]> granicus.if.org Git - libvpx/commitdiff
Implement get_full_mv()
authorAngie Chiang <angiebird@google.com>
Thu, 6 Dec 2018 02:17:31 +0000 (18:17 -0800)
committerAngie Chiang <angiebird@google.com>
Fri, 7 Dec 2018 00:00:44 +0000 (16:00 -0800)
Change-Id: Icde1b01ea7f64e2c43dcd039cc37fd306e43030f

vp9/encoder/vp9_encoder.c
vp9/encoder/vp9_mcomp.h

index 96111a7acd026ee7ad85b8464ff24e9d60001c3b..425db009eff918cd1cc2ad72ae2a081c1758fdd0 100644 (file)
@@ -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;
       }
index 0ac76e30d9f655ce93f300b8f3b91f925636a2ea..6d89fdfddf202c1bc6795810d7ffbef65b7cd833 100644 (file)
@@ -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"