ref: a082c562d0635d39a3beff5c2737d75132628bec
parent: 38f440120c7690ab94918e5ba77d41d00fd9ef02
parent: 34cce144d837ad2a4cae0526224fce60aa3344c8
author: Marco Paniconi <marpan@google.com>
date: Fri May 5 16:02:41 EDT 2017
Merge "vp9: Adjust some thresholds for noise estimation."
--- a/vp9/encoder/vp9_noise_estimate.c
+++ b/vp9/encoder/vp9_noise_estimate.c
@@ -32,7 +32,7 @@
if (width * height >= 1920 * 1080) {
ne->thresh = 200;
} else if (width * height >= 1280 * 720) {
- ne->thresh = 140;
+ ne->thresh = 150;
} else if (width * height >= 640 * 360) {
ne->thresh = 100;
}
@@ -114,6 +114,13 @@
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;
+ }
ne->enabled = enable_noise_estimation(cpi);
if (cpi->svc.number_spatial_layers > 1)
frame_counter = cpi->svc.current_superframe;
@@ -130,7 +137,8 @@
ne->last_h = cm->height;
}
return;
- } else if (cpi->rc.avg_frame_low_motion < (low_res ? 70 : 50)) {
+ } else if (cm->current_video_frame > 60 &&
+ cpi->rc.avg_frame_low_motion < (low_res ? 70 : 50)) {
// Force noise estimation to 0 and denoiser off if content has high motion.
ne->level = kLowLow;
#if CONFIG_VP9_TEMPORAL_DENOISING