shithub: libvpx

Download patch

ref: 7ba646f7e6142ff95b026a042f3d352012e46177
parent: 8b4dd536a53623f27a5dde7a4e4bd4cae485ba1c
author: JackyChen <[email protected]>
date: Mon Sep 29 07:30:17 EDT 2014

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

--- a/vp9/encoder/vp9_denoiser.c
+++ b/vp9/encoder/vp9_denoiser.c
@@ -143,7 +143,7 @@
 
   // 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;