From ad8bad3f94c8f883ccf6d3ed238a9fe8805a852c Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Fri, 19 Nov 2021 17:51:46 +0200 Subject: [PATCH] [inter] Scale x and y correctly in fracmv_within_tile() --- src/search_inter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/search_inter.c b/src/search_inter.c index 587bfdae..8c51614b 100644 --- a/src/search_inter.c +++ b/src/search_inter.c @@ -162,8 +162,8 @@ static INLINE bool fracmv_within_tile(const inter_search_info_t *info, int x, in // TODO implement KVZ_MV_CONSTRAIN_FRAM and KVZ_MV_CONSTRAIN_TILE. const vector2d_t abs_mv = { - info->origin.x << INTERNAL_MV_PREC + x, - info->origin.y << INTERNAL_MV_PREC + y, + (info->origin.x << INTERNAL_MV_PREC) + x, + (info->origin.y << INTERNAL_MV_PREC) + y, }; // Check that both margin constraints are satisfied. @@ -1261,7 +1261,6 @@ static void search_pu_inter_ref(inter_search_info_t *info, cur_cu->inter.mv_ref[ref_list] = temp_ref_idx; vector2d_t mv = { 0, 0 }; - mv_t amvr_mv[2] = { 0, 0 }; // Take starting point for MV search from previous frame. // When temporal motion vector candidates are added, there is probably