shithub: libvpx

Download patch

ref: 741fbe96562ab91f617069e80e45ecb72a2349e2
parent: f7dab600961bbf1ec0475512f1d009b7b0634ebf
author: Yaowu Xu <yaowu@google.com>
date: Mon Jan 14 09:39:54 EST 2013

Merge experiment "subpelrefmv"

Change-Id: Iac7f3d108863552b850c92c727e00c95571c9e96

--- a/configure
+++ b/configure
@@ -240,7 +240,6 @@
     csm
     comp_intra_pred
     lossless
-    subpelrefmv
     new_mvref
     implicit_segmentation
     newbintramodes
--- a/vp9/common/vp9_findnearmv.c
+++ b/vp9/common/vp9_findnearmv.c
@@ -55,7 +55,7 @@
   return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 3);
 }
 
-#if CONFIG_SUBPELREFMV
+
 unsigned int vp9_variance2x16_c(const uint8_t *src_ptr,
                                 const int  source_stride,
                                 const uint8_t *ref_ptr,
@@ -117,7 +117,6 @@
 
   return vp9_variance2x16_c(temp2, 2, dst_ptr, dst_pixels_per_line, sse);
 }
-#endif
 
 /* 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
@@ -137,9 +136,7 @@
   uint8_t *left_ref;
 #endif
   unsigned int score;
-#if CONFIG_SUBPELREFMV
   unsigned int sse;
-#endif
   unsigned int ref_scores[MAX_MV_REF_CANDIDATES] = {0};
   int_mv sorted_mvs[MAX_MV_REF_CANDIDATES];
   int zero_seen = FALSE;
@@ -148,7 +145,6 @@
   nearest->as_int = near->as_int = 0;
   vpx_memset(sorted_mvs, 0, sizeof(sorted_mvs));
 
-#if CONFIG_SUBPELREFMV
   above_src = xd->dst.y_buffer - xd->dst.y_stride * 2;
   above_ref = ref_y_buffer - ref_y_stride * 2;
 #if CONFIG_ABOVESPREFMV
@@ -158,17 +154,6 @@
   left_src  = xd->dst.y_buffer - 2;
   left_ref  = ref_y_buffer - 2;
 #endif
-#else
-  above_src = xd->dst.y_buffer - xd->dst.y_stride * 3;
-  above_ref = ref_y_buffer - ref_y_stride * 3;
-#if CONFIG_ABOVESPREFMV
-  above_src -= 4;
-  above_ref -= 4;
-#else
-  left_src  = xd->dst.y_buffer - 3;
-  left_ref  = ref_y_buffer - 3;
-#endif
-#endif
 
   // Limit search to the predicted best few candidates
   for(i = 0; i < MAX_MV_REF_CANDIDATES; ++i) {
@@ -199,7 +184,6 @@
              xd->mb_to_bottom_edge + RIGHT_BOTTOM_MARGIN);
 #endif
 
-#if CONFIG_SUBPELREFMV
     row_offset = this_mv.as_mv.row >> 3;
     col_offset = this_mv.as_mv.col >> 3;
     offset = ref_y_stride * row_offset + col_offset;
@@ -266,50 +250,6 @@
         score += sse;
       }
     }
-#endif
-#else
-    row_offset = (this_mv.as_mv.row > 0) ?
-      ((this_mv.as_mv.row + 3) >> 3):((this_mv.as_mv.row + 4) >> 3);
-    col_offset = (this_mv.as_mv.col > 0) ?
-      ((this_mv.as_mv.col + 3) >> 3):((this_mv.as_mv.col + 4) >> 3);
-    offset = ref_y_stride * row_offset + col_offset;
-    score = 0;
-    if (xd->up_available) {
-      score += vp9_sad16x3(above_src, xd->dst.y_stride,
-                           above_ref + offset, ref_y_stride);
-      if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) {
-        score += vp9_sad16x3(above_src + 16, xd->dst.y_stride,
-                             above_ref + offset + 16, ref_y_stride);
-      }
-      if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB64X64) {
-        score += vp9_sad16x3(above_src + 32, xd->dst.y_stride,
-                             above_ref + offset + 32, ref_y_stride);
-        score += vp9_sad16x3(above_src + 48, xd->dst.y_stride,
-                             above_ref + offset + 48, ref_y_stride);
-      }
-    }
-#if !CONFIG_ABOVESPREFMV
-    if (xd->left_available) {
-      score += vp9_sad3x16(left_src, xd->dst.y_stride,
-                           left_ref + offset, ref_y_stride);
-      if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB32X32) {
-        score += vp9_sad3x16(left_src + xd->dst.y_stride * 16,
-                             xd->dst.y_stride,
-                             left_ref + offset + ref_y_stride * 16,
-                             ref_y_stride);
-      }
-      if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB64X64) {
-        score += vp9_sad3x16(left_src + xd->dst.y_stride * 32,
-                             xd->dst.y_stride,
-                             left_ref + offset + ref_y_stride * 32,
-                             ref_y_stride);
-        score += vp9_sad3x16(left_src + xd->dst.y_stride * 48,
-                             xd->dst.y_stride,
-                             left_ref + offset + ref_y_stride * 48,
-                             ref_y_stride);
-      }
-    }
-#endif
 #endif
     // Add the entry to our list and then resort the list on score.
     ref_scores[i] = score;
--- a/vp9/common/vp9_rtcd_defs.sh
+++ b/vp9/common/vp9_rtcd_defs.sh
@@ -278,10 +278,8 @@
 prototype unsigned int vp9_sad3x16 "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int ref_stride"
 specialize vp9_sad3x16 sse2
 
-if [ "$CONFIG_SUBPELREFMV" = "yes" ]; then
 prototype unsigned int vp9_sub_pixel_variance16x2 "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int Refstride, unsigned int *sse"
 specialize vp9_sub_pixel_variance16x2 sse2
-fi
 
 #
 # Sub Pixel Filters
--- a/vp9/vp9_common.mk
+++ b/vp9/vp9_common.mk
@@ -96,9 +96,7 @@
 VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_subpixel_sse2.asm
 VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_loopfilter_sse2.asm
 VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_iwalsh_sse2.asm
-ifeq ($(CONFIG_SUBPELREFMV),yes)
 VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_subpixel_variance_sse2.c
-endif
 VP9_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/vp9_subpixel_8t_ssse3.asm
 VP9_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/vp9_subpixel_ssse3.asm
 ifeq ($(CONFIG_POSTPROC),yes)
--