[vorbis-dev] Optimisations

Michael Smith msmith at labyrinth.net.au
Wed Nov 15 20:02:50 PST 2000



At 02:55 PM 11/16/00 +1100, you wrote:
>
>>that we're typically working with data that came from 16 bit samples - so
>>really high precision tends to be unneccesary in much of the code. Most of
>
>True enough, signed 16 bit numbers will leave you with plenty of elbow 
>room.  Speaking of which, what is the highest number of bits the spec is 
>able to handle (I promise I'll read the code carefully for such details 
>tonight...)

The spec doesn't say anything about this. Basically, the spec says that
vorbis encodes amplitudes at each sample (well, I think it would if there
were a formal spec. There isn't, yet). It's up to an (en|de)coder to
actually do so with some specific precision. Libvorbis is the only one of
these at the moment. 

Libvorbis uses floats internally for all samples. It neither knows nor
cares about what the original precision was, it'll just encode or decode
them. The application (or libvorbisfile, if you use that) will then change
that to integer samples of the appropriate size for output (to audio
hardware, a file, etc.)

However, since vorbis is a perceptual audio codec, there will always be
losses involved - so significantly greater than 16 bits wouldn't be useful
for reasons of precision (it may be useful for reasons of dynamic range,
however).

>
>>That said, there are reasons to use fixed point arithmetic. With modern
>>processors, it's usually only a good idea to do fixed point if the
>>processor doesn't have a FPU (many/most dsps (including the C6201) are good
>>examples here, as you mentioned.) - fixed point is actually typically
>>slower these days if the cpu does have a FPU.
>
>That said, I presume fixed point would have to be the choice for x86 
>optimisations, as MMX is the only common SIMD instruction set for all post 
>1997 x86 CPUs.  Implementation in SSE or 3DNow! would be redundant.(?)  I 
>am just looking for an excuse to learn and apply MMX/3DNow (I have a Duron) 
>in some sort of constructive fashion. :)

Yes, MMX is the only SIMD instruction set common to almost all modern CPUs
- but that's no reason to entirely ignore SSE/3dnow. Those are probably
more useful, though to fewer users. Feel free to give it a try.

>
>Still, is some sort of optimised (platform dependant optimisations where 
>available) DSP library that both the encoder and decoder can use worth it 
>at this stage?

Not sure, though I doubt it - it might be worth looking at.

Michael

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