diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2007-09-15 00:43:40 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2007-09-15 00:43:40 +0000 |
commit | d5b7144e1ffa9b1a48832ba5995261873cb211d7 (patch) | |
tree | 29bc98a9cf02f0565987babae2d355f4779a5c57 | |
parent | bfcf690c6867cf227f59c36372a075de833e599a (diff) | |
download | ffmpeg-d5b7144e1ffa9b1a48832ba5995261873cb211d7.tar.gz |
fix random dithering of zero-bit mantissas
Originally committed as revision 10495 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/ac3dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 66b498b6ca..e59b4162aa 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: |