[FFmpeg-soc] [soc]: r1782 - eac3/ac3dec.c

jbr subversion at mplayerhq.hu
Mon Jan 7 01:38:10 CET 2008


Author: jbr
Date: Mon Jan  7 01:38:10 2008
New Revision: 1782

Log:
only set downmixing coefficients once per frame

Modified:
   eac3/ac3dec.c

Modified: eac3/ac3dec.c
==============================================================================
--- eac3/ac3dec.c	(original)
+++ eac3/ac3dec.c	Mon Jan  7 01:38:10 2008
@@ -1084,6 +1084,12 @@ static int ac3_decode_frame(AVCodecConte
     }
     avctx->channels = s->out_channels;
 
+    /* set downmixing coefficients if needed */
+    if(s->channels != s->out_channels && !((s->output_mode & AC3_OUTPUT_LFEON) &&
+            s->fbw_channels == s->out_channels)) {
+        set_downmix_coeffs(s);
+    }
+
     /* parse the audio blocks */
     for (blk = 0; blk <  s->num_blocks; blk++) {
         if (ff_eac3_parse_audio_block(s, blk)) {
@@ -1114,7 +1120,6 @@ static int ac3_decode_frame(AVCodecConte
         /* downmix output if needed */
         if(s->channels != s->out_channels && !((s->output_mode & AC3_OUTPUT_LFEON) &&
                 s->fbw_channels == s->out_channels)) {
-            set_downmix_coeffs(s);
             ac3_downmix(s);
         }
 



More information about the FFmpeg-soc mailing list