From 761a7088ac9f027ac902c9bbfc0ac46f9417f592 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Wed, 20 Jan 2016 15:17:24 -0800 Subject: [PATCH] VP9_INTERP_EXTEND -> VPX_INTERP_EXTEND Change-Id: I375d565b9c90a40799b3fb6f968ac6e4b4d4f093 --- vp10/common/reconinter.h | 4 ++-- vp10/decoder/decodeframe.c | 8 ++++---- vp10/encoder/encodeframe.c | 8 ++++---- vp10/encoder/mcomp.h | 2 +- vp10/encoder/rdopt.c | 4 ++-- vp10/encoder/temporal_filter.c | 18 +++++++++--------- vpx_scale/yv12config.h | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/vp10/common/reconinter.h b/vp10/common/reconinter.h index 5678f473f..09d0cefcf 100644 --- a/vp10/common/reconinter.h +++ b/vp10/common/reconinter.h @@ -83,9 +83,9 @@ static INLINE MV clamp_mv_to_umv_border_sb(const MACROBLOCKD *xd, // If the MV points so far into the UMV border that no visible pixels // are used for reconstruction, the subpel part of the MV can be // discarded and the MV limited to 16 pixels with equivalent results. - const int spel_left = (VP9_INTERP_EXTEND + bw) << SUBPEL_BITS; + const int spel_left = (VPX_INTERP_EXTEND + bw) << SUBPEL_BITS; const int spel_right = spel_left - SUBPEL_SHIFTS; - const int spel_top = (VP9_INTERP_EXTEND + bh) << SUBPEL_BITS; + const int spel_top = (VPX_INTERP_EXTEND + bh) << SUBPEL_BITS; const int spel_bottom = spel_top - SUBPEL_SHIFTS; MV clamped_mv = { src_mv->row * (1 << (1 - ss_y)), diff --git a/vp10/decoder/decodeframe.c b/vp10/decoder/decodeframe.c index 1c3f18239..1ac7fd292 100644 --- a/vp10/decoder/decodeframe.c +++ b/vp10/decoder/decodeframe.c @@ -632,14 +632,14 @@ static void dec_build_inter_predictors(VP10Decoder *const pbi, MACROBLOCKD *xd, int x_pad = 0, y_pad = 0; if (subpel_x || (sf->x_step_q4 != SUBPEL_SHIFTS)) { - x0 -= VP9_INTERP_EXTEND - 1; - x1 += VP9_INTERP_EXTEND; + x0 -= VPX_INTERP_EXTEND - 1; + x1 += VPX_INTERP_EXTEND; x_pad = 1; } if (subpel_y || (sf->y_step_q4 != SUBPEL_SHIFTS)) { - y0 -= VP9_INTERP_EXTEND - 1; - y1 += VP9_INTERP_EXTEND; + y0 -= VPX_INTERP_EXTEND - 1; + y1 += VPX_INTERP_EXTEND; y_pad = 1; } diff --git a/vp10/encoder/encodeframe.c b/vp10/encoder/encodeframe.c index 26ce5a1eb..b0a64240e 100644 --- a/vp10/encoder/encodeframe.c +++ b/vp10/encoder/encodeframe.c @@ -203,10 +203,10 @@ static void set_offsets(VP10_COMP *cpi, const TileInfo *const tile, // Set up limit values for MV components. // Mv beyond the range do not produce new/different prediction block. - x->mv_row_min = -(((mi_row + mi_height) * MI_SIZE) + VP9_INTERP_EXTEND); - x->mv_col_min = -(((mi_col + mi_width) * MI_SIZE) + VP9_INTERP_EXTEND); - x->mv_row_max = (cm->mi_rows - mi_row) * MI_SIZE + VP9_INTERP_EXTEND; - x->mv_col_max = (cm->mi_cols - mi_col) * MI_SIZE + VP9_INTERP_EXTEND; + x->mv_row_min = -(((mi_row + mi_height) * MI_SIZE) + VPX_INTERP_EXTEND); + x->mv_col_min = -(((mi_col + mi_width) * MI_SIZE) + VPX_INTERP_EXTEND); + x->mv_row_max = (cm->mi_rows - mi_row) * MI_SIZE + VPX_INTERP_EXTEND; + x->mv_col_max = (cm->mi_cols - mi_col) * MI_SIZE + VPX_INTERP_EXTEND; // Set up distance of MB to edge of frame in 1/8th pel units. assert(!(mi_col & (mi_width - 1)) && !(mi_row & (mi_height - 1))); diff --git a/vp10/encoder/mcomp.h b/vp10/encoder/mcomp.h index 9ebf60794..75979819a 100644 --- a/vp10/encoder/mcomp.h +++ b/vp10/encoder/mcomp.h @@ -29,7 +29,7 @@ extern "C" { #define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1)) // Allowed motion vector pixel distance outside image border // for Block_16x16 -#define BORDER_MV_PIXELS_B16 (16 + VP9_INTERP_EXTEND) +#define BORDER_MV_PIXELS_B16 (16 + VPX_INTERP_EXTEND) // motion search site typedef struct search_site { diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c index 90a716d2c..f92f20ef2 100644 --- a/vp10/encoder/rdopt.c +++ b/vp10/encoder/rdopt.c @@ -2405,9 +2405,9 @@ static int discount_newmv_test(const VP10_COMP *cpi, (mode_mv[NEARMV][ref_frame].as_int == INVALID_MV))); } -#define LEFT_TOP_MARGIN ((VP9_ENC_BORDER_IN_PIXELS - VP9_INTERP_EXTEND) << 3) +#define LEFT_TOP_MARGIN ((VP9_ENC_BORDER_IN_PIXELS - VPX_INTERP_EXTEND) << 3) #define RIGHT_BOTTOM_MARGIN ((VP9_ENC_BORDER_IN_PIXELS -\ - VP9_INTERP_EXTEND) << 3) + VPX_INTERP_EXTEND) << 3) // TODO(jingning): this mv clamping function should be block size dependent. static INLINE void clamp_mv2(MV *mv, const MACROBLOCKD *xd) { diff --git a/vp10/encoder/temporal_filter.c b/vp10/encoder/temporal_filter.c index 5278d3b73..dfca11d75 100644 --- a/vp10/encoder/temporal_filter.c +++ b/vp10/encoder/temporal_filter.c @@ -316,16 +316,16 @@ static void temporal_filter_iterate_c(VP10_COMP *cpi, // L/A/G reference frames that have a border of 32 (VP9ENCBORDERINPIXELS) // A 6/8 tap filter is used for motion search. This requires 2 pixels // before and 3 pixels after. So the largest Y mv on a border would - // then be 16 - VP9_INTERP_EXTEND. The UV blocks are half the size of the + // then be 16 - VPX_INTERP_EXTEND. The UV blocks are half the size of the // Y and therefore only extended by 8. The largest mv that a UV block - // can support is 8 - VP9_INTERP_EXTEND. A UV mv is half of a Y mv. - // (16 - VP9_INTERP_EXTEND) >> 1 which is greater than - // 8 - VP9_INTERP_EXTEND. + // can support is 8 - VPX_INTERP_EXTEND. A UV mv is half of a Y mv. + // (16 - VPX_INTERP_EXTEND) >> 1 which is greater than + // 8 - VPX_INTERP_EXTEND. // To keep the mv in play for both Y and UV planes the max that it - // can be on a border is therefore 16 - (2*VP9_INTERP_EXTEND+1). - cpi->td.mb.mv_row_min = -((mb_row * 16) + (17 - 2 * VP9_INTERP_EXTEND)); + // can be on a border is therefore 16 - (2*VPX_INTERP_EXTEND+1). + cpi->td.mb.mv_row_min = -((mb_row * 16) + (17 - 2 * VPX_INTERP_EXTEND)); cpi->td.mb.mv_row_max = ((mb_rows - 1 - mb_row) * 16) - + (17 - 2 * VP9_INTERP_EXTEND); + + (17 - 2 * VPX_INTERP_EXTEND); for (mb_col = 0; mb_col < mb_cols; mb_col++) { int i, j, k; @@ -334,9 +334,9 @@ static void temporal_filter_iterate_c(VP10_COMP *cpi, memset(accumulator, 0, 16 * 16 * 3 * sizeof(accumulator[0])); memset(count, 0, 16 * 16 * 3 * sizeof(count[0])); - cpi->td.mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VP9_INTERP_EXTEND)); + cpi->td.mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VPX_INTERP_EXTEND)); cpi->td.mb.mv_col_max = ((mb_cols - 1 - mb_col) * 16) - + (17 - 2 * VP9_INTERP_EXTEND); + + (17 - 2 * VPX_INTERP_EXTEND); for (frame = 0; frame < frame_count; frame++) { const int thresh_low = 10000; diff --git a/vpx_scale/yv12config.h b/vpx_scale/yv12config.h index 37b255d4d..c2be1a776 100644 --- a/vpx_scale/yv12config.h +++ b/vpx_scale/yv12config.h @@ -22,7 +22,7 @@ extern "C" { #define VP8BORDERINPIXELS 32 #define VP9INNERBORDERINPIXELS 96 -#define VP9_INTERP_EXTEND 4 +#define VPX_INTERP_EXTEND 4 #define VP9_ENC_BORDER_IN_PIXELS 160 #define VP9_DEC_BORDER_IN_PIXELS 32 -- 2.50.1