[FFmpeg-cvslog] avcodec/motion_est_template: Fix map cache use in qpel_motion_search()

Michael Niedermayer git at videolan.org
Thu Mar 17 17:00:19 CET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Mar 17 16:10:12 2016 +0100| [83df0a84a99d8291e5e1c5f7e2289cbd89107881] | committer: Michael Niedermayer

avcodec/motion_est_template: Fix map cache use in qpel_motion_search()

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/motion_est_template.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 327a24b..9f6b2c2 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -299,7 +299,7 @@ static int qpel_motion_search(MpegEncContext * s,
             const int cy2= b + t - 2*c;
             int cxy;
 
-            if(map[(index-(1<<ME_MAP_SHIFT)-1)&(ME_MAP_SIZE-1)] == (my<<ME_MAP_MV_BITS) + mx + map_generation && 0){ //FIXME
+            if(map[(index-(1<<ME_MAP_SHIFT)-1)&(ME_MAP_SIZE-1)] == ((my-1)<<ME_MAP_MV_BITS) + (mx-1) + map_generation){
                 tl= score_map[(index-(1<<ME_MAP_SHIFT)-1)&(ME_MAP_SIZE-1)];
             }else{
                 tl= cmp(s, mx-1, my-1, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);//FIXME wrong if chroma me is different



More information about the ffmpeg-cvslog mailing list