[vorbis-dev] mdct_backward with fused muladd?
Nicolas Pitre
nico at cam.org
Tue May 20 19:16:17 PDT 2003
On Tue, 20 May 2003, David Etherton wrote:
> Can anybody point me at any resources that would explain how to optimize
> mdct_backward for a cpu with a fused multiply-accumute unit?
This was discussed on this list some time ago.
> From what I understand from responses to my older postings, Tremor's
> mdct_backward could be rewritten to take advantage of a muladd.
Well in fact you could start with the current Tremor code where the XPROD
macros can easily be redefined specifically for your target. You can look
at the ARM version where the 32x32->64 MAC instruction is used for example.
> Can I get away with 16x16 multiplies without too much
> audio degredation?
No. See the definition of MULT32() and MULT31() for the _LOW_ACCURACY_
case. I had to make the multiplication unbalanced (like 24x8) since a 16x16
would not give acceptable audio quality.
> Thanks again. Just to show that I'm not a total leech, here's a slightly
> faster (at least on the PS2) version of bitrev12 that doesn't use any luts
> (thanks to http://aggregate.org/MAGIC/)
>
> STIN int bitrev12(int x){
> x = ((x & 0xaaa) >> 1) | ((x & 0x555) << 1);
> x = ((x & 0xccc) >> 2) | ((x & 0x333) << 2);
> x = ((x & 0xf00) >> 8) | (x & 0x0f0) | ((x & 0x00f) << 8);
> return x;
> }
Yeah, that's the generic cookbook method. This however sucks big time on
ARM where immediate arguments can be used directly within opcodes only if
they're not wider than 8 bits. The current version was optimized for ARM.
<p>Nicolas
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list