[FFmpeg-cvslog] lavfi/select/scene: use pointer increments instead of y*linesize.
Clément Bœsch
git at videolan.org
Sun Oct 14 02:21:20 CEST 2012
ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Sun Oct 14 02:09:05 2012 +0200| [096d96ffda8f4531795abc367d1974289a44fec8] | committer: Clément Bœsch
lavfi/select/scene: use pointer increments instead of y*linesize.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=096d96ffda8f4531795abc367d1974289a44fec8
---
libavfilter/vf_select.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c
index b0c3cb2..7cb5aae 100644
--- a/libavfilter/vf_select.c
+++ b/libavfilter/vf_select.c
@@ -213,12 +213,12 @@ static double get_scene_score(AVFilterContext *ctx, AVFilterBufferRef *picref)
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 + y * linesize + x,
- p2 + y * linesize + x,
+ sad += select->c.sad[1](select, p1 + x, p2 + x,
linesize, 8);
nb_sad += 8 * 8;
}
+ p1 += 8 * linesize;
+ p2 += 8 * linesize;
}
emms_c();
mafd = nb_sad ? sad / nb_sad : 0;
More information about the ffmpeg-cvslog
mailing list