Commit 9ac7a0f3 authored by Cheng Chen's avatar Cheng Chen

Soft enable loopfilter_level

Enable it as it is adopted.
Fix some compile warnings and compatibilities.

Change-Id: If324e749e27ffa42f69a19ad5ebb39bc493b33ec
parent 28031907
......@@ -6367,6 +6367,7 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
av1_copy(fc->delta_lf_prob, default_delta_lf_probs);
av1_copy(fc->delta_lf_cdf, default_delta_lf_cdf);
#if CONFIG_LOOPFILTER_LEVEL
av1_copy(fc->delta_lf_multi_prob, default_delta_lf_multi_probs);
av1_copy(fc->delta_lf_multi_cdf, default_delta_lf_multi_cdf);
#endif // CONFIG_LOOPFILTER_LEVEL
#endif
......@@ -6608,9 +6609,9 @@ void av1_adapt_intra_frame_probs(AV1_COMMON *cm) {
#if CONFIG_EXT_DELTA_Q
#if CONFIG_LOOPFILTER_LEVEL
for (i = 0; i < FRAME_LF_COUNT; ++i)
for (int j = 0; j < DELTA_LF_PROBS; ++j)
fc->delta_lf_multi_prob[i][j] = mode_mv_merge_probs(
pre_fc->delta_lf_multi_prob[i][j], counts->delta_lf_multi[i][j]);
for (int k = 0; k < DELTA_LF_PROBS; ++k)
fc->delta_lf_multi_prob[i][k] = mode_mv_merge_probs(
pre_fc->delta_lf_multi_prob[i][k], counts->delta_lf_multi[i][k]);
#endif // CONFIG_LOOPFILTER_LEVEL
for (i = 0; i < DELTA_LF_PROBS; ++i)
fc->delta_lf_prob[i] =
......
......@@ -2698,7 +2698,9 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
const uint8_t *data_end, int startTile,
int endTile) {
AV1_COMMON *const cm = &pbi->common;
#if !CONFIG_LOOPFILTER_LEVEL
const AVxWorkerInterface *const winterface = aom_get_worker_interface();
#endif
const int tile_cols = cm->tile_cols;
const int tile_rows = cm->tile_rows;
const int n_tiles = tile_cols * tile_rows;
......@@ -2737,6 +2739,7 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
}
#endif // CONFIG_EXT_TILE
#if !CONFIG_LOOPFILTER_LEVEL
if (cm->lf.filter_level && !cm->skip_loop_filter &&
pbi->lf_worker.data1 == NULL) {
CHECK_MEM_ERROR(cm, pbi->lf_worker.data1,
......@@ -2755,6 +2758,7 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
av1_loop_filter_data_reset(lf_data, get_frame_new_buffer(cm), cm,
pbi->mb.plane);
}
#endif // CONFIG_LOOPFILTER_LEVEL
assert(tile_rows <= MAX_TILE_ROWS);
assert(tile_cols <= MAX_TILE_COLS);
......
......@@ -162,7 +162,7 @@ set(CONFIG_KF_CTX 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LGT 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LGT_FROM_PRED 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LOOPFILTERING_ACROSS_TILES 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LOOPFILTER_LEVEL 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LOOPFILTER_LEVEL 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LOOP_RESTORATION 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LPF_DIRECT 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LPF_SB 0 CACHE NUMBER "AV1 experiment flag.")
......
......@@ -143,6 +143,12 @@ macro (fix_experiment_configs)
change_config_and_warn(CONFIG_VAR_TX 1 CONFIG_VAR_TX_NO_TX_MODE)
endif ()
endif ()
if (CONFIG_LPF_SB)
if (CONFIG_LOOPFILTER_LEVEL)
change_config_and_warn(CONFIG_LOOPFILTER_LEVEL 0 CONFIG_FRAME_SIGN_BIAS)
endif ()
endif ()
endmacro ()
endif () # AOM_BUILD_CMAKE_AOM_EXPERIMENT_DEPS_CMAKE_
......@@ -542,6 +542,7 @@ post_process_cmdline() {
soft_enable ext_delta_q
soft_enable parallel_deblocking
soft_enable simple_bwd_adapt
soft_enable loopfilter_level
fi
# Enable low-bitdepth pixel pipeline by default
......@@ -643,6 +644,11 @@ post_process_cmdline() {
log_echo "disabling striped_loop_restoration"
disable_feature striped_loop_restoration
fi
if enabled lpf_sb; then
log_echo "lpf_sb can't work with loopfilter_level yet."
log_echo "disabling loopfilter_level"
disable_feature loopfilter_level
fi
}
process_targets() {
......
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