Commit 5c7227bb authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_cropdetect: Unroll 3 & 4 bytes per sample loop

19484 -> 10266 decicycles
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 60e2c311
......@@ -81,6 +81,14 @@ static int checkline(void *ctx, const unsigned char *src, int stride, int len, i
break;
case 3:
case 4:
while (len >= 4) {
total += src[0] + src[1 ] + src[2 ]
+ src[ stride] + src[1+ stride] + src[2+ stride];
+ src[2*stride] + src[1+2*stride] + src[2+2*stride];
+ src[3*stride] + src[1+3*stride] + src[2+3*stride];
src += 4*stride;
len -= 4;
}
while (--len >= 0) {
total += src[0] + src[1] + src[2];
src += stride;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment