[FFmpeg-devel] [PATCH] avcodec/mpegaudio_tablegen: speed up table generation

Timothy Gu timothygu99 at gmail.com
Thu Nov 26 03:03:14 CET 2015


On Wed, Nov 25, 2015 at 05:17:29PM -0500, Ganesh Ajjanagadde wrote:
> +            double f = value * cbrt_lut[value] * pow(2, (exponent - 400) * 0.25 + FRAC_BITS + 5) / IMDCT_SCALAR;

While at it, you could change pow(2 to exp2(, which has a libm.h shim
and is easily 4 times faster than pow() on my machine (glibc 2.19, Haswell).

Timothy


More information about the ffmpeg-devel mailing list