Browse code

ac3_fixed: fix computation of spx_noise_blend

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>

Christophe Gisquet authored on 2015/03/14 20:48:58
Showing 1 changed files
... ...
@@ -939,7 +939,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
939 939
                             nblend = 0;
940 940
                             sblend = 0x800000;
941 941
                         } else if (nratio > 0x7fffff) {
942
-                            nblend = 0x800000;
942
+                            nblend = 14529495; // sqrt(3) in FP.23
943 943
                             sblend = 0;
944 944
                         } else {
945 945
                             nblend = fixed_sqrt(nratio, 23);