avfilter/select: larger pixel sad computation
authorClément Bœsch <u@pkh.me>
Thu, 14 Aug 2014 16:56:10 +0000 (18:56 +0200)
committerClément Bœsch <u@pkh.me>
Thu, 14 Aug 2014 17:11:13 +0000 (19:11 +0200)
libavfilter/f_select.c
tests/ref/fate/filter-metadata-scenedetect

index bb3eb65..546a940 100644 (file)
@@ -259,8 +259,8 @@ static double get_scene_score(AVFilterContext *ctx, AVFrame *frame)
         const int p1_linesize =       frame->linesize[0];
         const int p2_linesize = prev_picref->linesize[0];
 
-        for (y = 0; y < frame->height - 8; y += 8) {
-            for (x = 0; x < frame->width*3 - 8; x += 8) {
+        for (y = 0; y < frame->height - 7; y += 8) {
+            for (x = 0; x < frame->width*3 - 7; x += 8) {
                 sad += select->sad(p1 + x, p1_linesize, p2 + x, p2_linesize);
                 nb_sad += 8 * 8;
             }
index 4e70723..d04054a 100644 (file)
@@ -1,10 +1,10 @@
 pkt_pts=1620|tag:lavfi.scene_score=1.000000
-pkt_pts=4140|tag:lavfi.scene_score=0.876043
+pkt_pts=4140|tag:lavfi.scene_score=0.875036
 pkt_pts=5800|tag:lavfi.scene_score=1.000000
-pkt_pts=6720|tag:lavfi.scene_score=0.463259
+pkt_pts=6720|tag:lavfi.scene_score=0.461625
 pkt_pts=8160|tag:lavfi.scene_score=1.000000
 pkt_pts=9760|tag:lavfi.scene_score=1.000000
-pkt_pts=14080|tag:lavfi.scene_score=0.841420
+pkt_pts=14080|tag:lavfi.scene_score=0.838916
 pkt_pts=15700|tag:lavfi.scene_score=1.000000
-pkt_pts=18500|tag:lavfi.scene_score=0.471738
+pkt_pts=18500|tag:lavfi.scene_score=0.474948
 pkt_pts=21760|tag:lavfi.scene_score=1.000000