Remove redundant av1_update_film_grain_parameters
Remove the redundant av1_update_film_grain_parameters() call in
init_config(). init_config() calls av1_change_config(), which calls
av1_update_film_grain_parameters().
Remove the redundant "cpi->oxcf = *oxcf;" statement in
av1_update_film_grain_parameters(). Let the caller (av1_change_config())
take care of that.
Change-Id: Ib80692a52bd0028f51c9d522f5fac319e1098f8a
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 84580a2..e5f1672 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -573,8 +573,6 @@
alloc_compressor_data(cpi);
- av1_update_film_grain_parameters(cpi, oxcf);
-
// Single thread case: use counts in common.
cpi->td.counts = &cpi->counts;
@@ -707,9 +705,10 @@
lap_lag_in_frames = cpi->oxcf.gf_cfg.lag_in_frames;
}
+ cpi->oxcf = *oxcf;
+
av1_update_film_grain_parameters(cpi, oxcf);
- cpi->oxcf = *oxcf;
// When user provides superres_mode = AOM_SUPERRES_AUTO, we still initialize
// superres mode for current encoding = AOM_SUPERRES_NONE. This is to ensure
// that any analysis (e.g. TPL) happening outside the main encoding loop still
diff --git a/av1/encoder/encoder_utils.c b/av1/encoder/encoder_utils.c
index 1e3ea32..0c69e4d 100644
--- a/av1/encoder/encoder_utils.c
+++ b/av1/encoder/encoder_utils.c
@@ -636,7 +636,6 @@
void av1_update_film_grain_parameters(struct AV1_COMP *cpi,
const AV1EncoderConfig *oxcf) {
AV1_COMMON *const cm = &cpi->common;
- cpi->oxcf = *oxcf;
const TuneCfg *const tune_cfg = &oxcf->tune_cfg;
if (cpi->film_grain_table) {