changeset 11799:25ce7aff1e1d libavcodec

Make dequantization equation use less registers on some CPUs.
author maxim
date Sun, 30 May 2010 23:57:51 +0000
parents 46a7546ad744
children 966aa6b53dcf
files ivi_common.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ivi_common.c	Sun May 30 17:12:50 2010 +0000
+++ b/ivi_common.c	Sun May 30 23:57:51 2010 +0000
@@ -416,7 +416,7 @@
 
                     q = (base_tab[pos] * scale_tab[quant]) >> 8;
                     if (q > 1)
-                        val = val * q + FFSIGN(val) * ((q >> 1) - (q & 1));
+                        val = val * q + FFSIGN(val) * (((q ^ 1) - 1) >> 1);
                     trvec[pos] = val;
                     col_flags[pos & col_mask] |= !!val; /* track columns containing non-zero coeffs */
                 }// while