[FFmpeg-soc] [soc]: r3120 - aac/aac.c

superdump subversion at mplayerhq.hu
Sun Aug 10 12:17:52 CEST 2008


Author: superdump
Date: Sun Aug 10 12:17:52 2008
New Revision: 3120

Log:
Simplify get_vlc2() code in decode_cce()


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Sun Aug 10 12:17:52 2008
@@ -1195,18 +1195,19 @@ static int decode_cce(AACContext * ac, G
                 if (sce->band_type[idx] == ZERO_BT) {
                     coup->gain[c][idx] = 0;
                 } else {
-                    if (cge) {
-                        coup->gain[c][idx] = gain_cache;
-                    } else {
-                        int s, t = get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60;
-                        if (sign) {
-                            s = 1 - 2 * (t & 0x1);
-                            t >>= 1;
-                        } else
-                            s = 1;
-                        gain += t;
-                        coup->gain[c][idx] = pow(scale, gain) * s;
+                    if (!cge) {
+                        int t = get_vlc2(gb, vlc_scalefactors.table, 7, 3) - 60;
+                        if (t) {
+                            int s = 1;
+                            if (sign) {
+                                s  -= 2 * (t & 0x1);
+                                t >>= 1;
+                            }
+                            gain += t;
+                            gain_cache = pow(scale, gain) * s;
+                        }
                     }
+                    coup->gain[c][idx] = gain_cache;
                 }
     }
     return 0;



More information about the FFmpeg-soc mailing list