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

jbr subversion
Sat Sep 15 02:43:40 CEST 2007


Author: jbr
Date: Sat Sep 15 02:43:40 2007
New Revision: 10495

Log:
fix random dithering of zero-bit mantissas

Modified:
   trunk/libavcodec/ac3dec.c

Modified: trunk/libavcodec/ac3dec.c
==============================================================================
--- trunk/libavcodec/ac3dec.c	(original)
+++ trunk/libavcodec/ac3dec.c	Sat Sep 15 02:43:40 2007
@@ -518,7 +518,7 @@ static int get_transform_coeffs_ch(AC3De
         tbap = bap[i];
         switch (tbap) {
             case 0:
-                coeffs[i] = ((av_random(&ctx->dith_state) & 0xFFFF) * LEVEL_MINUS_3DB) / 32768.0f;
+                coeffs[i] = ((av_random(&ctx->dith_state) & 0xFFFF) / 65535.0f) - 0.5f;
                 break;
 
             case 1:




More information about the ffmpeg-cvslog mailing list