]> granicus.if.org Git - libvpx/commitdiff
Move noise_sensitivity to set_encoder_config
authorangiebird <angiebird@google.com>
Wed, 30 Oct 2019 21:59:58 +0000 (14:59 -0700)
committerangiebird <angiebird@google.com>
Wed, 30 Oct 2019 21:59:58 +0000 (14:59 -0700)
Change-Id: Ia9a0d71dc8a329d00ebf20a82d42cda43e13431b

vp9/encoder/vp9_encoder.c
vp9/vp9_cx_iface.c

index 5ecc83229d998b079741143f2f79074b9cb91ea1..35e53ae7e28e951038a4b2e05e6a211220b0bae2 100644 (file)
@@ -5360,12 +5360,6 @@ int vp9_receive_raw_frame(VP9_COMP *cpi, vpx_enc_frame_flags_t frame_flags,
   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
index ccdf9f75f2011b26dd155b0aeadee7d8253c2200..e452be96d336ad07a5793e4915d2c73d69c5afe1 100644 (file)
@@ -541,7 +541,13 @@ static vpx_codec_err_t set_encoder_config(
   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;