mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
mpegaudioenc: replace pow(2,.. by exp2(
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
51fa653829
commit
c21f81999a
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user