On Sat, 24 May 2014 08:52:02 +0200, [email protected] (Niels
=?iso-8859-1?Q?M=F6ller?=) wrote:
> 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 find it strange that it would actually matter.
This should only be called 2 * channels times per frame, so I'd expect the
effect to be completely negligible.
>
> I think I'd prefer to write it like (untested)
>
> return ((dca_dmixtable[code] ^ sign) - sign) * (1.0 / (1U << 32));
^^
not 15?
--
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel