[FFmpeg-soc] [soc]: r1017 - eac3/eac3dec.c

bwolowiec subversion at mplayerhq.hu
Sun Aug 19 12:32:35 CEST 2007


Author: bwolowiec
Date: Sun Aug 19 12:32:35 2007
New Revision: 1017

Log:
cosmetics


Modified:
   eac3/eac3dec.c

Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c	(original)
+++ eac3/eac3dec.c	Sun Aug 19 12:32:35 2007
@@ -67,8 +67,7 @@ static int parse_bsi(GetBitContext *gbc,
         s->strtmant[s->lfe_channel] = 0;
         s->endmant[s->lfe_channel] = 7;
         s->nchgrps[s->lfe_channel] = 2;
-
-        s->ntchans ++ ;
+        s->ntchans++;
     }
 
     GET_BITS(s->bsid, gbc, 5);
@@ -171,7 +170,6 @@ static int parse_bsi(GetBitContext *gbc,
     if(s->infomdate){
         /* Informational metadata */
         GET_BITS(s->bsmod, gbc, 3);
-
         GET_BITS(s->copyrightb, gbc, 1);
         GET_BITS(s->origbs, gbc, 1);
         if(s->acmod == AC3_ACMOD_STEREO) /* if in 2/0 mode */{
@@ -216,7 +214,6 @@ static int parse_bsi(GetBitContext *gbc,
     return 0;
 } /* end of bsi */
 
-
 static int parse_audfrm(GetBitContext *gbc, EAC3Context *s){
     int blk, ch;
 
@@ -271,7 +268,6 @@ static int parse_audfrm(GetBitContext *g
         s->ncplblks = 0;
     }
 
-
     /* Exponent strategy data */
     if(s->expstre){
         /* AC-3 style exponent strategy syntax */
@@ -406,8 +402,8 @@ static int parse_audblk(GetBitContext *g
             GET_BITS(s->dithflag[ch], gbc, 1);
         }
     }
-    /* Dynamic range control */
 
+    /* Dynamic range control */
     for(i = 0; i < (s->acmod?1:2); i++){
         GET_BITS(s->dynrnge[i], gbc, 1);
         if(s->dynrnge[i]){
@@ -492,7 +488,6 @@ static int parse_audblk(GetBitContext *g
         }
     }
 
-
     /* Spectral extension coordinates */
     if(s->spxinu){
         for(ch = 1; ch <= s->nfchans; ch++){
@@ -623,7 +618,6 @@ static int parse_audblk(GetBitContext *g
                     s->necplbnd -= s->ecplbndstrc[bnd];
                 }
 #endif
-
             } /* ecplinu[blk] */
         }else{
             /* !cplinu[blk] */
@@ -638,8 +632,6 @@ static int parse_audblk(GetBitContext *g
     } /* cplstre[blk] */
     /* Coupling coordinates */
     if(s->cplinu[blk]){
-        //        av_log(s->avctx, AV_LOG_INFO, "NOT TESTED CPLINU\n");
-
         if(!s->ecplinu){
             /* standard coupling in use */
             for(ch = 1; ch <= s->nfchans; ch++){
@@ -904,7 +896,6 @@ static int parse_audblk(GetBitContext *g
         }
     }
 
-
     /* Inclusion of unused dummy data */
     if(s->skipflde){
         if(get_bits1(gbc)){
@@ -942,8 +933,6 @@ static int parse_audblk(GetBitContext *g
                     s->hebap[ch]);
     }
 
-
-
     got_cplchan = 0;
 
     // TODO only for debug
@@ -957,7 +946,6 @@ static int parse_audblk(GetBitContext *g
             get_eac3_transform_coeffs_ch(gbc, s, blk, CPL_CH, &m);
             got_cplchan = 1;
         }
-
     }
 
     if(s->cplinu[blk])
@@ -1089,8 +1077,6 @@ static void spectral_extension(EAC3Conte
 #endif
 }
 
-
-
 static void get_transform_coeffs_aht_ch(GetBitContext *gbc, EAC3Context *s, int ch){
     //Now turned off, because there are no samples for testing it.
 #if 0
@@ -1300,12 +1286,9 @@ static int eac3_decode_frame(AVCodecCont
     GetBitContext gbc;
 
     *data_size = 0;
-
     c->gbc = &gbc;
     c->syncword = 0;
-
     init_get_bits(&gbc, buf, buf_size*8);
-
     GET_BITS(c->syncword, &gbc, 16);
 
     if(c->syncword != 0x0B77)
@@ -1320,15 +1303,13 @@ static int eac3_decode_frame(AVCodecCont
         avctx->sample_rate = ff_ac3_freqs[c->fscod];
     }
 
-
     avctx->bit_rate = (c->frmsiz * (avctx->sample_rate) * 16 / ( ff_eac3_blocks[c->numblkscod] * 256)) / 1000;
 #ifdef DEBUG
     av_log(NULL, AV_LOG_INFO, "bitrate = %i\n", avctx->bit_rate);
 #endif
     avctx->channels = c->nfchans + c->lfeon; // TODO lfe
 
-    for(blk = 0; blk < ff_eac3_blocks[c->numblkscod]; blk++)
-    {
+    for(blk = 0; blk < ff_eac3_blocks[c->numblkscod]; blk++){
         for(i=0; i<AC3_MAX_CHANNELS+1; i++){
             c->deltbae[i] = DBA_NONE;
             c->deltnseg[i] = 0;
@@ -1386,7 +1367,6 @@ static int eac3_decode_frame(AVCodecCont
             avctx->channels = c->nfchans + c->lfeon;
         }
 
-
         // convert float to 16-bit integer
        for(ch = 1; ch<=c->nfchans + c->lfeon; ch++) { // <- out_channels TODO
             for(i=0; i<AC3_BLOCK_SIZE; i++) {
@@ -1401,7 +1381,6 @@ static int eac3_decode_frame(AVCodecCont
                 *(out_samples++) = c->int_output[i][k];
             }
         }
-
     }
 
 #ifdef DEBUG



More information about the FFmpeg-soc mailing list