aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-13 22:08:00 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-13 22:44:42 +0200
commitc21f81999a3cd7a98063585e439dd3055d0eb32a (patch)
tree90d0d9f52209a222ebefe6a9abc8c5226d1e038f
parent51fa6538297f26f27a8ea1d9c0c3016f42ee7ecf (diff)
downloadffmpeg-c21f81999a3cd7a98063585e439dd3055d0eb32a.tar.gz
mpegaudioenc: replace pow(2,.. by exp2(
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegaudioenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index 64429d31c9..806cb21a88 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -148,16 +148,16 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
}
for(i=0;i<64;i++) {
- v = (int)(pow(2.0, (3 - i) / 3.0) * (1 << 20));
+ v = (int)(exp2((3 - i) / 3.0) * (1 << 20));
if (v <= 0)
v = 1;
scale_factor_table[i] = v;
#ifdef USE_FLOATS
- scale_factor_inv_table[i] = pow(2.0, -(3 - i) / 3.0) / (float)(1 << 20);
+ scale_factor_inv_table[i] = exp2(-(3 - i) / 3.0) / (float)(1 << 20);
#else
#define P 15
scale_factor_shift[i] = 21 - P - (i / 3);
- scale_factor_mult[i] = (1 << P) * pow(2.0, (i % 3) / 3.0);
+ scale_factor_mult[i] = (1 << P) * exp2((i % 3) / 3.0);
#endif
}
for(i=0;i<128;i++) {