[vorbis-dev] mdct as hardware

Luis Azuara lazuara at ra.informatik.uni-stuttgart.de
Wed Mar 20 02:23:02 PST 2002



On Wed, 20 Mar 2002, Segher Boessenkool wrote:

>
>
> Monty wrote:
> >
> >
> > You can use the MDCT in CVS as a fully fixed point implementation with
> > no problems *if* you have a 32bit*32bit->64bit multiply.  It's a
> > 32*32->32 multiply (which is really 16*16->32) that is an issue.  One
> > of those things C only sort of provides.
>
Exactly that's the point. I didn't mention it, but the idea is to have a
completly independent hardware modul for the mdct, meaning it might have
its own multiplier, and the fpu could be used by the other functions. Now
our system takes 40 sec. to play 15 sec. music. After simulating the mdct
as hardware, the rasult was reduced to 20 sec.

> The fp dct algorithm libvorbis uses, if implemented as fixed point,
> needs 80-or-so bit words, if you use the same fixed point scaling
> for all words, and need (only) 16-bit integer precision outputs.
>
> > Segher has magic code using a union of two 32 bit ints as a 64 bit
> > type that apparently newest versions of GCC will compile properly to
> > 32*32->64 on platforms that have it.
>
> It's hardly magic.  And gcc doesn't cope well with it on all platforms.
> The platforms I know of that handle it well are x86, ppc, alpha, arm.
>
It sounds cool, but like said before, we are planning to add one
multiplier to our plataform. By the way, we are using Leon plataform with
Meiko fpu at 25 MHz. So the idea is to take away some
calculation-intensive processes from the processor, by the addition of new
hardware. Since this hardware is extra-help, we try to implement it as
simple as possible, and add software to interface it with ogg vorbis.

> > Other than that, no real caveats in that code.
>
> For fixed point, you really really really want a different dct algorithm.
> (Mostly because, although fp multiplies are fast on most hardware,
> integer multiplies are slooooow).
> Especially if you implement it in hardware.  You can easily get away
> with a word size of only 18, for example, (for output size 16 bit), if
> you assume no values >= 65536 will happen (that's twice the legal output
> range), or you do some pre-clipping on the dct inputs.
>

So do you think the simplest way is to have an extra fixed point
multiplier inside the mdct core?

Luis

>
> Segher
>
>
> --- >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.
>

<p>--- >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