ref: 38739edaa1bc90635fbcb3666ff9288e6a5e9839
parent: 4d307cd7ff7baaca93053be554db300de2b149f0
author: angiebird <[email protected]>
date: Wed Oct 30 10:59:58 EDT 2019
Move noise_sensitivity to set_encoder_config Change-Id: Ia9a0d71dc8a329d00ebf20a82d42cda43e13431b
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -5360,12 +5360,6 @@
check_initial_width(cpi, subsampling_x, subsampling_y);
#endif // CONFIG_VP9_HIGHBITDEPTH
-#if CONFIG_VP9_HIGHBITDEPTH
- // Disable denoiser for high bitdepth since vp9_denoiser_filter only works for
- // 8 bits.
- if (cm->bit_depth > 8) cpi->oxcf.noise_sensitivity = 0;
-#endif
-
#if CONFIG_VP9_TEMPORAL_DENOISING
setup_denoiser_buffer(cpi);
#endif
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -541,7 +541,13 @@
oxcf->speed = abs(extra_cfg->cpu_used);
oxcf->encode_breakout = extra_cfg->static_thresh;
oxcf->enable_auto_arf = extra_cfg->enable_auto_alt_ref;
- oxcf->noise_sensitivity = extra_cfg->noise_sensitivity;
+ if (oxcf->bit_depth == VPX_BITS_8) {
+ oxcf->noise_sensitivity = extra_cfg->noise_sensitivity;
+ } else {
+ // Disable denoiser for high bitdepth since vp9_denoiser_filter only works
+ // for 8 bits.
+ oxcf->noise_sensitivity = 0;
+ }
oxcf->sharpness = extra_cfg->sharpness;
oxcf->two_pass_stats_in = cfg->rc_twopass_stats_in;