]> granicus.if.org Git - libvpx/commitdiff
Change initializations of variables with type "int_mv"
authorYaowu Xu <yaowu@google.com>
Fri, 6 May 2016 01:31:59 +0000 (18:31 -0700)
committerYaowu Xu <yaowu@google.com>
Fri, 6 May 2016 16:52:12 +0000 (16:52 +0000)
This is to make MSVC happy and eliminate build errors.

Change-Id: Ic81e7c7516923913e6e7a652b691953e4a1af8aa

vp10/common/mvref_common.c
vp10/encoder/rdopt.c

index 3023589802188e56eddebd462941affa99fe6062..17d539ff322650a03b9699b41eb32fd2c5d869cb 100644 (file)
@@ -92,13 +92,12 @@ static uint8_t add_ref_mv_candidate(const MODE_INFO *const candidate_mi,
     // compound reference frame
     if (candidate->ref_frame[0] == rf[0] &&
         candidate->ref_frame[1] == rf[1]) {
-      int_mv this_refmv[2] = {
-          get_sub_block_mv(candidate_mi, 0, col, block),
-          get_sub_block_mv(candidate_mi, 1, col, block)
-      };
+      int_mv this_refmv[2];
 
-      for (ref = 0; ref < 2; ++ref)
+      for (ref = 0; ref < 2; ++ref) {
+        this_refmv[ref] = get_sub_block_mv(candidate_mi, ref, col, block);
         lower_mv_precision(&this_refmv[ref].as_mv, use_hp);
+      }
 
       for (index = 0; index < *refmv_count; ++index)
         if ((ref_mv_stack[index].this_mv.as_int == this_refmv[0].as_int) &&
index 87d61737b5643e3b423a6e990995c403aa157d8c..c6b593282069584a6680f483aa7d6a2207bf1337 100644 (file)
@@ -8955,16 +8955,17 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
       else if (best_mbmode.mv[0].as_int == 0)
         best_mbmode.mode = ZEROMV;
     } else {
-      int_mv nearestmv[2] = { frame_mv[NEARESTMV][refs[0]],
-                              frame_mv[NEARESTMV][refs[1]] };
-      int_mv nearmv[2] = { frame_mv[NEARMV][refs[0]],
-                           frame_mv[NEARMV][refs[1]] };
+      int_mv nearestmv[2];
+      int_mv nearmv[2];
 
 #if CONFIG_EXT_INTER
       if (mbmi_ext->ref_mv_count[rf_type] > 1) {
-         nearmv[0] = mbmi_ext->ref_mv_stack[rf_type][1].this_mv;
-         nearmv[1] = mbmi_ext->ref_mv_stack[rf_type][1].comp_mv;
-       }
+        nearmv[0] = mbmi_ext->ref_mv_stack[rf_type][1].this_mv;
+        nearmv[1] = mbmi_ext->ref_mv_stack[rf_type][1].comp_mv;
+      } else {
+        nearmv[0] = frame_mv[NEARMV][refs[0]];
+        nearmv[1] = frame_mv[NEARMV][refs[1]];
+      }
 #else
       int i;
       int ref_set = (mbmi_ext->ref_mv_count[rf_type] >= 2) ?
@@ -8981,10 +8982,12 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
         }
       }
 #endif
-
       if (mbmi_ext->ref_mv_count[rf_type] >= 1) {
         nearestmv[0] = mbmi_ext->ref_mv_stack[rf_type][0].this_mv;
         nearestmv[1] = mbmi_ext->ref_mv_stack[rf_type][0].comp_mv;
+      } else {
+        nearestmv[0] = frame_mv[NEARESTMV][refs[0]];
+        nearestmv[1] = frame_mv[NEARESTMV][refs[1]];
       }
 
       if (nearestmv[0].as_int == best_mbmode.mv[0].as_int &&