Commit 761a7088 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

VP9_INTERP_EXTEND -> VPX_INTERP_EXTEND

Change-Id: I375d565b9c90a40799b3fb6f968ac6e4b4d4f093
parent 75b57d39
......@@ -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)),
......
......@@ -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;
}
......
......@@ -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)));
......
......@@ -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 {
......
......@@ -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) {
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment