[FFmpeg-devel] [PATCH 15/15] lavc/wmaprodec: replace pow(10, x) by exp10(x)

Ganesh Ajjanagadde gajjanagadde at gmail.com
Fri Dec 25 19:51:45 CET 2015


On Wed, Dec 23, 2015 at 10:47 AM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> exp10, introduced recently, is superior for the purpose.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  libavcodec/wmaprodec.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
> index f8f901c..cbda9e9 100644
> --- a/libavcodec/wmaprodec.c
> +++ b/libavcodec/wmaprodec.c
> @@ -91,6 +91,7 @@
>  #include "libavutil/float_dsp.h"
>  #include "libavutil/intfloat.h"
>  #include "libavutil/intreadwrite.h"
> +#include "libavutil/libm.h"
>  #include "avcodec.h"
>  #include "internal.h"
>  #include "get_bits.h"
> @@ -1350,7 +1351,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
>                  const int exp = s->channel[c].quant_step -
>                              (s->channel[c].max_scale_factor - *sf++) *
>                              s->channel[c].scale_factor_step;
> -                const float quant = pow(10.0, exp / 20.0);
> +                const float quant = exp10(exp / 20.0);
>                  int start = s->cur_sfb_offsets[b];
>                  s->fdsp->vector_fmul_scalar(s->tmp + start,
>                                             s->channel[c].coeffs + start,
> --
> 2.6.4
>

patch set pushed with change to ff_exp10.


More information about the ffmpeg-devel mailing list