[vorbis-dev] Observations about the floating point data in vorbisfile

Michael Smith msmith at labyrinth.net.au
Sun Feb 2 19:57:26 PST 2003



Tomas Ogren <stric at ing.umu.se> said:

> Hello.
> 
> I noticed that when reading data with ov_read_float(), you can get
> values outside [-1..1] when the stream is encoded at lower quality, but
> with higher quality, the values trim down to inside [-1..1].
> Looking at the plot from -q10, the data from ov_read_float seems
> clipped.
> 

This is correct. As a lossy codec, vorbis does not guarantee that the output
will be the same as the input (obviously) - and part of that is that the
approximations may produce out of range output. ov_read() performs clipping,
as you noted, in order to deal with this. If you use ov_read_float(), it's up
to you to deal with the values produced appropriately.

This problem generally only happens (at least in ways that matter - i.e. could
be audible) with peak-to-peak inputs, which are a bad idea anyway. 

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