Browse Source

avfilter/vf_cropdetect: Unroll 1byte per sample loop

12807 -> 6336 decicycles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 11 years ago
parent
commit
60e2c3110a
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      libavfilter/vf_cropdetect.c

+ 6
- 0
libavfilter/vf_cropdetect.c View File

@@ -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;


Loading…
Cancel
Save