merge full pixel refmv experiment
authorYaowu Xu <yaowu@google.com>
Wed, 7 Nov 2012 18:41:04 +0000 (10:41 -0800)
committerYaowu Xu <yaowu@google.com>
Wed, 7 Nov 2012 18:52:45 +0000 (10:52 -0800)
Change-Id: Ib39ad47a7d188f3b45416937b7eeb28c3e79b74c

14 files changed:
configure
vp9/common/blockd.h
vp9/common/findnearmv.c
vp9/common/findnearmv.h
vp9/common/mvref_common.c
vp9/common/mvref_common.h
vp9/common/rtcd_defs.sh
vp9/common/x86/sadmxn_x86.c
vp9/decoder/decodemv.c
vp9/encoder/bitstream.c
vp9/encoder/block.h
vp9/encoder/encodeframe.c
vp9/encoder/onyx_if.c
vp9/encoder/rdopt.c

index 6a3044c..a9649c6 100755 (executable)
--- a/configure
+++ b/configure
@@ -221,7 +221,6 @@ EXPERIMENT_LIST="
     superblocks
     pred_filter
     lossless
-    newbestrefmv
     subpelrefmv
     new_mvref
     implicit_segmentation
index 1014c80..9d5eedc 100644 (file)
@@ -44,9 +44,7 @@ void vpx_log(const char *format, ...);
 /* Segment Feature Masks */
 #define SEGMENT_DELTADATA   0
 #define SEGMENT_ABSDATA     1
-#if CONFIG_NEWBESTREFMV || CONFIG_NEW_MVREF
 #define MAX_MV_REFS 19
