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:
parent
17dc83ab5e
commit
60e2c3110a
@ -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…
Reference in New Issue
Block a user