[FFmpeg-soc] [soc]: r744 - in eac3: eac3.h eac3_parser.c

bwolowiec subversion at mplayerhq.hu
Mon Aug 13 15:32:43 CEST 2007


Author: bwolowiec
Date: Mon Aug 13 15:32:42 2007
New Revision: 744

Log:
removal of redundant variables


Modified:
   eac3/eac3.h
   eac3/eac3_parser.c

Modified: eac3/eac3.h
==============================================================================
--- eac3/eac3.h	(original)
+++ eac3/eac3.h	Mon Aug 13 15:32:42 2007
@@ -143,7 +143,6 @@ typedef struct EAC3Context{
     int cplstre[MAX_BLOCKS]; // 1);  ///< Coupling strategy exists
     int chexpstr[MAX_BLOCKS][MAX_CHANNELS]; // 2); ///< Channel exponent strategy
     int frmchexpstr[MAX_CHANNELS];   ///< frame based channel exponent strategy
-    int lfeexpstr[MAX_BLOCKS];       ///< Lfe exponent strategy
     int convexpstr[MAX_CHANNELS];    ///< Converter channel exponent strategy
     int cplahtinu; // 1);            ///< Coupling channel AHT in use
     int chahtinu[MAX_CHANNELS];      ///< Channel AHT in use
@@ -214,7 +213,6 @@ typedef struct EAC3Context{
     int blkfsnroffst; // 4);         ///< Block fine SNR offset
     int cplfsnroffst; // 4);         ///< Coupling fine SNR offset
     int fsnroffst[MAX_CHANNELS];     ///< Channel fine SNR offset
-    int lfefsnroffst; // 4);         ///< Lfe fine SNR offset
     int fgaincode; // 1);            ///< Channel fast gain code enabled
     int fgaincod[MAX_CHANNELS];      ///< Channel fast gain code
     int convsnroffste; // 1);        ///< Converter SNR offset exists
@@ -272,7 +270,6 @@ typedef struct EAC3Context{
     int strtmant[MAX_CHANNELS];
     int firstchincpl;
     int ecpl_start_subbnd, ecpl_end_subbnd;
-    int nlfegrps; ///< Number of lfe channel exponent groups
 
     int necplbnd;
     int nspxbnds;

Modified: eac3/eac3_parser.c
==============================================================================
--- eac3/eac3_parser.c	(original)
+++ eac3/eac3_parser.c	Mon Aug 13 15:32:42 2007
@@ -26,7 +26,7 @@
 #include "ac3.h"
 #include "random.h"
 
-//#undef DEBUG
+#undef DEBUG
 
 #ifdef DEBUG
 #define GET_BITS(a, gbc, n) {a = get_bits(gbc, n); av_log(NULL, AV_LOG_INFO, "%s: %i\n", __STRING(a), a);}
@@ -333,8 +333,7 @@ int ff_eac3_parse_audfrm(GetBitContext *
     if(s->lfeon)
     {
         for(blk = 0; blk < ff_eac3_blocks[s->numblkscod]; blk++) {
-            GET_BITS(s->lfeexpstr[blk], gbc, 1);
-            s->chexpstr[blk][s->lfe_channel] = s->lfeexpstr[blk];
+            GET_BITS(s->chexpstr[blk][s->lfe_channel], gbc, 1);
         }
     }
     /* These fields for converter exponent strategy data */
@@ -980,12 +979,11 @@ int ff_eac3_parse_audblk(GetBitContext *
     }
     if(s->lfeon) /* exponents for the low frequency effects channel */
     {
-        if(s->lfeexpstr[blk] != EXP_REUSE)
+        if(s->chexpstr[blk][s->lfe_channel] != EXP_REUSE)
         {
             ch = s->lfe_channel;
             GET_BITS(s->dexps[ch][0], gbc, 4);
-            s->nlfegrps = 2;
-            ff_ac3_decode_exponents(gbc, s->lfeexpstr[blk], s->nlfegrps, s->dexps[ch][0],
+            ff_ac3_decode_exponents(gbc, s->chexpstr[blk][s->lfe_channel], s->nchgrps[s->lfe_channel], s->dexps[ch][0],
                     s->dexps[ch] + 1);
         }
     }
@@ -1025,7 +1023,7 @@ int ff_eac3_parse_audblk(GetBitContext *
             s->fsnroffst[ch] = s->frmfsnroffst;
         }
         if(s->lfeon) {
-            s->lfefsnroffst = s->frmfsnroffst;
+            s->fsnroffst[s->lfe_channel] = s->frmfsnroffst;
         }
     }
     else
@@ -1047,7 +1045,7 @@ int ff_eac3_parse_audblk(GetBitContext *
                 for(ch = 1; ch <= s->nfchans; ch++) {
                     s->fsnroffst[ch] = s->blkfsnroffst;
                 }
-                s->lfefsnroffst = s->blkfsnroffst;
+                s->fsnroffst[s->lfe_channel] = s->blkfsnroffst;
             }
             else if(s->snroffststr == 0x2)
             {
@@ -1058,17 +1056,13 @@ int ff_eac3_parse_audblk(GetBitContext *
                     GET_BITS(s->fsnroffst[ch], gbc, 4);
                 }
                 if(s->lfeon) {
-                    GET_BITS(s->lfefsnroffst, gbc, 4);
+                    GET_BITS(s->fsnroffst[s->lfe_channel], gbc, 4);
                 }
             }
         }
     }
     s->fsnroffst[CPL_CH] = s->cplfsnroffst;
 
-    if(s->lfeon){
-        s->fsnroffst[s->lfe_channel] = s->lfefsnroffst;
-    }
-
     if(s->frmfgaincode) {
         GET_BITS(s->fgaincode, gbc, 1);
     }
@@ -1155,7 +1149,7 @@ int ff_eac3_parse_audblk(GetBitContext *
     }/* if(s->dbaflde) */
     else{
         if(!blk){
-            for(ch=0; ch<=s->nfchans+s->lfe_channel; ch++){
+            for(ch=0; ch<=s->nfchans+s->lfeon; ch++){
                 s->deltbae[ch] = DBA_NONE;
             }
         }



More information about the FFmpeg-soc mailing list