[FFmpeg-cvslog] r9660 - trunk/libavcodec/ac3dec.c

jbr subversion
Sat Jul 14 17:59:25 CEST 2007


Author: jbr
Date: Sat Jul 14 17:59:25 2007
New Revision: 9660

Log:
AC-3 decoder, soc revision 52, Aug 16 22:45:07 2006 UTC by cloud9
Reset the blksw and dithflag to 0 at the begining of each block.
Otherwise blockswitching propagates over multiple frames even if
block switching is not enabled for that frame.
Also reuse rematflg.

Modified:
   trunk/libavcodec/ac3dec.c

Modified: trunk/libavcodec/ac3dec.c
==============================================================================
--- trunk/libavcodec/ac3dec.c	(original)
+++ trunk/libavcodec/ac3dec.c	Sat Jul 14 17:59:25 2007
@@ -1632,9 +1632,11 @@ static int ac3_parse_audio_block(AC3Deco
     for (i = 0; i < 5; i++)
         ctx->chcoeffs[i] = 2.0;
 
+    ctx->blksw = 0;
     for (i = 0; i < nfchans; i++) /*block switch flag */
         ctx->blksw |= get_bits1(gb) << i;
 
+    ctx->dithflag = 0;
     for (i = 0; i < nfchans; i++) /* dithering flag */
         ctx->dithflag |= get_bits1(gb) << i;
 
@@ -1886,7 +1888,7 @@ static int ac3_parse_audio_block(AC3Deco
         dump_floats("channel transform coefficients", 10, ctx->transform_coeffs[i + 1], BLOCK_SIZE);*/
 
     /* recover coefficients if rematrixing is in use */
-    if (ctx->rematstr)
+    if (ctx->rematflg)
         do_rematrixing(ctx);
 
     do_imdct(ctx);




More information about the ffmpeg-cvslog mailing list