Mercurial > libavcodec.hg
diff mpegaudio_tablegen.h @ 11707:eb9e142ea51f libavcodec
float based mp1/mp2/mp3 decoders.
author | michael |
---|---|
date | Tue, 11 May 2010 19:52:42 +0000 |
parents | 64c8bc5340bd |
children | a1b4029b2465 |
line wrap: on
line diff
--- a/mpegaudio_tablegen.h Tue May 11 18:53:49 2010 +0000 +++ b/mpegaudio_tablegen.h Tue May 11 19:52:42 2010 +0000 @@ -37,6 +37,8 @@ static uint32_t table_4_3_value[TABLE_4_3_SIZE]; static uint32_t exp_table[512]; static uint32_t expval_table[512][16]; +static float exp_table_float[512]; +static float expval_table_float[512][16]; static void mpegaudio_tableinit(void) { @@ -58,8 +60,10 @@ for (value = 0; value < 16; value++) { double f = (double)value * cbrtf(value) * pow(2, (exponent - 400) * 0.25 + FRAC_BITS + 5); expval_table[exponent][value] = llrint(f); + expval_table_float[exponent][value] = f; } exp_table[exponent] = expval_table[exponent][1]; + exp_table_float[exponent] = expval_table_float[exponent][1]; } } #endif /* CONFIG_HARDCODED_TABLES */