[FFmpeg-soc] [soc]: r5587 - indeo5/ivi_common.c

kostya subversion at mplayerhq.hu
Fri Jan 15 10:30:31 CET 2010


Author: kostya
Date: Fri Jan 15 10:30:31 2010
New Revision: 5587

Log:
refactor dequantization a bit

Modified:
   indeo5/ivi_common.c

Modified: indeo5/ivi_common.c
==============================================================================
--- indeo5/ivi_common.c	Fri Jan 15 10:19:35 2010	(r5586)
+++ indeo5/ivi_common.c	Fri Jan 15 10:30:31 2010	(r5587)
@@ -383,11 +383,8 @@ int ff_ivi_decode_blocks(GetBitContext *
 
                     q = (base_tab[pos] * scale_tab[quant]) >> 8;
                     q += !q; // ensure the q always >= 1
-                    if (q != 1) {
-                        if (val > 0) {
-                            val = (val * q) + (q >> 1) - (q & 1);
-                        } else
-                            val = (val * q) - (q >> 1) + (q & 1);
+                    if (q > 1) {
+                        val = val * q + FFSIGN(val) * ((q >> 1) - (q & 1));
                     }
                     trvec[pos] = val;
                     col_flags[pos & col_mask] |= val; /* track columns containing non-zero coeffs */


More information about the FFmpeg-soc mailing list