Remove CONFIG_REFERENCE_BUFFER flag
Now SequenceHeader is no need of a flag to access.
Change-Id: I3c76249f9b21d391bf4733ea4cf16f11da6c9c18
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 293722b..b2a816b 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -3170,7 +3170,6 @@
aom_wb_write_bit(wb, 1); // show_existing_frame
aom_wb_write_literal(wb, cpi->existing_fb_idx_to_show, 3);
-#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
int frame_id_len = cm->seq_params.frame_id_length;
int display_frame_id = cm->ref_frame_id[cpi->existing_fb_idx_to_show];
@@ -3180,7 +3179,6 @@
/* Consider to have this logic only one place */
aom_wb_write_literal(wb, 0, 8);
}
-#endif // CONFIG_REFERENCE_BUFFER
#if CONFIG_FILM_GRAIN
if (cm->film_grain_params_present && cm->show_frame) {
@@ -3244,13 +3242,11 @@
}
#endif // CONFIG_AMVR
-#if CONFIG_REFERENCE_BUFFER
cm->invalid_delta_frame_id_minus1 = 0;
if (cm->seq_params.frame_id_numbers_present_flag) {
int frame_id_len = cm->seq_params.frame_id_length;
aom_wb_write_literal(wb, cm->current_frame_id, frame_id_len);
}
-#endif // CONFIG_REFERENCE_BUFFER
#if CONFIG_FRAME_SIZE
if (cm->width > cm->seq_params.max_frame_width ||
@@ -3375,7 +3371,7 @@
if (cm->frame_type == S_FRAME) {
assert(cm->ref_frame_sign_bias[ref_frame] == 0);
}
-#if CONFIG_REFERENCE_BUFFER
+
if (cm->seq_params.frame_id_numbers_present_flag) {
int i = get_ref_frame_map_idx(cpi, ref_frame);
int frame_id_len = cm->seq_params.frame_id_length;
@@ -3390,7 +3386,6 @@
cm->invalid_delta_frame_id_minus1 = 1;
aom_wb_write_literal(wb, delta_frame_id_minus1, diff_len);
}
-#endif // CONFIG_REFERENCE_BUFFER
}
#if CONFIG_FRAME_SIZE
@@ -3431,12 +3426,10 @@
aom_wb_write_literal(wb, arf_offset, FRAME_OFFSET_BITS);
}
-#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
cm->refresh_mask =
cm->frame_type == KEY_FRAME ? 0xFF : get_refresh_mask(cpi);
}
-#endif // CONFIG_REFERENCE_BUFFER
#if CONFIG_EXT_TILE
const int might_bwd_adapt =
diff --git a/av1/encoder/bitstream.h b/av1/encoder/bitstream.h
index f5d2e56..319bb2e 100644
--- a/av1/encoder/bitstream.h
+++ b/av1/encoder/bitstream.h
@@ -20,9 +20,7 @@
struct aom_write_bit_buffer;
-#if CONFIG_REFERENCE_BUFFER
void write_sequence_header(AV1_COMP *cpi, struct aom_write_bit_buffer *wb);
-#endif
uint32_t write_obu_header(OBU_TYPE obu_type, int obu_extension,
uint8_t *const dst);
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index fd3d83d..01dee7d 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -341,9 +341,7 @@
cpi->refresh_alt_ref_frame = 1;
av1_zero(cpi->interp_filter_selected);
set_sb_size(&cm->seq_params, select_sb_size(cpi));
-#if CONFIG_REFERENCE_BUFFER
set_use_reference_buffer(cm, 0);
-#endif // CONFIG_REFERENCE_BUFFER
#if CONFIG_NO_FRAME_CONTEXT_SIGNALING
cm->pre_fc = &cm->frame_contexts[FRAME_CONTEXT_DEFAULTS];
#else
@@ -5939,9 +5937,7 @@
#if CONFIG_EXT_TILE
cm->large_scale_tile = cpi->oxcf.large_scale_tile;
cm->single_tile_decoding = cpi->oxcf.single_tile_decoding;
-#if CONFIG_REFERENCE_BUFFER
if (cm->large_scale_tile) cm->seq_params.frame_id_numbers_present_flag = 0;
-#endif // CONFIG_REFERENCE_BUFFER
#endif // CONFIG_EXT_TILE
cm->seq_params.monochrome = oxcf->monochrome;
@@ -5965,7 +5961,6 @@
MAX_MODES * sizeof(*cpi->mode_chosen_counts));
#endif
-#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
/* Non-normative definition of current_frame_id ("frame counter" with
* wraparound) */
@@ -5987,7 +5982,6 @@
(1 << frame_id_length);
}
}
-#endif // CONFIG_REFERENCE_BUFFER
if (cpi->sf.recode_loop == DISALLOW_RECODE) {
encode_without_recode_loop(cpi);
@@ -6074,7 +6068,6 @@
return AOM_CODEC_OK;
}
-#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
int i;
/* Update reference frame id values based on the value of refresh_mask */
@@ -6084,7 +6077,6 @@
}
}
}
-#endif // CONFIG_REFERENCE_BUFFER
#if DUMP_RECON_FRAMES == 1
// NOTE(zoeliu): For debug - Output the filtered reconstructed video.
@@ -6941,13 +6933,12 @@
cm->min_qmlevel = cpi->oxcf.qm_minlevel;
cm->max_qmlevel = cpi->oxcf.qm_maxlevel;
-#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
if (*time_stamp == 0) {
cpi->common.current_frame_id = -1;
}
}
-#endif // CONFIG_REFERENCE_BUFFER
+
#if CONFIG_AMVR
cpi->cur_poc++;
if (oxcf->pass != 1 && cpi->common.allow_screen_content_tools) {