[FFmpeg-soc] [soc]: r1569 - in eac3: eac3.h eac3dec.c

jbr subversion at mplayerhq.hu
Fri Dec 14 06:27:47 CET 2007


Author: jbr
Date: Fri Dec 14 06:27:45 2007
New Revision: 1569

Log:
simplify parsing of coupling leak info and rename variable

Modified:
   eac3/eac3.h
   eac3/eac3dec.c

Modified: eac3/eac3.h
==============================================================================
--- eac3/eac3.h	(original)
+++ eac3/eac3.h	Fri Dec 14 06:27:45 2007
@@ -136,7 +136,7 @@ typedef struct EAC3Context{
 
     int firstspxcos[AC3_MAX_CHANNELS];              ///< First spectral extension coordinates states
     int firstcplcos[AC3_MAX_CHANNELS];              ///< First coupling coordinates states
-    int firstcplleak;                               ///< First coupling leak state
+    int first_cpl_leak;                             ///< First coupling leak state (firstcplleak)
 ///@}
 
     int nrematbnds;                    ///< Number of rematrixing bands

Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c	(original)
+++ eac3/eac3dec.c	Fri Dec 14 06:27:45 2007
@@ -681,7 +681,7 @@ static int parse_audfrm(GetBitContext *g
         s->firstspxcos[ch] = 1;
         s->firstcplcos[ch] = 1;
     }
-    s->firstcplleak = 1;
+    s->first_cpl_leak = 1;
 
     return 0;
 } /* end of audfrm */
@@ -933,7 +933,7 @@ static int parse_audblk(GetBitContext *g
                 s->chincpl[ch] = 0;
                 s->firstcplcos[ch] = 1;
             }
-            s->firstcplleak = 1;
+            s->first_cpl_leak = 1;
             s->phsflginu = 0;
             s->ecplinu = 0;
         }
@@ -1125,17 +1125,12 @@ static int parse_audblk(GetBitContext *g
         }
     }
     if (s->cplinu[blk]) {
-        if (s->firstcplleak) {
-            s->cplleake = 1;
-            s->firstcplleak = 0;
-        } else {
-            /* !firstcplleak */
-            s->cplleake = get_bits1(gbc);
-        }
-        if (s->cplleake) {
+        if (s->first_cpl_leak || get_bits1(gbc)) {
             s->bit_alloc_params.cpl_fast_leak = get_bits(gbc, 3);
             s->bit_alloc_params.cpl_slow_leak = get_bits(gbc, 3);
         }
+        if(s->first_cpl_leak)
+            s->first_cpl_leak = 0;
     }
     /* Delta bit allocation information */
     if (s->dbaflde && get_bits1(gbc)) {



More information about the FFmpeg-soc mailing list