diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-23 10:23:47 -0800 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-12-25 10:48:18 -0800 |
commit | 717eeb77e1d9e1e9d27c31d849afa271d07d50f4 (patch) | |
tree | 3fe1786d2a6620898cada9d72df4e475eceba477 /libavcodec/dcaenc.c | |
parent | b0e28da37cca0fbe7d03aece48776cb35c86214b (diff) | |
download | ffmpeg-717eeb77e1d9e1e9d27c31d849afa271d07d50f4.tar.gz |
lavc/dcaenc: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec/dcaenc.c')
-rw-r--r-- | libavcodec/dcaenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c index 6fcfb1addc..b0cb2fb950 100644 --- a/libavcodec/dcaenc.c +++ b/libavcodec/dcaenc.c @@ -24,6 +24,7 @@ #include "libavutil/avassert.h" #include "libavutil/channel_layout.h" #include "libavutil/common.h" +#include "libavutil/internal.h" #include "avcodec.h" #include "dca.h" #include "dcadata.h" @@ -179,7 +180,7 @@ static int encode_init(AVCodecContext *avctx) cos_table[2048-i] = cos_table[i]; } for (i = 0; i < 2048; i++) { - cb_to_level[i] = (int32_t)(0x7fffffff * pow(10, -0.005 * i)); + cb_to_level[i] = (int32_t)(0x7fffffff * ff_exp10(-0.005 * i)); } for (k = 0; k < 32; k++) { @@ -205,7 +206,7 @@ static int encode_init(AVCodecContext *avctx) } for (i = 0; i < 256; i++) { - double add = 1 + pow(10, -0.01 * i); + double add = 1 + ff_exp10(-0.01 * i); cb_to_add[i] = (int32_t)(100 * log10(add)); } for (j = 0; j < 8; j++) { |