[FFmpeg-cvslog] lavc/wmadec: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde
git at videolan.org
Fri Dec 25 19:50:22 CET 2015
ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Wed Dec 23 10:34:22 2015 -0800| [62765c0014bc21b8603d7f51250d8a10f98e670b] | committer: Ganesh Ajjanagadde
lavc/wmadec: replace pow(10,x) by ff_exp10(x)
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62765c0014bc21b8603d7f51250d8a10f98e670b
---
libavcodec/wmadec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index e814007..da54182 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -34,6 +34,7 @@
*/
#include "libavutil/attributes.h"
+#include "libavutil/internal.h"
#include "avcodec.h"
#include "internal.h"
@@ -626,7 +627,7 @@ static int wma_decode_block(WMACodecContext *s)
coefs1 = s->coefs1[ch];
exponents = s->exponents[ch];
esize = s->exponents_bsize[ch];
- mult = pow(10, total_gain * 0.05) / s->max_exponent[ch];
+ mult = ff_exp10(total_gain * 0.05) / s->max_exponent[ch];
mult *= mdct_norm;
coefs = s->coefs[ch];
if (s->use_noise_coding) {
@@ -674,7 +675,7 @@ static int wma_decode_block(WMACodecContext *s)
/* use noise with specified power */
mult1 = sqrt(exp_power[j] / exp_power[last_high_band]);
/* XXX: use a table */
- mult1 = mult1 * pow(10, s->high_band_values[ch][j] * 0.05);
+ mult1 = mult1 * ff_exp10(s->high_band_values[ch][j] * 0.05);
mult1 = mult1 / (s->max_exponent[ch] * s->noise_mult);
mult1 *= mdct_norm;
for (i = 0; i < n; i++) {
More information about the ffmpeg-cvslog
mailing list