Remove experimental flag of SIMPLE_BWD_ADAPT
This experiment has been adopted, we can simplify the code
by dropping the associated preprocessor conditionals.
Change-Id: I09423f67995ea4bea6f1de71bfeef7f6f1c2ae19
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index dbde2a7..1ddbe5c 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -2895,12 +2895,10 @@
*max_tile_size = 0;
*max_tile_col_size = 0;
-// All tile size fields are output on 4 bytes. A call to remux_tiles will
-// later compact the data if smaller headers are adequate.
+ // All tile size fields are output on 4 bytes. A call to remux_tiles will
+ // later compact the data if smaller headers are adequate.
-#if CONFIG_SIMPLE_BWD_ADAPT
cm->largest_tile_id = 0;
-#endif
#if CONFIG_EXT_TILE
if (cm->large_scale_tile) {
@@ -2943,11 +2941,9 @@
tile_size = mode_bc.pos;
buf->size = tile_size;
-#if CONFIG_SIMPLE_BWD_ADAPT
if (tile_size > *max_tile_size) {
cm->largest_tile_id = tile_cols * tile_row + tile_col;
}
-#endif
// Record the maximum tile size we see, so we can compact headers later.
*max_tile_size = AOMMAX(*max_tile_size, tile_size);
@@ -3129,11 +3125,9 @@
curr_tg_data_size += tile_size + 4;
buf->size = tile_size;
-#if CONFIG_SIMPLE_BWD_ADAPT
if (tile_size > *max_tile_size) {
cm->largest_tile_id = tile_cols * tile_row + tile_col;
}
-#endif
if (!is_last_tile) {
*max_tile_size = AOMMAX(*max_tile_size, tile_size);
// size of this tile
@@ -4514,9 +4508,7 @@
const int have_tiles = tile_cols * tile_rows > 1;
#endif
-#if CONFIG_SIMPLE_BWD_ADAPT
cm->largest_tile_id = 0;
-#endif
*max_tile_size = 0;
*max_tile_col_size = 0;
@@ -4570,9 +4562,7 @@
// Record the maximum tile size we see, so we can compact headers later.
if (tile_size > *max_tile_size) {
*max_tile_size = tile_size;
-#if CONFIG_SIMPLE_BWD_ADAPT
cm->largest_tile_id = tile_cols * tile_row + tile_col;
-#endif
}
if (have_tiles) {
@@ -4713,11 +4703,9 @@
curr_tg_data_size += (tile_size + (is_last_tile_in_tg ? 0 : 4));
buf->size = tile_size;
-#if CONFIG_SIMPLE_BWD_ADAPT
if (tile_size > *max_tile_size) {
cm->largest_tile_id = tile_cols * tile_row + tile_col;
}
-#endif
if (!is_last_tile) {
*max_tile_size = AOMMAX(*max_tile_size, tile_size);
}
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 5211274..d51a038 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -5910,11 +5910,7 @@
AV1_COMMON *const cm = &cpi->common;
const AV1EncoderConfig *const oxcf = &cpi->oxcf;
struct segmentation *const seg = &cm->seg;
-#if CONFIG_SIMPLE_BWD_ADAPT
const int num_bwd_ctxs = 1;
-#else
- const int num_bwd_ctxs = cm->tile_rows * cm->tile_cols;
-#endif
FRAME_CONTEXT **tile_ctxs =
aom_malloc(num_bwd_ctxs * sizeof(&cpi->tile_data[0].tctx));
@@ -6255,11 +6251,7 @@
&cm->counts);
#endif // CONFIG_ENTROPY_STATS
if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
-#if CONFIG_SIMPLE_BWD_ADAPT
make_update_tile_list_enc(cpi, cm->largest_tile_id, 1, tile_ctxs);
-#else
- make_update_tile_list_enc(cpi, 0, num_bwd_ctxs, tile_ctxs);
-#endif
av1_average_tile_coef_cdfs(cpi->common.fc, tile_ctxs, cdf_ptrs,
num_bwd_ctxs);
av1_average_tile_intra_cdfs(cpi->common.fc, tile_ctxs, cdf_ptrs,