shithub: libvpx

Download patch

ref: 980ca6324f01cdfbf6a456b9abc3eb6a9d497520
parent: fce8f063e38d86725b6b4d81c1ff42a82194146b
author: Ronald S. Bultje <rbultje@google.com>
date: Tue Jul 24 11:22:14 EDT 2012

Replace x*155/100 by x*101581>>16.

Idea stolen from webp - because it's cool.

Change-Id: Ic6e55e026e6533fbd2524ef090e3cbccf8af50dd

--- a/vp8/common/quant_common.c
+++ b/vp8/common/quant_common.c
@@ -109,7 +109,7 @@
     else if (QIndex < 0)
         QIndex = 0;
 
-    retval = (ac_qlookup[ QIndex ] * 155) / 100;
+    retval = (ac_qlookup[ QIndex ] * 101581) >> 16;
 
     if (retval < 8)
         retval = 8;