shithub: libvpx

Download patch

ref: 5de0e9ed082387c6d6251cc41e541e72a7fd93ba
parent: 30ef50b522c7b568921ca3e37bcc71ca7cd52972
author: Marco <marpan@google.com>
date: Thu Apr 20 12:32:46 EDT 2017

vp9: SVC: fix condition for partition/skip threshold when denoising.

The more aggressive settings should only be used when denoise_svc
condition is satisfied (which means top spatial layer).

Change-Id: Ia8e3515b27f31bf21b1976ca80a2fa826daece3a

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -536,8 +536,8 @@
         threshold_base = (7 * threshold_base) >> 3;
     }
 #if CONFIG_VP9_TEMPORAL_DENOISING
-    if (cpi->oxcf.noise_sensitivity > 0 && cpi->oxcf.speed > 5 &&
-        cpi->denoiser.denoising_level >= kDenLow)
+    if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi) &&
+        cpi->oxcf.speed > 5 && cpi->denoiser.denoising_level >= kDenLow)
       threshold_base = vp9_scale_part_thresh(
           threshold_base, cpi->denoiser.denoising_level, content_state);
     else
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -354,7 +354,8 @@
   *sse_y = sse;
 
 #if CONFIG_VP9_TEMPORAL_DENOISING
-  if (cpi->oxcf.noise_sensitivity > 0 && cpi->oxcf.speed > 5)
+  if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc(cpi) &&
+      cpi->oxcf.speed > 5)
     ac_thr = vp9_scale_acskip_thresh(ac_thr, cpi->denoiser.denoising_level,
                                      (abs(sum) >> (bw + bh)));
   else