diff options
author | Ronald S. Bultje <rbultje@google.com> | 2012-07-24 15:46:49 -0700 |
---|---|---|
committer | Ronald S. Bultje <rbultje@google.com> | 2012-07-24 15:46:49 -0700 |
commit | 8967fcaf845ae956c5f59baebd917a5e3da53e56 (patch) | |
tree | f637736059f341f1794f9a03f27e44901b8ddd4f /vp8/common/quant_common.c | |
parent | 980ca6324f01cdfbf6a456b9abc3eb6a9d497520 (diff) | |
download | libvpx-8967fcaf845ae956c5f59baebd917a5e3da53e56.tar libvpx-8967fcaf845ae956c5f59baebd917a5e3da53e56.tar.gz libvpx-8967fcaf845ae956c5f59baebd917a5e3da53e56.tar.bz2 libvpx-8967fcaf845ae956c5f59baebd917a5e3da53e56.zip |
Add comment for use of shift/mul instead of div.
Change-Id: Ia6a0090da2097ca9337f8179a6d7b6a09e12f2e6
Diffstat (limited to 'vp8/common/quant_common.c')
-rw-r--r-- | vp8/common/quant_common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vp8/common/quant_common.c b/vp8/common/quant_common.c index a0b212cc4..05f921070 100644 --- a/vp8/common/quant_common.c +++ b/vp8/common/quant_common.c @@ -109,6 +109,9 @@ int vp8_ac2quant(int QIndex, int Delta) else if (QIndex < 0) QIndex = 0; + /* For all x in [0..284], x*155/100 is bitwise equal to (x*101581) >> 16. + * The smallest precision for that is '(x*6349) >> 12' but 16 is a good + * word size. */ retval = (ac_qlookup[ QIndex ] * 101581) >> 16; if (retval < 8) |