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

superdump subversion at mplayerhq.hu
Tue Aug 12 15:43:55 CEST 2008


Author: superdump
Date: Tue Aug 12 15:43:55 2008
New Revision: 3193

Log:
Pass a pointer to a ChannelElement to decode_cce() rather than elem_id to allow
simplifications


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Tue Aug 12 15:43:55 2008
@@ -1133,17 +1133,13 @@ static int decode_cpe(AACContext * ac, G
  *
  * @return  Returns error status. 0 - OK, !0 - error
  */
-static int decode_cce(AACContext * ac, GetBitContext * gb, int elem_id) {
+static int decode_cce(AACContext * ac, GetBitContext * gb, ChannelElement * che) {
     int num_gain = 0;
     int c, g, sfb, ret, idx = 0;
     int sign;
     float scale;
-    SingleChannelElement * sce;
-    ChannelCoupling * coup;
-
-    sce = &ac->che[TYPE_CCE][elem_id]->ch[0];
-
-    coup = &ac->che[TYPE_CCE][elem_id]->coup;
+    SingleChannelElement * sce = &che->ch[0];
+    ChannelCoupling * coup     = &che->coup;
 
     coup->coupling_point = 2*get_bits1(gb);
     coup->num_coupled = get_bits(gb, 3);
@@ -1807,7 +1803,7 @@ static int aac_decode_frame(AVCodecConte
             break;
 
         case TYPE_CCE:
-            err = decode_cce(ac, &gb, elem_id);
+            err = decode_cce(ac, &gb, ac->che[TYPE_SCE][elem_id]);
             break;
 
         case TYPE_LFE:



More information about the FFmpeg-soc mailing list