diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-30 02:31:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-30 02:32:00 +0100 |
commit | 60e2c3110ae338fb7ea545f317f952df5acbb349 (patch) | |
tree | 06311615fe3cafa56180c3c6c9806b739ca1707e /libavfilter/vf_cropdetect.c | |
parent | 17dc83ab5e69dda27bc97f41c1301b9368d52670 (diff) | |
download | ffmpeg-60e2c3110ae338fb7ea545f317f952df5acbb349.tar.gz |
avfilter/vf_cropdetect: Unroll 1byte per sample loop
12807 -> 6336 decicycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_cropdetect.c')
-rw-r--r-- | libavfilter/vf_cropdetect.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c index fb7be8e240..5b59dbd5dc 100644 --- a/libavfilter/vf_cropdetect.c +++ b/libavfilter/vf_cropdetect.c @@ -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; |