shithub: libvpx

Download patch

ref: 4081e5b3fe41a062a42e6171d6c4ebceb85f8d88
parent: 23701f4f877ba7bdb6c3b308c1fdd3bbcf3c91dd
parent: a66c945c5973246561b3ff710886018f14e6679c
author: Yaowu Xu <yaowu@google.com>
date: Tue Oct 25 12:08:51 EDT 2011

Merge "added a last stage rounding for 8x8 inverse dct" into experimental

--- a/vp8/common/idctllm.c
+++ b/vp8/common/idctllm.c
@@ -369,7 +369,7 @@
       ((blk[8 * 0] + 32) >> 6);
     return;
   }
-  x0 = (blk[8 * 0] << 8) + 8192;
+  x0 = (blk[8 * 0] << 8) + 16384;
 
   /* first stage */
   x8 = W7 * (x4 + x5) + 4;
@@ -399,14 +399,14 @@
   x4 = (181 * (x4 - x5) + 128) >> 8;
 
   /* fourth stage */
-  blk[8 * 0] = (x7 + x1) >> 14;
-  blk[8 * 1] = (x3 + x2) >> 14;
-  blk[8 * 2] = (x0 + x4) >> 14;
-  blk[8 * 3] = (x8 + x6) >> 14;
-  blk[8 * 4] = (x8 - x6) >> 14;
-  blk[8 * 5] = (x0 - x4) >> 14;
-  blk[8 * 6] = (x3 - x2) >> 14;
-  blk[8 * 7] = (x7 - x1) >> 14;
+  blk[8 * 0] = (x7 + x1 ) >> 15;
+  blk[8 * 1] = (x3 + x2 ) >> 15;
+  blk[8 * 2] = (x0 + x4 ) >> 15;
+  blk[8 * 3] = (x8 + x6 ) >> 15;
+  blk[8 * 4] = (x8 - x6 ) >> 15;
+  blk[8 * 5] = (x0 - x4 ) >> 15;
+  blk[8 * 6] = (x3 - x2 ) >> 15;
+  blk[8 * 7] = (x7 - x1 ) >> 15;
 }
 
 #define TX_DIM 8
@@ -434,7 +434,7 @@
     {
         for (j = 0; j < TX_DIM; j++)
         {
-             block[i*shortpitch+j]  = X[i * TX_DIM + j]>>1;
+             block[i*shortpitch+j]  = X[i * TX_DIM + j];
         }
     }
 }