[FFmpeg-cvslog] lavc/wmaenc: 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:36:30 2015 -0800| [3343e4e6078cf25aee3c9b579c1855bba2e6781e] | committer: Ganesh Ajjanagadde

lavc/wmaenc: 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=3343e4e6078cf25aee3c9b579c1855bba2e6781e
---

 libavcodec/wmaenc.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index faf0cb5..54e83b6 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -20,6 +20,7 @@
  */
 
 #include "libavutil/attributes.h"
+#include "libavutil/internal.h"
 
 #include "avcodec.h"
 #include "internal.h"
@@ -132,7 +133,7 @@ static void init_exp(WMACodecContext *s, int ch, const int *exp_param)
     max_scale = 0;
     while (q < q_end) {
         /* XXX: use a table */
-        v         = pow(10, *exp_param++ *(1.0 / 16.0));
+        v         = ff_exp10(*exp_param++ *(1.0 / 16.0));
         max_scale = FFMAX(max_scale, v);
         n         = *ptr++;
         do {
@@ -227,7 +228,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
 
             coefs1    = s->coefs1[ch];
             exponents = s->exponents[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     = src_coefs[ch];
             if (s->use_noise_coding && 0) {



More information about the ffmpeg-cvslog mailing list