[SCM] libav/experimental: fix random dithering of zero-bit mantissas
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:07:09 UTC 2013
The following commit has been merged in the experimental branch:
commit d5b7144e1ffa9b1a48832ba5995261873cb211d7
Author: Justin Ruggles <justin.ruggles at gmail.com>
Date: Sat Sep 15 00:43:40 2007 +0000
fix random dithering of zero-bit mantissas
Originally committed as revision 10495 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 66b498b..e59b416 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -518,7 +518,7 @@ static int get_transform_coeffs_ch(AC3DecodeContext *ctx, int ch_index, mant_gro
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:
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list