shithub: libvpx

Download patch

ref: 2ad7a4a2711aa0ffe87add551e0368b5d2a2e025
parent: d8670b3c2eb224a25e95e260325699f2e44d4440
author: Paul Wilkins <paulwilkins@google.com>
date: Wed Feb 29 20:41:19 EST 2012

Bug fix in vp8_estimate_entropy_savings()

Incorrect scaling of savings for t8x8.

Change-Id: If01e08f8c73faa73afc3c70e501e6acc54d7e26f

--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -1765,6 +1765,7 @@
     /* do not do this if not evena allowed */
     if(cpi->common.txfm_mode == ALLOW_8X8)
     {
+        int savings8x8 = 0;
         do
         {
             int j = 0;
@@ -1803,7 +1804,7 @@
                         const int s = old_b - new_b - update_b;
 
                         if (s > 0)
-                            savings += s;
+                            savings8x8 += s;
 
 
                     }
@@ -1816,6 +1817,8 @@
             while (++j < COEF_BANDS);
         }
         while (++i < BLOCK_TYPES);
+
+        savings += savings8x8 >> 8;
     }
 #endif