]> granicus.if.org Git - libvpx/commitdiff
put refmvselection under experiment
authorYaowu Xu <yaowu@google.com>
Tue, 12 Mar 2013 23:49:15 +0000 (16:49 -0700)
committerYaowu Xu <yaowu@google.com>
Wed, 13 Mar 2013 17:40:31 +0000 (10:40 -0700)
and turn the experiment off by default.

Change-Id: If9e684aa6cc49eacd39f36645a110a447e38d2de

configure
vp9/common/vp9_findnearmv.c

index 5c8dc8e8430823e2e9b87d7db86416defdf4ef18..35801e2004eac082dbc4f1b783792becc5a049f7 100755 (executable)
--- a/configure
+++ b/configure
@@ -246,6 +246,7 @@ EXPERIMENT_LIST="
     enable_6tap
     abovesprefmv
     code_nonzerocount
+    useselectrefmv
 "
 CONFIG_LIST="
     external_build
index 8409885a0655d3051c0b1d18d26ce4bd2880bfab..f6d6932cc5ba5b39a6b78480a1e3bad20ec58b6f 100644 (file)
@@ -118,10 +118,12 @@ unsigned int vp9_sub_pixel_variance2x16_c(const uint8_t *src_ptr,
   return vp9_variance2x16_c(temp2, 2, dst_ptr, dst_pixels_per_line, sse);
 }
 
+#if CONFIG_USESELECTREFMV
 /* check a list of motion vectors by sad score using a number rows of pixels
  * above and a number cols of pixels in the left to select the one with best
  * score to use as ref motion vector
  */
+
 void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
                            uint8_t *ref_y_buffer,
                            int ref_y_stride,
@@ -298,3 +300,20 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
   // Copy back the re-ordered mv list
   vpx_memcpy(mvlist, sorted_mvs, sizeof(sorted_mvs));
 }
+#else
+void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
+                           uint8_t *ref_y_buffer,
+                           int ref_y_stride,
+                           int_mv *mvlist,
+                           int_mv *nearest,
+                           int_mv *near) {
+  int i;
+  // Make sure all the candidates are properly clamped etc
+  for (i = 0; i < MAX_MV_REF_CANDIDATES; ++i) {
+    lower_mv_precision(&mvlist[i], xd->allow_high_precision_mv);
+    clamp_mv2(&mvlist[i], xd);
+  }
+  *nearest = mvlist[0];
+  *near = mvlist[1];
+}
+#endif