Remove intrabc experiment flag
This experiment is adopted.
Change-Id: I64ddce2427160da157336b7ca178bb1616f4109e
diff --git a/av1/common/blockd.c b/av1/common/blockd.c
index 5a8ed42..10345ae 100644
--- a/av1/common/blockd.c
+++ b/av1/common/blockd.c
@@ -18,21 +18,13 @@
PREDICTION_MODE av1_left_block_mode(const MODE_INFO *left_mi) {
if (!left_mi) return DC_PRED;
-#if CONFIG_INTRABC
assert(!is_inter_block(&left_mi->mbmi) || is_intrabc_block(&left_mi->mbmi));
-#else
- assert(!is_inter_block(&left_mi->mbmi));
-#endif // CONFIG_INTRABC
return left_mi->mbmi.mode;
}
PREDICTION_MODE av1_above_block_mode(const MODE_INFO *above_mi) {
if (!above_mi) return DC_PRED;
-#if CONFIG_INTRABC
assert(!is_inter_block(&above_mi->mbmi) || is_intrabc_block(&above_mi->mbmi));
-#else
- assert(!is_inter_block(&above_mi->mbmi));
-#endif // CONFIG_INTRABC
return above_mi->mbmi.mode;
}
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 657a45b..7927a1d 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -247,9 +247,7 @@
UV_PREDICTION_MODE uv_mode;
PALETTE_MODE_INFO palette_mode_info;
-#if CONFIG_INTRABC
uint8_t use_intrabc;
-#endif // CONFIG_INTRABC
// Only for INTER blocks
InterpFilters interp_filters;
@@ -316,13 +314,11 @@
MB_MODE_INFO mbmi;
} MODE_INFO;
-#if CONFIG_INTRABC
#define NO_FILTER_FOR_IBC 1 // Disable in-loop filters for frame with intrabc
static INLINE int is_intrabc_block(const MB_MODE_INFO *mbmi) {
return mbmi->use_intrabc;
}
-#endif
static INLINE PREDICTION_MODE get_uv_mode(UV_PREDICTION_MODE mode) {
assert(mode < UV_INTRA_MODES);
@@ -350,10 +346,7 @@
}
static INLINE int is_inter_block(const MB_MODE_INFO *mbmi) {
-#if CONFIG_INTRABC
- if (is_intrabc_block(mbmi)) return 1;
-#endif
- return mbmi->ref_frame[0] > INTRA_FRAME;
+ return is_intrabc_block(mbmi) || mbmi->ref_frame[0] > INTRA_FRAME;
}
static INLINE int has_second_ref(const MB_MODE_INFO *mbmi) {
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index 953e175..f4237a3 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -440,10 +440,8 @@
}
};
-#if CONFIG_INTRABC
static const aom_cdf_prob default_intrabc_cdf[CDF_SIZE(2)] = { AOM_CDF2(192 *
128) };
-#endif // CONFIG_INTRABC
#define MAX_COLOR_CONTEXT_HASH 8
// Negative values are invalid
@@ -1307,9 +1305,7 @@
av1_copy(fc->cfl_sign_cdf, default_cfl_sign_cdf);
av1_copy(fc->cfl_alpha_cdf, default_cfl_alpha_cdf);
#endif
-#if CONFIG_INTRABC
av1_copy(fc->intrabc_cdf, default_intrabc_cdf);
-#endif
}
static void set_default_lf_deltas(struct loopfilter *lf) {
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index 2001c01..6530f7f 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -143,10 +143,8 @@
aom_cdf_prob skip_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)];
aom_cdf_prob intra_inter_cdf[INTRA_INTER_CONTEXTS][CDF_SIZE(2)];
nmv_context nmvc[NMV_CONTEXTS];
-#if CONFIG_INTRABC
nmv_context ndvc;
aom_cdf_prob intrabc_cdf[CDF_SIZE(2)];
-#endif
int initialized;
struct segmentation_probs seg;
#if CONFIG_FILTER_INTRA
@@ -270,9 +268,7 @@
unsigned int single_ref[REF_CONTEXTS][SINGLE_REFS - 1][2];
unsigned int comp_ref[REF_CONTEXTS][FWD_REFS - 1][2];
unsigned int comp_bwdref[REF_CONTEXTS][BWD_REFS - 1][2];
-#if CONFIG_INTRABC
unsigned int intrabc[2];
-#endif // CONFIG_INTRABC
#endif // CONFIG_ENTROPY_STATS
unsigned int txfm_partition[TXFM_PARTITION_CONTEXTS][2];
#if CONFIG_EXT_SKIP
diff --git a/av1/common/entropymv.c b/av1/common/entropymv.c
index 18e0d76..dd25f05 100644
--- a/av1/common/entropymv.c
+++ b/av1/common/entropymv.c
@@ -121,7 +121,5 @@
// NB: this sets CDFs too
cm->fc->nmvc[i] = default_nmv_context;
}
-#if CONFIG_INTRABC
cm->fc->ndvc = default_nmv_context;
-#endif // CONFIG_INTRABC
}
diff --git a/av1/common/entropymv.h b/av1/common/entropymv.h
index 3ff2a5f..aeb815a 100644
--- a/av1/common/entropymv.h
+++ b/av1/common/entropymv.h
@@ -102,9 +102,7 @@
MV_CLASS_TYPE av1_get_mv_class(int z, int *offset);
typedef enum {
-#if CONFIG_INTRABC || CONFIG_AMVR
MV_SUBPEL_NONE = -1,
-#endif
MV_SUBPEL_LOW_PRECISION = 0,
MV_SUBPEL_HIGH_PRECISION,
} MvSubpelPrecision;
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index 1bc5a45..54d0b3f 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -103,9 +103,7 @@
int_mv *gm_mv_candidates, const WarpedMotionParams *gm_params,
#endif // USE_CUR_GM_REFMV
int col, int weight) {
-#if CONFIG_INTRABC
- if (!is_inter_block(candidate)) return;
-#endif // CONFIG_INTRABC
+ if (!is_inter_block(candidate)) return; // for intrabc
int index = 0, ref;
assert(weight % 2 == 0);
@@ -1228,9 +1226,7 @@
#endif // CONFIG_TMV
#endif // CONFIG_MFMV
-#if CONFIG_INTRABC
assert(IMPLIES(ref_frame == INTRA_FRAME, cm->use_prev_frame_mvs == 0));
-#endif
const TileInfo *const tile = &xd->tile;
const BLOCK_SIZE bsize = mi->mbmi.sb_type;
const int bw = block_size_wide[AOMMAX(bsize, BLOCK_8X8)];
@@ -1285,9 +1281,7 @@
const MODE_INFO *const candidate_mi =
xd->mi[mv_ref->col + mv_ref->row * xd->mi_stride];
const MB_MODE_INFO *const candidate = &candidate_mi->mbmi;
-#if CONFIG_INTRABC
if (ref_frame == INTRA_FRAME && !is_intrabc_block(candidate)) continue;
-#endif // CONFIG_INTRABC
// Keep counts for entropy encoding.
context_counter += mode_2_counter[candidate->mode];
}
@@ -1323,12 +1317,10 @@
}
#endif // !CONFIG_MFMV
-// Since we couldn't find 2 mvs from the same reference frame
-// go back through the neighbors and find motion vectors from
-// different reference frames.
-#if CONFIG_INTRABC
+ // Since we couldn't find 2 mvs from the same reference frame
+ // go back through the neighbors and find motion vectors from
+ // different reference frames.
if (ref_frame != INTRA_FRAME) {
-#endif // CONFIG_INTRABC
for (i = 0; i < MVREF_NEIGHBOURS; ++i) {
const POSITION *mv_ref = &mv_ref_search[i];
if (is_inside(tile, mi_col, mi_row, cm->mi_rows, cm, mv_ref)) {
@@ -1346,9 +1338,7 @@
refmv_count, mv_ref_list, bw, bh, xd, Done);
}
}
-#if CONFIG_INTRABC
}
-#endif // CONFIG_INTRABC
#if !CONFIG_MFMV
// Since we still don't have a candidate we'll try the last frame.
@@ -1396,7 +1386,7 @@
BLOCK_SIZE bsize = mi->mbmi.sb_type;
MV_REFERENCE_FRAME rf[2];
av1_set_ref_frame(rf, ref_frame);
- if (!CONFIG_INTRABC || ref_frame != INTRA_FRAME) {
+ if (ref_frame != INTRA_FRAME) {
zeromv[0].as_int =
gm_get_motion_vector(&cm->global_motion[rf[0]],
cm->allow_high_precision_mv, bsize, mi_col, mi_row
diff --git a/av1/common/mvref_common.h b/av1/common/mvref_common.h
index 6429bab..bdf50b2 100644
--- a/av1/common/mvref_common.h
+++ b/av1/common/mvref_common.h
@@ -344,11 +344,7 @@
} else {
rf[0] = ref_frame_type;
rf[1] = NONE_FRAME;
-#if CONFIG_INTRABC
assert(ref_frame_type > NONE_FRAME);
-#else
- assert(ref_frame_type > INTRA_FRAME);
-#endif
}
}
@@ -503,7 +499,6 @@
int findSamples(const AV1_COMMON *cm, MACROBLOCKD *xd, int mi_row, int mi_col,
int *pts, int *pts_inref);
-#if CONFIG_INTRABC
#define INTRABC_DELAY_PIXELS 256 // Delay of 256 pixels
#define INTRABC_DELAY_SB64 (INTRABC_DELAY_PIXELS / 64)
#define USE_WAVE_FRONT 1 // Use only top left area of frame for reference.
@@ -572,7 +567,6 @@
return 1;
}
-#endif // CONFIG_INTRABC
#ifdef __cplusplus
} // extern "C"
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index e857b60..826b90f 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -326,9 +326,7 @@
#endif
int allow_screen_content_tools;
-#if CONFIG_INTRABC
int allow_intrabc;
-#endif // CONFIG_INTRABC
int allow_interintra_compound;
int allow_masked_compound;
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index fa47f5f..4d24691 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -922,10 +922,8 @@
struct macroblockd_plane *const pd = &xd->plane[plane];
int is_compound = has_second_ref(&mi->mbmi);
int ref;
-#if CONFIG_INTRABC
const int is_intrabc = is_intrabc_block(&mi->mbmi);
assert(IMPLIES(is_intrabc, !is_compound));
-#endif // CONFIG_INTRABC
int is_global[2] = { 0, 0 };
for (ref = 0; ref < 1 + is_compound; ++ref) {
const WarpedMotionParams *const wm =
@@ -941,11 +939,7 @@
int sub8x8_inter = (block_size_wide[bsize] < 8 && ss_x) ||
(block_size_high[bsize] < 8 && ss_y);
-#if CONFIG_INTRABC
- if (is_intrabc) {
- sub8x8_inter = 0;
- }
-#endif
+ if (is_intrabc) sub8x8_inter = 0;
sub8x8_inter = sub8x8_inter && !build_for_obmc;
const int row_start = (block_size_high[bsize] == 4) && ss_y ? -1 : 0;
@@ -957,9 +951,7 @@
const MB_MODE_INFO *this_mbmi =
&xd->mi[row * xd->mi_stride + col]->mbmi;
if (!is_inter_block(this_mbmi)) sub8x8_inter = 0;
-#if CONFIG_INTRABC
if (is_intrabc_block(this_mbmi)) sub8x8_inter = 0;
-#endif // CONFIG_INTRABC
}
}
}
@@ -1016,17 +1008,10 @@
pd->pre[ref].height = ref_buf->buf->uv_crop_height;
pd->pre[ref].stride = ref_buf->buf->uv_stride;
-#if CONFIG_INTRABC
const struct scale_factors *const sf =
is_intrabc ? &cm->sf_identity : &ref_buf->sf;
struct buf_2d *const pre_buf = is_intrabc ? dst_buf : &pd->pre[ref];
-#else
- const struct scale_factors *const sf = &ref_buf->sf;
- struct buf_2d *const pre_buf = &pd->pre[ref];
-#endif // CONFIG_INTRABC
-
const MV mv = this_mbmi->mv[ref].as_mv;
-
uint8_t *pre;
int xs, ys, subpel_x, subpel_y;
const int is_scaled = av1_is_scaled(sf);
@@ -1123,14 +1108,9 @@
DECLARE_ALIGNED(32, int32_t, tmp_dst[MAX_SB_SIZE * MAX_SB_SIZE]);
for (ref = 0; ref < 1 + is_compound; ++ref) {
-#if CONFIG_INTRABC
const struct scale_factors *const sf =
is_intrabc ? &cm->sf_identity : &xd->block_refs[ref]->sf;
struct buf_2d *const pre_buf = is_intrabc ? dst_buf : &pd->pre[ref];
-#else
- const struct scale_factors *const sf = &xd->block_refs[ref]->sf;
- struct buf_2d *const pre_buf = &pd->pre[ref];
-#endif // CONFIG_INTRABC
const MV mv = mi->mbmi.mv[ref].as_mv;
const int is_scaled = av1_is_scaled(sf);
@@ -1194,14 +1174,9 @@
#endif // CONFIG_JNT_COMP
for (ref = 0; ref < 1 + is_compound; ++ref) {
-#if CONFIG_INTRABC
const struct scale_factors *const sf =
is_intrabc ? &cm->sf_identity : &xd->block_refs[ref]->sf;
struct buf_2d *const pre_buf = is_intrabc ? dst_buf : &pd->pre[ref];
-#else
- const struct scale_factors *const sf = &xd->block_refs[ref]->sf;
- struct buf_2d *const pre_buf = &pd->pre[ref];
-#endif // CONFIG_INTRABC
WarpTypesAllowed warp_types;
warp_types.global_warp_allowed = is_global[ref];
warp_types.local_warp_allowed = mi->mbmi.motion_mode == WARPED_CAUSAL;
@@ -2329,9 +2304,7 @@
#if CONFIG_FILTER_INTRA
xd->mi[0]->mbmi.filter_intra_mode_info.use_filter_intra = 0;
#endif // CONFIG_FILTER_INTRA
-#if CONFIG_INTRABC
xd->mi[0]->mbmi.use_intrabc = 0;
-#endif
av1_predict_intra_block(
cm, xd, pd->width, pd->height, get_max_rect_tx_size(plane_bsize), mode,
diff --git a/av1/common/reconintra.h b/av1/common/reconintra.h
index ba71694..5c57532 100644
--- a/av1/common/reconintra.h
+++ b/av1/common/reconintra.h
@@ -60,11 +60,9 @@
#endif
}
-#if CONFIG_INTRABC
static INLINE int av1_allow_intrabc(const AV1_COMMON *const cm) {
return cm->allow_screen_content_tools && cm->allow_intrabc;
}
-#endif // CONFIG_INTRABC
#if CONFIG_FILTER_INTRA
extern const int8_t av1_filter_intra_taps[FILTER_INTRA_MODES][8][8];
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 29b4a1e..4d67750 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -403,13 +403,9 @@
for (int ref = 0; ref < 1 + has_second_ref(mbmi); ++ref) {
const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref];
if (frame < LAST_FRAME) {
-#if CONFIG_INTRABC
assert(is_intrabc_block(mbmi));
assert(frame == INTRA_FRAME);
assert(ref == 0);
-#else
- assert(0);
-#endif // CONFIG_INTRABC
} else {
RefBuffer *ref_buf = &cm->frame_refs[frame - LAST_FRAME];
@@ -795,9 +791,7 @@
static void decode_restoration_mode(AV1_COMMON *cm,
struct aom_read_bit_buffer *rb) {
const int num_planes = av1_num_planes(cm);
-#if CONFIG_INTRABC
if (cm->allow_intrabc && NO_FILTER_FOR_IBC) return;
-#endif // CONFIG_INTRABC
int all_none = 1, chroma_none = 1;
for (int p = 0; p < num_planes; ++p) {
RestorationInfo *rsi = &cm->rst_info[p];
@@ -1012,9 +1006,7 @@
static void setup_loopfilter(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
const int num_planes = av1_num_planes(cm);
-#if CONFIG_INTRABC
if (cm->allow_intrabc && NO_FILTER_FOR_IBC) return;
-#endif // CONFIG_INTRABC
struct loopfilter *lf = &cm->lf;
lf->filter_level[0] = aom_rb_read_literal(rb, 6);
lf->filter_level[1] = aom_rb_read_literal(rb, 6);
@@ -1047,9 +1039,7 @@
static void setup_cdef(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
const int num_planes = av1_num_planes(cm);
-#if CONFIG_INTRABC
if (cm->allow_intrabc && NO_FILTER_FOR_IBC) return;
-#endif // CONFIG_INTRABC
cm->cdef_pri_damping = cm->cdef_sec_damping = aom_rb_read_literal(rb, 2) + 3;
cm->cdef_bits = aom_rb_read_literal(rb, 2);
cm->nb_cdef_strengths = 1 << cm->cdef_bits;
@@ -2042,10 +2032,7 @@
mi_row << cm->seq_params.mib_size_log2);
}
-#if CONFIG_INTRABC
- if (!(cm->allow_intrabc && NO_FILTER_FOR_IBC))
-#endif // CONFIG_INTRABC
- {
+ if (!(cm->allow_intrabc && NO_FILTER_FOR_IBC)) {
// Loopfilter the whole frame.
if (endTile == cm->tile_rows * cm->tile_cols - 1)
if (cm->lf.filter_level[0] || cm->lf.filter_level[1]) {
@@ -2714,9 +2701,7 @@
int frame_size_override_flag = aom_rb_read_literal(rb, 1);
#endif
-#if CONFIG_INTRABC
cm->allow_intrabc = 0;
-#endif // CONFIG_INTRABC
#if CONFIG_FRAME_REFS_SIGNALING
cm->frame_refs_short_signaling = 0;
@@ -2740,7 +2725,7 @@
memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
pbi->need_resync = 0;
}
-#if CONFIG_INTRABC
+
#if CONFIG_HORZONLY_FRAME_SUPERRES
if (cm->allow_screen_content_tools &&
(av1_superres_unscaled(cm) || !NO_FILTER_FOR_IBC))
@@ -2748,7 +2733,6 @@
if (cm->allow_screen_content_tools)
#endif // CONFIG_HORZONLY_FRAME_SUPERRES
cm->allow_intrabc = aom_rb_read_bit(rb);
-#endif // CONFIG_INTRABC
#if CONFIG_CDF_UPDATE_MODE
cm->cdf_update_mode = aom_rb_read_literal(rb, 2);
#endif // CONFIG_CDF_UPDATE_MODE
@@ -2789,7 +2773,6 @@
memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
pbi->need_resync = 0;
}
-#if CONFIG_INTRABC
#if CONFIG_HORZONLY_FRAME_SUPERRES
if (cm->allow_screen_content_tools &&
(av1_superres_unscaled(cm) || !NO_FILTER_FOR_IBC))
@@ -2797,7 +2780,6 @@
if (cm->allow_screen_content_tools)
#endif // CONFIG_HORZONLY_FRAME_SUPERRES
cm->allow_intrabc = aom_rb_read_bit(rb);
-#endif // CONFIG_INTRABC // CONFIG_INTRABC
#if CONFIG_CDF_UPDATE_MODE
cm->cdf_update_mode = aom_rb_read_literal(rb, 2);
#endif // CONFIG_CDF_UPDATE_MODE
@@ -3025,7 +3007,6 @@
if (frame_is_intra_only(cm) || cm->error_resilient_mode)
av1_setup_past_independence(cm);
-#if CONFIG_INTRABC
if (cm->allow_intrabc && NO_FILTER_FOR_IBC) {
// Set parameters corresponding to no filtering.
struct loopfilter *lf = &cm->lf;
@@ -3041,7 +3022,6 @@
cm->rst_info[2].frame_restoration_type = RESTORE_NONE;
#endif // CONFIG_LOOP_RESTORATION
}
-#endif // CONFIG_INTRABC
#if CONFIG_TILE_INFO_FIRST
read_tile_info(pbi, rb);
@@ -3086,9 +3066,7 @@
xd->prev_qindex = cm->base_qindex;
cm->delta_q_res = 1 << aom_rb_read_literal(rb, 2);
#if CONFIG_EXT_DELTA_Q
-#if CONFIG_INTRABC
if (!cm->allow_intrabc || !NO_FILTER_FOR_IBC)
-#endif // CONFIG_INTRABC
cm->delta_lf_present_flag = aom_rb_read_bit(rb);
if (cm->delta_lf_present_flag) {
xd->prev_delta_lf_from_base = 0;
@@ -3295,14 +3273,12 @@
pbi->uncomp_hdr_size = aom_rb_bytes_read(&rb);
YV12_BUFFER_CONFIG *new_fb = get_frame_new_buffer(cm);
xd->cur_buf = new_fb;
-#if CONFIG_INTRABC
if (frame_is_intra_only(cm) && av1_allow_intrabc(cm)) {
av1_setup_scale_factors_for_frame(
&cm->sf_identity, xd->cur_buf->y_crop_width, xd->cur_buf->y_crop_height,
xd->cur_buf->y_crop_width, xd->cur_buf->y_crop_height,
cm->use_highbitdepth);
}
-#endif // CONFIG_INTRABC
if (cm->show_existing_frame) {
// showing a frame directly
@@ -3436,9 +3412,7 @@
return;
}
-#if CONFIG_INTRABC
if (!(cm->allow_intrabc && NO_FILTER_FOR_IBC)) {
-#endif
#if CONFIG_LOOP_RESTORATION
if (cm->rst_info[0].frame_restoration_type != RESTORE_NONE ||
cm->rst_info[1].frame_restoration_type != RESTORE_NONE ||
@@ -3464,9 +3438,7 @@
av1_loop_restoration_filter_frame((YV12_BUFFER_CONFIG *)xd->cur_buf, cm);
}
#endif // CONFIG_LOOP_RESTORATION
-#if CONFIG_INTRABC
}
-#endif
if (!xd->corrupted) {
if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index d6bfc4d..aae2870 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -848,7 +848,6 @@
}
}
-#if CONFIG_INTRABC
static INLINE void read_mv(aom_reader *r, MV *mv, const MV *ref,
nmv_context *ctx, MvSubpelPrecision precision);
@@ -869,9 +868,7 @@
cm->seq_params.mib_size_log2);
return valid;
}
-#endif // CONFIG_INTRABC
-#if CONFIG_INTRABC
static void read_intrabc_info(AV1_COMMON *const cm, MACROBLOCKD *const xd,
int mi_row, int mi_col, aom_reader *r) {
MODE_INFO *const mi = xd->mi[0];
@@ -936,7 +933,6 @@
#endif // !CONFIG_TXK_SEL
}
}
-#endif // CONFIG_INTRABC
static void read_intra_frame_mode_info(AV1_COMMON *const cm,
MACROBLOCKD *const xd, int mi_row,
@@ -1016,12 +1012,10 @@
xd->left_txfm_context = xd->left_txfm_context_buffer +
((mi_row & MAX_MIB_MASK) << TX_UNIT_HIGH_LOG2);
-#if CONFIG_INTRABC
if (av1_allow_intrabc(cm)) {
read_intrabc_info(cm, xd, mi_row, mi_col, r);
if (is_intrabc_block(mbmi)) return;
}
-#endif // CONFIG_INTRABC
mbmi->tx_size = read_tx_size(cm, xd, 0, 1, r);
set_txfm_ctxs(mbmi->tx_size, xd->n8_w, xd->n8_h, mbmi->skip, xd);
@@ -1081,10 +1075,7 @@
}
static int read_mv_component(aom_reader *r, nmv_component *mvcomp,
-#if CONFIG_INTRABC || CONFIG_AMVR
- int use_subpel,
-#endif // CONFIG_INTRABC || CONFIG_AMVR
- int usehp) {
+ int use_subpel, int usehp) {
int mag, d, fr, hp;
const int sign = aom_read_symbol(r, mvcomp->sign_cdf, 2, ACCT_STR);
const int mv_class =
@@ -1103,10 +1094,8 @@
mag = CLASS0_SIZE << (mv_class + 2);
}
-#if CONFIG_INTRABC || CONFIG_AMVR
if (use_subpel) {
-#endif // CONFIG_INTRABC || CONFIG_AMVR
- // Fractional part
+ // Fractional part
fr = aom_read_symbol(r, class0 ? mvcomp->class0_fp_cdf[d] : mvcomp->fp_cdf,
MV_FP_SIZE, ACCT_STR);
@@ -1115,12 +1104,10 @@
r, class0 ? mvcomp->class0_hp_cdf : mvcomp->hp_cdf, 2,
ACCT_STR)
: 1;
-#if CONFIG_INTRABC || CONFIG_AMVR
} else {
fr = 3;
hp = 1;
}
-#endif // CONFIG_INTRABC || CONFIG_AMVR
// Result
mag += ((d << 3) | (fr << 1) | hp) + 1;
@@ -1134,17 +1121,11 @@
(MV_JOINT_TYPE)aom_read_symbol(r, ctx->joints_cdf, MV_JOINTS, ACCT_STR);
if (mv_joint_vertical(joint_type))
- diff.row = read_mv_component(r, &ctx->comps[0],
-#if CONFIG_INTRABC || CONFIG_AMVR
- precision > MV_SUBPEL_NONE,
-#endif // CONFIG_INTRABC || CONFIG_AMVR
+ diff.row = read_mv_component(r, &ctx->comps[0], precision > MV_SUBPEL_NONE,
precision > MV_SUBPEL_LOW_PRECISION);
if (mv_joint_horizontal(joint_type))
- diff.col = read_mv_component(r, &ctx->comps[1],
-#if CONFIG_INTRABC || CONFIG_AMVR
- precision > MV_SUBPEL_NONE,
-#endif // CONFIG_INTRABC || CONFIG_AMVR
+ diff.col = read_mv_component(r, &ctx->comps[1], precision > MV_SUBPEL_NONE,
precision > MV_SUBPEL_LOW_PRECISION);
mv->row = ref->row + diff.row;
@@ -2160,9 +2141,7 @@
int mi_col, aom_reader *r, int x_mis, int y_mis) {
AV1_COMMON *const cm = &pbi->common;
MODE_INFO *const mi = xd->mi[0];
-#if CONFIG_INTRABC
mi->mbmi.use_intrabc = 0;
-#endif // CONFIG_INTRABC
if (frame_is_intra_only(cm)) {
read_intra_frame_mode_info(cm, xd, mi_row, mi_col, r);
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 77e963c..5aae9f7 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -73,9 +73,7 @@
const MODE_INFO *above_mi,
const MODE_INFO *left_mi, PREDICTION_MODE mode,
aom_writer *w) {
-#if CONFIG_INTRABC
assert(!is_intrabc_block(&mi->mbmi));
-#endif // CONFIG_INTRABC
(void)mi;
aom_write_symbol(w, mode, get_y_mode_cdf(frame_ctx, above_mi, left_mi),
INTRA_MODES);
@@ -1352,7 +1350,6 @@
#endif // !CONFIG_TXK_SEL
}
-#if CONFIG_INTRABC
static void write_intrabc_info(AV1_COMMON *cm, MACROBLOCKD *xd,
const MB_MODE_INFO_EXT *mbmi_ext,
int enable_tx_size, aom_writer *w) {
@@ -1386,12 +1383,9 @@
#endif // !CONFIG_TXK_SEL
}
}
-#endif // CONFIG_INTRABC
static void write_mb_modes_kf(AV1_COMP *cpi, MACROBLOCKD *xd,
-#if CONFIG_INTRABC
const MB_MODE_INFO_EXT *mbmi_ext,
-#endif // CONFIG_INTRABC
const int mi_row, const int mi_col,
aom_writer *w) {
AV1_COMMON *const cm = &cpi->common;
@@ -1460,12 +1454,10 @@
block_signals_txsize(bsize) &&
!xd->lossless[mbmi->segment_id];
-#if CONFIG_INTRABC
if (av1_allow_intrabc(cm)) {
write_intrabc_info(cm, xd, mbmi_ext, enable_tx_size, w);
if (is_intrabc_block(mbmi)) return;
}
-#endif // CONFIG_INTRABC
if (enable_tx_size) write_selected_tx_size(cm, xd, w);
@@ -1642,11 +1634,7 @@
((mi_row & MAX_MIB_MASK) << TX_UNIT_HIGH_LOG2);
if (frame_is_intra_only(cm)) {
- write_mb_modes_kf(cpi, xd,
-#if CONFIG_INTRABC
- cpi->td.mb.mbmi_ext,
-#endif // CONFIG_INTRABC
- mi_row, mi_col, w);
+ write_mb_modes_kf(cpi, xd, cpi->td.mb.mbmi_ext, mi_row, mi_col, w);
} else {
// has_subpel_mv_component needs the ref frame buffers set up to look
// up if they are scaled. has_subpel_mv_component is in turn needed by
@@ -1744,9 +1732,7 @@
assert(!mbmi->skip_mode || !palette_size_plane);
#endif // CONFIG_EXT_SKIP
if (palette_size_plane > 0) {
-#if CONFIG_INTRABC
assert(mbmi->use_intrabc == 0);
-#endif
assert(av1_allow_palette(cm->allow_screen_content_tools, mbmi->sb_type));
int rows, cols;
av1_get_block_dimensions(mbmi->sb_type, plane, xd, NULL, NULL, &rows,
@@ -2007,11 +1993,8 @@
#if CONFIG_LOOP_RESTORATION
static void encode_restoration_mode(AV1_COMMON *cm,
struct aom_write_bit_buffer *wb) {
- const int num_planes = av1_num_planes(cm);
-#if CONFIG_INTRABC
-
if (cm->allow_intrabc && NO_FILTER_FOR_IBC) return;
-#endif // CONFIG_INTRABC
+ const int num_planes = av1_num_planes(cm);
int all_none = 1, chroma_none = 1;
for (int p = 0; p < num_planes; ++p) {
RestorationInfo *rsi = &cm->rst_info[p];
@@ -2215,10 +2198,8 @@
#endif // CONFIG_LOOP_RESTORATION
static void encode_loopfilter(AV1_COMMON *cm, struct aom_write_bit_buffer *wb) {
- const int num_planes = av1_num_planes(cm);
-#if CONFIG_INTRABC
if (cm->allow_intrabc && NO_FILTER_FOR_IBC) return;
-#endif // CONFIG_INTRABC
+ const int num_planes = av1_num_planes(cm);
int i;
struct loopfilter *lf = &cm->lf;
@@ -2264,10 +2245,8 @@
}
static void encode_cdef(const AV1_COMMON *cm, struct aom_write_bit_buffer *wb) {
- const int num_planes = av1_num_planes(cm);
-#if CONFIG_INTRABC
if (cm->allow_intrabc && NO_FILTER_FOR_IBC) return;
-#endif // CONFIG_INTRABC
+ const int num_planes = av1_num_planes(cm);
int i;
aom_wb_write_literal(wb, cm->cdef_pri_damping - 3, 2);
assert(cm->cdef_pri_damping == cm->cdef_sec_damping);
@@ -3271,7 +3250,6 @@
#else
write_frame_size(cm, wb);
#endif
-#if CONFIG_INTRABC
#if CONFIG_HORZONLY_FRAME_SUPERRES
assert(av1_superres_unscaled(cm) ||
!(cm->allow_intrabc && NO_FILTER_FOR_IBC));
@@ -3281,7 +3259,6 @@
if (cm->allow_screen_content_tools)
#endif
aom_wb_write_bit(wb, cm->allow_intrabc);
-#endif // CONFIG_INTRABC
#if CONFIG_CDF_UPDATE_MODE
aom_wb_write_literal(wb, cm->cdf_update_mode, 2);
#endif // CONFIG_CDF_UPDATE_MODE
@@ -3303,7 +3280,6 @@
#else
write_frame_size(cm, wb);
#endif
-#if CONFIG_INTRABC
#if CONFIG_HORZONLY_FRAME_SUPERRES
assert(av1_superres_unscaled(cm) ||
!(cm->allow_intrabc && NO_FILTER_FOR_IBC));
@@ -3313,7 +3289,6 @@
if (cm->allow_screen_content_tools)
#endif
aom_wb_write_bit(wb, cm->allow_intrabc);
-#endif // CONFIG_INTRABC
#if CONFIG_CDF_UPDATE_MODE
aom_wb_write_literal(wb, cm->cdf_update_mode, 2);
#endif // CONFIG_CDF_UPDATE_MODE
@@ -3474,11 +3449,9 @@
aom_wb_write_literal(wb, OD_ILOG_NZ(cm->delta_q_res) - 1, 2);
xd->prev_qindex = cm->base_qindex;
#if CONFIG_EXT_DELTA_Q
-#if CONFIG_INTRABC
if (cm->allow_intrabc && NO_FILTER_FOR_IBC)
assert(cm->delta_lf_present_flag == 0);
else
-#endif // CONFIG_INTRABC
aom_wb_write_bit(wb, cm->delta_lf_present_flag);
if (cm->delta_lf_present_flag) {
aom_wb_write_literal(wb, OD_ILOG_NZ(cm->delta_lf_res) - 1, 2);
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 95b3e66..6bd8050 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -344,9 +344,7 @@
int wiener_restore_cost[2];
int sgrproj_restore_cost[2];
#endif // CONFIG_LOOP_RESTORATION
-#if CONFIG_INTRABC
int intrabc_cost[2];
-#endif // CONFIG_INTRABC
int optimize;
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index dd9a944..26c7ff5 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -977,7 +977,6 @@
update_palette_cdf(xd, mi);
}
-#if CONFIG_INTRABC
if (frame_is_intra_only(cm) && av1_allow_intrabc(cm)) {
if (allow_update_cdf)
update_cdf(fc->intrabc_cdf, is_intrabc_block(mbmi), 2);
@@ -985,7 +984,6 @@
++td->counts->intrabc[is_intrabc_block(mbmi)];
#endif // CONFIG_ENTROPY_STATS
}
-#endif // CONFIG_INTRABC
if (!frame_is_intra_only(cm)) {
RD_COUNTS *rdc = &td->rd_counts;
@@ -3884,9 +3882,7 @@
av1_crc_calculator_init(&td->mb.tx_rd_record.crc_calculator, 24, 0x5D6DCB);
-#if CONFIG_INTRABC
td->intrabc_used_this_tile = 0;
-#endif // CONFIG_INTRABC
for (mi_row = tile_info->mi_row_start; mi_row < tile_info->mi_row_end;
mi_row += cm->seq_params.mib_size) {
@@ -3910,9 +3906,7 @@
for (tile_row = 0; tile_row < cm->tile_rows; ++tile_row) {
for (tile_col = 0; tile_col < cm->tile_cols; ++tile_col) {
av1_encode_tile(cpi, &cpi->td, tile_row, tile_col);
-#if CONFIG_INTRABC
cpi->intrabc_used |= cpi->td.intrabc_used_this_tile;
-#endif // CONFIG_INTRABC
}
}
}
@@ -4219,7 +4213,6 @@
#endif // CONFIG_CDF_UPDATE_MODE
}
-#if CONFIG_INTRABC
// Allow intrabc when screen content tools are enabled.
cm->allow_intrabc = cm->allow_screen_content_tools;
// Reset the flag.
@@ -4230,7 +4223,6 @@
cm->allow_intrabc = 0;
}
#endif
-#endif // CONFIG_INTRABC
#if CONFIG_HASH_ME
if (cpi->oxcf.pass != 1 && av1_use_hash_me(cm)) {
@@ -4514,13 +4506,11 @@
cpi->time_encode_sb_row += aom_usec_timer_elapsed(&emr_timer);
}
-#if CONFIG_INTRABC
// If intrabc is allowed but never selected, reset the allow_intrabc flag.
if (cm->allow_intrabc && !cpi->intrabc_used) cm->allow_intrabc = 0;
#if CONFIG_EXT_DELTA_Q
if (cm->allow_intrabc) cm->delta_lf_present_flag = 0;
#endif // CONFIG_EXT_DELTA_Q
-#endif // CONFIG_INTRABC
}
static void make_consistent_compound_tools(AV1_COMMON *cm) {
@@ -4909,11 +4899,7 @@
set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
for (ref = 0; ref < 1 + is_compound; ++ref) {
YV12_BUFFER_CONFIG *cfg = get_ref_frame_buffer(cpi, mbmi->ref_frame[ref]);
-#if CONFIG_INTRABC
assert(IMPLIES(!is_intrabc_block(mbmi), cfg));
-#else
- assert(cfg != NULL);
-#endif // !CONFIG_INTRABC
av1_setup_pre_planes(xd, ref, cfg, mi_row, mi_col,
&xd->block_refs[ref]->sf, num_planes);
}
@@ -4957,10 +4943,8 @@
}
if (!dry_run) {
-#if CONFIG_INTRABC
- if (av1_allow_intrabc(cm))
- if (is_intrabc_block(mbmi)) td->intrabc_used_this_tile = 1;
-#endif // CONFIG_INTRABC
+ if (av1_allow_intrabc(cm) && is_intrabc_block(mbmi))
+ td->intrabc_used_this_tile = 1;
TX_SIZE tx_size =
is_inter && !mbmi->skip ? mbmi->min_tx_size : mbmi->tx_size;
if (cm->tx_mode == TX_MODE_SELECT && !xd->lossless[mbmi->segment_id] &&
diff --git a/av1/encoder/encodemv.c b/av1/encoder/encodemv.c
index 9a2054f..a468a44 100644
--- a/av1/encoder/encodemv.c
+++ b/av1/encoder/encodemv.c
@@ -46,11 +46,8 @@
for (i = 0; i < n; ++i)
aom_write_symbol(w, (d >> i) & 1, mvcomp->bits_cdf[i], 2);
}
-// Fractional bits
-#if CONFIG_INTRABC || CONFIG_AMVR
- if (precision > MV_SUBPEL_NONE)
-#endif // CONFIG_INTRABC || CONFIG_AMVR
- {
+ // Fractional bits
+ if (precision > MV_SUBPEL_NONE) {
aom_write_symbol(
w, fr,
mv_class == MV_CLASS_0 ? mvcomp->class0_fp_cdf[d] : mvcomp->fp_cdf,
@@ -103,10 +100,7 @@
const int b = c + CLASS0_BITS - 1; /* number of bits */
for (i = 0; i < b; ++i) cost += bits_cost[i][((d >> i) & 1)];
}
-#if CONFIG_INTRABC || CONFIG_AMVR
- if (precision > MV_SUBPEL_NONE)
-#endif // CONFIG_INTRABC || CONFIG_AMVR
- {
+ if (precision > MV_SUBPEL_NONE) {
if (c == MV_CLASS_0) {
cost += class0_fp_cost[d][f];
} else {
@@ -149,7 +143,6 @@
}
}
-#if CONFIG_INTRABC
void av1_encode_dv(aom_writer *w, const MV *mv, const MV *ref,
nmv_context *mvctx) {
// DV and ref DV should not have sub-pel.
@@ -167,7 +160,6 @@
if (mv_joint_horizontal(j))
encode_mv_component(w, diff.col, &mvctx->comps[1], MV_SUBPEL_NONE);
}
-#endif // CONFIG_INTRABC
void av1_build_nmv_cost_table(int *mvjoint, int *mvcost[2],
const nmv_context *ctx,
diff --git a/av1/encoder/encodemv.h b/av1/encoder/encodemv.h
index 2fe1ea7..719f2dc 100644
--- a/av1/encoder/encodemv.h
+++ b/av1/encoder/encodemv.h
@@ -27,10 +27,8 @@
void av1_update_mv_count(ThreadData *td);
-#if CONFIG_INTRABC
void av1_encode_dv(aom_writer *w, const MV *mv, const MV *ref,
nmv_context *mvctx);
-#endif // CONFIG_INTRABC
#ifdef __cplusplus
} // extern "C"
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 01dee7d..d14947c 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -6030,7 +6030,6 @@
// off.
// Pick the loop filter level for the frame.
-#if CONFIG_INTRABC
if (!(cm->allow_intrabc && NO_FILTER_FOR_IBC)) {
loopfilter_frame(cpi, cm);
} else {
@@ -6046,9 +6045,6 @@
cm->rst_info[2].frame_restoration_type = RESTORE_NONE;
#endif // CONFIG_LOOP_RESTORATION
}
-#else
- loopfilter_frame(cpi, cm);
-#endif // CONFIG_INTRABC
// TODO(debargha): Fix mv search range on encoder side
// aom_extend_frame_inner_borders(cm->frame_to_show, av1_num_planes(cm));
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index c78b1f4..c419e05 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -366,9 +366,7 @@
uint8_t *left_pred_buf;
#endif
PALETTE_BUFFER *palette_buffer;
-#if CONFIG_INTRABC
int intrabc_used_this_tile;
-#endif // CONFIG_INTRABC
} ThreadData;
struct EncWorkerData;
@@ -608,17 +606,13 @@
int arf_pos_for_ovrly[MAX_EXT_ARFS + 1];
int global_motion_search_done;
tran_low_t *tcoeff_buf[MAX_MB_PLANE];
-
int extra_arf_allowed;
int bwd_ref_allowed;
-
-#if CONFIG_INTRABC
// A flag to indicate if intrabc is ever used in current frame.
int intrabc_used;
int dv_cost[2][MV_VALS];
// TODO(huisu@google.com): we can update dv_joint_cost per SB.
int dv_joint_cost[MV_JOINTS];
-#endif // CONFIG_INTRABC
} AV1_COMP;
void av1_initialize_enc(void);
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index cbb0054..a505b0d 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -194,9 +194,7 @@
for (i = 0; i < num_workers; i++) {
AVxWorker *const worker = &cpi->workers[i];
EncWorkerData *const thread_data = (EncWorkerData *)worker->data1;
-#if CONFIG_INTRABC
cpi->intrabc_used |= thread_data->td->intrabc_used_this_tile;
-#endif // CONFIG_INTRABC
// Accumulate counters.
if (i < cpi->num_workers - 1) {
av1_accumulate_frame_counts(&cm->counts, thread_data->td->counts);
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index b15cf56..7bdfb02 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -2665,7 +2665,6 @@
for (int i = 0; i < count; i++, iterator_increment(&iterator)) {
block_hash ref_block_hash = *(block_hash *)(iterator_get(&iterator));
if (hash_value2 == ref_block_hash.hash_value2) {
-#if CONFIG_INTRABC
// For intra, make sure the prediction is from valid area.
if (intra) {
const TileInfo *tile = &x->e_mbd.tile;
@@ -2677,7 +2676,6 @@
cpi->common.seq_params.mib_size_log2))
continue;
}
-#endif // CONFIG_INTRABC
MV hash_mv;
hash_mv.col = ref_block_hash.x - x_pos;
hash_mv.row = ref_block_hash.y - y_pos;
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index 69f8a28..310cd31 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -237,9 +237,7 @@
av1_cost_tokens_from_cdf(x->sgrproj_restore_cost, fc->sgrproj_restore_cdf,
NULL);
#endif // CONFIG_LOOP_RESTORATION
-#if CONFIG_INTRABC
av1_cost_tokens_from_cdf(x->intrabc_cost, fc->intrabc_cdf, NULL);
-#endif // CONFIG_INTRABC
if (!frame_is_intra_only(cm)) {
for (i = 0; i < COMP_INTER_CONTEXTS; ++i) {
@@ -603,14 +601,12 @@
x->mvcost = x->mv_cost_stack[0];
x->nmvjointcost = x->nmv_vec_cost[0];
-#if CONFIG_INTRABC
if (frame_is_intra_only(cm) && cm->allow_screen_content_tools &&
cpi->oxcf.pass != 1) {
int *dvcost[2] = { &cpi->dv_cost[0][MV_MAX], &cpi->dv_cost[1][MV_MAX] };
av1_build_nmv_cost_table(cpi->dv_joint_cost, dvcost, &cm->fc->ndvc,
MV_SUBPEL_NONE);
}
-#endif
if (cpi->oxcf.pass != 1) {
for (int i = 0; i < TRANS_TYPES; ++i)
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index ba4bd63..3fdec1b 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2711,14 +2711,10 @@
#if CONFIG_FILTER_INTRA
const int use_filter_intra = mbmi->filter_intra_mode_info.use_filter_intra;
#endif // CONFIG_FILTER_INTRA
-// Can only activate one mode.
-#if CONFIG_INTRABC
const int use_intrabc = mbmi->use_intrabc;
+ // Can only activate one mode.
assert(((mbmi->mode != DC_PRED) + use_palette + use_intrabc +
use_filter_intra) <= 1);
-#else
- assert((mbmi->mode != DC_PRED) + use_palette + use_filter_intra <= 1);
-#endif // CONFIG_INTRABC
const int try_palette =
av1_allow_palette(cpi->common.allow_screen_content_tools, mbmi->sb_type);
if (try_palette && mbmi->mode == DC_PRED) {
@@ -2767,10 +2763,8 @@
#endif // CONFIG_EXT_INTRA_MOD
}
}
-#if CONFIG_INTRABC
if (av1_allow_intrabc(&cpi->common))
total_rate += x->intrabc_cost[use_intrabc];
-#endif // CONFIG_INTRABC
return total_rate;
}
@@ -2781,12 +2775,9 @@
int total_rate = mode_cost;
const int use_palette = mbmi->palette_mode_info.palette_size[1] > 0;
const UV_PREDICTION_MODE mode = mbmi->uv_mode;
-// Can only activate one mode.
-#if CONFIG_INTRABC
+ // Can only activate one mode.
assert(((mode != UV_DC_PRED) + use_palette + mbmi->use_intrabc) <= 1);
-#else
- assert((mode != UV_DC_PRED) + use_palette <= 1);
-#endif // CONFIG_INTRABC
+
const int try_palette =
av1_allow_palette(cpi->common.allow_screen_content_tools, mbmi->sb_type);
if (try_palette && mode == UV_DC_PRED) {
@@ -8639,7 +8630,6 @@
return 0; // The rate-distortion cost will be re-calculated by caller.
}
-#if CONFIG_INTRABC
static int64_t rd_pick_intrabc_mode_sb(const AV1_COMP *cpi, MACROBLOCK *x,
RD_STATS *rd_cost, BLOCK_SIZE bsize,
int64_t best_rd) {
@@ -8844,7 +8834,6 @@
sizeof(x->blk_skip[0][0]) * xd->n8_h * xd->n8_w);
return best_rd;
}
-#endif // CONFIG_INTRABC
void av1_rd_pick_intra_mode_sb(const AV1_COMP *cpi, MACROBLOCK *x, int mi_row,
int mi_col, RD_STATS *rd_cost, BLOCK_SIZE bsize,
@@ -8865,10 +8854,8 @@
ctx->skip = 0;
mbmi->ref_frame[0] = INTRA_FRAME;
mbmi->ref_frame[1] = NONE_FRAME;
-#if CONFIG_INTRABC
mbmi->use_intrabc = 0;
mbmi->mv[0].as_int = 0;
-#endif // CONFIG_INTRABC
const int64_t intra_yrd =
rd_pick_intra_sby_mode(cpi, x, &rate_y, &rate_y_tokenonly, &dist_y,
@@ -8911,7 +8898,6 @@
rd_cost->rate = INT_MAX;
}
-#if CONFIG_INTRABC
if (rd_cost->rate != INT_MAX && rd_cost->rdcost < best_rd)
best_rd = rd_cost->rdcost;
if (rd_pick_intrabc_mode_sb(cpi, x, rd_cost, bsize, best_rd) < best_rd) {
@@ -8920,7 +8906,6 @@
sizeof(x->blk_skip[0][0]) * ctx->num_4x4_blk);
assert(rd_cost->rate != INT_MAX);
}
-#endif
if (rd_cost->rate == INT_MAX) return;
ctx->mic = *xd->mi[0];
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 71d94b3..1b0a562 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -37,8 +37,7 @@
50, 50, 25, 15, 5, 1
};
-#if CONFIG_INTRABC
-// TODO(aconverse@google.com): These settings are pretty relaxed, tune them for
+// TODO(huisu@google.com): These settings are pretty relaxed, tune them for
// each speed setting
static MESH_PATTERN intrabc_mesh_patterns[MAX_MESH_SPEED + 1][MAX_MESH_STEP] = {
{ { 256, 1 }, { 256, 1 }, { 0, 0 }, { 0, 0 } },
@@ -50,7 +49,6 @@
};
static uint8_t intrabc_max_mesh_pct[MAX_MESH_SPEED + 1] = { 100, 100, 100,
25, 25, 10 };
-#endif
// Intra only frames, golden frames (except alt ref overlays) and
// alt ref frames tend to be coded at a higher than ambient quality
@@ -545,7 +543,6 @@
sf->mesh_patterns[i].interval =
good_quality_mesh_patterns[speed][i].interval;
}
-#if CONFIG_INTRABC
if ((frame_is_intra_only(cm) && cm->allow_screen_content_tools) &&
(cpi->twopass.fr_content_type == FC_GRAPHICS_ANIMATION ||
cpi->oxcf.content == AOM_CONTENT_SCREEN)) {
@@ -555,7 +552,6 @@
}
sf->max_exaustive_pct = intrabc_max_mesh_pct[speed];
}
-#endif // CONFIG_INTRABC
// Slow quant, dct and trellis not worthwhile for first pass
// so make sure they are always turned off.