From 503cbebc4d5cd9eebe9cda83d959228ba9dd76aa Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 15 Oct 2009 06:59:23 +0000 Subject: [PATCH] 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. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20233 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavcodec/mpegaudiodec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index dd986bd859..e531fd37d8 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -408,9 +408,10 @@ static av_cold int decode_init(AVCodecContext * avctx) 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); -- 2.11.4.GIT