shithub: libvpx

Download patch

ref: 80519937e30eb3c81c4a91581db72785270aca9c
parent: d40a5bc8a3558ba6c0eeeed11c964ed26544aabc
author: Marco Paniconi <marpan@google.com>
date: Wed Nov 28 17:08:08 EST 2018

vp9: Fix condition for disabling noise estimation

Fix condition for turning off denoiser due to high
motion: use proper superframe counter and
frames_since_key counter so this condition won't
take effect on key (super)frame.

Change-Id: Ic502bf5ebfa32a921f611a78e8e963eb62b5bc79

--- a/vp9/encoder/vp9_noise_estimate.c
+++ b/vp9/encoder/vp9_noise_estimate.c
@@ -148,7 +148,9 @@
       ne->last_h = cm->height;
     }
     return;
-  } else if (cm->current_video_frame > 60 &&
+  } else if (frame_counter > 60 &&
+             cpi->rc.frames_since_key > cpi->svc.number_spatial_layers &&
+             cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1 &&
              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;