From: Angie Chiang Date: Thu, 6 Dec 2018 02:17:31 +0000 (-0800) Subject: Implement get_full_mv() X-Git-Tag: v1.8.0~93^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2100ad35572b6280170e3260eeaef347f0064bdc;p=libvpx Implement get_full_mv() Change-Id: Icde1b01ea7f64e2c43dcd039cc37fd306e43030f --- diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 96111a7ac..425db009e 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -5598,8 +5598,7 @@ static void prepare_nb_full_mvs(const TplDepFrame *tpl_frame, int mi_row, &tpl_frame ->tpl_stats_ptr[(mi_row + r) * tpl_frame->stride + mi_col + c]; if (tpl_ptr->ready[rf_idx]) { - nb_full_mvs[i].as_mv.row = tpl_ptr->mv_arr[rf_idx].as_mv.row >> 3; - nb_full_mvs[i].as_mv.col = tpl_ptr->mv_arr[rf_idx].as_mv.col >> 3; + nb_full_mvs[i].as_mv = get_full_mv(&tpl_ptr->mv_arr[rf_idx].as_mv); } else { nb_full_mvs[i].as_int = INVALID_MV; } diff --git a/vp9/encoder/vp9_mcomp.h b/vp9/encoder/vp9_mcomp.h index 0ac76e30d..6d89fdfdd 100644 --- a/vp9/encoder/vp9_mcomp.h +++ b/vp9/encoder/vp9_mcomp.h @@ -137,6 +137,12 @@ double vp9_full_pixel_diamond_new(const struct VP9_COMP *cpi, MACROBLOCK *x, double *best_mv_cost); double vp9_nb_mvs_inconsistency(const MV *mv, const int_mv *nb_mvs, int mv_num); +static INLINE MV get_full_mv(const MV *mv) { + MV out_mv; + out_mv.row = mv->row >> 3; + out_mv.col = mv->col >> 3; + return out_mv; +} #endif // CONFIG_NON_GREEDY_MV #ifdef __cplusplus } // extern "C"