From 5de0e9ed082387c6d6251cc41e541e72a7fd93ba Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 20 Apr 2017 16:32:46 -0700 Subject: [PATCH] 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 --- vp9/encoder/vp9_encodeframe.c | 4 ++-- vp9/encoder/vp9_pickmode.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 481f5a0fd..783a63373 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -536,8 +536,8 @@ static void set_vbp_thresholds(VP9_COMP *cpi, int64_t thresholds[], int q, 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 diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index f177814d6..ab05e94bd 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -354,7 +354,8 @@ static void model_rd_for_sb_y_large(VP9_COMP *cpi, BLOCK_SIZE bsize, *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