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

jbr subversion at mplayerhq.hu
Wed Dec 19 23:47:43 CET 2007


Author: jbr
Date: Wed Dec 19 23:47:42 2007
New Revision: 1605

Log:
Do not apply dialog normalization. Just skip it for now.

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

Modified: eac3/eac3.h
==============================================================================
--- eac3/eac3.h	(original)
+++ eac3/eac3.h	Wed Dec 19 23:47:42 2007
@@ -51,7 +51,6 @@ 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 dialog_norm[2];            ///< Dialogue normalization (dialnorm)
 ///@}
 ///@name Audio Frame
 ///@{

Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c	(original)
+++ eac3/eac3dec.c	Wed Dec 19 23:47:42 2007
@@ -334,7 +334,7 @@ static int parse_bsi(GetBitContext *gbc,
     }
 
     for (i = 0; i < (s->channel_mode ? 1 : 2); i++) {
-        s->dialog_norm[i] = ff_ac3_dialog_norm_tab[get_bits(gbc, 5)];
+        skip_bits(gbc, 5); // skip dialog normalization
         if (get_bits1(gbc)) {
             skip_bits(gbc, 8); //skip Compression gain word
         }
@@ -1269,9 +1269,9 @@ static int eac3_decode_frame(AVCodecCont
         for (ch = 1; ch <= c->fbw_channels + c->lfe_on; ch++) {
             float gain=2.0f;
             if (c->channel_mode == AC3_CHMODE_DUALMONO) {
-                gain *= c->dialog_norm[ch-1] * c->dynamic_range[ch-1];
+                gain *= c->dynamic_range[ch-1];
             } else {
-                gain *= c->dialog_norm[0] * c->dynamic_range[0];
+                gain *= c->dynamic_range[0];
             }
             for (i = 0; i < c->end_freq[ch]; i++) {
                 c->transform_coeffs[ch][i] *= gain;



More information about the FFmpeg-soc mailing list