ref: 2574573feaf47c685ccd9de72f300c043c615d2f
parent: d713ec3c46c5c8e57b2c8d3fe36623b48c863189
author: Jerome Jiang <[email protected]>
date: Tue May 9 13:23:00 EDT 2017
vp9: Wrap threshold tuning for HD only when denoiser is enabled. Fixes a speed regression. Change-Id: I23d942e4af17fa81fe4a366c7369b3ad537e59b0
--- a/vp9/encoder/vp9_noise_estimate.c
+++ b/vp9/encoder/vp9_noise_estimate.c
@@ -111,16 +111,18 @@
// 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;