Re: [FFmpeg-devel] [PATCH 1/3] lavc/atrac3plusdsp: change pow(2, x) to exp2f(x)

2016-01-15 Thread Michael Niedermayer
On Fri, Jan 15, 2016 at 02:01:10PM -0500, Ganesh Ajjanagadde wrote:
> Much faster generation possible; but array is small so don't want to bloat
> the binary.
> 
> Signed-off-by: Ganesh Ajjanagadde 
> ---
>  libavcodec/atrac3plusdsp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

LGTM

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/3] lavc/atrac3plusdsp: change pow(2, x) to exp2f(x)

2016-01-15 Thread Ganesh Ajjanagadde
Much faster generation possible; but array is small so don't want to bloat
the binary.

Signed-off-by: Ganesh Ajjanagadde 
---
 libavcodec/atrac3plusdsp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/atrac3plusdsp.c b/libavcodec/atrac3plusdsp.c
index 17c6437..d089588 100644
--- a/libavcodec/atrac3plusdsp.c
+++ b/libavcodec/atrac3plusdsp.c
@@ -28,6 +28,7 @@
 #include 
 
 #include "libavutil/float_dsp.h"
+#include "libavutil/libm.h"
 #include "avcodec.h"
 #include "sinewin.h"
 #include "fft.h"
@@ -107,7 +108,7 @@ av_cold void ff_atrac3p_init_wave_synth(void)
 
 /* generate amplitude scalefactors table */
 for (i = 0; i < 64; i++)
-amp_sf_tab[i] = pow(2.0f, ((double)i - 3) / 4.0f);
+amp_sf_tab[i] = exp2f((i - 3) / 4.0f);
 }
 
 /**
-- 
2.7.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel