Combine compile flags for skip mode improve
As described in #227, there are two compile time flags for skip mode improvement. In this MR, these two compile time flags are combined into one compile time flag CONFIG_SKIP_MODE_ENHANCEMENT.
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index bd2449a..a0a899d 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -1735,7 +1735,7 @@
} WARP_PARAM_BANK;
#endif // CONFIG_WARP_REF_LIST
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
/*! \brief Variables related to mvp list of skip mode.*/
typedef struct {
//! MV list
@@ -1753,7 +1753,7 @@
//! Global mvs
int_mv global_mvs[2];
} SKIP_MODE_MVP_LIST;
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
/*! \brief Variables related to current coding block.
*
@@ -2073,9 +2073,9 @@
/*!
* skip_mvp_candidate_list is the MVP list for skip mode.
*/
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
SKIP_MODE_MVP_LIST skip_mvp_candidate_list;
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_WARP_REF_LIST
/*!
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 3bf9782..111ee13 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -161,9 +161,9 @@
RESET_CDF_COUNTER(fc->drl_cdf[0], 2);
RESET_CDF_COUNTER(fc->drl_cdf[1], 2);
RESET_CDF_COUNTER(fc->drl_cdf[2], 2);
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
RESET_CDF_COUNTER(fc->skip_drl_cdf, 2);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_OPTFLOW_REFINEMENT
RESET_CDF_COUNTER(fc->use_optflow_cdf, 2);
RESET_CDF_COUNTER(fc->inter_compound_mode_cdf, INTER_COMPOUND_REF_TYPES);
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index cff5831..04d839c 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -1688,13 +1688,13 @@
};
#endif // CONFIG_IMPROVED_JMVD
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
static const aom_cdf_prob default_skip_drl_cdf[3][CDF_SIZE(2)] = {
{ AOM_CDF2(24394) },
{ AOM_CDF2(22637) },
{ AOM_CDF2(21474) },
};
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_C076_INTER_MOD_CTX
#if CONFIG_OPTFLOW_REFINEMENT
@@ -3307,9 +3307,9 @@
av1_copy(fc->motion_mode_cdf, default_motion_mode_cdf);
av1_copy(fc->obmc_cdf, default_obmc_cdf);
#endif // CONFIG_EXTENDED_WARP_PREDICTION
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
av1_copy(fc->skip_drl_cdf, default_skip_drl_cdf);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_BAWP
av1_copy(fc->bawp_cdf, default_bawp_cdf);
#endif // CONFIG_BAWP
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index 0ec8e93..b72678e 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -197,9 +197,9 @@
#endif // CONFIG_WARPMV
aom_cdf_prob drl_cdf[3][DRL_MODE_CONTEXTS][CDF_SIZE(2)];
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
aom_cdf_prob skip_drl_cdf[3][CDF_SIZE(2)];
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_REFINEMV
aom_cdf_prob refinemv_flag_cdf[NUM_REFINEMV_CTX]
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index 7ac8581..6a94736 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -194,18 +194,18 @@
const MV_REFERENCE_FRAME rf[2], CANDIDATE_MV *ref_mv_stack,
uint16_t *ref_mv_weight, uint8_t *refmv_count,
CANDIDATE_MV *derived_mv_stack, uint8_t derived_mv_count,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
const MB_MODE_INFO *mbmi, MV_REFERENCE_FRAME *ref_frame_idx0,
MV_REFERENCE_FRAME *ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
const int max_ref_mv_count) {
int index = 0;
int derived_idx = 0;
if (rf[1] == NONE_FRAME) {
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
assert(!mbmi->skip_mode);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
for (derived_idx = 0; derived_idx < derived_mv_count; ++derived_idx) {
for (index = 0; index < *refmv_count; ++index) {
@@ -236,10 +236,10 @@
derived_mv_stack[derived_idx].this_mv.as_int) &&
(ref_mv_stack[index].comp_mv.as_int ==
derived_mv_stack[derived_idx].comp_mv.as_int)) {
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (!mbmi->skip_mode || (ref_frame_idx0[index] == rf[0] &&
ref_frame_idx1[index] == rf[1]))
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
break;
}
}
@@ -255,12 +255,12 @@
#if CONFIG_CWP
ref_mv_stack[index].cwp_idx = derived_mv_stack[derived_idx].cwp_idx;
#endif // CONFIG_CWP
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mbmi->skip_mode) {
ref_frame_idx0[index] = rf[0];
ref_frame_idx1[index] = rf[1];
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
ref_mv_weight[index] = REF_CAT_LEVEL;
++(*refmv_count);
}
@@ -396,11 +396,11 @@
uint8_t *ref_match_count, uint8_t *newmv_count, CANDIDATE_MV *ref_mv_stack,
uint16_t *ref_mv_weight, int_mv *gm_mv_candidates,
const WarpedMotionParams *gm_params,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
const MB_MODE_INFO *mbmi,
MV_REFERENCE_FRAME ref_frame_idx0[MAX_REF_MV_STACK_SIZE],
MV_REFERENCE_FRAME ref_frame_idx1[MAX_REF_MV_STACK_SIZE],
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
const AV1_COMMON *cm, int add_more_mvs, SINGLE_MV_CANDIDATE *single_mv,
uint8_t *single_mv_count, CANDIDATE_MV *derived_mv_stack,
@@ -434,7 +434,7 @@
const TIP *tip_ref = &cm->tip_ref;
#endif // CONFIG_TIP
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mbmi->skip_mode) {
#if CONFIG_TIP
if (!is_tip_ref_frame(candidate->ref_frame[0]) &&
@@ -482,12 +482,12 @@
}
return;
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
if (rf[1] == NONE_FRAME) {
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
assert(!mbmi->skip_mode);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
// single reference frame
for (ref = 0; ref < 2; ++ref) {
@@ -624,9 +624,9 @@
// compound reference frame
if (candidate->ref_frame[0] == rf[0] &&
candidate->ref_frame[1] == rf[1]) {
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mbmi->skip_mode) return;
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
int_mv this_refmv[2];
@@ -843,9 +843,9 @@
CANDIDATE_MV *ref_mv_stack, uint16_t *ref_mv_weight, uint8_t *refmv_count,
uint8_t *ref_match_count, uint8_t *newmv_count, int_mv *gm_mv_candidates,
int max_row_offset,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
MV_REFERENCE_FRAME *ref_frame_idx0, MV_REFERENCE_FRAME *ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
int add_more_mvs, SINGLE_MV_CANDIDATE *single_mv, uint8_t *single_mv_count,
CANDIDATE_MV *derived_mv_stack, uint16_t *derived_mv_weight,
@@ -950,9 +950,9 @@
#endif // CONFIG_C071_SUBBLK_WARPMV
rf, refmv_count, ref_match_count, newmv_count, ref_mv_stack,
ref_mv_weight, gm_mv_candidates, cm->global_motion,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
xd->mi[0], ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
cm, add_more_mvs, single_mv, single_mv_count, derived_mv_stack,
derived_mv_weight, derived_mv_count,
@@ -1009,9 +1009,9 @@
const MV_REFERENCE_FRAME rf[2], int col_offset, CANDIDATE_MV *ref_mv_stack,
uint16_t *ref_mv_weight, uint8_t *refmv_count, uint8_t *ref_match_count,
uint8_t *newmv_count, int_mv *gm_mv_candidates, int max_col_offset,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
MV_REFERENCE_FRAME *ref_frame_idx0, MV_REFERENCE_FRAME *ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
int add_more_mvs, SINGLE_MV_CANDIDATE *single_mv, uint8_t *single_mv_count,
CANDIDATE_MV *derived_mv_stack, uint16_t *derived_mv_weight,
@@ -1113,9 +1113,9 @@
#endif // CONFIG_C071_SUBBLK_WARPMV
rf, refmv_count, ref_match_count, newmv_count, ref_mv_stack,
ref_mv_weight, gm_mv_candidates, cm->global_motion,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
xd->mi[0], ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
cm, add_more_mvs, single_mv, single_mv_count, derived_mv_stack,
derived_mv_weight, derived_mv_count,
@@ -1160,9 +1160,9 @@
const int mi_col, const MV_REFERENCE_FRAME rf[2], int row_offset,
int col_offset, CANDIDATE_MV *ref_mv_stack, uint16_t *ref_mv_weight,
uint8_t *ref_match_count, uint8_t *newmv_count, int_mv *gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
MV_REFERENCE_FRAME *ref_frame_idx0, MV_REFERENCE_FRAME *ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
int add_more_mvs, SINGLE_MV_CANDIDATE *single_mv, uint8_t *single_mv_count,
CANDIDATE_MV *derived_mv_stack, uint16_t *derived_mv_weight,
@@ -1224,9 +1224,9 @@
#endif // CONFIG_C071_SUBBLK_WARPMV
rf, refmv_count, ref_match_count, newmv_count, ref_mv_stack,
ref_mv_weight, gm_mv_candidates, cm->global_motion,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
xd->mi[0], ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
cm, add_more_mvs, single_mv, single_mv_count, derived_mv_stack,
derived_mv_weight, derived_mv_count,
@@ -1458,11 +1458,11 @@
#endif // CONFIG_MVP_IMPROVEMENT
CANDIDATE_MV ref_mv_stack[MAX_REF_MV_STACK_SIZE],
uint16_t ref_mv_weight[MAX_REF_MV_STACK_SIZE]
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
,
MV_REFERENCE_FRAME *ref_frame_idx0,
MV_REFERENCE_FRAME *ref_frame_idx1
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if !CONFIG_C076_INTER_MOD_CTX
,
int16_t *mode_context
@@ -1543,9 +1543,9 @@
}
#endif // !CONFIG_C076_INTER_MOD_CTX
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
assert(!xd->mi[0]->skip_mode);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
for (idx = 0; idx < *refmv_count; ++idx)
if (this_refmv.as_int == ref_mv_stack[idx].this_mv.as_int) break;
@@ -1599,7 +1599,7 @@
}
#endif // !CONFIG_C076_INTER_MOD_CTX
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (xd->mi[0]->skip_mode) {
for (idx = 0; idx < *refmv_count; ++idx) {
if (this_refmv.as_int == ref_mv_stack[idx].this_mv.as_int &&
@@ -1625,7 +1625,7 @@
#endif // CONFIG_MVP_IMPROVEMENT
}
} else {
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
for (idx = 0; idx < *refmv_count; ++idx) {
if (this_refmv.as_int == ref_mv_stack[idx].this_mv.as_int &&
comp_refmv.as_int == ref_mv_stack[idx].comp_mv.as_int)
@@ -1651,9 +1651,9 @@
++(*added_tmvp_cnt);
#endif // CONFIG_MVP_IMPROVEMENT
}
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
}
return 1;
@@ -1821,9 +1821,9 @@
uint8_t *const refmv_count,
CANDIDATE_MV ref_mv_stack[MAX_REF_MV_STACK_SIZE],
uint16_t ref_mv_weight[MAX_REF_MV_STACK_SIZE],
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
MV_REFERENCE_FRAME *ref_frame_idx0, MV_REFERENCE_FRAME *ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
int_mv mv_ref_list[MAX_MV_REF_CANDIDATES], int_mv *gm_mv_candidates,
int mi_row, int mi_col
#if !CONFIG_C076_INTER_MOD_CTX
@@ -1944,9 +1944,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, (xd->height - 1), -1,
ref_mv_stack, ref_mv_weight, &col_match_count, &newmv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -1963,9 +1963,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, -1, (xd->width - 1), ref_mv_stack,
ref_mv_weight, &row_match_count, &newmv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -1980,9 +1980,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, 0, -1, ref_mv_stack,
ref_mv_weight, &col_match_count, &newmv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -1999,9 +1999,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, -1, 0, ref_mv_stack,
ref_mv_weight, &row_match_count, &newmv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2016,9 +2016,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, xd->height, -1, ref_mv_stack,
ref_mv_weight, &col_match_count, &newmv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2033,9 +2033,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, -1, xd->width, ref_mv_stack,
ref_mv_weight, &row_match_count, &newmv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2052,9 +2052,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, -1, -1, ref_mv_stack,
ref_mv_weight, &dummy_ref_match_count, &dummy_new_mv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2069,9 +2069,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, (xd->height >> 1), -1,
ref_mv_stack, ref_mv_weight, &col_match_count, &newmv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2088,9 +2088,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, -1, (xd->width >> 1),
ref_mv_stack, ref_mv_weight, &row_match_count, &newmv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2111,9 +2111,9 @@
mi_col, rf, -1, ref_mv_stack, ref_mv_weight, refmv_count,
&row_match_count, &newmv_count, gm_mv_candidates,
max_row_offset,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2133,9 +2133,9 @@
rf, -1, ref_mv_stack, ref_mv_weight, refmv_count,
&col_match_count, &newmv_count, gm_mv_candidates,
max_col_offset,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2151,9 +2151,9 @@
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, -1, xd->width, ref_mv_stack,
ref_mv_weight, &row_match_count, &newmv_count,
gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
1, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2236,10 +2236,10 @@
&added_tmvp_cnt,
#endif // CONFIG_MVP_IMPROVEMENT
ref_mv_stack, ref_mv_weight
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
,
ref_frame_idx0, ref_frame_idx1
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if !CONFIG_C076_INTER_MOD_CTX
,
mode_context
@@ -2269,10 +2269,10 @@
gm_mv_candidates,
#endif //! CONFIG_C076_INTER_MOD_CTX
refmv_count, ref_mv_stack, ref_mv_weight,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0,
ref_frame_idx1
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if !CONFIG_C076_INTER_MOD_CTX
mode_context
#endif //! CONFIG_C076_INTER_MOD_CTX
@@ -2287,9 +2287,9 @@
// Scan the second outer area.
scan_blk_mbmi(cm, xd, mi_row, mi_col, rf, -1, -1, ref_mv_stack, ref_mv_weight,
&row_match_count, &dummy_newmv_count, gm_mv_candidates,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_MVP_IMPROVEMENT
0, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
@@ -2313,9 +2313,9 @@
rf, col_offset, ref_mv_stack, ref_mv_weight, refmv_count,
&col_match_count, &dummy_newmv_count, gm_mv_candidates,
max_col_offset,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
0, single_mv, &single_mv_count, derived_mv_stack,
derived_mv_weight, &derived_mv_count,
#if CONFIG_WARP_REF_LIST
@@ -2339,9 +2339,9 @@
mi_col, rf, row_offset, ref_mv_stack, ref_mv_weight,
refmv_count, &row_match_count, &dummy_newmv_count,
gm_mv_candidates, max_row_offset,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_WARP_REF_LIST
warp_param_stack, max_num_of_warp_candidates,
valid_num_warp_candidates, ref_frame,
@@ -2358,9 +2358,9 @@
rf, col_offset, ref_mv_stack, ref_mv_weight, refmv_count,
&col_match_count, &dummy_newmv_count, gm_mv_candidates,
max_col_offset,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_WARP_REF_LIST
warp_param_stack, max_num_of_warp_candidates,
valid_num_warp_candidates, ref_frame,
@@ -2420,7 +2420,7 @@
ref_mv_stack[idx] = tmp_mv;
ref_mv_weight[idx - 1] = ref_mv_weight[idx];
ref_mv_weight[idx] = tmp_ref_mv_weight;
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (xd->mi[0]->skip_mode) {
const MV_REFERENCE_FRAME temp_ref0 = ref_frame_idx0[idx - 1];
const MV_REFERENCE_FRAME temp_ref1 = ref_frame_idx1[idx - 1];
@@ -2430,7 +2430,7 @@
ref_frame_idx1[idx - 1] = ref_frame_idx1[idx];
ref_frame_idx1[idx] = temp_ref1;
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
nr_len = idx;
}
}
@@ -2479,18 +2479,18 @@
++idx_bank) {
const int idx = (start_idx + count - 1 - idx_bank) % REF_MV_BANK_SIZE;
const CANDIDATE_MV cand_mv = queue[idx];
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
bool rmb_candi_exist =
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
check_rmb_cand(cand_mv, ref_mv_stack, ref_mv_weight, refmv_count,
is_comp, xd->mi_row, xd->mi_col, block_width,
block_height, cm->width, cm->height);
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (xd->mi[0]->skip_mode && rmb_candi_exist) {
ref_frame_idx0[*refmv_count - 1] = rf[0];
ref_frame_idx1[*refmv_count - 1] = rf[1];
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
}
}
}
@@ -2500,16 +2500,16 @@
const int max_ref_mv_count =
AOMMIN(cm->features.max_drl_bits + 1, MAX_REF_MV_STACK_SIZE);
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (xd->mi[0]->skip_mode) derived_mv_count = 0;
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
if (*refmv_count < max_ref_mv_count && derived_mv_count > 0) {
fill_mvp_from_derived_smvp(rf, ref_mv_stack, ref_mv_weight, refmv_count,
derived_mv_stack, derived_mv_count,
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
xd->mi[0], ref_frame_idx0, ref_frame_idx1,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
max_ref_mv_count);
}
#endif // CONFIG_MVP_IMPROVEMENT
@@ -2595,12 +2595,12 @@
ref_mv_stack[*refmv_count].cwp_idx = CWP_EQUAL;
#endif // CONFIG_CWP
}
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (xd->mi[0]->skip_mode) {
ref_frame_idx0[*refmv_count] = rf[0];
ref_frame_idx1[*refmv_count] = rf[1];
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
ref_mv_weight[*refmv_count] = 2;
++*refmv_count;
} else {
@@ -2614,12 +2614,12 @@
#if CONFIG_CWP
ref_mv_stack[*refmv_count].cwp_idx = CWP_EQUAL;
#endif // CONFIG_CWP
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (xd->mi[0]->skip_mode) {
ref_frame_idx0[*refmv_count] = rf[0];
ref_frame_idx1[*refmv_count] = rf[1];
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
ref_mv_weight[*refmv_count] = 2;
++*refmv_count;
}
@@ -2636,9 +2636,9 @@
}
} else {
// Handle single reference frame extension
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
assert(!xd->mi[0]->skip_mode);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_IBC_SR_EXT
if (!xd->mi[0]->use_intrabc[xd->tree_type == CHROMA_PART]) {
#endif // CONFIG_IBC_SR_EXT
@@ -2738,18 +2738,18 @@
++idx_bank) {
const int idx = (start_idx + count - 1 - idx_bank) % REF_MV_BANK_SIZE;
const CANDIDATE_MV cand_mv = queue[idx];
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
bool rmb_candi_exist =
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
check_rmb_cand(cand_mv, ref_mv_stack, ref_mv_weight, refmv_count,
is_comp, xd->mi_row, xd->mi_col, block_width,
block_height, cm->width, cm->height);
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (xd->mi[0]->skip_mode && rmb_candi_exist) {
ref_frame_idx0[*refmv_count - 1] = rf[0];
ref_frame_idx1[*refmv_count - 1] = rf[1];
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
}
}
#endif // CONFIG_REF_MV_BANK && !CONFIG_MVP_IMPROVEMENT
@@ -2980,7 +2980,7 @@
}
#endif // CONFIG_WARP_REF_LIST
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mi->skip_mode) {
SKIP_MODE_MVP_LIST *skip_list =
(SKIP_MODE_MVP_LIST *)&(xd->skip_mvp_candidate_list);
@@ -3099,7 +3099,7 @@
derive_wrl ? &valid_num_warp_candidates[ref_frame] : NULL
#endif // CONFIG_WARP_REF_LIST
);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
}
#if CONFIG_FLEX_MVRES
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 75c72b2..4686ecb 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -332,12 +332,12 @@
? xd->weight[mbmi->ref_frame[ref]]
: xd->weight[ref_frame_type];
aom_cdf_prob *drl_cdf =
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
mbmi->skip_mode ? ec_ctx->skip_drl_cdf[AOMMIN(idx, 2)]
: av1_get_drl_cdf(ec_ctx, weight, mode_ctx, idx);
#else
av1_get_drl_cdf(ec_ctx, xd->weight[ref_frame_type], mode_ctx, idx);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
int drl_idx = aom_read_symbol(r, drl_cdf, 2, ACCT_INFO("drl_idx"));
mbmi->ref_mv_idx[ref] = idx + drl_idx;
if (!drl_idx) break;
@@ -351,13 +351,13 @@
#endif // CONFIG_SKIP_MODE_ENHANCEMENT
for (int idx = 0; idx < max_drl_bits; ++idx) {
aom_cdf_prob *drl_cdf =
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
mbmi->skip_mode ? ec_ctx->skip_drl_cdf[AOMMIN(idx, 2)]
: av1_get_drl_cdf(ec_ctx, xd->weight[ref_frame_type],
mode_ctx, idx);
#else
av1_get_drl_cdf(ec_ctx, xd->weight[ref_frame_type], mode_ctx, idx);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
int drl_idx = aom_read_symbol(r, drl_cdf, 2, ACCT_INFO("drl_idx"));
mbmi->ref_mv_idx = idx + drl_idx;
if (!drl_idx) break;
@@ -2884,7 +2884,7 @@
);
#endif // CONFIG_SEP_COMP_DRL
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_SEP_COMP_DRL
mbmi->ref_frame[0] =
xd->skip_mvp_candidate_list.ref_frame0[get_ref_mv_idx(mbmi, 0)];
@@ -2896,7 +2896,7 @@
mbmi->ref_frame[1] =
xd->skip_mvp_candidate_list.ref_frame1[mbmi->ref_mv_idx];
#endif
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_REFINEMV && !CONFIG_CWP
mbmi->refinemv_flag = get_default_refinemv_flag(cm, mbmi);
@@ -3077,7 +3077,7 @@
#else
ref_mv[1] = xd->ref_mv_stack[ref_frame][mbmi->ref_mv_idx].comp_mv;
#endif
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mbmi->skip_mode) {
#if CONFIG_SEP_COMP_DRL
ref_mv[0] =
@@ -3093,7 +3093,7 @@
xd->skip_mvp_candidate_list.ref_mv_stack[mbmi->ref_mv_idx].comp_mv;
#endif // CONFIG_SEP_COMP_DRL
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
}
if (mbmi->skip_mode) {
@@ -3292,7 +3292,7 @@
}
}
}
-#if CONFIG_CWP
+#if CONFIG_CWP && CONFIG_SKIP_MODE_ENHANCEMENT
mbmi->cwp_idx = CWP_EQUAL;
if (cm->features.enable_cwp) {
if (is_cwp_allowed(mbmi) && !mbmi->skip_mode)
@@ -3312,8 +3312,8 @@
? 1
: 0;
}
-#endif
-#endif // CONFIG_CWP
+#endif // CONFIG_REFINEMV
+#endif // CONFIG_CWP && CONFIG_SKIP_MODE_ENHANCEMENT
read_mb_interp_filter(xd, features->interp_filter, cm, mbmi, r);
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 2b3168d..879ebec 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -152,12 +152,12 @@
assert(mbmi->mode == NEAR_NEARMV);
}
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mbmi->skip_mode)
assert(mbmi->ref_mv_idx[0] <
mbmi_ext_frame->skip_mvp_candidate_list.ref_mv_count);
else
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
assert(mbmi->ref_mv_idx[0] < mbmi_ext_frame->ref_mv_count[0]);
if (has_second_drl(mbmi))
assert(mbmi->ref_mv_idx[1] < mbmi_ext_frame->ref_mv_count[1]);
@@ -166,35 +166,35 @@
for (int ref = 0; ref < 1 + has_second_drl(mbmi); ref++) {
for (int idx = 0; idx < max_drl_bits; ++idx) {
aom_cdf_prob *drl_cdf =
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
mbmi->skip_mode ? ec_ctx->skip_drl_cdf[AOMMIN(idx, 2)]
: av1_get_drl_cdf(ec_ctx, mbmi_ext_frame->weight[ref],
mode_ctx, idx);
#else
av1_get_drl_cdf(ec_ctx, mbmi_ext_frame->weight[ref], mode_ctx, idx);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
aom_write_symbol(w, mbmi->ref_mv_idx[ref] != idx, drl_cdf, 2);
if (mbmi->ref_mv_idx[ref] == idx) break;
}
}
#else
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mbmi->skip_mode)
assert(mbmi->ref_mv_idx <
mbmi_ext_frame->skip_mvp_candidate_list.ref_mv_count);
else
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
assert(mbmi->ref_mv_idx < mbmi_ext_frame->ref_mv_count);
assert(mbmi->ref_mv_idx < max_drl_bits + 1);
for (int idx = 0; idx < max_drl_bits; ++idx) {
aom_cdf_prob *drl_cdf =
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
mbmi->skip_mode
? ec_ctx->skip_drl_cdf[AOMMIN(idx, 2)]
: av1_get_drl_cdf(ec_ctx, mbmi_ext_frame->weight, mode_ctx, idx);
#else
av1_get_drl_cdf(ec_ctx, mbmi_ext_frame->weight, mode_ctx, idx);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
aom_write_symbol(w, mbmi->ref_mv_idx != idx, drl_cdf, 2);
if (mbmi->ref_mv_idx == idx) break;
}
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 468f0a8..23feb0b 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -260,7 +260,7 @@
//! Global mvs
int_mv global_mvs[INTER_REFS_PER_FRAME];
//! skip_mvp_candidate_list is the MVP list for skip mode.
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
SKIP_MODE_MVP_LIST skip_mvp_candidate_list;
#endif
@@ -300,7 +300,7 @@
uint8_t ref_mv_count;
#endif // CONFIG_SEP_COMP_DRL
//! skip_mvp_candidate_list is the MVP list for skip mode.
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
SKIP_MODE_MVP_LIST skip_mvp_candidate_list;
#endif
// TODO(Ravi/Remya): Reduce the buffer size of global_mvs
@@ -921,10 +921,10 @@
int pb_block_mv_precision_costs[MV_PREC_DOWN_CONTEXTS][FLEX_MV_COSTS_SIZE]
[NUM_MV_PRECISIONS];
#endif
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
//! skip_drl_mode_cost
int skip_drl_mode_cost[3][2];
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
/**@}*/
/*****************************************************************************
diff --git a/av1/encoder/encodeframe_utils.c b/av1/encoder/encodeframe_utils.c
index 96a4849..0f05979 100644
--- a/av1/encoder/encodeframe_utils.c
+++ b/av1/encoder/encodeframe_utils.c
@@ -1288,9 +1288,9 @@
AVERAGE_CDF(ctx_left->drl_cdf[0], ctx_tr->drl_cdf[0], 2);
AVERAGE_CDF(ctx_left->drl_cdf[1], ctx_tr->drl_cdf[1], 2);
AVERAGE_CDF(ctx_left->drl_cdf[2], ctx_tr->drl_cdf[2], 2);
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
AVERAGE_CDF(ctx_left->skip_drl_cdf, ctx_tr->skip_drl_cdf, 2);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_OPTFLOW_REFINEMENT
AVERAGE_CDF(ctx_left->inter_compound_mode_cdf,
ctx_tr->inter_compound_mode_cdf, INTER_COMPOUND_REF_TYPES);
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index b9ae241..d21d927 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -1347,9 +1347,9 @@
unsigned int inter_single_mode[INTER_SINGLE_MODE_CONTEXTS]
[INTER_SINGLE_MODES];
unsigned int drl_mode[3][DRL_MODE_CONTEXTS][2];
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
unsigned int skip_drl_mode[3][2];
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_OPTFLOW_REFINEMENT
unsigned int use_optflow[INTER_COMPOUND_MODE_CONTEXTS][2];
unsigned int inter_compound_mode[INTER_COMPOUND_MODE_CONTEXTS]
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c
index ef512d2..4718e81 100644
--- a/av1/encoder/partition_search.c
+++ b/av1/encoder/partition_search.c
@@ -1077,7 +1077,7 @@
#endif // CONFIG_WARP_REF_LIST
}
#endif // CONFIG_EXTENDED_WARP_PREDICTION
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
static void update_skip_drl_index_stats(int max_drl_bits, FRAME_CONTEXT *fc,
FRAME_COUNTS *counts,
const MB_MODE_INFO *mbmi) {
@@ -1116,7 +1116,7 @@
#endif // CONFIG_SEP_COMP_DRL
}
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
static void update_stats(const AV1_COMMON *const cm, ThreadData *td) {
MACROBLOCK *x = &td->mb;
@@ -1294,14 +1294,14 @@
#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mbmi->skip_mode && have_drl_index(mbmi->mode)) {
FRAME_COUNTS *const counts = td->counts;
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
update_skip_drl_index_stats(cm->features.max_drl_bits, fc, counts, mbmi);
#else
const int16_t mode_ctx_pristine =
av1_mode_context_pristine(mbmi_ext->mode_context, mbmi->ref_frame);
update_drl_index_stats(cm->features.max_drl_bits, mode_ctx_pristine, fc,
counts, mbmi, mbmi_ext);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
}
#endif // CONFIG_SKIP_MODE_ENHANCEMENT
@@ -2034,9 +2034,9 @@
assert(!frame_is_intra_only(cm));
rdc->skip_mode_used_flag = 1;
if (cm->current_frame.reference_mode == REFERENCE_MODE_SELECT) {
-#if !CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if !CONFIG_SKIP_MODE_ENHANCEMENT
assert(has_second_ref(mbmi));
-#endif // !CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // !CONFIG_SKIP_MODE_ENHANCEMENT
rdc->compound_ref_used_flag = 1;
}
set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
@@ -2120,7 +2120,7 @@
// frame level buffer (cpi->mbmi_ext_info.frame_base) will be used during
// bitstream preparation.
if (xd->tree_type != CHROMA_PART)
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
{
if (mbmi->skip_mode) {
const SkipModeInfo *const skip_mode_info =
@@ -2147,20 +2147,20 @@
// mbmi_ext->weight[ref_frame][4] inside av1_find_mv_refs.
av1_copy_usable_ref_mv_stack_and_weight(xd, x->mbmi_ext, ref_frame_type);
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
av1_copy_mbmi_ext_to_mbmi_ext_frame(
x->mbmi_ext_frame, x->mbmi_ext,
#if CONFIG_SEP_COMP_DRL
mbmi,
#endif // CONFIG_SEP_COMP_DRL
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
mbmi->skip_mode,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
av1_ref_frame_type(xd->mi[0]->ref_frame));
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
x->rdmult = origin_mult;
}
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index 5ddbae1..e230e0f 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -541,12 +541,12 @@
fc->drl_cdf[2][i], NULL);
}
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
for (i = 0; i < 3; ++i) {
av1_cost_tokens_from_cdf(mode_costs->skip_drl_mode_cost[i],
fc->skip_drl_cdf[i], NULL);
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_OPTFLOW_REFINEMENT
for (i = 0; i < INTER_COMPOUND_MODE_CONTEXTS; ++i)
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 07222dc..a41ab9a 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -789,9 +789,9 @@
#if CONFIG_SEP_COMP_DRL
xd->mi[0],
#endif // CONFIG_SEP_COMP_DRL
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
xd->mi[0]->skip_mode,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
av1_ref_frame_type(xd->mi[0]->ref_frame));
ctx->single_pred_diff = (int)comp_pred_diff[SINGLE_REFERENCE];
ctx->comp_pred_diff = (int)comp_pred_diff[COMPOUND_REFERENCE];
@@ -829,9 +829,9 @@
av1_setup_pred_block(xd, yv12_mb[ref_frame_idx], yv12, sf, sf, num_planes);
}
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mbmi->skip_mode) return;
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
// Gets an initial list of candidate vectors from neighbours and orders them
av1_find_mv_refs(
@@ -3057,7 +3057,7 @@
const MB_MODE_INFO *mbmi = xd->mi[0];
const int is_comp_pred = has_second_ref(mbmi);
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (mbmi->skip_mode) {
int ret = 1;
#if CONFIG_SEP_COMP_DRL
@@ -3107,7 +3107,7 @@
return ret;
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
int ret = 1;
for (int i = 0; i < is_comp_pred + 1; ++i) {
@@ -3211,7 +3211,7 @@
return cost;
}
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
static INLINE int get_skip_drl_cost(int max_drl_bits, const MB_MODE_INFO *mbmi,
const MACROBLOCK *x) {
#if CONFIG_SEP_COMP_DRL
@@ -3258,7 +3258,7 @@
#endif
return cost;
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
static INLINE int is_single_newmv_valid(const HandleInterModeArgs *const args,
const MB_MODE_INFO *const mbmi,
@@ -3317,10 +3317,10 @@
if (mode == AMVDNEWMV) ref_mv_count = AOMMIN(ref_mv_count, 2);
#endif // IMPROVED_AMVD
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (x->e_mbd.mi[0]->skip_mode)
ref_mv_count = mbmi_ext->skip_mvp_candidate_list.ref_mv_count;
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
return AOMMIN(max_drl_bits + 1, ref_mv_count);
}
@@ -6746,9 +6746,9 @@
#if CONFIG_SEP_COMP_DRL
xd->mi[0],
#endif
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
mbmi->skip_mode,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
av1_ref_frame_type(xd->mi[0]->ref_frame));
av1_copy_array(ctx->tx_type_map, xd->tx_type_map, ctx->num_4x4_blk);
}
@@ -6834,7 +6834,7 @@
mbmi->refinemv_flag = 0;
#endif // CONFIG_REFINEMV
-#if !CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if !CONFIG_SKIP_MODE_ENHANCEMENT
const uint8_t ref_frame_type = av1_ref_frame_type(mbmi->ref_frame);
if (x->mbmi_ext->ref_mv_count[ref_frame_type] == UINT8_MAX) {
if (x->mbmi_ext->ref_mv_count[ref_frame] == UINT8_MAX ||
@@ -6858,7 +6858,7 @@
// mbmi_ext->weight[ref_frame][4] inside av1_find_mv_refs.
av1_copy_usable_ref_mv_stack_and_weight(xd, mbmi_ext, ref_frame_type);
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_OPTFLOW_REFINEMENT
#if CONFIG_CWP
@@ -6880,12 +6880,12 @@
assert(mbmi->mode == NEAR_NEARMV);
#endif
-#if !CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if !CONFIG_SKIP_MODE_ENHANCEMENT
if (!build_cur_mv(mbmi->mv, this_mode, cm, x, 0)) {
assert(av1_check_newmv_joint_nonzero(cm, x));
return;
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
mbmi->fsc_mode[xd->tree_type == CHROMA_PART] = 0;
#if CONFIG_BAWP
@@ -6926,7 +6926,7 @@
#endif // CONFIG_OPTFLOW_REFINEMENT
cm->features.interp_filter);
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
const int mi_row = xd->mi_row;
const int mi_col = xd->mi_col;
@@ -7036,7 +7036,7 @@
orig_dst.plane[i] = xd->plane[i].dst.buf;
orig_dst.stride[i] = xd->plane[i].dst.stride;
}
-#else // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#else // CONFIG_SKIP_MODE_ENHANCEMENT
set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
for (int i = 0; i < num_planes; i++) {
xd->plane[i].pre[0] = yv12_mb[mbmi->ref_frame[0]][i];
@@ -7077,7 +7077,7 @@
assert(av1_check_newmv_joint_nonzero(cm, x));
continue;
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
av1_enc_build_inter_predictor(cm, xd, mi_row, mi_col, &orig_dst, bsize, 0,
av1_num_planes(cm) - 1);
@@ -7093,11 +7093,11 @@
// MB_MODE_INFO_EXT *const mbmi_ext = x->mbmi_ext;
// add ref_mv_idx rate
const int drl_cost =
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
get_skip_drl_cost(cpi->common.features.max_drl_bits, mbmi, x);
#else
get_drl_cost(cpi->common.features.max_drl_bits, mbmi, mbmi_ext, x);
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
skip_mode_rd_stats.rate += drl_cost;
// Do transform search
@@ -7244,7 +7244,12 @@
}
mbmi->mode = this_mode;
+#if CONFIG_SEP_COMP_DRL
+ mbmi->ref_mv_idx[0] = 0;
+ mbmi->ref_mv_idx[1] = 0;
+#else
mbmi->ref_mv_idx = 0;
+#endif // CONFIG_SEP_COMP_DRL
mbmi->uv_mode = UV_DC_PRED;
mbmi->ref_frame[0] = ref_frame;
mbmi->ref_frame[1] = second_ref_frame;
@@ -7288,7 +7293,12 @@
mbmi->comp_group_idx = 0;
mbmi->interinter_comp.type = COMPOUND_AVERAGE;
mbmi->motion_mode = SIMPLE_TRANSLATION;
+#if CONFIG_SEP_COMP_DRL
+ mbmi->ref_mv_idx[0] = 0;
+ mbmi->ref_mv_idx[1] = 0;
+#else
mbmi->ref_mv_idx = 0;
+#endif // CONFIG_SEP_COMP_DRL
mbmi->skip_mode = mbmi->skip_txfm[xd->tree_type == CHROMA_PART] = 1;
set_default_interp_filters(mbmi,
@@ -7343,7 +7353,12 @@
search_state->best_mbmode.ref_frame[1] = mbmi->ref_frame[1];
search_state->best_mbmode.mv[0].as_int = mbmi->mv[0].as_int;
search_state->best_mbmode.mv[1].as_int = mbmi->mv[1].as_int;
+#if CONFIG_SEP_COMP_DRL
+ search_state->best_mbmode.ref_mv_idx[0] = 0;
+ search_state->best_mbmode.ref_mv_idx[1] = 0;
+#else
search_state->best_mbmode.ref_mv_idx = 0;
+#endif
#if CONFIG_FLEX_MVRES
search_state->best_mbmode.pb_mv_precision = mbmi->max_mv_precision;
diff --git a/av1/encoder/rdopt.h b/av1/encoder/rdopt.h
index 04144b7..3647c7d 100644
--- a/av1/encoder/rdopt.h
+++ b/av1/encoder/rdopt.h
@@ -179,13 +179,13 @@
static INLINE void av1_copy_usable_ref_mv_stack_and_weight(
const MACROBLOCKD *xd, MB_MODE_INFO_EXT *const mbmi_ext,
MV_REFERENCE_FRAME ref_frame) {
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (xd->mi[0]->skip_mode) {
memcpy(&(mbmi_ext->skip_mvp_candidate_list), &(xd->skip_mvp_candidate_list),
sizeof(xd->skip_mvp_candidate_list));
return;
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_SEP_COMP_DRL
if (has_second_drl(xd->mi[0])) {
MV_REFERENCE_FRAME rf[2];
@@ -327,19 +327,19 @@
#if CONFIG_SEP_COMP_DRL
MB_MODE_INFO *mbmi,
#endif // CONFIG_SEP_COMP_DRL
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
uint8_t skip_mode,
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
uint8_t ref_frame_type) {
-#if CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#if CONFIG_SKIP_MODE_ENHANCEMENT
if (skip_mode) {
memcpy(&(mbmi_ext_best->skip_mvp_candidate_list),
&(mbmi_ext->skip_mvp_candidate_list),
sizeof(mbmi_ext->skip_mvp_candidate_list));
return;
}
-#endif // CONFIG_SKIP_MODE_DRL_WITH_REF_IDX
+#endif // CONFIG_SKIP_MODE_ENHANCEMENT
#if CONFIG_SEP_COMP_DRL
MV_REFERENCE_FRAME rf[2];
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index f410fad..5deff84 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -228,10 +228,7 @@
set_aom_config_var(CONFIG_SKIP_MODE_SSE_BUG_FIX 1
"AV2 experiment flag to fix the SSE calc bug for skip mode.")
set_aom_config_var(CONFIG_SKIP_MODE_ENHANCEMENT 1
- "AV2 experiment flag to enable skip mode enhancement: C019.")
-set_aom_config_var(
- CONFIG_SKIP_MODE_DRL_WITH_REF_IDX 1
- "AV2 experiment flag to enable DRL with ref_MV_idx for skip mode.")
+ "AV2 experiment flag to enable skip mode enhancement.")
set_aom_config_var(CONFIG_TIP 1 "Enable temporal interpolated prediction (TIP)")
set_aom_config_var(CONFIG_OUTPUT_FRAME_BASED_ON_ORDER_HINT 0
"Enable frame output order derivation from order hint")