Commit f57a937c authored by Frederic Barbier's avatar Frederic Barbier

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
parent aa84f3e6
......@@ -923,9 +923,7 @@ void av1_average_tile_coef_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
aom_cdf_prob *cdf_ptr[], int num_tiles) {
int i, cdf_size;
aom_cdf_prob *fc_cdf_ptr;
#if CONFIG_SIMPLE_BWD_ADAPT
assert(num_tiles == 1);
#endif
#if CONFIG_LV_MAP
AVERAGE_TILE_CDFS(txb_skip_cdf)
......@@ -961,9 +959,7 @@ void av1_average_tile_mv_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
aom_cdf_prob *fc_cdf_ptr;
#if CONFIG_SIMPLE_BWD_ADAPT
assert(num_tiles == 1);
#endif
int j;
for (j = 0; j < NMV_CONTEXTS; ++j) {
......@@ -990,9 +986,7 @@ void av1_average_tile_loopfilter_cdfs(FRAME_CONTEXT *fc,
(void)num_tiles;
(void)cdf_ptr;
#if CONFIG_SIMPLE_BWD_ADAPT
assert(num_tiles == 1);
#endif
int i, cdf_size;
aom_cdf_prob *fc_cdf_ptr;
......@@ -1011,9 +1005,7 @@ void av1_average_tile_intra_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
aom_cdf_prob *cdf_ptr[], int num_tiles) {
int i, cdf_size;
#if CONFIG_SIMPLE_BWD_ADAPT
assert(num_tiles == 1);
#endif
aom_cdf_prob *fc_cdf_ptr;
AVERAGE_TILE_CDFS(tx_size_cdf)
......@@ -1068,9 +1060,7 @@ void av1_average_tile_inter_cdfs(AV1_COMMON *cm, FRAME_CONTEXT *fc,
aom_cdf_prob *cdf_ptr[], int num_tiles) {
int i, cdf_size;
#if CONFIG_SIMPLE_BWD_ADAPT
assert(num_tiles == 1);
#endif
aom_cdf_prob *fc_cdf_ptr;
AVERAGE_TILE_CDFS(comp_inter_cdf)
......
......@@ -239,9 +239,7 @@ typedef struct AV1Common {
// support additional planes.
int subsampling_x;
int subsampling_y;
#if CONFIG_SIMPLE_BWD_ADAPT
int largest_tile_id;
#endif
// Marks if we need to use 16bit frame buffers (1: yes, 0: no).
int use_highbitdepth;
......
......@@ -1814,10 +1814,8 @@ static void get_tile_buffers(AV1Decoder *pbi, const uint8_t *data,
int tile_group_start_row = 0;
#endif
#if CONFIG_SIMPLE_BWD_ADAPT
size_t max_tile_size = 0;
cm->largest_tile_id = 0;
#endif
for (int r = 0; r < tile_rows; ++r) {
for (int c = 0; c < tile_cols; ++c, ++tc) {
TileBufferDec *const buf = &tile_buffers[r][c];
......@@ -1862,12 +1860,10 @@ static void get_tile_buffers(AV1Decoder *pbi, const uint8_t *data,
cm->tile_group_start_row[r][c] = tile_group_start_row;
cm->tile_group_start_col[r][c] = tile_group_start_col;
#endif
#if CONFIG_SIMPLE_BWD_ADAPT
if (buf->size > max_tile_size) {
max_tile_size = buf->size;
cm->largest_tile_id = r * tile_cols + c;
}
#endif
}
}
}
......@@ -3460,21 +3456,13 @@ void av1_decode_tg_tiles_and_wrapup(AV1Decoder *pbi, const uint8_t *data,
if (!xd->corrupted) {
if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
#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(&pbi->tile_data[0].tctx));
aom_cdf_prob **cdf_ptrs = aom_malloc(
num_bwd_ctxs * sizeof(&pbi->tile_data[0].tctx.partition_cdf[0][0]));
#if CONFIG_SIMPLE_BWD_ADAPT
make_update_tile_list_dec(pbi, cm->largest_tile_id, num_bwd_ctxs,
tile_ctxs);
#else
make_update_tile_list_dec(pbi, 0, num_bwd_ctxs, tile_ctxs);
#endif
#if CONFIG_SYMBOLRATE
av1_dump_symbol_rate(cm);
#endif
......
......@@ -2895,12 +2895,10 @@ static uint32_t write_tiles(AV1_COMP *const cpi, uint8_t *const dst,
*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 @@ static uint32_t write_tiles(AV1_COMP *const cpi, uint8_t *const dst,
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 @@ static uint32_t write_tiles(AV1_COMP *const cpi, uint8_t *const dst,
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 @@ static uint32_t write_tiles_in_tg_obus(AV1_COMP *const cpi, uint8_t *const dst,
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 @@ static uint32_t write_tiles_in_tg_obus(AV1_COMP *const cpi, uint8_t *const dst,
// 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 @@ static uint32_t write_tiles_in_tg_obus(AV1_COMP *const cpi, uint8_t *const dst,
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);
}
......
......@@ -5910,11 +5910,7 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
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 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
&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,
......
......@@ -177,7 +177,6 @@ set(CONFIG_REF_ADAPT 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SEGMENT_GLOBALMV 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SEGMENT_PRED_LAST 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SHORT_FILTER 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SIMPLE_BWD_ADAPT 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SIMPLIFY_TX_MODE 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SPATIAL_SEGMENTATION 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_STRIPED_LOOP_RESTORATION 1 CACHE NUMBER "AV1 experiment flag.")
......
......@@ -319,7 +319,6 @@ EXPERIMENT_LIST="
tmv
ext_warped_motion
horzonly_frame_superres
simple_bwd_adapt
eob_first
eighth_pel_mv_only
fwd_kf
......@@ -504,7 +503,6 @@ post_process_cmdline() {
soft_enable ext_delta_q
soft_enable parallel_deblocking
soft_enable obu
soft_enable simple_bwd_adapt
soft_enable loopfilter_level
soft_enable cfl
soft_enable deblock_13tap
......
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