summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2013-03-12 16:49:15 -0700
committerYaowu Xu <yaowu@google.com>2013-03-13 10:40:31 -0700
commit88862c0454dd1c39788c9c397bd57f2ecb7f55af (patch)
treee64a1828853c027b589e0e9075cd7deab7d863f2 /vp9/common
parent005552639b276709868a4a0f86f27a737c7c6917 (diff)
downloadlibvpx-88862c0454dd1c39788c9c397bd57f2ecb7f55af.tar
libvpx-88862c0454dd1c39788c9c397bd57f2ecb7f55af.tar.gz
libvpx-88862c0454dd1c39788c9c397bd57f2ecb7f55af.tar.bz2
libvpx-88862c0454dd1c39788c9c397bd57f2ecb7f55af.zip
put refmvselection under experiment
and turn the experiment off by default. Change-Id: If9e684aa6cc49eacd39f36645a110a447e38d2de
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_findnearmv.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/vp9/common/vp9_findnearmv.c b/vp9/common/vp9_findnearmv.c
index 8409885a0..f6d6932cc 100644
--- a/vp9/common/vp9_findnearmv.c
+++ b/vp9/common/vp9_findnearmv.c
@@ -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