shithub: libvpx

Download patch

ref: 34cce144d837ad2a4cae0526224fce60aa3344c8
parent: af69ed20c4be1d8fda493334105a51ecb45cd6d4
author: Marco <marpan@google.com>
date: Thu May 4 13:34:19 EDT 2017

vp9: Adjust some thresholds for noise estimation.

Adjust thresholds for noise estimation, for resolutions above VGA.
Tends to push cleaner/low noise clips to LowLow state.

No change in RTC metrics.

Change-Id: I739ca6b797d0a60ccd1c6c6a2775269b1f007e5e

--- 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