Commit 23b54841 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Remove CONFIG_FRAME_SIGN_BIAS config flag

Change-Id: I6138519456b2ad3ffc8bced803ddc4418b246e74
parent da01c0dc
......@@ -1327,7 +1327,6 @@ void av1_setup_frame_buf_refs(AV1_COMMON *cm) {
cm->buffer_pool->frame_bufs[alt2_buf_idx].cur_frame_offset;
}
#if CONFIG_FRAME_SIGN_BIAS
void av1_setup_frame_sign_bias(AV1_COMMON *cm) {
MV_REFERENCE_FRAME ref_frame;
for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) {
......@@ -1342,7 +1341,6 @@ void av1_setup_frame_sign_bias(AV1_COMMON *cm) {
}
}
}
#endif // CONFIG_FRAME_SIGN_BIAS
#if CONFIG_MFMV
#define MAX_OFFSET_WIDTH 64
......
......@@ -421,9 +421,7 @@ static INLINE int av1_refs_are_one_sided(const AV1_COMMON *cm) {
}
void av1_setup_frame_buf_refs(AV1_COMMON *cm);
#if CONFIG_FRAME_SIGN_BIAS
void av1_setup_frame_sign_bias(AV1_COMMON *cm);
#endif // CONFIG_FRAME_SIGN_BIAS
#if CONFIG_EXT_SKIP
void av1_setup_skip_mode_allowed(AV1_COMMON *cm);
#endif // CONFIG_EXT_SKIP
......
......@@ -2887,20 +2887,11 @@ static int read_uncompressed_header(AV1Decoder *pbi,
RefBuffer *const ref_frame = &cm->frame_refs[i];
ref_frame->idx = idx;
ref_frame->buf = &frame_bufs[idx].buf;
#if CONFIG_FRAME_SIGN_BIAS
#if CONFIG_OBU
// NOTE: For the scenario of (cm->frame_type != S_FRAME),
// ref_frame_sign_bias will be reset based on frame offsets.
cm->ref_frame_sign_bias[LAST_FRAME + i] = 0;
#endif // CONFIG_OBU
#else // !CONFIG_FRAME_SIGN_BIAS
#if CONFIG_OBU
cm->ref_frame_sign_bias[LAST_FRAME + i] =
(cm->frame_type == S_FRAME) ? 0 : aom_rb_read_bit(rb);
#else // !CONFIG_OBU
cm->ref_frame_sign_bias[LAST_FRAME + i] = aom_rb_read_bit(rb);
#endif // CONFIG_OBU
#endif // CONFIG_FRAME_SIGN_BIAS
#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
int frame_id_length = cm->seq_params.frame_id_length;
......@@ -2990,12 +2981,10 @@ static int read_uncompressed_header(AV1Decoder *pbi,
}
av1_setup_frame_buf_refs(cm);
#if CONFIG_FRAME_SIGN_BIAS
#if CONFIG_OBU
if (cm->frame_type != S_FRAME)
#endif // CONFIG_OBU
av1_setup_frame_sign_bias(cm);
#endif // CONFIG_FRAME_SIGN_BIAS
#if CONFIG_TEMPMV_SIGNALING
cm->cur_frame->intra_only = cm->frame_type == KEY_FRAME || cm->intra_only;
......
......@@ -3725,9 +3725,6 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
assert(get_ref_frame_map_idx(cpi, ref_frame) != INVALID_IDX);
aom_wb_write_literal(wb, get_ref_frame_map_idx(cpi, ref_frame),
REF_FRAMES_LOG2);
#if !CONFIG_FRAME_SIGN_BIAS
aom_wb_write_bit(wb, cm->ref_frame_sign_bias[ref_frame]);
#endif // !CONFIG_FRAME_SIGN_BIAS
#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
int i = get_ref_frame_map_idx(cpi, ref_frame);
......@@ -4060,9 +4057,6 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi,
assert(get_ref_frame_map_idx(cpi, ref_frame) != INVALID_IDX);
aom_wb_write_literal(wb, get_ref_frame_map_idx(cpi, ref_frame),
REF_FRAMES_LOG2);
#if !CONFIG_FRAME_SIGN_BIAS
aom_wb_write_bit(wb, cm->ref_frame_sign_bias[ref_frame]);
#endif // !CONFIG_FRAME_SIGN_BIAS
#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
int i = get_ref_frame_map_idx(cpi, ref_frame);
......
......@@ -4592,9 +4592,7 @@ void av1_encode_frame(AV1_COMP *cpi) {
}
av1_setup_frame_buf_refs(cm);
if (cpi->sf.selective_ref_frame >= 2) enforce_max_ref_frames(cpi);
#if CONFIG_FRAME_SIGN_BIAS
av1_setup_frame_sign_bias(cm);
#endif // CONFIG_FRAME_SIGN_BIAS
#if CONFIG_MISMATCH_DEBUG
mismatch_reset_frame(num_planes);
......
......@@ -5666,23 +5666,6 @@ static void set_ext_overrides(AV1_COMP *cpi) {
}
}
#if !CONFIG_FRAME_SIGN_BIAS
static void set_arf_sign_bias(AV1_COMP *cpi) {
AV1_COMMON *const cm = &cpi->common;
int arf_sign_bias;
const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
// The arf_sign_bias will be one for internal ARFs'
arf_sign_bias = cpi->rc.source_alt_ref_active &&
(!cpi->refresh_alt_ref_frame ||
gf_group->update_type[gf_group->index] == INTNL_ARF_UPDATE);
cm->ref_frame_sign_bias[ALTREF_FRAME] = arf_sign_bias;
cm->ref_frame_sign_bias[BWDREF_FRAME] = cm->ref_frame_sign_bias[ALTREF_FRAME];
cm->ref_frame_sign_bias[ALTREF2_FRAME] =
cm->ref_frame_sign_bias[ALTREF_FRAME];
}
#endif // !CONFIG_FRAME_SIGN_BIAS
static int setup_interp_filter_search_mask(AV1_COMP *cpi) {
InterpFilter ifilter;
int ref_total[TOTAL_REFS_PER_FRAME] = { 0 };
......@@ -5854,11 +5837,6 @@ static int encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size, uint8_t *dest,
set_ext_overrides(cpi);
aom_clear_system_state();
#if !CONFIG_FRAME_SIGN_BIAS
// Set the arf sign bias for this frame.
set_arf_sign_bias(cpi);
#endif // !CONFIG_FRAME_SIGN_BIAS
#if CONFIG_TEMPMV_SIGNALING || CONFIG_FWD_KF
// frame type has been decided outside of this function call
cm->cur_frame->intra_only = cm->frame_type == KEY_FRAME || cm->intra_only;
......
......@@ -117,7 +117,6 @@ set(CONFIG_FAST_SGR 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FILM_GRAIN 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FILTER_INTRA 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FP_MB_STATS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FRAME_SIGN_BIAS 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FRAME_SIZE 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FWD_KF 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_HASH_ME 0 CACHE NUMBER "AV1 experiment flag.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment