Commit 60e2c311 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_cropdetect: Unroll 1byte per sample loop

12807 -> 6336 decicycles
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 17dc83ab
......@@ -68,6 +68,12 @@ static int checkline(void *ctx, const unsigned char *src, int stride, int len, i
switch (bpp) {
case 1:
while (len >= 8) {
total += src[ 0] + src[ stride] + src[2*stride] + src[3*stride]
+ src[4*stride] + src[5*stride] + src[6*stride] + src[7*stride];
src += 8*stride;
len -= 8;
}
while (--len >= 0) {
total += src[0];
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