avcodec/mpegaudiodec_template: use double to build csa tables

Fixes rounding difference between 32bit x86 and 64bit
Fixes fate failure with gapless mp3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-04-17 13:36:14 +02:00
parent 38f6726068
commit 8768f8f4b9
2 changed files with 3 additions and 3 deletions

View File

@ -388,7 +388,7 @@ static av_cold void decode_init_static(void)
}
for (i = 0; i < 8; i++) {
float ci, cs, ca;
double ci, cs, ca;
ci = ci_table[i];
cs = 1.0 / sqrt(1.0 + ci * ci);
ca = cs * ci;

View File

@ -1,4 +1,4 @@
d5c88cf38416329a052a9b0cb140fb4c *tests/data/fate/gapless-mp3.out-1
3e41cbd4dcd511d3155234684252beab
c96c3ae7bd3300fd2f4debac222de5b7
68f040b12d79c71e3b2e8ba90a9cbd96 *tests/data/fate/gapless-mp3.out-2
3e41cbd4dcd511d3155234684252beab
c96c3ae7bd3300fd2f4debac222de5b7