shithub: libvpx

Download patch

ref: 7ba600dc894543c04996f7692042026ae0db165b
parent: 27db51c6025af11521475f0ad0716d798107c9d8
parent: e30f7698f5c500f3a1db992126a03d23cbccc533
author: JackyChen <jackychen@google.com>
date: Thu Sep 4 10:16:26 EDT 2014

Merge "Fix a bug in VP9 denoiser."

--- a/vp9/encoder/vp9_denoiser.c
+++ b/vp9/encoder/vp9_denoiser.c
@@ -145,11 +145,17 @@
         adj = delta;
       }
       if (diff > 0) {
+        // Diff positive means we made positive adjustment above
+        // (in first try/attempt), so now make negative adjustment to bring
+        // denoised signal down.
         avg[c] = MAX(0, avg[c] - adj);
-        total_adj += adj;
+        total_adj -= adj;
       } else {
+        // Diff negative means we made negative adjustment above
+        // (in first try/attempt), so now make positive adjustment to bring
+        // denoised signal up.
         avg[c] = MIN(UINT8_MAX, avg[c] + adj);
-        total_adj -= adj;
+        total_adj += adj;
       }
     }
     sig += sig_stride;