summaryrefslogtreecommitdiff
path: root/libavcodec/motion_est_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-03-17 16:10:12 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-03-17 16:59:37 +0100
commit83df0a84a99d8291e5e1c5f7e2289cbd89107881 (patch)
tree90fb0224f2ec0e719f4dd7dc0a32e8e94bb6a244 /libavcodec/motion_est_template.c
parent7660c135a30e4da8e833e0d563e83002c46e0594 (diff)
downloadffmpeg-83df0a84a99d8291e5e1c5f7e2289cbd89107881.tar.gz
avcodec/motion_est_template: Fix map cache use in qpel_motion_search()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/motion_est_template.c')
-rw-r--r--libavcodec/motion_est_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 327a24b164..9f6b2c26fc 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