-#endif
 
 typedef struct {
   int r, c;
@@ -216,9 +214,7 @@ typedef struct {
   MV_REFERENCE_FRAME ref_frame, second_ref_frame;
   TX_SIZE txfm_size;
   int_mv mv[2]; // for each reference frame used
-#if CONFIG_NEWBESTREFMV || CONFIG_NEW_MVREF
   int_mv ref_mvs[MAX_REF_FRAMES][MAX_MV_REFS];
-#endif
 
   SPLITMV_PARTITIONING_TYPE partitioning;
   unsigned char mb_skip_coeff;                                /* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */
index 52cf07b..cc560cf 100644 (file)
@@ -168,7 +168,6 @@ vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
   return p;
 }
 
-#if CONFIG_NEWBESTREFMV
 #define SP(x) (((x) & 7) << 1)
 unsigned int vp9_sad3x16_c(
   const unsigned char *src_ptr,
@@ -394,5 +393,3 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
   // Copy back the re-ordered mv list
   vpx_memcpy(mvlist, sorted_mvs, sizeof(sorted_mvs));
 }
-
-#endif  // CONFIG_NEWBESTREFMV
index 3cba90d..c53575e 100644 (file)
@@ -18,7 +18,6 @@
 #include "treecoder.h"
 #include "onyxc_int.h"
 
-#if CONFIG_NEWBESTREFMV
 /* 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
@@ -30,7 +29,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
                            int_mv *best_mv,
                            int_mv *nearest,
                            int_mv *near);
-#endif
 
 static void mv_bias(int refmb_ref_frame_sign_bias, int refframe, int_mv *mvp, const int *ref_frame_sign_bias) {
   MV xmv;
index 7fd48b9..d6faa13 100644 (file)
@@ -10,8 +10,6 @@
 
 #include "mvref_common.h"
 
-#if CONFIG_NEWBESTREFMV
-
 #define MVREF_NEIGHBOURS 8
 static int mv_ref_search[MVREF_NEIGHBOURS][2] =
   { {0,-1},{-1,0},{-1,-1},{0,-2},{-2,0},{-1,-2},{-2,-1},{-2,-2} };
@@ -338,5 +336,3 @@ void vp9_find_mv_refs(
   // Copy over the candidate list.
   vpx_memcpy(mv_ref_list, candidate_mvs, sizeof(candidate_mvs));
 }
-
-#endif
index 7f396e4..0605040 100644 (file)
@@ -11,8 +11,6 @@
 #include "onyxc_int.h"
 #include "blockd.h"
 
-// MR reference entropy header file.
-#if CONFIG_NEWBESTREFMV
 
 #ifndef __INC_MVREF_COMMON_H
 #define __INC_MVREF_COMMON_H
@@ -28,4 +26,3 @@ void vp9_find_mv_refs(
 
 #endif
 
-#endif
index ca3844c..8964fa2 100644 (file)
@@ -227,13 +227,11 @@ vp9_loop_filter_simple_bh_neon=vp9_loop_filter_bhs_neon
 #
 # sad 16x3, 3x16
 #
-if [ "$CONFIG_NEWBESTREFMV" = "yes" ]; then
 prototype unsigned int vp9_sad16x3 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad"
 specialize vp9_sad16x3 sse2
 
 prototype unsigned int vp9_sad3x16 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad"
 specialize vp9_sad3x16 sse2
-fi
 
 #
 # Encoder functions below this point.
index 71fa320..b12680d 100644 (file)
@@ -13,9 +13,6 @@
 #include "./vpx_rtcd.h"
 
 
-#if CONFIG_NEWBESTREFMV
-
-
 #if HAVE_SSE2
 unsigned int vp9_sad16x3_sse2(
   const unsigned char *src_ptr,
@@ -89,4 +86,3 @@ unsigned int vp9_sad3x16_sse2(
 #endif
 
 
-#endif  // CONFIG_NEWBESTREFMV
index a299b5d..5013462 100644 (file)
@@ -712,17 +712,13 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
     int_mv nearest_second, nearby_second, best_mv_second;
     vp9_prob mv_ref_p [VP9_MVREFS - 1];
 
-#if CONFIG_NEWBESTREFMV
     int recon_y_stride, recon_yoffset;
     int recon_uv_stride, recon_uvoffset;
-#endif
 
     vp9_find_near_mvs(xd, mi,
                       prev_mi,
                       &nearest, &nearby, &best_mv, rct,
                       mbmi->ref_frame, cm->ref_frame_sign_bias);
-
-#if CONFIG_NEWBESTREFMV
     {
       int ref_fb_idx;
       MV_REFERENCE_FRAME ref_frame = mbmi->ref_frame;
@@ -755,7 +751,6 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
                             mbmi->ref_mvs[ref_frame],
                             &best_mv, &nearest, &nearby);
     }
-#endif
 
     vp9_mv_ref_probs(&pbi->common, mv_ref_p, rct);
 
@@ -808,7 +803,6 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
       mbmi->second_ref_frame = mbmi->ref_frame + 1;
       if (mbmi->second_ref_frame == 4)
         mbmi->second_ref_frame = 1;
-#if CONFIG_NEWBESTREFMV
       if (mbmi->second_ref_frame) {
         int second_ref_fb_idx;
         /* Select the appropriate reference frame for this MB */
@@ -845,13 +839,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
                               &nearest_second,
                               &nearby_second);
       }
-#else
-      vp9_find_near_mvs(xd, mi, prev_mi,
-                        &nearest_second, &nearby_second, &best_mv_second,
-                        rct,
-                        mbmi->second_ref_frame,
-                        pbi->common.ref_frame_sign_bias);
-#endif
+
     } else {
       mbmi->second_ref_frame = 0;
     }
index b3ed6cd..b7bc99c 100644 (file)
 #include "vp9/common/entropy.h"
 #include "vp9/encoder/encodemv.h"
 #include "vp9/common/entropymv.h"
-
-#if CONFIG_NEWBESTREFMV
 #include "vp9/common/mvref_common.h"
-#endif
 
 #if defined(SECTIONBITS_OUTPUT)
 unsigned __int64 Sectionbits[500];
