[FFmpeg-devel] [PATCH 5/5] lavfi/select/scene: prefer 16B over 8 for SAD.
Clément Bœsch
ubitux at gmail.com
Sat Oct 13 18:31:46 CEST 2012
Potentially more ignored data, but doesn't seem to affect the results.
---
libavfilter/vf_select.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c
index baf96a1..c77d74f 100644
--- a/libavfilter/vf_select.c
+++ b/libavfilter/vf_select.c
@@ -211,12 +211,12 @@ static double get_scene_score(AVFilterContext *ctx, AVFilterBufferRef *picref)
uint8_t *p2 = prev_picref->data[0];
const int linesize = picref->linesize[0];
- for (y = 0; y < picref->video->h - 8; y += 8) {
- for (x = 0; x < picref->video->w*3 - 8; x += 8)
- sad += select->c.sad[1](select, p1 + x, p2 + x,
- linesize, 8);
- p1 += 8 * linesize;
- p2 += 8 * linesize;
+ for (y = 0; y < picref->video->h - 16; y += 16) {
+ for (x = 0; x < picref->video->w*3 - 16; x += 16)
+ sad += select->c.sad[0](select, p1 + x, p2 + x,
+ linesize, 16);
+ p1 += 16 * linesize;
+ p2 += 16 * linesize;
}
emms_c();
mafd = sad / (picref->video->h * picref->video->w * 3);
--
1.7.12.2
More information about the ffmpeg-devel
mailing list