Talk:OggPCM Draft1

From XiphWiki

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
=== Do we need signed/unsigned data flag? ===
=== Do we need signed/unsigned data flag? ===
-
* Not really.  The data can be easily changed to signed as default losslessly.  Unsigned 8-bit data (where 128 is the median) is easily changed to signed, and changed back if being saved as RIFF/WAV (which only supports unsigned 8-bit).  However, it wouldn't hurt to support it.  Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. --[[User:Arc]]
+
* Not really.  The data can be easily changed to signed as default losslessly.  Unsigned 8-bit data (where 128 is the median) is easily changed to signed, and changed back if being saved as RIFF/WAV (which only supports unsigned 8-bit).  However, it wouldn't hurt to support it.  Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. --[[User:Arc|Arc]]
* I don't agree with that.  It just puts more conditional code into packages that would normally have only one native format and it gives them more opportunity to fail to support variants of the format. If it's fixed then a few packages will always have to modify the data, and most will never get it wrong. If it's variable then every package will have to do something sometimes, or fail occasionally. --[[User:Gumboot|Gumboot]] 01:28, 8 Nov 2005 (PST)
* I don't agree with that.  It just puts more conditional code into packages that would normally have only one native format and it gives them more opportunity to fail to support variants of the format. If it's fixed then a few packages will always have to modify the data, and most will never get it wrong. If it's variable then every package will have to do something sometimes, or fail occasionally. --[[User:Gumboot|Gumboot]] 01:28, 8 Nov 2005 (PST)
Line 7: Line 7:
=== Do we need to record int/float data flag? ===
=== Do we need to record int/float data flag? ===
-
* Some codecs (Vorbis) use floating point samples natively.  Others only support int.  Support for int/float data flag is thus important. --[[User:Arc]]
+
* Some codecs (Vorbis) use floating point samples natively.  Others only support int.  Support for int/float data flag is thus important. --[[User:Arc|Arc]]
=== Do we need to offer endian data flag?  If not, which is used? ===
=== Do we need to offer endian data flag?  If not, which is used? ===
-
* LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it.  It's a fairly low-CPU process to change the endian on the application side in any event, and if the application uses the bitpacker, this isn't even an issue. Supporting both is possible, too, but adds complexity to a format intended to be ''simple''. --[[User:Arc]]
+
* LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it.  It's a fairly low-CPU process to change the endian on the application side in any event, and if the application uses the bitpacker, this isn't even an issue. Supporting both is possible, too, but adds complexity to a format intended to be ''simple''. --[[User:Arc|Arc]]
* We should just standardize on little endian ordering for the data. It's commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV's will already know how to support it.
* We should just standardize on little endian ordering for the data. It's commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV's will already know how to support it.
Line 21: Line 21:
=== Is it worth supporting a vorbiscomment header? ===
=== Is it worth supporting a vorbiscomment header? ===
-
* It'd be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information.  Besides, if you don't put it in then five other people will do it five different ways. --[[User:Arc]]
+
* It'd be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information.  Besides, if you don't put it in then five other people will do it five different ways. --[[User:Arc|Arc]]
Line 37: Line 37:
   
   
== Do we want/need the 32-bit data packet header? ==
== Do we want/need the 32-bit data packet header? ==
-
* The issue was raised on the ogg-dev mailing list of wether this is necessary.  With only a single header packet, it could be considered an unneeded complication, however, additional header packets (current or future) will make this a requirement.  --[[User:Arc]]
+
* The issue was raised on the ogg-dev mailing list of wether this is necessary.  With only a single header packet, it could be considered an unneeded complication, however, additional header packets (current or future) will make this a requirement.  --[[User:Arc|Arc]]
* I can definitely see people wanting to use comment pages, so I'd say leave the header on the data pages as well. On the other hand, if ogg provides guarantees about the alignment of packet data from packetout, I could see getting rid of it since there are benefits to working on buffers aligned to larger boundaries on some architectures. As far as I can tell, either no guarantees are made, or you'll get a buffer aligned to a word boundary, in which case having the header has no penalty.
* I can definitely see people wanting to use comment pages, so I'd say leave the header on the data pages as well. On the other hand, if ogg provides guarantees about the alignment of packet data from packetout, I could see getting rid of it since there are benefits to working on buffers aligned to larger boundaries on some architectures. As far as I can tell, either no guarantees are made, or you'll get a buffer aligned to a word boundary, in which case having the header has no penalty.