@@ -1059,9 +1056,8 @@ static void pack_inter_mode_mvs(VP9_COMP *const cpi, vp9_writer *const bc) {
             // Only used for context just now and soon to be deprecated.
             vp9_find_near_mvs(xd, m, prev_m, &n1, &n2, &best_mv, ct,
                               rf, cpi->common.ref_frame_sign_bias);
-#if CONFIG_NEWBESTREFMV
+
             best_mv.as_int = mi->ref_mvs[rf][0].as_int;
-#endif
 
             vp9_mv_ref_probs(&cpi->common, mv_ref_p, ct);
 
@@ -1121,10 +1117,8 @@ static void pack_inter_mode_mvs(VP9_COMP *const cpi, vp9_writer *const bc) {
                               mi->second_ref_frame,
                               cpi->common.ref_frame_sign_bias);
 
-#if CONFIG_NEWBESTREFMV
             best_second_mv.as_int =
               mi->ref_mvs[mi->second_ref_frame][0].as_int;
-#endif
           }
 
           // does the feature use compound prediction or not
index 43c249c..3b3794c 100644 (file)
@@ -70,9 +70,7 @@ typedef struct {
   PARTITION_INFO partition_info;
   int_mv best_ref_mv;
   int_mv second_best_ref_mv;
-#if CONFIG_NEWBESTREFMV || CONFIG_NEW_MVREF
   int_mv ref_mvs[MAX_REF_FRAMES][MAX_MV_REFS];
-#endif
   int rate;
   int distortion;
   int64_t intra_error;
index 94fa2f2..703b49e 100644 (file)
 #include "vp9/common/subpixel.h"
 #include "vpx_ports/vpx_timer.h"
 #include "vp9/common/pred_common.h"
-
-#define DBG_PRNT_SEGMAP 0
-#if CONFIG_NEWBESTREFMV
 #include "vp9/common/mvref_common.h"
-#endif
 
+#define DBG_PRNT_SEGMAP 0
 
 #if CONFIG_RUNTIME_CPU_DETECT
 #define RTCD(x)     &cpi->common.rtcd.x
@@ -1959,13 +1956,10 @@ static void encode_intra_macro_block(VP9_COMP *cpi, MACROBLOCK *x,
     } else {
       mbmi->txfm_size = TX_4X4;
     }
-  }
-#if CONFIG_NEWBESTREFMV
-  else
+  } else {
     vp9_tokenize_mb(cpi, &x->e_mbd, t, 1);
-#endif
+  }
 }
-
 static void encode_inter_macroblock(VP9_COMP *cpi, MACROBLOCK *x,
                                     TOKENEXTRA **t, int recon_yoffset,
                                     int recon_uvoffset, int output_enabled) {
index 58b2076..bd8e6d4 100644 (file)
 #include "bitstream.h"
 #include "vp9/encoder/picklpf.h"
 #include "ratectrl.h"
-
-#if CONFIG_NEWBESTREFMV
 #include "vp9/common/mvref_common.h"
-#endif
+
 
 #if ARCH_ARM
 #include "vpx_ports/arm.h"
index ca8a3ba..19b96af 100644 (file)
@@ -41,9 +41,7 @@
 #include "vp9/common/pred_common.h"
 #include "vp9/common/entropy.h"
 #include "vpx_rtcd.h"
-#if CONFIG_NEWBESTREFMV
 #include "vp9/common/mvref_common.h"
-#endif
 
 #if CONFIG_RUNTIME_CPU_DETECT
 #define IF_RTCD(x)  (x)
@@ -3188,7 +3186,6 @@ static void setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
   MACROBLOCKD *xd = &x->e_mbd;
   MB_MODE_INFO * mbmi = &xd->mode_info_context->mbmi;
 
-
   vp9_find_near_mvs(xd, xd->mode_info_context,
                     xd->prev_mode_info_context,
                     &frame_nearest_mv[frame_type], &frame_near_mv[frame_type],
@@ -3199,7 +3196,6 @@ static void setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
   u_buffer[frame_type] = yv12->u_buffer + recon_uvoffset;
   v_buffer[frame_type] = yv12->v_buffer + recon_uvoffset;
 
-#if CONFIG_NEWBESTREFMV
   vp9_find_mv_refs(xd, xd->mode_info_context,
                    xd->prev_mode_info_context,
                    frame_type,
@@ -3212,7 +3208,6 @@ static void setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
                         &frame_best_ref_mv[frame_type],
                         &frame_nearest_mv[frame_type],
                         &frame_near_mv[frame_type]);
-#endif
 }
 
 static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,