[vorbis-dev] float to PCM packing in libvorbisfile

John Morton jwm at eslnz.co.nz
Wed Apr 30 20:37:48 PDT 2003



On Thu, 01 May 2003 15:10, Michael Smith wrote:
> > 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.

Well we can't be having that sort of behaviour :-) 

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

That's what I'm aiming for. I'll see what I can come up with over the next 
week.

John

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