]> granicus.if.org Git - libvpx/commitdiff
Replace x*155/100 by x*101581>>16.
authorRonald S. Bultje <rbultje@google.com>
Tue, 24 Jul 2012 22:22:14 +0000 (15:22 -0700)
committerRonald S. Bultje <rbultje@google.com>
Tue, 24 Jul 2012 22:22:39 +0000 (15:22 -0700)
Idea stolen from webp - because it's cool.

Change-Id: Ic6e55e026e6533fbd2524ef090e3cbccf8af50dd

vp8/common/quant_common.c

index e9833fe33b4aa658c855a490842c8deb5a6103e7..a0b212cc40f7a900b92a937bf744095e79f941d8 100644 (file)
@@ -109,7 +109,7 @@ int vp8_ac2quant(int QIndex, int Delta)
     else if (QIndex < 0)
         QIndex = 0;
 
-    retval = (ac_qlookup[ QIndex ] * 155) / 100;
+    retval = (ac_qlookup[ QIndex ] * 101581) >> 16;
 
     if (retval < 8)
         retval = 8;