# HG changeset patch # User reimar # Date 1255589963 0 # Node ID b44eae1b197121a07fd2464e792cdb1f915c0183 # Parent 866dffa620d12063cf66eaa0895382cd88d5d7cf Use cbrtf and exp2f instead of pow to calculate tables for MPEG audio decoding. This hopefully is fast enough so that it is reasonable to use the same formula directly instead of the table for CONFIG_SMALL. diff -r 866dffa620d1 -r b44eae1b1971 mpegaudiodec.c --- a/mpegaudiodec.c Wed Oct 14 21:41:24 2009 +0000 +++ b/mpegaudiodec.c Thu Oct 15 06:59:23 2009 +0000 @@ -408,9 +408,10 @@ int_pow_init(); for(i=1;i>4); - double f= pow(i&15, 4.0 / 3.0) * pow(2, (exponent-400)*0.25 + FRAC_BITS + 5); + double f= value * cbrtf(value) * exp2f((exponent-400)*0.25 + FRAC_BITS + 5); expval_table[exponent][i&15]= llrint(f); if((i&15)==1) exp_table[exponent]= llrint(f);