From 80519937e30eb3c81c4a91581db72785270aca9c Mon Sep 17 00:00:00 2001 From: Marco Paniconi Date: Wed, 28 Nov 2018 22:08:08 -0800 Subject: [PATCH] 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 --- vp9/encoder/vp9_noise_estimate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_noise_estimate.c b/vp9/encoder/vp9_noise_estimate.c index 249e03760..e0ae00e50 100644 --- a/vp9/encoder/vp9_noise_estimate.c +++ b/vp9/encoder/vp9_noise_estimate.c @@ -148,7 +148,9 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) { 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; -- 2.40.0