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

jbr subversion at mplayerhq.hu
Fri Dec 14 06:08:51 CET 2007


Author: jbr
Date: Fri Dec 14 06:08:51 2007
New Revision: 1568

Log:
rename dialnorm and dynrng

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

Modified: eac3/eac3.h
==============================================================================
--- eac3/eac3.h	(original)
+++ eac3/eac3.h	Fri Dec 14 06:08:51 2007
@@ -51,7 +51,7 @@ typedef struct EAC3Context{
     int channel_mode;                ///< Channel mode (acmod)
     int lfe_on;                      ///< Low frequency effect channel on (lfeon)
     int bitstream_id;                ///< Bit stream identification (bsid)
-    float dialnorm[2];               ///< Dialogue normalization
+    float dialog_norm[2];            ///< Dialogue normalization (dialnorm)
     int mixmdate;                    ///< Mixing meta-data exists
     int dmixmod;                     ///< Preferred stereo downmix mode
     int lfemixlevcode;               ///< lfe mix level code exists
@@ -91,7 +91,7 @@ typedef struct EAC3Context{
 ///@{
     int blksw[AC3_MAX_CHANNELS];     ///< Block switch flag
     int dithflag[AC3_MAX_CHANNELS];  ///< Dither flag
-    float dynrng[2];                 ///< Dynamic range gain word
+    float dynamic_range[2];          ///< Dynamic range gain (dynrng)
     float downmix_coeffs[AC3_MAX_CHANNELS][2];  ///< stereo downmix coefficients
     int spxinu;                      ///< spectral extension in use
     int chinspx[AC3_MAX_CHANNELS];   ///< Channel in spectral extension

Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c	(original)
+++ eac3/eac3dec.c	Fri Dec 14 06:08:51 2007
@@ -382,7 +382,7 @@ static int parse_bsi(GetBitContext *gbc,
     }
 
     for (i = 0; i < (s->channel_mode ? 1 : 2); i++) {
-        s->dialnorm[i] = ff_ac3_dialog_norm_tab[get_bits(gbc, 5)];
+        s->dialog_norm[i] = ff_ac3_dialog_norm_tab[get_bits(gbc, 5)];
         if (get_bits1(gbc)) {
             skip_bits(gbc, 8); //skip Compression gain word
         }
@@ -709,10 +709,10 @@ static int parse_audblk(GetBitContext *g
     /* Dynamic range control */
     for (i = 0; i < (s->channel_mode ? 1 : 2); i++) {
         if (get_bits1(gbc)) {
-            s->dynrng[i] = ff_ac3_dynamic_range_tab[get_bits(gbc, 8)];
+            s->dynamic_range[i] = ff_ac3_dynamic_range_tab[get_bits(gbc, 8)];
         } else {
             if (!blk) {
-                s->dynrng[i] = 1.0f;
+                s->dynamic_range[i] = 1.0f;
             }
         }
     }
@@ -1311,9 +1311,9 @@ static int eac3_decode_frame(AVCodecCont
         for (ch = 1; ch <= c->nfchans + c->lfe_on; ch++) {
             float gain=2.0f;
             if (c->channel_mode == AC3_CHMODE_DUALMONO) {
-                gain *= c->dialnorm[ch-1] * c->dynrng[ch-1];
+                gain *= c->dialog_norm[ch-1] * c->dynamic_range[ch-1];
             } else {
-                gain *= c->dialnorm[0] * c->dynrng[0];
+                gain *= c->dialog_norm[0] * c->dynamic_range[0];
             }
             for (i = 0; i < c->endmant[ch]; i++) {
                 c->transform_coeffs[ch][i] *= gain;



More information about the FFmpeg-soc mailing list