shithub: libvpx

Download patch

ref: 0cedaa363187e7fbd42f513e6d1547dc385f38ed
parent: a879b4e6d425e7ec26e6ed9f0ef3e84575a891d4
author: Yaowu Xu <yaowu@google.com>
date: Wed Nov 7 05:41:04 EST 2012

merge full pixel refmv experiment

Change-Id: Ib39ad47a7d188f3b45416937b7eeb28c3e79b74c

--- a/configure
+++ b/configure
@@ -221,7 +221,6 @@
     superblocks
     pred_filter
     lossless
-    newbestrefmv
     subpelrefmv
     new_mvref
     implicit_segmentation
--- a/vp9/common/blockd.h
+++ b/vp9/common/blockd.h
@@ -44,9 +44,7 @@
 /* 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 @@
   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 */
--- a/vp9/common/findnearmv.c
+++ b/vp9/common/findnearmv.c
@@ -168,7 +168,6 @@
   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 @@
   // Copy back the re-ordered mv list
   vpx_memcpy(mvlist, sorted_mvs, sizeof(sorted_mvs));
 }
-
-#endif  // CONFIG_NEWBESTREFMV
--- a/vp9/common/findnearmv.h
+++ b/vp9/common/findnearmv.h
@@ -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 @@
                            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;
--- a/vp9/common/mvref_common.c
+++ b/vp9/common/mvref_common.c
@@ -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 @@
   // Copy over the candidate list.
   vpx_memcpy(mv_ref_list, candidate_mvs, sizeof(candidate_mvs));
 }
-
-#endif
--- a/vp9/common/mvref_common.h
+++ b/vp9/common/mvref_common.h
@@ -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 @@
 
 #endif
 
-#endif
--- a/vp9/common/rtcd_defs.sh
+++ b/vp9/common/rtcd_defs.sh
@@ -227,13 +227,11 @@
 #
 # 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.
--- a/vp9/common/x86/sadmxn_x86.c
+++ b/vp9/common/x86/sadmxn_x86.c
@@ -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 @@
 #endif
 
 
-#endif  // CONFIG_NEWBESTREFMV
--- a/vp9/decoder/decodemv.c
+++ b/vp9/decoder/decodemv.c
@@ -712,17 +712,13 @@
     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 @@
                             mbmi->ref_mvs[ref_frame],
                             &best_mv, &nearest, &nearby);
     }
-#endif
 
     vp9_mv_ref_probs(&pbi->common, mv_ref_p, rct);
 
@@ -808,7 +803,6 @@
       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 @@
                               &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;
     }
--- a/vp9/encoder/bitstream.c
+++ b/vp9/encoder/bitstream.c
@@ -29,10 +29,7 @@
 #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 @@
             // 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 @@
                               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
--- a/vp9/encoder/block.h
+++ b/vp9/encoder/block.h
@@ -70,9 +70,7 @@
   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;
--- a/vp9/encoder/encodeframe.c
+++ b/vp9/encoder/encodeframe.c
@@ -36,13 +36,10 @@
 #include "vp9/common/subpixel.h"
 #include "vpx_ports/vpx_timer.h"
 #include "vp9/common/pred_common.h"
+#include "vp9/common/mvref_common.h"
 
 #define DBG_PRNT_SEGMAP 0
-#if CONFIG_NEWBESTREFMV
-#include "vp9/common/mvref_common.h"
-#endif
 
-
 #if CONFIG_RUNTIME_CPU_DETECT
 #define RTCD(x)     &cpi->common.rtcd.x
 #define IF_RTCD(x)  (x)
@@ -1959,13 +1956,10 @@
     } 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) {
--- a/vp9/encoder/onyx_if.c
+++ b/vp9/encoder/onyx_if.c
@@ -38,10 +38,8 @@
 #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"
--- a/vp9/encoder/rdopt.c
+++ b/vp9/encoder/rdopt.c
@@ -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 @@
   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 @@
   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 @@
                         &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,