shithub: libvpx

Download patch

ref: 6b0bc34b62ed1655801fde756e2dac2b13fadb8a
parent: 39e28f9f1ae399b12045903320961944d300527a
author: Jingning Han <jingning@google.com>
date: Fri Jun 13 12:04:21 EDT 2014

Fix C versions of DC calculation functions

This commit fixes the scaling factors used in the C versions of the
DC calculation functions.

Change-Id: Iab41108c2bb93c2f2e78667214f3a772a2b707b5

--- a/vp9/encoder/vp9_dct.c
+++ b/vp9/encoder/vp9_dct.c
@@ -50,7 +50,7 @@
     for (c = 0; c < 4; ++c)
       sum += input[r * stride + c];
 
-  output[0] = sum << 3;
+  output[0] = sum << 1;
   output[1] = 0;
 }
 
@@ -258,7 +258,7 @@
     for (c = 0; c < 8; ++c)
       sum += input[r * stride + c];
 
-  output[0] = sum * 8;
+  output[0] = sum;
   output[1] = 0;
 }
 
@@ -340,7 +340,7 @@
     for (c = 0; c < 16; ++c)
       sum += input[r * stride + c];
 
-  output[0] = sum * 8;
+  output[0] = sum >> 1;
   output[1] = 0;
 }
 
@@ -1369,7 +1369,7 @@
     for (c = 0; c < 32; ++c)
       sum += input[r * stride + c];
 
-  output[0] = sum << 2;
+  output[0] = sum >> 3;
   output[1] = 0;
 }