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

superdump subversion at mplayerhq.hu
Sun May 25 22:07:23 CEST 2008


Author: superdump
Date: Sun May 25 22:07:23 2008
New Revision: 2209

Log:
Simplify and factorise


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Sun May 25 22:07:23 2008
@@ -1499,15 +1499,14 @@ static int decode_cce(AACContext * ac, G
                     if (cge) {
                         coup->gain[c][g][sfb] = gain_cache;
                     } else {
+                        int s, t = get_vlc2(gb, ac->mainvlc.table, 7, 3) - 60;
                         if (sign) {
-                            int t = get_vlc2(gb, ac->mainvlc.table, 7, 3);
-                            int s = 1 - 2 * (t & 0x1);
-                            gain += (t >> 1) - 30;
-                            coup->gain[c][g][sfb] = s * pow(scale, gain);
-                        } else {
-                            gain += get_vlc2(gb, ac->mainvlc.table, 7, 3) - 60;
-                            coup->gain[c][g][sfb] = pow(scale, gain);
-                        }
+                            s = 1 - 2 * (t & 0x1);
+                            t >>= 1;
+                        } else
+                            s = 1;
+                        gain += t;
+                        coup->gain[c][g][sfb] = pow(scale, gain) * s;
                     }
                 }
     }



More information about the FFmpeg-soc mailing list