diff options
author | Jerome Jiang <jianj@google.com> | 2017-05-09 17:23:00 -0700 |
---|---|---|
committer | Marco <marpan@google.com> | 2017-05-10 12:15:41 -0700 |
commit | 2574573feaf47c685ccd9de72f300c043c615d2f (patch) | |
tree | c52815578fae8b98502a0548c0f3a035ee9541eb | |
parent | d713ec3c46c5c8e57b2c8d3fe36623b48c863189 (diff) | |
download | libvpx-2574573feaf47c685ccd9de72f300c043c615d2f.tar libvpx-2574573feaf47c685ccd9de72f300c043c615d2f.tar.gz libvpx-2574573feaf47c685ccd9de72f300c043c615d2f.tar.bz2 libvpx-2574573feaf47c685ccd9de72f300c043c615d2f.zip |
vp9: Wrap threshold tuning for HD only when denoiser is enabled.
Fixes a speed regression.
Change-Id: I23d942e4af17fa81fe4a366c7369b3ad537e59b0
-rw-r--r-- | vp9/encoder/vp9_noise_estimate.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_noise_estimate.c b/vp9/encoder/vp9_noise_estimate.c index ca0873e4c..c769407df 100644 --- a/vp9/encoder/vp9_noise_estimate.c +++ b/vp9/encoder/vp9_noise_estimate.c @@ -111,16 +111,18 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) { // Estimate is between current source and last source. YV12_BUFFER_CONFIG *last_source = cpi->Last_Source; #if CONFIG_VP9_TEMPORAL_DENOISING - if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi)) + if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi)) { last_source = &cpi->denoiser.last_source; -#endif - // Tune these thresholds for different resolutions. - if (cm->width > 640 && cm->width < 1920) { - thresh_consec_zeromv = 5; - thresh_sum_diff = 200; - thresh_sum_spatial = (120 * 120) << 8; - thresh_spatial_var = (48 * 48) << 8; + // Tune these thresholds for different resolutions when denoising is + // enabled. + if (cm->width > 640 && cm->width < 1920) { + thresh_consec_zeromv = 5; + thresh_sum_diff = 200; + thresh_sum_spatial = (120 * 120) << 8; + thresh_spatial_var = (48 * 48) << 8; + } } +#endif ne->enabled = enable_noise_estimation(cpi); if (cpi->svc.number_spatial_layers > 1) frame_counter = cpi->svc.current_superframe; |