[vorbis-dev] float to PCM packing in libvorbisfile

Michael Smith msmith at labyrinth.net.au
Wed Apr 30 20:10:49 PDT 2003



> However, the devil is in the details - the code in ov_read looks like some 
> time has been taken to optimise it, and the header file is full of hacks to 
> make float to int conversion behave itself under several arch/os/compiler 
> combinations. It would suck to have to reimpliment this just to get 
> replaygain, a preamp, limiting or other not uncommon player features to work, 
> when the code is already in libvorbisfile in one form. Additionally, 
> converting audio from float to int seems to be fairly peculiar to vorbis (at 
> least, in the context of common audio decoders). 

It's true that this is somewhat optimised (the hacks are performance hacks,
not to make it work, though). Your statement that this conversionj is peculiar
to vorbis is not true, though - most lossy codecs (outside of fixed-point
implementations, obviously) will do this - vorbis may differ that it
optionally exposes the raw float buffers to you, but that's all. So, in not
having the float-to-int conversions externally accessible, vorbis is being
_more like_ other codecs.

<p>> 
> Suppose I wrote and tested a patch to move float to pcm packing out of the 
> inside of ov_read, making as little change to the API as possible. Would you 
> be interested in entertaining the idea of future inclusion?

Assuming 'as little change to the API as possible' means 'no change at all
other than the addition of a single function', then yes, we'd consider it.

(in just-arrived mail, Jack suggests that this already exists. He's
misremembering, it does not).

Mike

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