Ignacio Vazquez-Abrams
2001-Aug-29 01:59 UTC
[vorbis] Byte-width of a bitstream, cabbages, and other things
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? I realize point 3 is moot because a) no 24-bit audio playback devices have significant market penetration yet, and b) human hearing can barely cope with 16-bit sound, but still I''m curious. Also, has any more work been done on the VorbisEnc documentation? I can easily dig through the oggenc source, but if there's more recent documentation... While I have your attention, I keep getting a 0L from ov_info() as the version. How should I read that? As "Codec Version 1" or "Codec Version 0"? -- Ignacio Vazquez-Abrams <ignacio@openservices.net> --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Michael Smith
2001-Aug-29 02:13 UTC
[vorbis] Byte-width of a bitstream, cabbages, and other things
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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Jernej Simonèiè
2001-Aug-29 11:55 UTC
[vorbis] Byte-width of a bitstream, cabbages, and other things
Hello Ignacio, 29. avgust 2001, 10:59:29, you wrote:> 2) 8-bit recordings can be decoded at 16 bits, andYes> 3) There is no way to handle encoding more than 16 bits?I don't think so, if you check Peter's Vorbis input plugin for WinAmp, you'll find out, that it allows you to select 8,16,24 or ever 32 bit output (and dithering). Vorbis' internal format is unrelated to bit depth, so there shouldn't be any problem with encoding more than 16 bit files... -- Jernej Simoncic, jernej.simoncic@guest.arnes.si http://www2.arnes.si/~sopjsimo/ ICQ: 26266467 --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.