shithub: libvpx

Download patch

ref: 4f1f510f160a185df63ca2bbacc7afee1f966b70
parent: 8914ab696dbc30db6227596b063614d0689615ee
author: Jingning Han <[email protected]>
date: Tue Jun 16 10:35:00 EDT 2015

Add dynamic range comment to vp9_satd

Change-Id: I75873846e6fdafbe7597a1bd0192115d2d1e9987

--- a/vp9/encoder/vp9_avg.c
+++ b/vp9/encoder/vp9_avg.c
@@ -115,6 +115,8 @@
   }
 }
 
+// coeff: 16 bits, dynamic range [-32640, 32640].
+// length: value range {16, 64, 256, 1024}.
 int16_t vp9_satd_c(const int16_t *coeff, int length) {
   int i;
   int satd = 0;
@@ -121,6 +123,7 @@
   for (i = 0; i < length; ++i)
     satd += abs(coeff[i]);
 
+  // satd: 26 bits, dynamic range [-32640 * 1024, 32640 * 1024]
   return (int16_t)satd;
 }