shithub: libvpx

Download patch

ref: 2100ad35572b6280170e3260eeaef347f0064bdc
parent: f497f8f71985dca5259ecd6349ef04b52c7dfbad
author: Angie Chiang <[email protected]>
date: Wed Dec 5 13:17:31 EST 2018

Implement get_full_mv()

Change-Id: Icde1b01ea7f64e2c43dcd039cc37fd306e43030f

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -5598,8 +5598,7 @@
           &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;
       }
--- a/vp9/encoder/vp9_mcomp.h
+++ b/vp9/encoder/vp9_mcomp.h
@@ -137,6 +137,12 @@
                                   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"