[FFmpeg-cvslog] avcodec/snowenc: Fix used reference MV in fullpel iterative ME

Michael Niedermayer git at videolan.org
Sun May 10 01:18:03 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 10 00:57:06 2015 +0200| [db6d0a5bd2447b764d67bcd66741e8044a3d7c3f] | committer: Michael Niedermayer

avcodec/snowenc: Fix used reference MV in fullpel iterative ME

This very very slightly improves quality, no measurable speed change

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db6d0a5bd2447b764d67bcd66741e8044a3d7c3f
---

 libavcodec/snowenc.c               |   10 ++++++----
 tests/ref/vsynth/vsynth1-snow      |    6 +++---
 tests/ref/vsynth/vsynth1-snow-hpel |    6 +++---
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index a30c618..a8f4106 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1112,13 +1112,15 @@ static void iterative_me(SnowContext *s){
                     /* fullpel ME */
                     //FIXME avoid subpel interpolation / round to nearest integer
                     do{
+                        int newx = block->mx;
+                        int newy = block->my;
                         dia_change=0;
                         for(i=0; i<FFMAX(s->avctx->dia_size, 1); i++){
                             for(j=0; j<i; j++){
-                                dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my+(4*j), obmc_edged, &best_rd);
-                                dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my-(4*j), obmc_edged, &best_rd);
-                                dia_change |= check_block_inter(s, mb_x, mb_y, block->mx+4*(i-j), block->my-(4*j), obmc_edged, &best_rd);
-                                dia_change |= check_block_inter(s, mb_x, mb_y, block->mx-4*(i-j), block->my+(4*j), obmc_edged, &best_rd);
+                                dia_change |= check_block_inter(s, mb_x, mb_y, newx+4*(i-j), newy+(4*j), obmc_edged, &best_rd);
+                                dia_change |= check_block_inter(s, mb_x, mb_y, newx-4*(i-j), newy-(4*j), obmc_edged, &best_rd);
+                                dia_change |= check_block_inter(s, mb_x, mb_y, newx+4*(i-j), newy-(4*j), obmc_edged, &best_rd);
+                                dia_change |= check_block_inter(s, mb_x, mb_y, newx-4*(i-j), newy+(4*j), obmc_edged, &best_rd);
                             }
                         }
                     }while(dia_change);
diff --git a/tests/ref/vsynth/vsynth1-snow b/tests/ref/vsynth/vsynth1-snow
index 2f0f582..24c4167 100644
--- a/tests/ref/vsynth/vsynth1-snow
+++ b/tests/ref/vsynth/vsynth1-snow
@@ -1,4 +1,4 @@
-e4de85f539ef50b08d2a1dc7e57c7f49 *tests/data/fate/vsynth1-snow.avi
-136080 tests/data/fate/vsynth1-snow.avi
-91021b7d6d7908648fe78cc1975af8c4 *tests/data/fate/vsynth1-snow.out.rawvideo
+61915927233f94db766dd968e750d6a8 *tests/data/fate/vsynth1-snow.avi
+136324 tests/data/fate/vsynth1-snow.avi
+443a1fbdfea490453e790b7e99c0c8df *tests/data/fate/vsynth1-snow.out.rawvideo
 stddev:   22.77 PSNR: 20.98 MAXDIFF:  172 bytes:  7603200/  7603200
diff --git a/tests/ref/vsynth/vsynth1-snow-hpel b/tests/ref/vsynth/vsynth1-snow-hpel
index 2d3401c..1c0691e 100644
--- a/tests/ref/vsynth/vsynth1-snow-hpel
+++ b/tests/ref/vsynth/vsynth1-snow-hpel
@@ -1,4 +1,4 @@
-a9e99877f757a99816fd82461d047812 *tests/data/fate/vsynth1-snow-hpel.avi
-138704 tests/data/fate/vsynth1-snow-hpel.avi
-d6845c8f1310e041afdcebc6bbfc449b *tests/data/fate/vsynth1-snow-hpel.out.rawvideo
+a49202654daa09408565be55b2a18010 *tests/data/fate/vsynth1-snow-hpel.avi
+138684 tests/data/fate/vsynth1-snow-hpel.avi
+00a7d96a4829e4babbe496bb0d1a1cdc *tests/data/fate/vsynth1-snow-hpel.out.rawvideo
 stddev:   22.74 PSNR: 20.99 MAXDIFF:  171 bytes:  7603200/  7603200



More information about the ffmpeg-cvslog mailing list