From 7ba646f7e6142ff95b026a042f3d352012e46177 Mon Sep 17 00:00:00 2001 From: JackyChen Date: Mon, 29 Sep 2014 11:30:17 -0700 Subject: [PATCH] Fix a bug in calculating delta in VP9 denoiser. When calculating delta in VP8 denoiser, since the block size is fixed to 16x16, the divisor is 256, which is the number of the pixel. But in VP9, the block size varies, the divisor should correspond to the block size. Change-Id: Ibdc1e5d23ba8c788b0d0dc6d406bcdfc34c1b142 --- vp9/encoder/vp9_denoiser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_denoiser.c b/vp9/encoder/vp9_denoiser.c index 681b2a575..11cb27f43 100644 --- a/vp9/encoder/vp9_denoiser.c +++ b/vp9/encoder/vp9_denoiser.c @@ -143,7 +143,7 @@ static VP9_DENOISER_DECISION denoiser_filter(const uint8_t *sig, int sig_stride, // Otherwise, we try to dampen the filter if the delta is not too high. delta = ((abs(total_adj) - total_adj_strong_thresh(bs, increase_denoising)) - >> 8) + 1; + >> num_pels_log2_lookup[bs]) + 1; if (delta >= delta_thresh(bs, increase_denoising)) { return COPY_BLOCK; -- 2.40.0