1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_cropdetect: Unroll 1byte per sample loop

12807 -> 6336 decicycles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-12-30 02:31:10 +01:00
parent 17dc83ab5e
commit 60e2c3110a

View File

@ -68,6 +68,12 @@ static int checkline(void *ctx, const unsigned char *src, int stride, int len, i
switch (bpp) { switch (bpp) {
case 1: 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) { while (--len >= 0) {
total += src[0]; total += src[0];
src += stride; src += stride;