Commit 670b660d authored by Yue Chen's avatar Yue Chen

Remove CONFIG_INTERINTRA

Change-Id: Icbedc16b01adf9b48f0f357ec89143462865d54e
parent c5252a69
......@@ -334,10 +334,8 @@ typedef struct MB_MODE_INFO {
int8_t angle_delta[2];
#endif // CONFIG_EXT_INTRA
#if CONFIG_INTERINTRA
// interintra members
INTERINTRA_MODE interintra_mode;
#endif
// TODO(debargha): Consolidate these flags
int use_wedge_interintra;
int interintra_wedge_index;
......@@ -1288,30 +1286,15 @@ void av1_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
int loff);
static INLINE int is_interintra_allowed_bsize(const BLOCK_SIZE bsize) {
#if CONFIG_INTERINTRA
return (bsize >= BLOCK_8X8) && (bsize <= BLOCK_32X32);
#else
(void)bsize;
return 0;
#endif // CONFIG_INTERINTRA
}
static INLINE int is_interintra_allowed_mode(const PREDICTION_MODE mode) {
#if CONFIG_INTERINTRA
return (mode >= NEARESTMV) && (mode <= NEWMV);
#else
(void)mode;
return 0;
#endif // CONFIG_INTERINTRA
}
static INLINE int is_interintra_allowed_ref(const MV_REFERENCE_FRAME rf[2]) {
#if CONFIG_INTERINTRA
return (rf[0] > INTRA_FRAME) && (rf[1] <= INTRA_FRAME);
#else
(void)rf;
return 0;
#endif // CONFIG_INTERINTRA
}
static INLINE int is_interintra_allowed(const MB_MODE_INFO *mbmi) {
......
......@@ -2365,13 +2365,11 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
AVERAGE_TILE_CDFS(inter_singleref_comp_mode_cdf)
#endif
#if CONFIG_INTERINTRA
#if CONFIG_NEW_MULTISYMBOL
AVERAGE_TILE_CDFS(interintra_cdf)
AVERAGE_TILE_CDFS(wedge_interintra_cdf)
#endif
AVERAGE_TILE_CDFS(interintra_mode_cdf)
#endif
/* NB: kf_y_cdf is discarded after use, so no need
for backwards update */
......
......@@ -753,7 +753,6 @@ static const aom_cdf_prob
#endif
};
#if CONFIG_INTERINTRA
static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
128, 226, 244, 254,
};
......@@ -830,8 +829,6 @@ static const aom_cdf_prob
};
#endif // CONFIG_NEW_MULTISYMBOL
#endif // CONFIG_INTERINTRA
#if CONFIG_NCOBMC_ADAPT_WEIGHT
#ifdef TWO_MODE
const aom_tree_index av1_ncobmc_mode_tree[TREE_SIZE(MAX_NCOBMC_MODES)] = {
......@@ -1112,13 +1109,11 @@ static const aom_cdf_prob default_delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)] = {
#endif
/* clang-format off */
#if CONFIG_INTERINTRA
const aom_tree_index av1_interintra_mode_tree[TREE_SIZE(INTERINTRA_MODES)] = {
-II_DC_PRED, 2, /* 0 = II_DC_NODE */
-II_SMOOTH_PRED, 4, /* 1 = II_SMOOTH_PRED */
-II_V_PRED, -II_H_PRED /* 2 = II_V_NODE */
};
#endif // CONFIG_INTERINTRA
const aom_tree_index av1_inter_compound_mode_tree
[TREE_SIZE(INTER_COMPOUND_MODES)] = {
......@@ -5966,7 +5961,6 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
#endif // CONFIG_COMPOUND_SINGLEREF
av1_copy(fc->compound_type_prob, default_compound_type_probs);
av1_copy(fc->compound_type_cdf, default_compound_type_cdf);
#if CONFIG_INTERINTRA
av1_copy(fc->interintra_prob, default_interintra_prob);
av1_copy(fc->wedge_interintra_prob, default_wedge_interintra_prob);
#if CONFIG_NEW_MULTISYMBOL
......@@ -5975,7 +5969,6 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
#endif // CONFIG_NEW_MULTISYMBOL
av1_copy(fc->interintra_mode_prob, default_interintra_mode_prob);
av1_copy(fc->interintra_mode_cdf, default_interintra_mode_cdf);
#endif // CONFIG_INTERINTRA
av1_copy(fc->seg.tree_probs, default_segment_tree_probs);
av1_copy(fc->seg.pred_probs, default_segment_pred_probs);
#if CONFIG_NEW_MULTISYMBOL
......@@ -6126,7 +6119,6 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
counts->inter_singleref_comp_mode[i],
fc->inter_singleref_comp_mode_probs[i]);
#endif // CONFIG_COMPOUND_SINGLEREF
#if CONFIG_INTERINTRA
if (cm->allow_interintra_compound) {
for (i = 0; i < BLOCK_SIZE_GROUPS; ++i) {
if (is_interintra_allowed_bsize_group(i))
......@@ -6144,7 +6136,6 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
pre_fc->wedge_interintra_prob[i], counts->wedge_interintra[i]);
}
}
#endif // CONFIG_INTERINTRA
if (cm->allow_masked_compound) {
for (i = 0; i < BLOCK_SIZES_ALL; ++i) {
......
......@@ -207,7 +207,6 @@ typedef struct frame_contexts {
#endif // CONFIG_COMPOUND_SINGLEREF
aom_prob compound_type_prob[BLOCK_SIZES_ALL][COMPOUND_TYPES - 1];
aom_cdf_prob compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES)];
#if CONFIG_INTERINTRA
aom_prob interintra_prob[BLOCK_SIZE_GROUPS];
aom_prob wedge_interintra_prob[BLOCK_SIZES_ALL];
aom_prob interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1];
......@@ -217,7 +216,6 @@ typedef struct frame_contexts {
#endif
aom_cdf_prob interintra_mode_cdf[BLOCK_SIZE_GROUPS]
[CDF_SIZE(INTERINTRA_MODES)];
#endif // CONFIG_INTERINTRA
aom_prob motion_mode_prob[BLOCK_SIZES_ALL][MOTION_MODES - 1];
aom_cdf_prob motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)];
#if CONFIG_NCOBMC_ADAPT_WEIGHT
......@@ -451,11 +449,9 @@ typedef struct FRAME_COUNTS {
unsigned int inter_singleref_comp_mode[INTER_MODE_CONTEXTS]
[INTER_SINGLEREF_COMP_MODES];
#endif // CONFIG_COMPOUND_SINGLEREF
#if CONFIG_INTERINTRA
unsigned int interintra[BLOCK_SIZE_GROUPS][2];
unsigned int interintra_mode[BLOCK_SIZE_GROUPS][INTERINTRA_MODES];
unsigned int wedge_interintra[BLOCK_SIZES_ALL][2];
#endif // CONFIG_INTERINTRA
unsigned int compound_interinter[BLOCK_SIZES_ALL][COMPOUND_TYPES];
unsigned int motion_mode[BLOCK_SIZES_ALL][MOTION_MODES];
#if CONFIG_NCOBMC_ADAPT_WEIGHT
......@@ -619,10 +615,8 @@ static const int av1_ext_tx_inv[TX_TYPES] = {
#endif // CONFIG_MRC_TX
#endif // CONFIG_EXT_TX
#if CONFIG_INTERINTRA
extern const aom_tree_index
av1_interintra_mode_tree[TREE_SIZE(INTERINTRA_MODES)];
#endif
extern const aom_tree_index
av1_inter_compound_mode_tree[TREE_SIZE(INTER_COMPOUND_MODES)];
#if CONFIG_COMPOUND_SINGLEREF
......
......@@ -585,7 +585,6 @@ typedef enum ATTRIBUTE_PACKED {
#endif
} MOTION_MODE;
#if CONFIG_INTERINTRA
typedef enum ATTRIBUTE_PACKED {
II_DC_PRED,
II_V_PRED,
......@@ -593,7 +592,6 @@ typedef enum ATTRIBUTE_PACKED {
II_SMOOTH_PRED,
INTERINTRA_MODES
} INTERINTRA_MODE;
#endif
typedef enum {
COMPOUND_AVERAGE,
......
......@@ -278,9 +278,7 @@ typedef struct AV1Common {
#endif
int allow_screen_content_tools;
#if CONFIG_INTERINTRA
int allow_interintra_compound;
#endif // CONFIG_INTERINTRA
int allow_masked_compound;
#if !CONFIG_NO_FRAME_CONTEXT_SIGNALING
......
......@@ -1388,7 +1388,7 @@ void av1_build_inter_predictors_sby(const AV1_COMMON *cm, MACROBLOCKD *xd,
int mi_row, int mi_col, BUFFER_SET *ctx,
BLOCK_SIZE bsize) {
build_inter_predictors_for_planes(cm, xd, bsize, mi_row, mi_col, 0, 0);
#if CONFIG_INTERINTRA
if (is_interintra_pred(&xd->mi[0]->mbmi)) {
BUFFER_SET default_ctx = { { xd->plane[0].dst.buf, NULL, NULL },
{ xd->plane[0].dst.stride, 0, 0 } };
......@@ -1396,9 +1396,6 @@ void av1_build_inter_predictors_sby(const AV1_COMMON *cm, MACROBLOCKD *xd,
av1_build_interintra_predictors_sby(cm, xd, xd->plane[0].dst.buf,
xd->plane[0].dst.stride, ctx, bsize);
}
#else
(void)ctx;
#endif // CONFIG_INTERINTRA
}
void av1_build_inter_predictors_sbuv(const AV1_COMMON *cm, MACROBLOCKD *xd,
......@@ -1406,7 +1403,7 @@ void av1_build_inter_predictors_sbuv(const AV1_COMMON *cm, MACROBLOCKD *xd,
BLOCK_SIZE bsize) {
build_inter_predictors_for_planes(cm, xd, bsize, mi_row, mi_col, 1,
MAX_MB_PLANE - 1);
#if CONFIG_INTERINTRA
if (is_interintra_pred(&xd->mi[0]->mbmi)) {
BUFFER_SET default_ctx = {
{ NULL, xd->plane[1].dst.buf, xd->plane[2].dst.buf },
......@@ -1417,9 +1414,6 @@ void av1_build_inter_predictors_sbuv(const AV1_COMMON *cm, MACROBLOCKD *xd,
cm, xd, xd->plane[1].dst.buf, xd->plane[2].dst.buf,
xd->plane[1].dst.stride, xd->plane[2].dst.stride, ctx, bsize);
}
#else
(void)ctx;
#endif // CONFIG_INTERINTRA
}
void av1_build_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
......@@ -2326,7 +2320,6 @@ void set_sb_mi_boundaries(const AV1_COMMON *const cm, MACROBLOCKD *const xd,
#endif
/* clang-format off */
#if CONFIG_INTERINTRA
#if CONFIG_EXT_PARTITION
static const int ii_weights1d[MAX_SB_SIZE] = {
60, 58, 56, 54, 52, 50, 48, 47, 45, 44, 42, 41, 39, 38, 37, 35, 34, 33, 32,
......@@ -2605,7 +2598,6 @@ void av1_build_interintra_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd,
av1_build_interintra_predictors_sbuv(cm, xd, upred, vpred, ustride, vstride,
ctx, bsize);
}
#endif // CONFIG_INTERINTRA
// Builds the inter-predictor for the single ref case
// for use in the encoder to search the wedges efficiently.
......
......@@ -521,19 +521,22 @@ const uint8_t *av1_get_compound_type_mask_inverse(
const uint8_t *av1_get_compound_type_mask(
const INTERINTER_COMPOUND_DATA *const comp_data, BLOCK_SIZE sb_type);
#if CONFIG_INTERINTRA
void av1_build_interintra_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd,
uint8_t *ypred, uint8_t *upred,
uint8_t *vpred, int ystride, int ustride,
int vstride, BUFFER_SET *ctx,
BLOCK_SIZE bsize);
void av1_build_interintra_predictors_sby(const AV1_COMMON *cm, MACROBLOCKD *xd,
uint8_t *ypred, int ystride,
BUFFER_SET *ctx, BLOCK_SIZE bsize);
void av1_build_interintra_predictors_sbc(const AV1_COMMON *cm, MACROBLOCKD *xd,
uint8_t *upred, int ustride,
BUFFER_SET *ctx, int plane,
BLOCK_SIZE bsize);
void av1_build_interintra_predictors_sbuv(const AV1_COMMON *cm, MACROBLOCKD *xd,
uint8_t *upred, uint8_t *vpred,
int ustride, int vstride,
......@@ -545,7 +548,7 @@ void av1_build_intra_predictors_for_interintra(
void av1_combine_interintra(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane,
const uint8_t *inter_pred, int inter_stride,
const uint8_t *intra_pred, int intra_stride);
#endif // CONFIG_INTERINTRA
// Encoder only
void av1_build_inter_predictors_for_planes_single_buf(
MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane_from, int plane_to, int mi_row,
......
......@@ -30,7 +30,6 @@ void av1_predict_intra_block(const AV1_COMMON *cm, const MACROBLOCKD *xd,
int ref_stride, uint8_t *dst, int dst_stride,
int aoff, int loff, int plane);
#if CONFIG_INTERINTRA
// Mapping of interintra to intra mode for use in the intra component
static const PREDICTION_MODE interintra_to_intra_mode[INTERINTRA_MODES] = {
DC_PRED, V_PRED, H_PRED, SMOOTH_PRED
......@@ -41,7 +40,6 @@ static const INTERINTRA_MODE intra_to_interintra_mode[INTRA_MODES] = {
II_DC_PRED, II_V_PRED, II_H_PRED, II_V_PRED, II_SMOOTH_PRED, II_V_PRED,
II_H_PRED, II_H_PRED, II_V_PRED, II_SMOOTH_PRED, II_SMOOTH_PRED
};
#endif // CONFIG_INTERINTRA
#if CONFIG_FILTER_INTRA
#define FILTER_INTRA_PREC_BITS 10
......
......@@ -2607,15 +2607,11 @@ void read_sequence_header(SequenceHeader *seq_params,
static void read_compound_tools(AV1_COMMON *cm,
struct aom_read_bit_buffer *rb) {
(void)cm;
(void)rb;
#if CONFIG_INTERINTRA
if (!frame_is_intra_only(cm) && cm->reference_mode != COMPOUND_REFERENCE) {
cm->allow_interintra_compound = aom_rb_read_bit(rb);
} else {
cm->allow_interintra_compound = 0;
}
#endif // CONFIG_INTERINTRA
#if CONFIG_COMPOUND_SINGLEREF
if (!frame_is_intra_only(cm)) {
#else // !CONFIG_COMPOUND_SINGLEREF
......@@ -3426,7 +3422,6 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
read_inter_mode_probs(fc, &r);
#endif
#if CONFIG_INTERINTRA
if (cm->reference_mode != COMPOUND_REFERENCE &&
cm->allow_interintra_compound) {
#if !CONFIG_NEW_MULTISYMBOL
......@@ -3449,7 +3444,6 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
}
#endif // !CONFIG_NEW_MULTISYMBOL
}
#endif // CONFIG_INTERINTRA
#if !CONFIG_NEW_MULTISYMBOL
for (int i = 0; i < INTRA_INTER_CONTEXTS; i++)
......@@ -3498,12 +3492,10 @@ static void debug_check_frame_counts(const AV1_COMMON *const cm) {
assert(!memcmp(cm->counts.inter_compound_mode,
zero_counts.inter_compound_mode,
sizeof(cm->counts.inter_compound_mode)));
#if CONFIG_INTERINTRA
assert(!memcmp(cm->counts.interintra, zero_counts.interintra,
sizeof(cm->counts.interintra)));
assert(!memcmp(cm->counts.wedge_interintra, zero_counts.wedge_interintra,
sizeof(cm->counts.wedge_interintra)));
#endif // CONFIG_INTERINTRA
assert(!memcmp(cm->counts.compound_interinter,
zero_counts.compound_interinter,
sizeof(cm->counts.compound_interinter)));
......
......@@ -172,10 +172,8 @@ static int read_cfl_alphas(FRAME_CONTEXT *const ec_ctx, aom_reader *r,
}
#endif
#if CONFIG_INTERINTRA
static INTERINTRA_MODE read_interintra_mode(AV1_COMMON *cm, MACROBLOCKD *xd,
aom_reader *r, int size_group) {
(void)cm;
static INTERINTRA_MODE read_interintra_mode(MACROBLOCKD *xd, aom_reader *r,
int size_group) {
const INTERINTRA_MODE ii_mode = (INTERINTRA_MODE)aom_read_symbol(
r, xd->tile_ctx->interintra_mode_cdf[size_group], INTERINTRA_MODES,
ACCT_STR);
......@@ -183,7 +181,6 @@ static INTERINTRA_MODE read_interintra_mode(AV1_COMMON *cm, MACROBLOCKD *xd,
if (counts) ++counts->interintra_mode[size_group][ii_mode];
return ii_mode;
}
#endif // CONFIG_INTERINTRA
static PREDICTION_MODE read_inter_mode(FRAME_CONTEXT *ec_ctx, MACROBLOCKD *xd,
aom_reader *r, int16_t ctx) {
......@@ -2640,7 +2637,6 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
nearestmv, nearmv, mi_row, mi_col, is_compound, allow_hp, r);
aom_merge_corrupted_flag(&xd->corrupted, mv_corrupted_flag);
#if CONFIG_INTERINTRA
mbmi->use_wedge_interintra = 0;
if (cm->reference_mode != COMPOUND_REFERENCE &&
cm->allow_interintra_compound && is_interintra_allowed(mbmi)) {
......@@ -2656,7 +2652,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
assert(mbmi->ref_frame[1] == NONE_FRAME);
if (interintra) {
const INTERINTRA_MODE interintra_mode =
read_interintra_mode(cm, xd, r, bsize_group);
read_interintra_mode(xd, r, bsize_group);
mbmi->ref_frame[1] = INTRA_FRAME;
mbmi->interintra_mode = interintra_mode;
#if CONFIG_EXT_INTRA
......@@ -2685,7 +2681,6 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
}
}
}
#endif // CONFIG_INTERINTRA
for (ref = 0; ref < 1 + has_second_ref(mbmi); ++ref) {
const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref];
......
......@@ -73,9 +73,7 @@ static INLINE void write_uniform(aom_writer *w, int n, int v) {
}
}
#if CONFIG_INTERINTRA
static struct av1_token interintra_mode_encodings[INTERINTRA_MODES];
#endif
static struct av1_token compound_type_encodings[COMPOUND_TYPES];
#if CONFIG_LOOP_RESTORATION
static void loop_restoration_write_sb_coeffs(const AV1_COMMON *const cm,
......@@ -101,9 +99,7 @@ static int remux_tiles(const AV1_COMMON *const cm, uint8_t *dst,
int *const tile_col_size_bytes);
#endif
void av1_encode_token_init(void) {
#if CONFIG_INTERINTRA
av1_tokens_from_tree(interintra_mode_encodings, av1_interintra_mode_tree);
#endif // CONFIG_INTERINTRA
#if CONFIG_COMPOUND_SINGLEREF
av1_tokens_from_tree(inter_singleref_comp_mode_encodings,
av1_inter_singleref_comp_mode_tree);
......@@ -1691,7 +1687,6 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row,
#endif // CONFIG_COMPOUND_SINGLEREF
}
#if CONFIG_INTERINTRA
if (cpi->common.reference_mode != COMPOUND_REFERENCE &&
cpi->common.allow_interintra_compound && is_interintra_allowed(mbmi)) {
const int interintra = mbmi->ref_frame[1] == INTRA_FRAME;
......@@ -1721,7 +1716,6 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const int mi_row,
}
}
}
#endif // CONFIG_INTERINTRA
if (mbmi->ref_frame[1] != INTRA_FRAME) write_motion_mode(cm, xd, mi, w);
#if CONFIG_NCOBMC_ADAPT_WEIGHT
......@@ -3742,15 +3736,11 @@ static void write_sb_size(const AV1_COMMON *cm,
static void write_compound_tools(const AV1_COMMON *cm,
struct aom_write_bit_buffer *wb) {
(void)cm;
(void)wb;
#if CONFIG_INTERINTRA
if (!frame_is_intra_only(cm) && cm->reference_mode != COMPOUND_REFERENCE) {
aom_wb_write_bit(wb, cm->allow_interintra_compound);
} else {
assert(cm->allow_interintra_compound == 0);
}
#endif // CONFIG_INTERINTRA
#if CONFIG_COMPOUND_SINGLEREF
if (!frame_is_intra_only(cm)) {
#else // !CONFIG_COMPOUND_SINGLEREF
......@@ -4556,7 +4546,6 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
#if !CONFIG_NEW_MULTISYMBOL
update_inter_mode_probs(cm, header_bc, counts);
#endif
#if CONFIG_INTERINTRA
if (cm->reference_mode != COMPOUND_REFERENCE &&
cm->allow_interintra_compound) {
#if !CONFIG_NEW_MULTISYMBOL
......@@ -4580,7 +4569,6 @@ static uint32_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) {
}
#endif // !CONFIG_NEW_MULTISYMBOL
}
#endif // CONFIG_INTERINTRA
#if !CONFIG_NEW_MULTISYMBOL
for (int i = 0; i < INTRA_INTER_CONTEXTS; i++)
......
......@@ -217,11 +217,9 @@ struct macroblock {
int inter_singleref_comp_mode_cost[INTER_MODE_CONTEXTS]
[INTER_SINGLEREF_COMP_MODES];
#endif // CONFIG_COMPOUND_SINGLEREF
#if CONFIG_INTERINTRA
int interintra_cost[BLOCK_SIZE_GROUPS][2];
int wedge_interintra_cost[BLOCK_SIZES_ALL][2];
int interintra_mode_cost[BLOCK_SIZE_GROUPS][INTERINTRA_MODES];
#endif // CONFIG_INTERINTRA
int motion_mode_cost[BLOCK_SIZES_ALL][MOTION_MODES];
int motion_mode_cost1[BLOCK_SIZES_ALL][2];
#if CONFIG_NCOBMC_ADAPT_WEIGHT
......
......@@ -1159,7 +1159,6 @@ static void update_stats(const AV1_COMMON *const cm, ThreadData *td, int mi_row,
[is_inter_singleref_comp_mode(mbmi->mode)]++;
#endif // CONFIG_COMPOUND_SINGLEREF
#if CONFIG_INTERINTRA
if (cm->reference_mode != COMPOUND_REFERENCE &&
cm->allow_interintra_compound && is_interintra_allowed(mbmi)) {
const int bsize_group = size_group_lookup[bsize];
......@@ -1185,7 +1184,6 @@ static void update_stats(const AV1_COMMON *const cm, ThreadData *td, int mi_row,
#endif
}
}
#endif // CONFIG_INTERINTRA
set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
const MOTION_MODE motion_allowed =
......@@ -3987,10 +3985,8 @@ static void encode_frame_internal(AV1_COMP *cpi) {
static void make_consistent_compound_tools(AV1_COMMON *cm) {
(void)cm;
#if CONFIG_INTERINTRA
if (frame_is_intra_only(cm) || cm->reference_mode == COMPOUND_REFERENCE)
cm->allow_interintra_compound = 0;
#endif // CONFIG_INTERINTRA
#if CONFIG_COMPOUND_SINGLEREF
if (frame_is_intra_only(cm))
#else // !CONFIG_COMPOUND_SINGLEREF
......
......@@ -2421,10 +2421,7 @@ static void realloc_segmentation_maps(AV1_COMP *cpi) {
}
void set_compound_tools(AV1_COMMON *cm) {
(void)cm;
#if CONFIG_INTERINTRA
cm->allow_interintra_compound = 1;
#endif // CONFIG_INTERINTRA
cm->allow_masked_compound = 1;
}
......
......@@ -375,7 +375,6 @@ void av1_fill_mode_rates(AV1_COMMON *const cm, MACROBLOCK *x,
av1_cost_tokens_from_cdf(x->inter_singleref_comp_mode_cost[i],
fc->inter_singleref_comp_mode_cdf[i], NULL);
#endif // CONFIG_COMPOUND_SINGLEREF
#if CONFIG_INTERINTRA
for (i = 0; i < BLOCK_SIZE_GROUPS; ++i) {
#if CONFIG_NEW_MULTISYMBOL
av1_cost_tokens_from_cdf(x->interintra_cost[i], fc->interintra_cdf[i],
......@@ -398,7 +397,6 @@ void av1_fill_mode_rates(AV1_COMMON *const cm, MACROBLOCK *x,
av1_cost_bit(fc->wedge_interintra_prob[i], 1);
#endif
}
#endif // CONFIG_INTERINTRA
for (i = BLOCK_8X8; i < BLOCK_SIZES_ALL; i++) {
av1_cost_tokens_from_cdf(x->motion_mode_cost[i], fc->motion_mode_cdf[i],
NULL);
......
......@@ -7637,7 +7637,6 @@ static int64_t pick_interinter_seg(const AV1_COMP *const cpi,
return best_rd;
}
#if CONFIG_INTERINTRA
static int64_t pick_interintra_wedge(const AV1_COMP *const cpi,
const MACROBLOCK *const x,
const BLOCK_SIZE bsize,
......@@ -7658,7 +7657,6 @@ static int64_t pick_interintra_wedge(const AV1_COMP *const cpi,
mbmi->interintra_wedge_index = wedge_index;
return rd;
}
#endif // CONFIG_INTERINTRA
static int64_t pick_interinter_mask(const AV1_COMP *const cpi, MACROBLOCK *x,
const BLOCK_SIZE bsize,
......@@ -8417,10 +8415,8 @@ static int64_t handle_inter_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
int pred_exists = 1;
const int bw = block_size_wide[bsize];
int_mv single_newmv[TOTAL_REFS_PER_FRAME];
#if CONFIG_INTERINTRA
const int *const interintra_mode_cost =
x->interintra_mode_cost[size_group_lookup[bsize]];
#endif // CONFIG_INTERINTRA
const int is_comp_interintra_pred = (mbmi->ref_frame[1] == INTRA_FRAME);
uint8_t ref_frame_type = av1_ref_frame_type(mbmi->ref_frame);
#if CONFIG_HIGHBITDEPTH
......@@ -8446,20 +8442,16 @@ static int64_t handle_inter_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
mbmi->ncobmc_mode[1] = NO_OVERLAP;
#endif
#if CONFIG_INTERINTRA
int compmode_interintra_cost = 0;
mbmi->use_wedge_interintra = 0;
#endif
int compmode_interinter_cost = 0;
mbmi->interinter_compound_type = COMPOUND_AVERAGE;
#if CONFIG_LGT_FROM_PRED
mbmi->use_lgt = 0;
#endif
#if CONFIG_INTERINTRA
if (!cm->allow_interintra_compound && is_comp_interintra_pred)
return INT64_MAX;
#endif // CONFIG_INTERINTRA
// is_comp_interintra_pred implies !is_comp_pred
assert(!is_comp_interintra_pred || (!is_comp_pred));
......@@ -8833,7 +8825,6 @@ static int64_t handle_inter_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
compmode_interinter_cost = best_compmode_interinter_cost;
}
#if CONFIG_INTERINTRA
if (is_comp_interintra_pred) {
INTERINTRA_MODE best_interintra_mode = II_DC_PRED;
int64_t best_interintra_rd = INT64_MAX;
......@@ -8976,7 +8967,6 @@ static int64_t handle_inter_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
} else if (is_interintra_allowed(mbmi)) {
compmode_interintra_cost = x->interintra_cost[size_group_lookup[bsize]][0];
}
#endif // CONFIG_INTERINTRA
if (pred_exists == 0) {
int tmp_rate;
......@@ -9015,10 +9005,8 @@ static int64_t handle_inter_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
}
}
#if CONFIG_INTERINTRA
rd_stats->rate += compmode_interintra_cost;
rate2_bmc_nocoeff += compmode_interintra_cost;
#endif
rd_stats->rate += compmode_interinter_cost;
ret_val = motion_mode_rd(cpi, x, bsize, rd_stats, rd_stats_y, rd_stats_uv,
......@@ -9487,10 +9475,8 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
int best_skip2 = 0;
uint16_t ref_frame_skip_mask[2] = { 0 };
uint32_t mode_skip_mask[TOTAL_REFS_PER_FRAME] = { 0 };
#if CONFIG_INTERINTRA
MV_REFERENCE_FRAME best_single_inter_ref = LAST_FRAME;
int64_t best_single_inter_rd = INT64_MAX;
#endif // CONFIG_INTERINTRA
int mode_skip_start = sf->mode_skip_start + 1;
const int *const rd_threshes = rd_opt->threshes[segment_id][bsize];
const int *const rd_thresh_freq_fact = tile_data->thresh_freq_fact[bsize];
......@@ -9991,9 +9977,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
}
#endif // CONFIG_COMPOUND_SINGLEREF
#if CONFIG_INTERINTRA
mbmi->interintra_mode = (INTERINTRA_MODE)(II_DC_PRED - 1);
#endif // CONFIG_INTERINTRA
#if CONFIG_FRAME_MARKER
if (sf->selective_ref_frame) {
......@@ -10199,7 +10183,6 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
backup_ref_mv[0] = mbmi_ext->ref_mvs[ref_frame][0];
if (comp_pred) backup_ref_mv[1] = mbmi_ext->ref_mvs[second_ref_frame][0];
#if CONFIG_INTERINTRA
if (second_ref_frame == INTRA_FRAME) {
if (best_single_inter_ref != ref_frame) continue;
mbmi->interintra_mode = intra_to_interintra_mode[best_intra_mode];
......@@ -10214,7 +10197,6 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
#endif // CONFIG_FILTER_INTRA
}
#endif // CONFIG_INTERINTRA
mbmi->ref_mv_idx = 0;
ref_frame_type = av1_ref_frame_type(mbmi->ref_frame);
......@@ -10739,13 +10721,11 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
best_intra_rd = this_rd;
best_intra_mode = mbmi->mode;
}
#if CONFIG_INTERINTRA
} else if (second_ref_frame == NONE_FRAME) {
if (this_rd < best_single_inter_rd) {
best_single_inter_rd = this_rd;
best_single_inter_ref = mbmi->ref_frame[0];
}
#endif // CONFIG_INTERINTRA
}
if (!disable_skip && ref_frame == INTRA_FRAME) {
......
......@@ -150,7 +150,6 @@ set(CONFIG_FRAME_SIZE 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FRAME_SUPERRES 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_HASH_ME 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_HORZONLY_FRAME_SUPERRES 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_INTERINTRA 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_INTER_STATS_ONLY 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_INTRABC 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_INTRA_EDGE 1 CACHE NUMBER "AV1 experiment flag.")
......
......@@ -262,7 +262,6 @@ EXPERIMENT_LIST="
intra_edge
ext_intra_mod
intrabc
interintra
new_quant
ans
loop_restoration
......@@ -504,7 +503,6 @@ post_process_cmdline() {
soft_enable intra_edge
soft_enable mv_compress
soft_enable dual_filter
soft_enable interintra
soft_enable one_sided_compound
soft_enable convolve_round
soft_enable aom_qm
......
......@@ -459,7 +459,7 @@ int main(int argc, const char **argv) {
"default_inter_singleref_comp_mode_cdf[INTER_MODE_"
"CONTEXTS][CDF_SIZE(INTER_SINGLEREF_COMP_MODES)]");
#endif
#if CONFIG_INTERINTRA