Anton Khirnov <[email protected]> writes:
> Sorry for the delay, pushed.
Thanks!
Michael Niedermayer merged this change into ffmpeg, and he noticed that
the ldexp used in dca_dmix_code is a pretty slow function call. After
trying a couple of variants, the ffmpeg version now uses
#define POW2_MINUS15 .000030517578125
return ((dca_dmixtable[code] ^ sign) - sign) * POW2_MINUS15;
instead of
return ldexpf((dca_dmixtable[code] ^ sign) - sign, -15);
I think I'd prefer to write it like (untested)
return ((dca_dmixtable[code] ^ sign) - sign) * (1.0 / (1U << 32));
but I don't care very much about the style used here. The point is to
replace the ldexp function call by a float multiplication by a constant.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel