[openal] [WIP] AL_EXT_MSADPCM in OpenAL Soft
david at ingeniumdigital.com
Sun Mar 2 03:24:13 EST 2014
On 02/03/14 11:03, Chris Robinson wrote:
> Hmm, to be honest, I'm not really keen on the special-cased mono and
> stereo decoders. I don't think the potential speed gain is worth the
> extra code and manual unrolling, considering all the other work being
> done here too (unless there's really notable gains, I think it's best to
> write clean code and let the compiler worry about optimizing it). I
> think the amount of templating could also be cut down by passing the
> block size as a parameter to the Convert_##T##_ALmsadpcm functions.
I did some of the optimization work on this, it was certainly a bug win
at the time.
The optimized versions were significantly faster (~an order of
magnitude) than the original version. Some things (the unrolling) don't
make a huge difference, so it could certainly be made cleaner, and the
separate mono/stereo stuff isn't as important as it was when it was
originally written. The special case for converting to ALshort gave a
rather impressive performance boost.
IMHO, performance would still be acceptable if we got rid of the
special-cased mono and stereo decoders, but a separate
Convert_ALshort_ALmsadpcm function to kill that copy is such a great win
you'd be silly to let it go.
More information about the openal