ac3_fixed: fix computation of spx_noise_blend
authorChristophe Gisquet <christophe.gisquet@gmail.com>
Sat, 14 Mar 2015 11:48:58 +0000 (11:48 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Mar 2015 00:52:53 +0000 (01:52 +0100)
It was set to 1 instead of sqrt(3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c4bf3833f4663fd484441907f73c5bc4700021a4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ac3dec.c

index 19903ee..dbf20a8 100644 (file)
@@ -939,7 +939,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
                             nblend = 0;
                             sblend = 0x800000;
                         } else if (nratio > 0x7fffff) {
-                            nblend = 0x800000;
+                            nblend = 14529495; // sqrt(3) in FP.23
                             sblend = 0;
                         } else {
                             nblend = fixed_sqrt(nratio, 23);