From: Ronald S. Bultje Date: Tue, 24 Jul 2012 22:22:14 +0000 (-0700) Subject: Replace x*155/100 by x*101581>>16. X-Git-Tag: v1.2.0~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=980ca6324f01cdfbf6a456b9abc3eb6a9d497520;p=libvpx Replace x*155/100 by x*101581>>16. Idea stolen from webp - because it's cool. Change-Id: Ic6e55e026e6533fbd2524ef090e3cbccf8af50dd --- diff --git a/vp8/common/quant_common.c b/vp8/common/quant_common.c index e9833fe33..a0b212cc4 100644 --- a/vp8/common/quant_common.c +++ b/vp8/common/quant_common.c @@ -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;