Revision as of 21:11, 9 November 2005

Contents

Do we need signed/unsigned data flag?

  • Not really. The data can be easily changed to signed as default losslessly. Unsigned 8-bit data (where 128 is the median) is easily changed to signed, and changed back if being saved as RIFF/WAV (which only supports unsigned 8-bit). However, it wouldn't hurt to support it. Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. --Arc
  • I don't agree with that. It just puts more conditional code into packages that would normally have only one native format and it gives them more opportunity to fail to support variants of the format. If it's fixed then a few packages will always have to modify the data, and most will never get it wrong. If it's variable then every package will have to do something sometimes, or fail occasionally. --Gumboot 01:28, 8 Nov 2005 (PST)

Do we need to record int/float data flag?

  • Some codecs (Vorbis) use floating point samples natively. Others only support int. Support for int/float data flag is thus important. --Arc


Do we need to offer endian data flag? If not, which is used?

  • LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it. It's a fairly low-CPU process to change the endian on the application side in any event, and if the application uses the bitpacker, this isn't even an issue. Supporting both is possible, too, but adds complexity to a format intended to be simple. --Arc
  • We should just standardize on little endian ordering for the data. It's commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV's will already know how to support it.

--Jkoleszar 11:48, 9 Nov 2005 (PST)

  • I agree that we should use little endian as standard, however, I'm questioning if big endian should be supported as well... after all, it'd be trivial for a plugin to convert from one to another. --Arc 13:11, 9 Nov 2005 (PST)

Is it worth supporting a vorbiscomment header?

  • It'd be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information. Besides, if you don't put it in then five other people will do it five different ways. --Arc


How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float?

  • One doesn't. Standardize on IEEE floats and be done with it. Simple, remember? :)

--Jkoleszar 11:48, 9 Nov 2005 (PST)

  • I'm uncertain exactly what this question is. Hopefully the submitter can clarify? --Arc 13:11, 9 Nov 2005 (PST)


Are samples padded to some round number of bits?

  • I don't know of any PCM formats for non-octet based samples, but if you want to specify something, I'd say pack them into the MSB's of the next larger byte boundary, round toward zero, on a per channel basis. This should allow software that knows how to handle 16 bit audio but not 10 bit to operate on the data.

--Jkoleszar 11:48, 9 Nov 2005 (PST)


Do we want/need the 32-bit data packet header?

  • The issue was raised on the ogg-dev mailing list of wether this is necessary. With only a single header packet, it could be considered an unneeded complication, however, additional header packets (current or future) will make this a requirement. --Arc
  • I can definitely see people wanting to use comment pages, so I'd say leave the header on the data pages as well. On the other hand, if ogg provides guarantees about the alignment of packet data from packetout, I could see getting rid of it since there are benefits to working on buffers aligned to larger boundaries on some architectures. As far as I can tell, either no guarantees are made, or you'll get a buffer aligned to a word boundary, in which case having the header has no penalty.

--Jkoleszar 11:48, 9 Nov 2005 (PST)

  • I believe that 64-bit platforms still use 32-bit memory space (I may be wrong!). Yes, libogg2 buffers should always begin on a 32-bit word boundary, so the beginning of the data should also be on a boundary. This was done intentionally, as was the choice to use a three letter codec identifier for raw codecs (since the packet ID + codec ID = 32bits this way), after an extended IRC discussion on the subject. If ending on a 64-bit boundary is something we're really worried about, we could always add 4 bytes, but I really don't think it should be necessary. --Arc 13:11, 9 Nov 2005 (PST)
Personal tools


Main Page

Xiph.Org Projects

Audio—

Video—

Text—

Container—

Streaming—