Commit 7ff79434 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Brings back near-near compound mode into ext-inter

lowres: improves by 0.1%

Change-Id: I245019916bf47c6e24bc8c3953b86715ab0193c9
parent bf93b385
......@@ -259,13 +259,13 @@ static const vpx_prob default_inter_mode_probs[INTER_MODE_CONTEXTS]
#if CONFIG_EXT_INTER
static const vpx_prob default_inter_compound_mode_probs
[INTER_MODE_CONTEXTS][INTER_COMPOUND_MODES - 1] = {
{ 2, 173, 68, 192, 192, 128, 180, 180}, // 0 = both zero mv
{ 7, 145, 160, 192, 192, 128, 180, 180}, // 1 = 1 zero + 1 predicted
{ 7, 166, 126, 192, 192, 128, 180, 180}, // 2 = two predicted mvs
{ 7, 94, 132, 192, 192, 128, 180, 180}, // 3 = 1 pred/zero, 1 new
{ 8, 64, 64, 192, 192, 128, 180, 180}, // 4 = two new mvs
{17, 81, 52, 192, 192, 128, 180, 180}, // 5 = one intra neighbour
{25, 29, 50, 192, 192, 128, 180, 180}, // 6 = two intra neighbours
{ 2, 173, 68, 192, 64, 192, 128, 180, 180}, // 0 = both zero mv
{ 7, 145, 160, 192, 64, 192, 128, 180, 180}, // 1 = 1 zero + 1 predicted
{ 7, 166, 126, 192, 64, 192, 128, 180, 180}, // 2 = two predicted mvs
{ 7, 94, 132, 192, 64, 192, 128, 180, 180}, // 3 = 1 pred/zero, 1 new
{ 8, 64, 64, 192, 64, 192, 128, 180, 180}, // 4 = two new mvs
{17, 81, 52, 192, 64, 192, 128, 180, 180}, // 5 = one intra neighbour
{25, 29, 50, 192, 64, 192, 128, 180, 180}, // 6 = two intra neighbours
};
static const vpx_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
......@@ -347,10 +347,11 @@ const vpx_tree_index vp10_inter_compound_mode_tree
-INTER_COMPOUND_OFFSET(ZERO_ZEROMV), 2,
-INTER_COMPOUND_OFFSET(NEAREST_NEARESTMV), 4,
6, -INTER_COMPOUND_OFFSET(NEW_NEWMV),
8, 10,
8, 12,
-INTER_COMPOUND_OFFSET(NEAR_NEARMV), 10,
-INTER_COMPOUND_OFFSET(NEAREST_NEARMV),
-INTER_COMPOUND_OFFSET(NEAR_NEARESTMV),
12, 14,
-INTER_COMPOUND_OFFSET(NEAR_NEARESTMV),
14, 16,
-INTER_COMPOUND_OFFSET(NEAREST_NEWMV), -INTER_COMPOUND_OFFSET(NEW_NEARESTMV),
-INTER_COMPOUND_OFFSET(NEAR_NEWMV), -INTER_COMPOUND_OFFSET(NEW_NEARMV)
};
......
......@@ -250,15 +250,16 @@ typedef enum {
#define NEAREST_NEARESTMV 15
#define NEAREST_NEARMV 16
#define NEAR_NEARESTMV 17
#define NEAREST_NEWMV 18
#define NEW_NEARESTMV 19
#define NEAR_NEWMV 20
#define NEW_NEARMV 21
#define ZERO_ZEROMV 22
#define NEW_NEWMV 23
#define MB_MODE_COUNT 24
#define NEAR_NEARMV 18
#define NEAREST_NEWMV 19
#define NEW_NEARESTMV 20
#define NEAR_NEWMV 21
#define NEW_NEARMV 22
#define ZERO_ZEROMV 23
#define NEW_NEWMV 24
#define MB_MODE_COUNT 25
#else
#define MB_MODE_COUNT 14
#define MB_MODE_COUNT 14
#endif // CONFIG_EXT_INTER
typedef uint8_t PREDICTION_MODE;
......
......@@ -212,7 +212,7 @@ static const int mode_lf_lut[MB_MODE_COUNT] = {
1, 1, 0, 1 // INTER_MODES (ZEROMV == 0)
#if CONFIG_EXT_INTER
, 1, // NEWFROMNEARMV mode
1, 1, 1, 1, 1, 1, 1, 0, 1 // INTER_COMPOUND_MODES (ZERO_ZEROMV == 0)
1, 1, 1, 1, 1, 1, 1, 1, 0, 1 // INTER_COMPOUND_MODES (ZERO_ZEROMV == 0)
#endif // CONFIG_EXT_INTER
};
......
......@@ -60,6 +60,7 @@ static const int mode_2_counter[MB_MODE_COUNT] = {
0, // NEAREST_NEARESTMV
0, // NEAREST_NEARMV
0, // NEAR_NEARESTMV
0, // NEAR_NEARMV
1, // NEAREST_NEWMV
1, // NEW_NEARESTMV
1, // NEAR_NEWMV
......
......@@ -1083,6 +1083,12 @@ static INLINE int assign_mv(VP10_COMMON *cm, MACROBLOCKD *xd,
mv[1].as_int = nearest_mv[1].as_int;
break;
}
case NEAR_NEARMV: {
assert(is_compound);
mv[0].as_int = near_mv[0].as_int;
mv[1].as_int = near_mv[1].as_int;
break;
}
case NEW_NEARESTMV: {
FRAME_COUNTS *counts = xd->counts;
#if CONFIG_REF_MV
......@@ -1331,8 +1337,10 @@ static void read_inter_block_mode_info(VP10Decoder *const pbi,
#if CONFIG_EXT_INTER
if (mbmi->mode == NEAREST_NEARESTMV) {
#endif // CONFIG_EXT_INTER
nearestmv[0] = xd->ref_mv_stack[ref_frame_type][0].this_mv;
nearestmv[1] = xd->ref_mv_stack[ref_frame_type][0].comp_mv;
nearestmv[0] = xd->ref_mv_stack[ref_frame_type][0].this_mv;
nearestmv[1] = xd->ref_mv_stack[ref_frame_type][0].comp_mv;
lower_mv_precision(&nearestmv[0].as_mv, allow_hp);
lower_mv_precision(&nearestmv[1].as_mv, allow_hp);
#if CONFIG_EXT_INTER
} else if (mbmi->mode == NEAREST_NEWMV || mbmi->mode == NEAREST_NEARMV) {
nearestmv[0] = xd->ref_mv_stack[ref_frame_type][0].this_mv;
......@@ -1346,12 +1354,16 @@ static void read_inter_block_mode_info(VP10Decoder *const pbi,
#if CONFIG_EXT_INTER
if (xd->ref_mv_count[ref_frame_type] > 1) {
if (mbmi->mode == NEAR_NEWMV || mbmi->mode == NEAR_NEARESTMV) {
if (mbmi->mode == NEAR_NEWMV ||
mbmi->mode == NEAR_NEARESTMV ||
mbmi->mode == NEAR_NEARMV) {
nearmv[0] = xd->ref_mv_stack[ref_frame_type][1].this_mv;
lower_mv_precision(&nearmv[0].as_mv, allow_hp);
}
if (mbmi->mode == NEW_NEARMV || mbmi->mode == NEAREST_NEARMV) {
if (mbmi->mode == NEW_NEARMV ||
mbmi->mode == NEAREST_NEARMV ||
mbmi->mode == NEAR_NEARMV) {
nearmv[1] = xd->ref_mv_stack[ref_frame_type][1].comp_mv;
lower_mv_precision(&nearmv[1].as_mv, allow_hp);
}
......
......@@ -69,7 +69,7 @@ static const struct vp10_token inter_mode_encodings[INTER_MODES] =
#if CONFIG_EXT_INTER
static const struct vp10_token inter_compound_mode_encodings
[INTER_COMPOUND_MODES] = {
{2, 2}, {24, 5}, {25, 5}, {52, 6}, {53, 6},
{2, 2}, {50, 6}, {51, 6}, {24, 5}, {52, 6}, {53, 6},
{54, 6}, {55, 6}, {0, 1}, {7, 3}
};
#endif // CONFIG_EXT_INTER
......
......@@ -811,6 +811,8 @@ void vp10_set_rd_speed_thresholds(VP10_COMP *cpi) {
rd->thresh_mult[THR_COMP_NEAREST_NEARGA] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARESTLA] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARESTGA] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARLA] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARGA] += 1200;
rd->thresh_mult[THR_COMP_NEAREST_NEWLA] += 1500;
rd->thresh_mult[THR_COMP_NEAREST_NEWGA] += 1500;
rd->thresh_mult[THR_COMP_NEW_NEARESTLA] += 1500;
......@@ -828,6 +830,7 @@ void vp10_set_rd_speed_thresholds(VP10_COMP *cpi) {
rd->thresh_mult[THR_COMP_NEAREST_NEARESTL2A] += 1000;
rd->thresh_mult[THR_COMP_NEAREST_NEARL2A] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARESTL2A] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARL2A] += 1200;
rd->thresh_mult[THR_COMP_NEAREST_NEWL2A] += 1500;
rd->thresh_mult[THR_COMP_NEW_NEARESTL2A] += 1500;
rd->thresh_mult[THR_COMP_NEAR_NEWL2A] += 1700;
......@@ -838,6 +841,7 @@ void vp10_set_rd_speed_thresholds(VP10_COMP *cpi) {
rd->thresh_mult[THR_COMP_NEAREST_NEARESTL3A] += 1000;
rd->thresh_mult[THR_COMP_NEAREST_NEARL3A] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARESTL3A] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARL3A] += 1200;
rd->thresh_mult[THR_COMP_NEAREST_NEWL3A] += 1500;
rd->thresh_mult[THR_COMP_NEW_NEARESTL3A] += 1500;
rd->thresh_mult[THR_COMP_NEAR_NEWL3A] += 1700;
......@@ -848,13 +852,13 @@ void vp10_set_rd_speed_thresholds(VP10_COMP *cpi) {
rd->thresh_mult[THR_COMP_NEAREST_NEARESTL4A] += 1000;
rd->thresh_mult[THR_COMP_NEAREST_NEARL4A] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARESTL4A] += 1200;
rd->thresh_mult[THR_COMP_NEAR_NEARL4A] += 1200;
rd->thresh_mult[THR_COMP_NEAREST_NEWL4A] += 1500;
rd->thresh_mult[THR_COMP_NEW_NEARESTL4A] += 1500;
rd->thresh_mult[THR_COMP_NEAR_NEWL4A] += 1700;
rd->thresh_mult[THR_COMP_NEW_NEARL4A] += 1700;
rd->thresh_mult[THR_COMP_NEW_NEWL4A] += 2000;
rd->thresh_mult[THR_COMP_ZERO_ZEROL4A] += 2500;
#endif // CONFIG_EXT_REFS
#else
rd->thresh_mult[THR_COMP_NEARESTLA] += 1000;
......
......@@ -45,13 +45,13 @@ extern "C" {
#if CONFIG_EXT_REFS
#if CONFIG_EXT_INTER
#define MAX_MODES 109
#define MAX_MODES 114
#else
#define MAX_MODES 54
#endif // CONFIG_EXT_INTER
#else
#if CONFIG_EXT_INTER
#define MAX_MODES 55
#define MAX_MODES 57
#else
#define MAX_MODES 30
#endif // CONFIG_EXT_INTER
......@@ -143,6 +143,8 @@ typedef enum {
THR_COMP_NEAR_NEARESTGA,
THR_COMP_NEAREST_NEARLA,
THR_COMP_NEAREST_NEARGA,
THR_COMP_NEAR_NEARLA,
THR_COMP_NEAR_NEARGA,
THR_COMP_NEW_NEARESTLA,
THR_COMP_NEW_NEARESTGA,
THR_COMP_NEAREST_NEWLA,
......@@ -159,6 +161,7 @@ typedef enum {
#if CONFIG_EXT_REFS
THR_COMP_NEAR_NEARESTL2A,
THR_COMP_NEAREST_NEARL2A,
THR_COMP_NEAR_NEARL2A,
THR_COMP_NEW_NEARESTL2A,
THR_COMP_NEAREST_NEWL2A,
THR_COMP_NEW_NEARL2A,
......@@ -168,6 +171,7 @@ typedef enum {
THR_COMP_NEAR_NEARESTL3A,
THR_COMP_NEAREST_NEARL3A,
THR_COMP_NEAR_NEARL3A,
THR_COMP_NEW_NEARESTL3A,
THR_COMP_NEAREST_NEWL3A,
THR_COMP_NEW_NEARL3A,
......@@ -177,6 +181,7 @@ typedef enum {
THR_COMP_NEAR_NEARESTL4A,
THR_COMP_NEAREST_NEARL4A,
THR_COMP_NEAR_NEARL4A,
THR_COMP_NEW_NEARESTL4A,
THR_COMP_NEAREST_NEWL4A,
THR_COMP_NEW_NEARL4A,
......
......@@ -191,6 +191,8 @@ static const MODE_DEFINITION vp10_mode_order[MAX_MODES] = {
{NEAR_NEARESTMV, {GOLDEN_FRAME, ALTREF_FRAME}},
{NEAREST_NEARMV, {LAST_FRAME, ALTREF_FRAME}},
{NEAREST_NEARMV, {GOLDEN_FRAME, ALTREF_FRAME}},
{NEAR_NEARMV, {LAST_FRAME, ALTREF_FRAME}},
{NEAR_NEARMV, {GOLDEN_FRAME, ALTREF_FRAME}},
{NEW_NEARESTMV, {LAST_FRAME, ALTREF_FRAME}},
{NEW_NEARESTMV, {GOLDEN_FRAME, ALTREF_FRAME}},
{NEAREST_NEWMV, {LAST_FRAME, ALTREF_FRAME}},
......@@ -206,6 +208,7 @@ static const MODE_DEFINITION vp10_mode_order[MAX_MODES] = {
#if CONFIG_EXT_REFS
{NEAR_NEARESTMV, {LAST2_FRAME, ALTREF_FRAME}},
{NEAREST_NEARMV, {LAST2_FRAME, ALTREF_FRAME}},
{NEAR_NEARMV, {LAST2_FRAME, ALTREF_FRAME}},
{NEW_NEARESTMV, {LAST2_FRAME, ALTREF_FRAME}},
{NEAREST_NEWMV, {LAST2_FRAME, ALTREF_FRAME}},
{NEW_NEARMV, {LAST2_FRAME, ALTREF_FRAME}},
......@@ -215,6 +218,7 @@ static const MODE_DEFINITION vp10_mode_order[MAX_MODES] = {
{NEAR_NEARESTMV, {LAST3_FRAME, ALTREF_FRAME}},
{NEAREST_NEARMV, {LAST3_FRAME, ALTREF_FRAME}},
{NEAR_NEARMV, {LAST3_FRAME, ALTREF_FRAME}},
{NEW_NEARESTMV, {LAST3_FRAME, ALTREF_FRAME}},
{NEAREST_NEWMV, {LAST3_FRAME, ALTREF_FRAME}},
{NEW_NEARMV, {LAST3_FRAME, ALTREF_FRAME}},
......@@ -224,6 +228,7 @@ static const MODE_DEFINITION vp10_mode_order[MAX_MODES] = {
{NEAR_NEARESTMV, {LAST4_FRAME, ALTREF_FRAME}},
{NEAREST_NEARMV, {LAST4_FRAME, ALTREF_FRAME}},
{NEAR_NEARMV, {LAST4_FRAME, ALTREF_FRAME}},
{NEW_NEARESTMV, {LAST4_FRAME, ALTREF_FRAME}},
{NEAREST_NEWMV, {LAST4_FRAME, ALTREF_FRAME}},
{NEW_NEARMV, {LAST4_FRAME, ALTREF_FRAME}},
......@@ -4254,6 +4259,7 @@ static int set_and_cost_bmi_mvs(VP10_COMP *cpi, MACROBLOCK *x, MACROBLOCKD *xd,
case NEAREST_NEARMV:
case NEAR_NEARESTMV:
case NEAREST_NEARESTMV:
case NEAR_NEARMV:
this_mv[0].as_int = frame_mv[mode][mbmi->ref_frame[0]].as_int;
this_mv[1].as_int = frame_mv[mode][mbmi->ref_frame[1]].as_int;
break;
......@@ -4541,7 +4547,8 @@ static int check_best_zero_mv(
}
#if CONFIG_EXT_INTER
else if ((this_mode == NEAREST_NEARESTMV || this_mode == NEAREST_NEARMV ||
this_mode == NEAR_NEARESTMV || this_mode == ZERO_ZEROMV) &&
this_mode == NEAR_NEARESTMV || this_mode == NEAR_NEARMV ||
this_mode == ZERO_ZEROMV) &&
frame_mv[this_mode][ref_frames[0]].as_int == 0 &&
frame_mv[this_mode][ref_frames[1]].as_int == 0) {
#if CONFIG_REF_MV
......@@ -4550,12 +4557,14 @@ static int check_best_zero_mv(
int c2 = cost_mv_ref(cpi, NEAREST_NEARESTMV, 1, rfc);
int c3 = cost_mv_ref(cpi, ZERO_ZEROMV, 1, rfc);
int c4 = cost_mv_ref(cpi, NEAR_NEARESTMV, 1, rfc);
int c5 = cost_mv_ref(cpi, NEAR_NEARMV, 1, rfc);
#else
int16_t rfc = mode_context[ref_frames[0]];
int c1 = cost_mv_ref(cpi, NEAREST_NEARMV, rfc);
int c2 = cost_mv_ref(cpi, NEAREST_NEARESTMV, rfc);
int c3 = cost_mv_ref(cpi, ZERO_ZEROMV, rfc);
int c4 = cost_mv_ref(cpi, NEAR_NEARESTMV, rfc);
int c5 = cost_mv_ref(cpi, NEAR_NEARMV, rfc);
#endif
if (this_mode == NEAREST_NEARMV) {
......@@ -4564,6 +4573,8 @@ static int check_best_zero_mv(
if (c2 > c3) return 0;
} else if (this_mode == NEAR_NEARESTMV) {
if (c4 > c3) return 0;
} else if (this_mode == NEAR_NEARMV) {
if (c5 > c3) return 0;
} else {
assert(this_mode == ZERO_ZEROMV);
if ((c3 >= c2 &&
......@@ -4572,6 +4583,9 @@ static int check_best_zero_mv(
(c3 >= c1 &&
frame_mv[NEAREST_NEARMV][ref_frames[0]].as_int == 0 &&
frame_mv[NEAREST_NEARMV][ref_frames[1]].as_int == 0) ||
(c3 >= c5 &&
frame_mv[NEAR_NEARMV][ref_frames[0]].as_int == 0 &&
frame_mv[NEAR_NEARMV][ref_frames[1]].as_int == 0) ||
(c3 >= c4 &&
frame_mv[NEAR_NEARESTMV][ref_frames[0]].as_int == 0 &&
frame_mv[NEAR_NEARESTMV][ref_frames[1]].as_int == 0))
......@@ -4966,6 +4980,8 @@ static int64_t rd_pick_best_sub8x8_mode(VP10_COMP *cpi, MACROBLOCK *x,
frame_mv[NEARESTMV][frame].as_int;
frame_mv[NEAR_NEWMV][frame].as_int =
frame_mv[NEARMV][frame].as_int;
frame_mv[NEAR_NEARMV][frame].as_int =
frame_mv[NEARMV][frame].as_int;
} else if (ref == 1) {
frame_mv[NEAREST_NEARMV][frame].as_int =
frame_mv[NEARMV][frame].as_int;
......@@ -4975,6 +4991,8 @@ static int64_t rd_pick_best_sub8x8_mode(VP10_COMP *cpi, MACROBLOCK *x,
frame_mv[NEARESTMV][frame].as_int;
frame_mv[NEW_NEARMV][frame].as_int =
frame_mv[NEARMV][frame].as_int;
frame_mv[NEAR_NEARMV][frame].as_int =
frame_mv[NEARMV][frame].as_int;
}
}
#endif // CONFIG_EXT_INTER
......@@ -6207,6 +6225,11 @@ static INTERP_FILTER predict_interp_filter(const VP10_COMP *cpi,
single_filter[NEARESTMV][refs[1]])
best_filter = single_filter[NEARMV][refs[0]];
break;
case NEAR_NEARMV:
if (single_filter[NEARMV][refs[0]] ==
single_filter[NEARMV][refs[1]])
best_filter = single_filter[NEARMV][refs[0]];
break;
case ZERO_ZEROMV:
if (single_filter[ZEROMV][refs[0]] ==
single_filter[ZEROMV][refs[1]])
......@@ -6553,7 +6576,9 @@ static int64_t handle_inter_mode(VP10_COMP *cpi, MACROBLOCK *x,
}
if (mbmi_ext->ref_mv_count[ref_frame_type] > 1) {
if (this_mode == NEAR_NEWMV || this_mode == NEAR_NEARESTMV) {
if (this_mode == NEAR_NEWMV ||
this_mode == NEAR_NEARESTMV ||
this_mode == NEAR_NEARMV) {
cur_mv[0] = mbmi_ext->ref_mv_stack[ref_frame_type][1].this_mv;
lower_mv_precision(&cur_mv[0].as_mv, cm->allow_high_precision_mv);
......@@ -6563,7 +6588,9 @@ static int64_t handle_inter_mode(VP10_COMP *cpi, MACROBLOCK *x,
mbmi->mv[0].as_int = cur_mv[0].as_int;
}
if (this_mode == NEW_NEARMV || this_mode == NEAREST_NEARMV) {
if (this_mode == NEW_NEARMV ||
this_mode == NEAREST_NEARMV ||
this_mode == NEAR_NEARMV) {
cur_mv[1] = mbmi_ext->ref_mv_stack[ref_frame_type][1].comp_mv;
lower_mv_precision(&cur_mv[1].as_mv, cm->allow_high_precision_mv);
......@@ -7143,6 +7170,11 @@ static int64_t handle_inter_mode(VP10_COMP *cpi, MACROBLOCK *x,
single_skippable[NEARMV][refs[1]])
memset(skip_txfm, SKIP_TXFM_AC_DC, sizeof(skip_txfm));
break;
case NEAR_NEARMV:
if (single_skippable[NEARMV][refs[0]] &&
single_skippable[NEARMV][refs[1]])
memset(skip_txfm, SKIP_TXFM_AC_DC, sizeof(skip_txfm));
break;
case NEAR_NEARESTMV:
if (single_skippable[NEARMV][refs[0]] &&
single_skippable[NEARESTMV][refs[1]])
......@@ -7885,6 +7917,8 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
mode_skip_mask[ALTREF_FRAME] |= (1 << NEAREST_NEARMV);
if (frame_mv[NEAR_NEARESTMV][ALTREF_FRAME].as_int != 0)
mode_skip_mask[ALTREF_FRAME] |= (1 << NEAR_NEARESTMV);
if (frame_mv[NEAR_NEARMV][ALTREF_FRAME].as_int != 0)
mode_skip_mask[ALTREF_FRAME] |= (1 << NEAR_NEARMV);
#endif // CONFIG_EXT_INTER
}
}
......@@ -7980,6 +8014,11 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
frame_mv[NEARESTMV][ref_frame].as_int;
frame_mv[NEAREST_NEARMV][second_ref_frame].as_int =
frame_mv[NEARMV][second_ref_frame].as_int;
} else if (this_mode == NEAR_NEARMV) {
frame_mv[NEAR_NEARMV][ref_frame].as_int =
frame_mv[NEARMV][ref_frame].as_int;
frame_mv[NEAR_NEARMV][second_ref_frame].as_int =
frame_mv[NEARMV][second_ref_frame].as_int;
} else if (this_mode == NEAR_NEARESTMV) {
frame_mv[NEAR_NEARESTMV][ref_frame].as_int =
frame_mv[NEARMV][ref_frame].as_int;
......@@ -8947,6 +8986,9 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
else if (nearmv[0].as_int == best_mbmode.mv[0].as_int &&
nearestmv[1].as_int == best_mbmode.mv[1].as_int)
best_mbmode.mode = NEAR_NEARESTMV;
else if (nearmv[0].as_int == best_mbmode.mv[0].as_int &&
nearmv[1].as_int == best_mbmode.mv[1].as_int)
best_mbmode.mode = NEAR_NEARMV;
else if (best_mbmode.mv[0].as_int == 0 && best_mbmode.mv[1].as_int == 0)
best_mbmode.mode = ZERO_ZEROMV;
#else
......@@ -8990,6 +9032,11 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
frame_mv[NEAR_NEARESTMV][refs[1]].as_int ==
best_mbmode.mv[1].as_int)
best_mbmode.mode = NEAR_NEARESTMV;
else if (frame_mv[NEAR_NEARMV][refs[0]].as_int ==
best_mbmode.mv[0].as_int &&
frame_mv[NEAR_NEARMV][refs[1]].as_int ==
best_mbmode.mv[1].as_int)
best_mbmode.mode = NEAR_NEARMV;
else if (best_mbmode.mv[0].as_int == 0 && best_mbmode.mv[1].as_int == 0)
best_mbmode.mode = ZERO_ZEROMV;
}
......
......@@ -36,9 +36,10 @@ enum {
INTER_ALL =
(1 << NEARESTMV) | (1 << NEARMV) | (1 << ZEROMV) |
(1 << NEWMV) | (1 << NEWFROMNEARMV) |
(1 << NEAREST_NEARESTMV) | (1 << ZERO_ZEROMV) | (1 << NEAREST_NEARMV) |
(1 << NEAREST_NEARESTMV) | (1 << NEAR_NEARMV) | (1 << NEAREST_NEARMV) |
(1 << NEAR_NEARESTMV) | (1 << NEW_NEWMV) | (1 << NEAREST_NEWMV) |
(1 << NEAR_NEWMV) | (1 << NEW_NEARMV) | (1 << NEW_NEARESTMV),
(1 << NEAR_NEWMV) | (1 << NEW_NEARMV) | (1 << NEW_NEARESTMV) |
(1 << ZERO_ZEROMV),
INTER_NEAREST = (1 << NEARESTMV) | (1 << NEAREST_NEARESTMV) |
(1 << NEAREST_NEARMV) | (1 << NEAR_NEARESTMV) |
(1 << NEW_NEARESTMV) | (1 << NEAREST_NEWMV),
......@@ -62,13 +63,13 @@ enum {
(1 << NEAREST_NEARESTMV) | (1 << NEW_NEWMV) |
(1 << NEAREST_NEARMV) | (1 << NEAR_NEARESTMV) |
(1 << NEW_NEARESTMV) | (1 << NEAREST_NEWMV) |
(1 << NEW_NEARMV) | (1 << NEAR_NEWMV),
(1 << NEW_NEARMV) | (1 << NEAR_NEWMV) | (1 << NEAR_NEARMV),
INTER_NEAREST_NEAR_ZERO =
(1 << NEARESTMV) | (1 << NEARMV) | (1 << ZEROMV) |
(1 << NEAREST_NEARESTMV) | (1 << ZERO_ZEROMV) |
(1 << NEAREST_NEARMV) | (1 << NEAR_NEARESTMV) |
(1 << NEAREST_NEWMV) | (1 << NEW_NEARESTMV) |
(1 << NEW_NEARMV) | (1 << NEAR_NEWMV)
(1 << NEW_NEARMV) | (1 << NEAR_NEWMV) | (1 << NEAR_NEARMV),
};
#else
enum {
......
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