[vorbis] Byte-width of a bitstream, cabbages, and other things

Michael Smith msmith at labyrinth.net.au
Wed Aug 29 02:13:09 PDT 2001



At 04:59 AM 8/29/01 -0400, you wrote:
>Sorry to bug you all, but I have some questions (I have beta4 at the moment;
>don't ask):
>
>I was reading through the VorbisFile API documentation because I'm writing
>code to deal with Ogg Vorbis-encoded files, and nowhere did I see a function
>or method for retrieving the byte-width of a stream. However, I did notice
>that ov_read() takes a word size as a parameter. Am I correct in assuming
>that:
>
>1) The decoding width is independent of the encoding width,
>2) 8-bit recordings can be decoded at 16 bits, and
>3) There is no way to handle encoding more than 16 bits?

Vorbis encodes everything (and decodes everything) as floating point. As 
such, there _is_ no concept of 8 or 16 bit input/output. However, in 
interfacing to the outside world, it's obviously neccesary to convert
to such formats. VorbisFile supports two widths - 8 and 16 bits. However,
should it prove useful, it'd be very easy to add support for 24 bit 
output - that hasn't been done because there hasn't been any demand for it.

Encoding is a similar situation - you need to convert to floating point 
before passing the data into the encoder. oggenc, for example, supports 8
and 16 bit input (as well as direct floating-point pcm input, though I 
think that's buggy on big-endian platforms). Again, if anyone actually
wanted 24 bit input, it'd take about 5 minutes to add.

Michael

p.s. update to rc2 ASAP, please. beta4 can't decode all vorbis files.

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