Rename NEAR_FORNEW to NEW2

Change-Id: I2928b0d28dcbf9c6b705d3ebf20550aeec9b99b3
This commit is contained in:
Debargha Mukherjee 2015-05-12 14:36:27 -07:00
parent f5445e124c
commit d43544137b
13 changed files with 45 additions and 45 deletions

View File

@ -89,7 +89,7 @@ typedef enum {
ZEROMV,
NEWMV,
#if CONFIG_NEW_INTER
NEAR_FORNEWMV,
NEW2MV,
NEAREST_NEARESTMV,
NEAREST_NEARMV,
NEAR_NEARESTMV,
@ -115,7 +115,7 @@ typedef enum {
static INLINE int is_inter_mode(PREDICTION_MODE mode) {
#if CONFIG_NEW_INTER
return mode >= NEARESTMV && mode <= NEAR_FORNEWMV;
return mode >= NEARESTMV && mode <= NEW2MV;
#else
return mode >= NEARESTMV && mode <= NEWMV;
#endif // CONFIG_NEW_INTER
@ -130,7 +130,7 @@ static INLINE int is_inter_compound_mode(PREDICTION_MODE mode) {
static INLINE int have_newmv_in_inter_mode(PREDICTION_MODE mode) {
#if CONFIG_NEW_INTER
return (mode == NEWMV ||
mode == NEAR_FORNEWMV ||
mode == NEW2MV ||
mode == NEW_NEWMV ||
mode == NEAREST_NEWMV ||
mode == NEW_NEARESTMV ||
@ -151,7 +151,7 @@ static INLINE int is_intrabc_mode(PREDICTION_MODE mode) {
#endif // CONFIG_INTRABC
#if CONFIG_NEW_INTER
#define INTER_MODES (1 + NEAR_FORNEWMV - NEARESTMV)
#define INTER_MODES (1 + NEW2MV - NEARESTMV)
#else
#define INTER_MODES (1 + NEWMV - NEARESTMV)
#endif // CONFIG_NEW_INTER

View File

@ -470,7 +470,7 @@ const vp9_tree_index vp9_inter_mode_tree[TREE_SIZE(INTER_MODES)] = {
-INTER_OFFSET(NEARESTMV), 4,
#if CONFIG_NEW_INTER
-INTER_OFFSET(NEARMV), 6,
-INTER_OFFSET(NEWMV), -INTER_OFFSET(NEAR_FORNEWMV)
-INTER_OFFSET(NEWMV), -INTER_OFFSET(NEW2MV)
#else
-INTER_OFFSET(NEARMV), -INTER_OFFSET(NEWMV)
#endif // CONFIG_NEW_INTER

View File

@ -222,7 +222,7 @@ static const int mode_lf_lut[MB_MODE_COUNT] = {
#endif // CONFIG_INTRABC
1, 1, 0, 1, // INTER_MODES (ZEROMV == 0)
#if CONFIG_NEW_INTER
1, // NEAR_FORNEWMV mode
1, // NEW2MV mode
1, 1, 1, 1, 1, 1, 1, 0, 1 // INTER_COMPOUND_MODES (ZERO_ZEROMV == 0)
#endif // CONFIG_NEW_INTER
};

View File

@ -60,7 +60,7 @@ static const int mode_2_counter[MB_MODE_COUNT] = {
3, // ZEROMV
1, // NEWMV
#if CONFIG_NEW_INTER
1, // NEAR_FORNEWMV
1, // NEW2MV
0, // NEAREST_NEARESTMV
0, // NEAREST_NEARMV
0, // NEAR_NEARESTMV

View File

@ -872,7 +872,7 @@ static INLINE int assign_mv(VP9_COMMON *cm, PREDICTION_MODE mode,
#endif // CONFIG_NEW_INTER
switch (mode) {
#if CONFIG_NEW_INTER
case NEAR_FORNEWMV:
case NEW2MV:
#endif // CONFIG_NEW_INTER
case NEWMV: {
nmv_context_counts *const mv_counts = cm->frame_parallel_decoding_mode ?
@ -1172,12 +1172,12 @@ static void read_inter_block_mode_info(VP9_COMMON *const cm,
b_mode = read_inter_mode(cm, r, inter_mode_ctx);
#if CONFIG_NEW_INTER
mv_idx = (b_mode == NEAR_FORNEWMV) ? 1 : 0;
mv_idx = (b_mode == NEW2MV) ? 1 : 0;
#endif // CONFIG_NEW_INTER
#if CONFIG_NEW_INTER
if (b_mode == NEARESTMV || b_mode == NEARMV ||
b_mode == NEWMV || b_mode == NEAR_FORNEWMV ||
b_mode == NEWMV || b_mode == NEW2MV ||
b_mode == NEW_NEWMV ||
b_mode == NEAREST_NEARESTMV ||
b_mode == NEAREST_NEARMV || b_mode == NEAR_NEARESTMV ||
@ -1199,7 +1199,7 @@ static void read_inter_block_mode_info(VP9_COMMON *const cm,
&nearest_sub8x8[ref],
&near_sub8x8[ref]);
#if CONFIG_NEW_INTER
if (b_mode == NEWMV || b_mode == NEAR_FORNEWMV ||
if (b_mode == NEWMV || b_mode == NEW2MV ||
b_mode == NEW_NEWMV ||
b_mode == NEAREST_NEWMV || b_mode == NEW_NEARESTMV ||
b_mode == NEAR_NEWMV || b_mode == NEW_NEARMV) {
@ -1237,7 +1237,7 @@ static void read_inter_block_mode_info(VP9_COMMON *const cm,
mbmi->mv[1].as_int = mi->bmi[3].as_mv[1].as_int;
} else {
#if CONFIG_NEW_INTER
if (mbmi->mode == NEAR_FORNEWMV) {
if (mbmi->mode == NEW2MV) {
for (ref = 0; ref < 1 + is_compound; ++ref)
ref_mv[ref].as_int = nearmv[ref].as_int;
}

View File

@ -762,7 +762,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, const MODE_INFO *mi,
write_inter_mode(w, b_mode, inter_probs);
#if CONFIG_NEW_INTER
if (b_mode == NEWMV || b_mode == NEAR_FORNEWMV ||
if (b_mode == NEWMV || b_mode == NEW2MV ||
b_mode == NEW_NEWMV) {
#else
if (b_mode == NEWMV) {
@ -790,13 +790,13 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, const MODE_INFO *mi,
}
} else {
#if CONFIG_NEW_INTER
if (mode == NEWMV || mode == NEAR_FORNEWMV || mode == NEW_NEWMV) {
if (mode == NEWMV || mode == NEW2MV || mode == NEW_NEWMV) {
#else
if (mode == NEWMV) {
#endif // CONFIG_NEW_INTER
for (ref = 0; ref < 1 + is_compound; ++ref) {
#if CONFIG_NEW_INTER
if (mode == NEAR_FORNEWMV)
if (mode == NEW2MV)
vp9_encode_mv(cpi, w, &mbmi->mv[ref].as_mv,
&mbmi->ref_mvs[mbmi->ref_frame[ref]][1].as_mv, nmvc,
allow_hp);

View File

@ -420,7 +420,7 @@ void vp9_denoiser_update_frame_stats(MB_MODE_INFO *mbmi, unsigned int sse,
ctx->best_zeromv_reference_frame = mbmi->ref_frame[0];
}
#if CONFIG_NEW_INTER
if (mode == NEW_NEWMV || mode == NEWMV || mode == NEAR_FORNEWMV ||
if (mode == NEW_NEWMV || mode == NEWMV || mode == NEW2MV ||
mode == NEW_NEARESTMV || mode == NEAREST_NEWMV) {
#else
if (mode == NEWMV) {

View File

@ -318,7 +318,7 @@ void vp9_update_mv_count(VP9_COMMON *cm, const MACROBLOCKD *xd) {
for (ref = 0; ref < 1 + has_second_ref(mbmi); ++ref) {
#if CONFIG_NEW_INTER
if (mbmi->sb_type >= BLOCK_8X8 && mbmi->mode == NEAR_FORNEWMV)
if (mbmi->sb_type >= BLOCK_8X8 && mbmi->mode == NEW2MV)
ref_mv[ref].as_int = mbmi->ref_mvs[mbmi->ref_frame[ref]][1].as_int;
else
#endif // CONFIG_NEW_INTER
@ -341,7 +341,7 @@ void vp9_update_mv_count(VP9_COMMON *cm, const MACROBLOCKD *xd) {
#if CONFIG_NEW_INTER
if (mi->bmi[i].as_mode == NEWMV ||
mi->bmi[i].as_mode == NEAR_FORNEWMV ||
mi->bmi[i].as_mode == NEW2MV ||
mi->bmi[i].as_mode == NEW_NEWMV)
#else
if (mi->bmi[i].as_mode == NEWMV)
@ -362,7 +362,7 @@ void vp9_update_mv_count(VP9_COMMON *cm, const MACROBLOCKD *xd) {
}
} else {
#if CONFIG_NEW_INTER
if (mbmi->mode == NEWMV || mbmi->mode == NEAR_FORNEWMV ||
if (mbmi->mode == NEWMV || mbmi->mode == NEW2MV ||
mbmi->mode == NEW_NEWMV)
#else
if (mbmi->mode == NEWMV)

View File

@ -466,9 +466,9 @@ static void estimate_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
static const THR_MODES mode_idx[MAX_REF_FRAMES - 1][INTER_MODES] = {
#if CONFIG_NEW_INTER
{THR_NEARESTMV, THR_NEARMV, THR_ZEROMV, THR_NEWMV, THR_NEAR_FORNEWMV},
{THR_NEARESTG, THR_NEARG, THR_ZEROG, THR_NEWG, THR_NEAR_FORNEWG},
{THR_NEARESTA, THR_NEARA, THR_ZEROA, THR_NEWA, THR_NEAR_FORNEWA},
{THR_NEARESTMV, THR_NEARMV, THR_ZEROMV, THR_NEWMV, THR_NEW2MV},
{THR_NEARESTG, THR_NEARG, THR_ZEROG, THR_NEWG, THR_NEW2G},
{THR_NEARESTA, THR_NEARA, THR_ZEROA, THR_NEWA, THR_NEW2A},
#else
{THR_NEARESTMV, THR_NEARMV, THR_ZEROMV, THR_NEWMV},
{THR_NEARESTG, THR_NEARG, THR_ZEROG, THR_NEWG},

View File

@ -634,16 +634,16 @@ void vp9_set_rd_speed_thresholds(VP9_COMP *cpi) {
rd->thresh_mult[THR_NEWG] += 1000;
#if CONFIG_NEW_INTER
rd->thresh_mult[THR_NEAR_FORNEWMV] += 1000;
rd->thresh_mult[THR_NEAR_FORNEWA] += 1000;
rd->thresh_mult[THR_NEAR_FORNEWG] += 1000;
rd->thresh_mult[THR_NEW2MV] += 1000;
rd->thresh_mult[THR_NEW2A] += 1000;
rd->thresh_mult[THR_NEW2G] += 1000;
#endif // CONFIG_NEW_INTER
// Adjust threshold only in real time mode, which only uses last
// reference frame.
rd->thresh_mult[THR_NEWMV] += sf->elevate_newmv_thresh;
#if CONFIG_NEW_INTER
rd->thresh_mult[THR_NEAR_FORNEWMV] += sf->elevate_newmv_thresh;
rd->thresh_mult[THR_NEW2MV] += sf->elevate_newmv_thresh;
#endif // CONFIG_NEW_INTER
rd->thresh_mult[THR_NEARMV] += 1000;

View File

@ -71,9 +71,9 @@ typedef enum {
THR_NEWG,
#if CONFIG_NEW_INTER
THR_NEAR_FORNEWMV,
THR_NEAR_FORNEWA,
THR_NEAR_FORNEWG,
THR_NEW2MV,
THR_NEW2A,
THR_NEW2G,
#endif // CONFIG_NEW_INTER
THR_NEARMV,

View File

@ -97,9 +97,9 @@ static const MODE_DEFINITION vp9_mode_order[MAX_MODES] = {
{NEWMV, {GOLDEN_FRAME, NONE}},
#if CONFIG_NEW_INTER
{NEAR_FORNEWMV, {LAST_FRAME, NONE}},
{NEAR_FORNEWMV, {ALTREF_FRAME, NONE}},
{NEAR_FORNEWMV, {GOLDEN_FRAME, NONE}},
{NEW2MV, {LAST_FRAME, NONE}},
{NEW2MV, {ALTREF_FRAME, NONE}},
{NEW2MV, {GOLDEN_FRAME, NONE}},
#endif // CONFIG_NEW_INTER
{NEARMV, {LAST_FRAME, NONE}},
@ -2784,7 +2784,7 @@ static int set_and_cost_bmi_mvs(VP9_COMP *cpi, MACROBLOCKD *xd, int i,
switch (mode) {
case NEWMV:
#if CONFIG_NEW_INTER
case NEAR_FORNEWMV:
case NEW2MV:
#endif // CONFIG_NEW_INTER
this_mv[0].as_int = seg_mvs[mbmi->ref_frame[0]].as_int;
thismvcost += vp9_mv_bit_cost(&this_mv[0].as_mv, &ref_mv[0]->as_mv,
@ -3407,7 +3407,7 @@ static int64_t rd_pick_best_sub8x8_mode(
// search for the best motion vector on this segment
#if CONFIG_NEW_INTER
for (this_mode = (has_second_rf ? NEAREST_NEARESTMV : NEARESTMV);
this_mode <= (has_second_rf ? NEW_NEWMV : NEAR_FORNEWMV);
this_mode <= (has_second_rf ? NEW_NEWMV : NEW2MV);
++this_mode) {
#else
for (this_mode = NEARESTMV; this_mode <= NEWMV; ++this_mode) {
@ -3427,7 +3427,7 @@ static int64_t rd_pick_best_sub8x8_mode(
#endif // CONFIG_NEW_INTER
#if CONFIG_NEW_INTER
mv_idx = (this_mode == NEAR_FORNEWMV) ? 1 : 0;
mv_idx = (this_mode == NEW2MV) ? 1 : 0;
for (ref = 0; ref < 1 + has_second_rf; ++ref)
ref_mv_sub8x8[ref].as_int = ref_mvs_sub8x8[mv_idx][ref].as_int;
#endif // CONFIG_NEW_INTER
@ -3457,7 +3457,7 @@ static int64_t rd_pick_best_sub8x8_mode(
// has changed in the NEWMVREF experiment.
if (!has_second_rf &&
#if CONFIG_NEW_INTER
(this_mode == NEWMV || this_mode == NEAR_FORNEWMV)
(this_mode == NEWMV || this_mode == NEW2MV)
#else
this_mode == NEWMV
#endif // CONFIG_NEW_INTER
@ -3693,7 +3693,7 @@ static int64_t rd_pick_best_sub8x8_mode(
#endif // CONFIG_NEW_INTER
#if CONFIG_NEW_INTER
mv_idx = (mode_selected == NEAR_FORNEWMV) ? 1 : 0;
mv_idx = (mode_selected == NEW2MV) ? 1 : 0;
#endif // CONFIG_NEW_INTER
for (ref = 0; ref < 1 + has_second_rf; ++ref) {
@ -4453,7 +4453,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
#if CONFIG_NEW_INTER
// mv_idx==1: NEARMV as reference mv
// mv_idx==0: NEARESTMV as reference mv
int mv_idx = (this_mode == NEAR_FORNEWMV) ? 1 : 0;
int mv_idx = (this_mode == NEW2MV) ? 1 : 0;
int_mv single_newmv[MAX_REF_FRAMES];
#endif // CONFIG_NEW_INTER
#if CONFIG_VP9_HIGHBITDEPTH
@ -4519,7 +4519,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
lf = xd->mi[-1].src_mi->mbmi.interp_filter;
#if CONFIG_NEW_INTER
if ((this_mode != NEWMV && this_mode != NEAR_FORNEWMV &&
if ((this_mode != NEWMV && this_mode != NEW2MV &&
this_mode != NEW_NEWMV) || (af == lf))
#else
if ((this_mode != NEWMV) || (af == lf))
@ -4714,7 +4714,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
// Clip "next_nearest" so that it does not extend to far out of image
#if CONFIG_NEW_INTER
if (this_mode != NEWMV && this_mode != NEW_NEWMV &&
this_mode != NEAR_FORNEWMV &&
this_mode != NEW2MV &&
!((this_mode == NEAR_NEWMV || this_mode == NEAREST_NEWMV) && i == 1) &&
!((this_mode == NEW_NEARMV || this_mode == NEW_NEARESTMV) && i == 0))
#else
@ -5070,7 +5070,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
#ifdef WEDGE_INTERINTRA_REFINE_SEARCH
// Refine motion vector.
#if CONFIG_NEW_INTER
if (this_mode == NEWMV || this_mode == NEAR_FORNEWMV) {
if (this_mode == NEWMV || this_mode == NEW2MV) {
#else
if (this_mode == NEWMV) {
#endif // CONFIG_NEW_INTER
@ -5932,7 +5932,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
}
frame_mv[NEWMV][ref_frame].as_int = INVALID_MV;
#if CONFIG_NEW_INTER
frame_mv[NEAR_FORNEWMV][ref_frame].as_int = INVALID_MV;
frame_mv[NEW2MV][ref_frame].as_int = INVALID_MV;
#endif // CONFIG_NEW_INTER
#if CONFIG_GLOBAL_MOTION
frame_mv[ZEROMV][ref_frame].as_int =
@ -6208,7 +6208,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
#if CONFIG_NEW_INTER
if (skip_ref_frame && this_mode != NEARESTMV &&
this_mode != NEWMV && this_mode != NEAR_FORNEWMV &&
this_mode != NEWMV && this_mode != NEW2MV &&
this_mode != NEAREST_NEARESTMV && this_mode != NEW_NEWMV &&
this_mode != NEAREST_NEWMV && this_mode != NEW_NEARESTMV &&
this_mode != NEAR_NEWMV && this_mode != NEW_NEARMV)
@ -6739,7 +6739,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
// are corrected.
if (best_mbmode.mode == NEWMV
#if CONFIG_NEW_INTER
|| best_mbmode.mode == NEAR_FORNEWMV
|| best_mbmode.mode == NEW2MV
#endif // CONFIG_NEW_INTER
) {
const MV_REFERENCE_FRAME refs[2] = {best_mbmode.ref_frame[0],

View File

@ -35,7 +35,7 @@ enum {
enum {
INTER_ALL =
(1 << NEARESTMV) | (1 << NEARMV) | (1 << ZEROMV) |
(1 << NEWMV) | (1 << NEAR_FORNEWMV) |
(1 << NEWMV) | (1 << NEW2MV) |
(1 << NEAREST_NEARESTMV) | (1 << ZERO_ZEROMV) | (1 << NEAREST_NEARMV) |
(1 << NEAR_NEARESTMV) | (1 << NEW_NEWMV) | (1 << NEAREST_NEWMV) |
(1 << NEAR_NEWMV) | (1 << NEW_NEARMV) | (1 << NEW_NEARESTMV),