<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.xiph.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Erikd</id>
	<title>XiphWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.xiph.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Erikd"/>
	<link rel="alternate" type="text/html" href="https://wiki.xiph.org/Special:Contributions/Erikd"/>
	<updated>2026-04-20T07:27:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=People&amp;diff=15818</id>
		<title>People</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=People&amp;diff=15818"/>
		<updated>2015-05-09T08:37:10Z</updated>

		<summary type="html">&lt;p&gt;Erikd: Add myself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is meant to help with nickname-to-person lookup.&lt;br /&gt;
&#039;&#039;Nickname&#039;&#039; can be a mail alias, an IRC nick, or a Subversion user &amp;amp;mdash; in most cases several of these.&lt;br /&gt;
&lt;br /&gt;
Please help to fill this table. Keeping your own entry up to date is a good start.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; width=&amp;quot;100%&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3&amp;quot;| Who Is Who&lt;br /&gt;
|-&lt;br /&gt;
! Nickname&lt;br /&gt;
! Real name&lt;br /&gt;
! Keywords&lt;br /&gt;
|-&lt;br /&gt;
| arkadini&lt;br /&gt;
| Arek Korbik&lt;br /&gt;
| Quicktime, XiphQT&lt;br /&gt;
|-&lt;br /&gt;
| basilgohar&lt;br /&gt;
| Basil Mohamed Gohar&lt;br /&gt;
| opus, legal&lt;br /&gt;
|-&lt;br /&gt;
| ben&lt;br /&gt;
| Benjamin Gérard&lt;br /&gt;
| libao&lt;br /&gt;
|-	 &lt;br /&gt;
| BjornW&lt;br /&gt;
| Björn Wijers&lt;br /&gt;
| [[Spread Open Media]], [[XSPF]]&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Conrad|conrad]]&lt;br /&gt;
| [http://blog.kfish.org/ Conrad Parker]&lt;br /&gt;
| see &#039;&#039;[[#nick_kfish|kfish]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span id=&amp;quot;nick_derf&amp;quot;&amp;gt;derf&amp;lt;/span&amp;gt;&lt;br /&gt;
| [http://people.xiph.org/~tterribe/ Timothy B. Terriberry]&lt;br /&gt;
| theora, CELT, video, daala&lt;br /&gt;
|-&lt;br /&gt;
| dllmain&lt;br /&gt;
| Sebastian Pipping&lt;br /&gt;
| see &#039;&#039;[[#nick_sping|sping]]&#039;&#039;, nick not used anymore&lt;br /&gt;
|-&lt;br /&gt;
| dm8tbr&lt;br /&gt;
| Thomas B. Rücker&lt;br /&gt;
| icecast&lt;br /&gt;
|-&lt;br /&gt;
| doublec&lt;br /&gt;
| Chris Double&lt;br /&gt;
| firefox, theora, Mozilla&lt;br /&gt;
|-&lt;br /&gt;
| drac667&lt;br /&gt;
| Cristian Adam&lt;br /&gt;
| DirectShow, oggcodecs, Windows&lt;br /&gt;
|-&lt;br /&gt;
| ds&lt;br /&gt;
| David Schleef&lt;br /&gt;
| theora, dirac, gstreamer&lt;br /&gt;
|-&lt;br /&gt;
| erikd&lt;br /&gt;
| Erik de Castro Lopo&lt;br /&gt;
| FLAC maintainer&lt;br /&gt;
|-&lt;br /&gt;
| [[User:GChriss|gchriss]]&lt;br /&gt;
| George Chriss&lt;br /&gt;
| gstreamer, Elphel, event videography&lt;br /&gt;
|-&lt;br /&gt;
| giles&lt;br /&gt;
| [http://people.xiph.org/~giles/ Ralph Giles]&lt;br /&gt;
| see &#039;&#039;[[#nick_rillian|rillian]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| gmaxwell&lt;br /&gt;
| Gregory Maxwell&lt;br /&gt;
| Wikimedia, CELT, theora, daala&lt;br /&gt;
|-&lt;br /&gt;
| gnafu&lt;br /&gt;
| Gideon Mayhak&lt;br /&gt;
| community, testing&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Silvia|ginger]]&lt;br /&gt;
| Silvia Pfeiffer&lt;br /&gt;
| see &#039;&#039;[[#nick_nessy|nessy]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| [[User:Imalone|imalone]]&lt;br /&gt;
| Ian Malone&lt;br /&gt;
| metadata&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span id=&amp;quot;nick_illi&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;illiminable&lt;br /&gt;
| Zentaro Kavanagh&lt;br /&gt;
| DirectShow, dsfilters, Microsoft&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span id=&amp;quot;nick_ivo&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[User:Saoshyant|ivo]]&lt;br /&gt;
| Ivo Emanuel Gonçalves&lt;br /&gt;
| advocacy, [[Spread Open Media]], [[XSPF]], wiki mod, vorbis-tools&lt;br /&gt;
|-&lt;br /&gt;
| jack&lt;br /&gt;
| Jack Moffitt&lt;br /&gt;
| libao, treasurer, Icecast&lt;br /&gt;
|-&lt;br /&gt;
| jcoalson&lt;br /&gt;
| Josh Coalson&lt;br /&gt;
| FLAC author&lt;br /&gt;
|-&lt;br /&gt;
| j, j^&lt;br /&gt;
| Jan Gerber&lt;br /&gt;
| v2v, ffmpeg2theora, sysadmin&lt;br /&gt;
|-&lt;br /&gt;
| [[User:jmspeex|jmspeex]]&lt;br /&gt;
| [http://jmvalin.ca/ Jean-Marc Valin]&lt;br /&gt;
| Opus (CELT), Daala, Speex&lt;br /&gt;
|-&lt;br /&gt;
| jmworx&lt;br /&gt;
| Jean-Marc Valin&lt;br /&gt;
| see &#039;&#039;[[#nick_jmspeex|jmspeex]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| JoeyBorn&lt;br /&gt;
| Joe Born&lt;br /&gt;
| neuros&lt;br /&gt;
|-&lt;br /&gt;
| karl&lt;br /&gt;
| Karl Heyes&lt;br /&gt;
| Icecast&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span id=&amp;quot;nick_kfish&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[User:Conrad|kfish]]&lt;br /&gt;
| [http://www.kfish.org/ Conrad Parker]&lt;br /&gt;
| annodex, fishsound, hogg, oggz, vorbis-tools&lt;br /&gt;
|-&lt;br /&gt;
| laser13&lt;br /&gt;
| Marcin Lubonski&lt;br /&gt;
| annodex, oggplay, win32&lt;br /&gt;
|-&lt;br /&gt;
| lgonze&lt;br /&gt;
| Lucas Gonze&lt;br /&gt;
| [[XSPF]]&lt;br /&gt;
|-&lt;br /&gt;
| lu_zero&lt;br /&gt;
| Luca Barbato &lt;br /&gt;
| RTP Vorbis, RTP Theora, Gentoo&lt;br /&gt;
|-&lt;br /&gt;
| maikmerten&lt;br /&gt;
| Maik Merten&lt;br /&gt;
| theora, java, macos&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span id=&amp;quot;nick_mikes&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;MikeS&lt;br /&gt;
| Michael Smith&lt;br /&gt;
| fluendo, gstreamer, sysadmin, IceS&lt;br /&gt;
|-&lt;br /&gt;
| Monty&lt;br /&gt;
| Christopher Montgomery&lt;br /&gt;
| see &#039;&#039;[[#nick_xiphmont|xiphmont]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| msmith&lt;br /&gt;
| Michael Smith&lt;br /&gt;
| see &#039;&#039;[[#nick_mikes|MikeS]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span id=&amp;quot;nick_nessy&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;nessy&lt;br /&gt;
| Silvia Pfeiffer&lt;br /&gt;
| annodex, vquence, sysadmin, CMML&lt;br /&gt;
|-&lt;br /&gt;
| ozone&lt;br /&gt;
| Andr&amp;amp;eacute; Pang&lt;br /&gt;
| annodex, macos&lt;br /&gt;
|-&lt;br /&gt;
| pjones&lt;br /&gt;
| Peter Jones&lt;br /&gt;
| cdparanoia, redhat&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span id=&amp;quot;nick_rillian&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;rillian&lt;br /&gt;
| [http://people.xiph.org/~giles/ Ralph Giles]&lt;br /&gt;
| metadata, video, theora, MNG, sysadmin&lt;br /&gt;
|-&lt;br /&gt;
| ribamar&lt;br /&gt;
| Ribamar Santarosa&lt;br /&gt;
| etheora&lt;br /&gt;
|-&lt;br /&gt;
| Saoshyant&lt;br /&gt;
| Ivo Emanuel Gonçalves&lt;br /&gt;
| see &#039;&#039;[[#nick_ivo|ivo]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| segher&lt;br /&gt;
| Segher Boessenkool&lt;br /&gt;
| vorbis, audio&lt;br /&gt;
|-&lt;br /&gt;
| shans&lt;br /&gt;
| Shane Stephens&lt;br /&gt;
| annodex, oggplay&lt;br /&gt;
|-&lt;br /&gt;
| silvia&lt;br /&gt;
| Silvia Pfeiffer&lt;br /&gt;
| see &#039;&#039;[[#nick_nessy|nessy]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| smarter&lt;br /&gt;
| Guillaume Martres&lt;br /&gt;
| libvpx&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span id=&amp;quot;nick_sping&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[User:sping|sping]]&lt;br /&gt;
| Sebastian Pipping&lt;br /&gt;
| [[XSPF]], [http://libspiff.sourceforge.net/ libSpiff], [http://validator.xspf.org/ XSPF Validator]&lt;br /&gt;
|-&lt;br /&gt;
| TD-Linux&lt;br /&gt;
| [http://thomasdaede.com/ Thomas Daede]&lt;br /&gt;
| Daala hardware&lt;br /&gt;
|-&lt;br /&gt;
| tmatth&lt;br /&gt;
| Tristan Matthews&lt;br /&gt;
| VLC, speex&lt;br /&gt;
|-&lt;br /&gt;
| tterribe&lt;br /&gt;
| [http://people.xiph.org/~tterribe/ Timothy B. Terriberry]&lt;br /&gt;
| See &#039;&#039;[[#nick_derf|derf]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| thomasvs&lt;br /&gt;
| Thomas Vander Stichele&lt;br /&gt;
| fluendo, flumotion, gstreamer&lt;br /&gt;
|-&lt;br /&gt;
| unlord&lt;br /&gt;
| Nathan Egge&lt;br /&gt;
| daala&lt;br /&gt;
|-&lt;br /&gt;
| volsung&lt;br /&gt;
| Stan Seibert&lt;br /&gt;
| libao&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span id=&amp;quot;nick_xiphmont&amp;quot;&amp;gt;xiphmont&lt;br /&gt;
| Christopher Montgomery&lt;br /&gt;
| vorbis, ghost, audio, Ogg, cdparanoia, daala&lt;br /&gt;
|-&lt;br /&gt;
| zen&lt;br /&gt;
| Zentaro Kavanagh&lt;br /&gt;
| see &#039;&#039;[[#nick_illi|illi]]&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Developers stuff]]&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2117</id>
		<title>OggPCM</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2117"/>
		<updated>2005-11-16T11:18:33Z</updated>

		<summary type="html">&lt;p&gt;Erikd: /* Channel Mapping Header */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page was created as an alternative to the original [[OggPCM]]. The matter is currently a topic of [http://lists.xiph.org/pipermail/ogg-dev/2005-November/thread.html heated debate] and is now being voted on&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Alternate format for OggPCM ==&lt;br /&gt;
&lt;br /&gt;
The following is an alternate format for OggPCM. This is a work in progress and not a final proposal.&lt;br /&gt;
&lt;br /&gt;
Note that unless otherwise noted, all multi-byte fields use the network byte order (big endian). The first packed in a stream MUST be the main header packet. The second packet MUST be the comment packet. Some extra header packets MAY be included after the comment header, provided this is identified in the main header. The packets that follow MUST all be data packets.&lt;br /&gt;
&lt;br /&gt;
=== Main Header Packet ===&lt;br /&gt;
Multibyte fields in the header packets are packed in big endian order, to be consistent with network byte order. A header packet contains the following fields: &lt;br /&gt;
&lt;br /&gt;
 64  &amp;quot;PCM     &amp;quot; Codec identifier&lt;br /&gt;
 16  0x00   Version Major (breaks backwards compatability to increment)&lt;br /&gt;
 16  0x00   Version Minor (backwards compatable, ie, more supported format id&#039;s)&lt;br /&gt;
 32  [uint] PCM format&lt;br /&gt;
 32  [uint] Sampling rate [Hz]&lt;br /&gt;
 8   [uint] Significant bits&lt;br /&gt;
 8   [uint] Number of Channels (&amp;lt; 256)&lt;br /&gt;
 16  [uint] Maximum number of frames per packet&lt;br /&gt;
 32  [uint] Number of extra header packets&lt;br /&gt;
&lt;br /&gt;
A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Codec identifier&amp;quot; is 64 bit long since most other Ogg codecs specify their identifier within the first 64 bits rather than the first 32 bits, so this allows applications to match on all 64 bits consistently.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum number of frames per packet&amp;quot; field is meant to notify an application reading the file that no data packet will contain more than a certain number of frames.  This not only makes implementation easier, but also provides information on how much needs to be buffered when streaming PCM files. A value of 0 means a maximum of 65536 frames. Implementations SHOULD make this field such that packets do not get split into multiple pages.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;significant bits&amp;quot; field specifies how many bits are actually used. The other bits MUST be zero. This can be used to support audio with any resolution. For example, 12-bit PCM can be supported as &amp;quot;16 bit PCM&amp;quot; for the format and 12 for the number of significant bits.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is the same as the bit width specified by the format, the significant bits field may be set to zero.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is less than that specified by the bit width, the data shall be justified to fill the most significant bits. For 12 bit PCM in a 16 bit format, the 12 valid bits will occupy the 12 most significant bits of the 16 bit word and the least significant 4 bits shall be zero.&lt;br /&gt;
&lt;br /&gt;
Since the main header packet and the comment packet are mandatory, the &amp;quot;extra header packets&amp;quot; field counts any additional header packets (aside from these two) that can be provided before the start of the data packets.&lt;br /&gt;
&lt;br /&gt;
=== Comment packet ===&lt;br /&gt;
&lt;br /&gt;
The codec header is followed by a &amp;quot;vorbis comment&amp;quot; packet and by optional extra headers, if any. The format used is the same as for Vorbis with the exception that there is no packet identifier (so the packet is exactly like it is for Speex).&lt;br /&gt;
&lt;br /&gt;
=== Extra Headers (optional) ===&lt;br /&gt;
&lt;br /&gt;
Extra header packets contain additional information about the OggPCM stream. Each extra header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32  [uint] Header ID&lt;br /&gt;
 ...        Header data&lt;br /&gt;
&lt;br /&gt;
Two examples for such optional extra header packets are the channel mapping and the channel conversion header packets.&lt;br /&gt;
&lt;br /&gt;
==== Channel Mapping Header ====&lt;br /&gt;
&lt;br /&gt;
The channel mapping header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32 0x00000000   Header ID&lt;br /&gt;
 16 [uint]   Major version&lt;br /&gt;
 16 [uint]   Minor version&lt;br /&gt;
 32 [uint]   Channel type&lt;br /&gt;
 32xN [uint] Channel map (one for each channel)&lt;br /&gt;
&lt;br /&gt;
All channel_types less than 0x80000000 are reserved for use by Xiph; 0x80000000 and above are allowed for application specific extensions.&lt;br /&gt;
&lt;br /&gt;
This scheme allows for 2^31 -1 Xiph defined channel map types and 2^32 distinct channel names.&lt;br /&gt;
&lt;br /&gt;
Exampe values for channel map type might be:&lt;br /&gt;
&lt;br /&gt;
 OGG_CHANNEL_MAP_STEREO = 1&lt;br /&gt;
 OGG_CHANNEL_MAP_MS_WAVE = 2&lt;br /&gt;
 OGG_CHANNEL_MAP_QUADROPHONIC = 3&lt;br /&gt;
&lt;br /&gt;
and defined channels might be:&lt;br /&gt;
&lt;br /&gt;
 OGG_CHANNEL_FRONT_LEFT = 1&lt;br /&gt;
 OGG_CHANNEL_FRONT_RIGHT = 2&lt;br /&gt;
 OGG_CHANNEL_REAR_LEFT = 3&lt;br /&gt;
 OGG_CHANNEL_REAR_RIGHT = 4&lt;br /&gt;
&lt;br /&gt;
This leaves two ways to define a  stereo file:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_FRONT_LEFT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_FRONT_RIGHT&lt;br /&gt;
&lt;br /&gt;
or as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_FRONT_RIGHT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_FRONT_LEFT&lt;br /&gt;
&lt;br /&gt;
==== Channel Conversion Header ====&lt;br /&gt;
&lt;br /&gt;
Any number of channel conversion headers can be specified. This header specifies how to down-mix the data to another format.&lt;br /&gt;
&lt;br /&gt;
 32 0x00000001 Remixing Header Id&lt;br /&gt;
 16 [uint]     Major version&lt;br /&gt;
 16 [uint]     Minor version&lt;br /&gt;
 32 [uint]     Target Channel type&lt;br /&gt;
 32xMxN [sint] Target Channel (M) x Src Channel (N) Gain array&lt;br /&gt;
&lt;br /&gt;
The ordering of the mixing matrix is such that source channel gains are consecutive. The gain (note: *signed* integer) has the 16 MSBs for the integer part (including sign) and 16 bits for the fracional part of the gain. Note: the gain can be negative.&lt;br /&gt;
&lt;br /&gt;
=== Data Packets ===&lt;br /&gt;
&lt;br /&gt;
Data packets contain the raw PCM audio in interleaved format (complete frames are encoded sequentially) with the following definitions/restrictions:&lt;br /&gt;
&lt;br /&gt;
* A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
* Any OggPCM packet MUST only contain complete frames (ie samples for all channels at a given sampling instance). Partial frames are forbidden.&lt;br /&gt;
* There is no padding allowed in a frame except when some bits (&amp;lt;8) are needed to complete a byte. This means that packet size has a direct relationship to the number of frames in the packet (for purposes of seeking).&lt;br /&gt;
* Recommended packet size is smaller than 4k since interleaving and seeking in Ogg bitstreams is done on the resolution of packets and thus larger packet sizes create suboptimal bitstreams.&lt;br /&gt;
&lt;br /&gt;
=== Supported PCM Formats ===&lt;br /&gt;
&lt;br /&gt;
  Format ID     Short Name             Description&lt;br /&gt;
  -- Integer coding&lt;br /&gt;
  0x00000000    OGGPCM_FMT_S8          Signed integer 8 bit&lt;br /&gt;
  0x00000001    OGGPCM_FMT_U8          Unsigned integer 8 bit&lt;br /&gt;
  0x00000002    OGGPCM_FMT_S16_LE      Signed integer 16 bit little endian&lt;br /&gt;
  0x00000003    OGGPCM_FMT_S16_BE      Signed integer 16 bit big endian&lt;br /&gt;
  0x00000004    OGGPCM_FMT_S24_LE      Signed integer 24 bit little endian&lt;br /&gt;
  0x00000005    OGGPCM_FMT_S24_BE      Signed integer 24 bit big endian&lt;br /&gt;
  0x00000006    OGGPCM_FMT_S32_LE      Signed integer 32 bit little endian&lt;br /&gt;
  0x00000007    OGGPCM_FMT_S32_BE      Signed integer 32 bit big endian&lt;br /&gt;
  --&lt;br /&gt;
  -- Compressed PCM&lt;br /&gt;
  0x00000010    OGGPCM_FMT_ULAW        G.711 u-law encoding (8 bit)&lt;br /&gt;
  0x00000011    OGGPCM_FMT_ALAW        G.711 A-law encoding (8 bit)&lt;br /&gt;
  --&lt;br /&gt;
  -- IEEE Floating point coding&lt;br /&gt;
  0x00000020    OGGPCM_FMT_FLT32_LE    IEEE Float [-1,1] 32 bit little endian&lt;br /&gt;
  0x00000021    OGGPCM_FMT_FLT32_BE    IEEE Float [-1,1] 32 bit big endian&lt;br /&gt;
  0x00000022    OGGPCM_FMT_FLT64_LE    IEEE Float [-1,1] 64 bit little endian&lt;br /&gt;
  0x00000023    OGGPCM_FMT_FLT64_BE    IEEE Float [-1,1] 64 bit big endian&lt;br /&gt;
&lt;br /&gt;
Format IDs below 0x80000000 are reserved for use by Xiph and all the ones above are allowed for application-specific formats.&lt;br /&gt;
&lt;br /&gt;
== Related Links ==&lt;br /&gt;
Short info about AC-3: http://www.mediatwins.com/en/support/kb_topic_11.html&lt;br /&gt;
&lt;br /&gt;
AC-3 spec: http://www.atsc.org/standards/a_52a.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
Note: around p34/140 it appears to be how the channel mapping is encoded.&lt;br /&gt;
&lt;br /&gt;
.wav extended headers for multi channel: http://www.microsoft.com/whdc/device/audio/multichaud.mspx&lt;br /&gt;
&lt;br /&gt;
General surround info: http://www.surroundassociates.com/fqmain.html&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2109</id>
		<title>OggPCM</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2109"/>
		<updated>2005-11-16T11:11:23Z</updated>

		<summary type="html">&lt;p&gt;Erikd: Clarify Channel Mapping Header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page was created as an alternative to the original [[OggPCM]]. The matter is currently a topic of [http://lists.xiph.org/pipermail/ogg-dev/2005-November/thread.html heated debate] and is now being voted on&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Alternate format for OggPCM ==&lt;br /&gt;
&lt;br /&gt;
The following is an alternate format for OggPCM. This is a work in progress and not a final proposal.&lt;br /&gt;
&lt;br /&gt;
Note that unless otherwise noted, all multi-byte fields use the network byte order (big endian). The first packed in a stream MUST be the main header packet. The second packet MUST be the comment packet. Some extra header packets MAY be included after the comment header, provided this is identified in the main header. The packets that follow MUST all be data packets.&lt;br /&gt;
&lt;br /&gt;
=== Main Header Packet ===&lt;br /&gt;
Multibyte fields in the header packets are packed in big endian order, to be consistent with network byte order. A header packet contains the following fields: &lt;br /&gt;
&lt;br /&gt;
 64  &amp;quot;PCM     &amp;quot; Codec identifier&lt;br /&gt;
 16  0x00   Version Major (breaks backwards compatability to increment)&lt;br /&gt;
 16  0x00   Version Minor (backwards compatable, ie, more supported format id&#039;s)&lt;br /&gt;
 32  [uint] PCM format&lt;br /&gt;
 32  [uint] Sampling rate [Hz]&lt;br /&gt;
 8   [uint] Significant bits&lt;br /&gt;
 8   [uint] Number of Channels (&amp;lt; 256)&lt;br /&gt;
 16  [uint] Maximum number of frames per packet&lt;br /&gt;
 32  [uint] Number of extra header packets&lt;br /&gt;
&lt;br /&gt;
A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Codec identifier&amp;quot; is 64 bit long since most other Ogg codecs specify their identifier within the first 64 bits rather than the first 32 bits, so this allows applications to match on all 64 bits consistently.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum number of frames per packet&amp;quot; field is meant to notify an application reading the file that no data packet will contain more than a certain number of frames.  This not only makes implementation easier, but also provides information on how much needs to be buffered when streaming PCM files. A value of 0 means a maximum of 65536 frames. Implementations SHOULD make this field such that packets do not get split into multiple pages.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;significant bits&amp;quot; field specifies how many bits are actually used. The other bits MUST be zero. This can be used to support audio with any resolution. For example, 12-bit PCM can be supported as &amp;quot;16 bit PCM&amp;quot; for the format and 12 for the number of significant bits.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is the same as the bit width specified by the format, the significant bits field may be set to zero.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is less than that specified by the bit width, the data shall be justified to fill the most significant bits. For 12 bit PCM in a 16 bit format, the 12 valid bits will occupy the 12 most significant bits of the 16 bit word and the least significant 4 bits shall be zero.&lt;br /&gt;
&lt;br /&gt;
Since the main header packet and the comment packet are mandatory, the &amp;quot;extra header packets&amp;quot; field counts any additional header packets (aside from these two) that can be provided before the start of the data packets.&lt;br /&gt;
&lt;br /&gt;
=== Comment packet ===&lt;br /&gt;
&lt;br /&gt;
The codec header is followed by a &amp;quot;vorbis comment&amp;quot; packet and by optional extra headers, if any. The format used is the same as for Vorbis with the exception that there is no packet identifier (so the packet is exactly like it is for Speex).&lt;br /&gt;
&lt;br /&gt;
=== Extra Headers (optional) ===&lt;br /&gt;
&lt;br /&gt;
Extra header packets contain additional information about the OggPCM stream. Each extra header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32  [uint] Header ID&lt;br /&gt;
 ...        Header data&lt;br /&gt;
&lt;br /&gt;
Two examples for such optional extra header packets are the channel mapping and the channel conversion header packets.&lt;br /&gt;
&lt;br /&gt;
==== Channel Mapping Header ====&lt;br /&gt;
&lt;br /&gt;
The channel mapping header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32 0x00000000   Header ID&lt;br /&gt;
 16 [uint]   Major version&lt;br /&gt;
 16 [uint]   Minor version&lt;br /&gt;
 32 [uint]   Channel type&lt;br /&gt;
 32xN [uint] Channel map (one for each channel)&lt;br /&gt;
&lt;br /&gt;
All channel_types less than 0x80000000 are reserved for use by Xiph; 0x80000000 and above are allowed for application specific extensions.&lt;br /&gt;
&lt;br /&gt;
This scheme allows for 2^31 -1 Xiph defined channel map types and then each of these can have 2^32 channel names.&lt;br /&gt;
&lt;br /&gt;
Exampe values for channel map type might be:&lt;br /&gt;
&lt;br /&gt;
 OGG_CHANNEL_MAP_STEREO = 1&lt;br /&gt;
 OGG_CHANNEL_MAP_MS_WAVE = 2&lt;br /&gt;
 OGG_CHANNEL_MAP_QUADROPHONIC = 3&lt;br /&gt;
&lt;br /&gt;
and defined channels might be:&lt;br /&gt;
&lt;br /&gt;
 OGG_CHANNEL_FRONT_LEFT = 1&lt;br /&gt;
 OGG_CHANNEL_FRONT_RIGHT = 2&lt;br /&gt;
 OGG_CHANNEL_REAR_LEFT = 3&lt;br /&gt;
 OGG_CHANNEL_REAR_RIGHT = 4&lt;br /&gt;
&lt;br /&gt;
This leaves two ways to define a  stereo file:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_FRONT_LEFT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_FRONT_RIGHT&lt;br /&gt;
&lt;br /&gt;
or as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_FRONT_RIGHT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_FRONT_LEFT&lt;br /&gt;
&lt;br /&gt;
==== Channel Conversion Header ====&lt;br /&gt;
&lt;br /&gt;
Any number of channel conversion headers can be specified. This header specifies how to down-mix the data to another format.&lt;br /&gt;
&lt;br /&gt;
 32 0x00000001 Remixing Header Id&lt;br /&gt;
 16 [uint]     Major version&lt;br /&gt;
 16 [uint]     Minor version&lt;br /&gt;
 32 [uint]     Target Channel type&lt;br /&gt;
 32xMxN [sint] Target Channel (M) x Src Channel (N) Gain array&lt;br /&gt;
&lt;br /&gt;
The ordering of the mixing matrix is such that source channel gains are consecutive. The gain (note: *signed* integer) has the 16 MSBs for the integer part (including sign) and 16 bits for the fracional part of the gain. Note: the gain can be negative.&lt;br /&gt;
&lt;br /&gt;
=== Data Packets ===&lt;br /&gt;
&lt;br /&gt;
Data packets contain the raw PCM audio in interleaved format (complete frames are encoded sequentially) with the following definitions/restrictions:&lt;br /&gt;
&lt;br /&gt;
* A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
* Any OggPCM packet MUST only contain complete frames (ie samples for all channels at a given sampling instance). Partial frames are forbidden.&lt;br /&gt;
* There is no padding allowed in a frame except when some bits (&amp;lt;8) are needed to complete a byte. This means that packet size has a direct relationship to the number of frames in the packet (for purposes of seeking).&lt;br /&gt;
* Recommended packet size is smaller than 4k since interleaving and seeking in Ogg bitstreams is done on the resolution of packets and thus larger packet sizes create suboptimal bitstreams.&lt;br /&gt;
&lt;br /&gt;
=== Supported PCM Formats ===&lt;br /&gt;
&lt;br /&gt;
  Format ID     Short Name             Description&lt;br /&gt;
  -- Integer coding&lt;br /&gt;
  0x00000000    OGGPCM_FMT_S8          Signed integer 8 bit&lt;br /&gt;
  0x00000001    OGGPCM_FMT_U8          Unsigned integer 8 bit&lt;br /&gt;
  0x00000002    OGGPCM_FMT_S16_LE      Signed integer 16 bit little endian&lt;br /&gt;
  0x00000003    OGGPCM_FMT_S16_BE      Signed integer 16 bit big endian&lt;br /&gt;
  0x00000004    OGGPCM_FMT_S24_LE      Signed integer 24 bit little endian&lt;br /&gt;
  0x00000005    OGGPCM_FMT_S24_BE      Signed integer 24 bit big endian&lt;br /&gt;
  0x00000006    OGGPCM_FMT_S32_LE      Signed integer 32 bit little endian&lt;br /&gt;
  0x00000007    OGGPCM_FMT_S32_BE      Signed integer 32 bit big endian&lt;br /&gt;
  --&lt;br /&gt;
  -- Compressed PCM&lt;br /&gt;
  0x00000010    OGGPCM_FMT_ULAW        G.711 u-law encoding (8 bit)&lt;br /&gt;
  0x00000011    OGGPCM_FMT_ALAW        G.711 A-law encoding (8 bit)&lt;br /&gt;
  --&lt;br /&gt;
  -- IEEE Floating point coding&lt;br /&gt;
  0x00000020    OGGPCM_FMT_FLT32_LE    IEEE Float [-1,1] 32 bit little endian&lt;br /&gt;
  0x00000021    OGGPCM_FMT_FLT32_BE    IEEE Float [-1,1] 32 bit big endian&lt;br /&gt;
  0x00000022    OGGPCM_FMT_FLT64_LE    IEEE Float [-1,1] 64 bit little endian&lt;br /&gt;
  0x00000023    OGGPCM_FMT_FLT64_BE    IEEE Float [-1,1] 64 bit big endian&lt;br /&gt;
&lt;br /&gt;
Format IDs below 0x80000000 are reserved for use by Xiph and all the ones above are allowed for application-specific formats.&lt;br /&gt;
&lt;br /&gt;
== Related Links ==&lt;br /&gt;
Short info about AC-3: http://www.mediatwins.com/en/support/kb_topic_11.html&lt;br /&gt;
&lt;br /&gt;
AC-3 spec: http://www.atsc.org/standards/a_52a.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
Note: around p34/140 it appears to be how the channel mapping is encoded.&lt;br /&gt;
&lt;br /&gt;
.wav extended headers for multi channel: http://www.microsoft.com/whdc/device/audio/multichaud.mspx&lt;br /&gt;
&lt;br /&gt;
General surround info: http://www.surroundassociates.com/fqmain.html&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2108</id>
		<title>OggPCM</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2108"/>
		<updated>2005-11-16T10:53:18Z</updated>

		<summary type="html">&lt;p&gt;Erikd: Channel Mapping Header : minor update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page was created as an alternative to the original [[OggPCM]]. The matter is currently a topic of [http://lists.xiph.org/pipermail/ogg-dev/2005-November/thread.html heated debate] and is now being voted on&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Alternate format for OggPCM ==&lt;br /&gt;
&lt;br /&gt;
The following is an alternate format for OggPCM. This is a work in progress and not a final proposal.&lt;br /&gt;
&lt;br /&gt;
Note that unless otherwise noted, all multi-byte fields use the network byte order (big endian). The first packed in a stream MUST be the main header packet. The second packet MUST be the comment packet. Some extra header packets MAY be included after the comment header, provided this is identified in the main header. The packets that follow MUST all be data packets.&lt;br /&gt;
&lt;br /&gt;
=== Main Header Packet ===&lt;br /&gt;
Multibyte fields in the header packets are packed in big endian order, to be consistent with network byte order. A header packet contains the following fields: &lt;br /&gt;
&lt;br /&gt;
 64  &amp;quot;PCM     &amp;quot; Codec identifier&lt;br /&gt;
 16  0x00   Version Major (breaks backwards compatability to increment)&lt;br /&gt;
 16  0x00   Version Minor (backwards compatable, ie, more supported format id&#039;s)&lt;br /&gt;
 32  [uint] PCM format&lt;br /&gt;
 32  [uint] Sampling rate [Hz]&lt;br /&gt;
 8   [uint] Significant bits&lt;br /&gt;
 8   [uint] Number of Channels (&amp;lt; 256)&lt;br /&gt;
 16  [uint] Maximum number of frames per packet&lt;br /&gt;
 32  [uint] Number of extra header packets&lt;br /&gt;
&lt;br /&gt;
A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Codec identifier&amp;quot; is 64 bit long since most other Ogg codecs specify their identifier within the first 64 bits rather than the first 32 bits, so this allows applications to match on all 64 bits consistently.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum number of frames per packet&amp;quot; field is meant to notify an application reading the file that no data packet will contain more than a certain number of frames.  This not only makes implementation easier, but also provides information on how much needs to be buffered when streaming PCM files. A value of 0 means a maximum of 65536 frames. Implementations SHOULD make this field such that packets do not get split into multiple pages.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;significant bits&amp;quot; field specifies how many bits are actually used. The other bits MUST be zero. This can be used to support audio with any resolution. For example, 12-bit PCM can be supported as &amp;quot;16 bit PCM&amp;quot; for the format and 12 for the number of significant bits.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is the same as the bit width specified by the format, the significant bits field may be set to zero.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is less than that specified by the bit width, the data shall be justified to fill the most significant bits. For 12 bit PCM in a 16 bit format, the 12 valid bits will occupy the 12 most significant bits of the 16 bit word and the least significant 4 bits shall be zero.&lt;br /&gt;
&lt;br /&gt;
Since the main header packet and the comment packet are mandatory, the &amp;quot;extra header packets&amp;quot; field counts any additional header packets (aside from these two) that can be provided before the start of the data packets.&lt;br /&gt;
&lt;br /&gt;
=== Comment packet ===&lt;br /&gt;
&lt;br /&gt;
The codec header is followed by a &amp;quot;vorbis comment&amp;quot; packet and by optional extra headers, if any. The format used is the same as for Vorbis with the exception that there is no packet identifier (so the packet is exactly like it is for Speex).&lt;br /&gt;
&lt;br /&gt;
=== Extra Headers (optional) ===&lt;br /&gt;
&lt;br /&gt;
Extra header packets contain additional information about the OggPCM stream. Each extra header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32  [uint] Header ID&lt;br /&gt;
 ...        Header data&lt;br /&gt;
&lt;br /&gt;
Two examples for such optional extra header packets are the channel mapping and the channel conversion header packets.&lt;br /&gt;
&lt;br /&gt;
==== Channel Mapping Header ====&lt;br /&gt;
&lt;br /&gt;
The channel mapping header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32 0x00000000   Header ID&lt;br /&gt;
 16 [uint]   Major version&lt;br /&gt;
 16 [uint]   Minor version&lt;br /&gt;
 32 [uint]   Channel type&lt;br /&gt;
 32xN [uint] Channel map (one for each channel)&lt;br /&gt;
&lt;br /&gt;
All channel_types less than 0x80000000 are reserved for use by Xiph; 0x80000000 and above are allowed for application specific extensions.&lt;br /&gt;
&lt;br /&gt;
This scheme allows for 2^31 -1 Xiph defined channel map types and then each of these can have 2^32 channel names.&lt;br /&gt;
&lt;br /&gt;
As a simple example, stereo might be encoded as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
&lt;br /&gt;
or as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
&lt;br /&gt;
==== Channel Conversion Header ====&lt;br /&gt;
&lt;br /&gt;
Any number of channel conversion headers can be specified. This header specifies how to down-mix the data to another format.&lt;br /&gt;
&lt;br /&gt;
 32 0x00000001 Remixing Header Id&lt;br /&gt;
 16 [uint]     Major version&lt;br /&gt;
 16 [uint]     Minor version&lt;br /&gt;
 32 [uint]     Target Channel type&lt;br /&gt;
 32xMxN [sint] Target Channel (M) x Src Channel (N) Gain array&lt;br /&gt;
&lt;br /&gt;
The ordering of the mixing matrix is such that source channel gains are consecutive. The gain (note: *signed* integer) has the 16 MSBs for the integer part (including sign) and 16 bits for the fracional part of the gain. Note: the gain can be negative.&lt;br /&gt;
&lt;br /&gt;
=== Data Packets ===&lt;br /&gt;
&lt;br /&gt;
Data packets contain the raw PCM audio in interleaved format (complete frames are encoded sequentially) with the following definitions/restrictions:&lt;br /&gt;
&lt;br /&gt;
* A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
* Any OggPCM packet MUST only contain complete frames (ie samples for all channels at a given sampling instance). Partial frames are forbidden.&lt;br /&gt;
* There is no padding allowed in a frame except when some bits (&amp;lt;8) are needed to complete a byte. This means that packet size has a direct relationship to the number of frames in the packet (for purposes of seeking).&lt;br /&gt;
* Recommended packet size is smaller than 4k since interleaving and seeking in Ogg bitstreams is done on the resolution of packets and thus larger packet sizes create suboptimal bitstreams.&lt;br /&gt;
&lt;br /&gt;
=== Supported PCM Formats ===&lt;br /&gt;
&lt;br /&gt;
  Format ID     Short Name             Description&lt;br /&gt;
  -- Integer coding&lt;br /&gt;
  0x00000000    OGGPCM_FMT_S8          Signed integer 8 bit&lt;br /&gt;
  0x00000001    OGGPCM_FMT_U8          Unsigned integer 8 bit&lt;br /&gt;
  0x00000002    OGGPCM_FMT_S16_LE      Signed integer 16 bit little endian&lt;br /&gt;
  0x00000003    OGGPCM_FMT_S16_BE      Signed integer 16 bit big endian&lt;br /&gt;
  0x00000004    OGGPCM_FMT_S24_LE      Signed integer 24 bit little endian&lt;br /&gt;
  0x00000005    OGGPCM_FMT_S24_BE      Signed integer 24 bit big endian&lt;br /&gt;
  0x00000006    OGGPCM_FMT_S32_LE      Signed integer 32 bit little endian&lt;br /&gt;
  0x00000007    OGGPCM_FMT_S32_BE      Signed integer 32 bit big endian&lt;br /&gt;
  --&lt;br /&gt;
  -- Compressed PCM&lt;br /&gt;
  0x00000010    OGGPCM_FMT_ULAW        G.711 u-law encoding (8 bit)&lt;br /&gt;
  0x00000011    OGGPCM_FMT_ALAW        G.711 A-law encoding (8 bit)&lt;br /&gt;
  --&lt;br /&gt;
  -- IEEE Floating point coding&lt;br /&gt;
  0x00000020    OGGPCM_FMT_FLT32_LE    IEEE Float [-1,1] 32 bit little endian&lt;br /&gt;
  0x00000021    OGGPCM_FMT_FLT32_BE    IEEE Float [-1,1] 32 bit big endian&lt;br /&gt;
  0x00000022    OGGPCM_FMT_FLT64_LE    IEEE Float [-1,1] 64 bit little endian&lt;br /&gt;
  0x00000023    OGGPCM_FMT_FLT64_BE    IEEE Float [-1,1] 64 bit big endian&lt;br /&gt;
&lt;br /&gt;
Format IDs below 0x80000000 are reserved for use by Xiph and all the ones above are allowed for application-specific formats.&lt;br /&gt;
&lt;br /&gt;
== Related Links ==&lt;br /&gt;
Short info about AC-3: http://www.mediatwins.com/en/support/kb_topic_11.html&lt;br /&gt;
&lt;br /&gt;
AC-3 spec: http://www.atsc.org/standards/a_52a.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
Note: around p34/140 it appears to be how the channel mapping is encoded.&lt;br /&gt;
&lt;br /&gt;
.wav extended headers for multi channel: http://www.microsoft.com/whdc/device/audio/multichaud.mspx&lt;br /&gt;
&lt;br /&gt;
General surround info: http://www.surroundassociates.com/fqmain.html&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Main_Page&amp;diff=2115</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Main_Page&amp;diff=2115"/>
		<updated>2005-11-16T10:08:30Z</updated>

		<summary type="html">&lt;p&gt;Erikd: Another PCM format -&amp;gt; OggPCM2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projects/Formats =&lt;br /&gt;
&lt;br /&gt;
In an effort to bring open-source ideals to the world of multimedia The Xiph.org Foundation ([[XiphOrg]]) develops a multitude of amazing products. &lt;br /&gt;
&lt;br /&gt;
== Container Formats ==&lt;br /&gt;
&lt;br /&gt;
* [[Ogg]]: Media container. This is our native format and the recommeded container for Xiph codecs.&lt;br /&gt;
* [[OggSkeleton]]: Skeleton information on all logical content bitstreams in Ogg&lt;br /&gt;
&lt;br /&gt;
* [[SpeexRTP]]: RTP payload format for voice&lt;br /&gt;
* [[VorbisRTP]]: RTP payload format for general audio&lt;br /&gt;
* [[TheoraRTP]]: RTP payload format for video&lt;br /&gt;
* [[XSPF]]: XML playlist format&lt;br /&gt;
&lt;br /&gt;
== Codecs ==&lt;br /&gt;
* &#039;&#039;&#039;Compressed Codecs:&#039;&#039;&#039;&lt;br /&gt;
** [[Vorbis]]: Audio codec with a [[Tremor|fixed point decoder]]&lt;br /&gt;
** [[Theora]]: Video codec&lt;br /&gt;
** [[FLAC]]: Free Lossless Audio Codec&lt;br /&gt;
** [[Speex]]: Speech codec&lt;br /&gt;
** [[OggMNG]]: A mapping for encapsulating the MNG animation format in Ogg&lt;br /&gt;
* &#039;&#039;&#039;[[RawCodecs|Uncompressed Codecs]]:&#039;&#039;&#039;&lt;br /&gt;
** Audio:&lt;br /&gt;
*** [[OggPCM]]: Uncompressed PCM audio, primarily as an interchange codec&lt;br /&gt;
*** [[OggPCM2]]: An Alternative Uncompressed PCM audio, under active development&lt;br /&gt;
*** [[OggPCM3|Humorous PCM format]]: Uncompressed PCM audio - and a lot more!&lt;br /&gt;
** Video:&lt;br /&gt;
*** [[OggRGB]]: Uncompressed RGB video, primarily as an interchange codec, under active development &lt;br /&gt;
*** [[OggYUV]]: Uncompressed YUV video, primarily as an interchange codec, under active development&lt;br /&gt;
*** [[OggUVS]]: Uncompressed RGB and YUV video, under active development as an alternative to OggRGB and OggYUV.&lt;br /&gt;
** Text &amp;amp; Hyperlinking:&lt;br /&gt;
*** [[OggWrit]]: Text phrase codec (e.g. subtitles)&lt;br /&gt;
*** [http://annodex.net/TR/draft-pfeiffer-cmml-02.txt CMML]: Continuous Media Markup Language, used for [http://www.annodex.net/ Annodex] and subtitles (xine, vlc, gstreamer, and DirectShow support)&lt;br /&gt;
* &#039;&#039;&#039;Metadata Codecs:&#039;&#039;&#039;&lt;br /&gt;
** [[Metadata]]: Arbitrary metadata stream format (vapourware so far)&lt;br /&gt;
&lt;br /&gt;
== Software for distributing media ==&lt;br /&gt;
&lt;br /&gt;
* [[Icecast]]: Streaming server&lt;br /&gt;
* [[Ices]]: Source client for Icecast servers&lt;br /&gt;
* [[IceShare]]: P2P content distribution&lt;br /&gt;
&lt;br /&gt;
== Other software ==&lt;br /&gt;
&lt;br /&gt;
* [[OggComponent/VorbisComponent]]: Wrappers to integrate Ogg-Vorbis into MacOsX&lt;br /&gt;
&lt;br /&gt;
= Demonstrations =&lt;br /&gt;
&lt;br /&gt;
Want to hear Xiph in action?  These projects are using our codecs, formats, or libraries.&lt;br /&gt;
&lt;br /&gt;
* [[VorbisStreams]]: Stations streaming with the Vorbis codec&lt;br /&gt;
* [[Games that use Vorbis]]: Games using the Vorbis codec for music or sound effects&lt;br /&gt;
* [[VorbisHardware]]: Hardware players using the Vorbis codec&lt;br /&gt;
* [http://www.tversity.com TVersity Media Server]: A UPNP/AV compliant media server that uses the Ogg Vorbis libraries to transcode audio files to the Ogg Vorbis format.&lt;br /&gt;
&lt;br /&gt;
= Project management =&lt;br /&gt;
&lt;br /&gt;
* [[MonthlyMeeting]]&lt;br /&gt;
* [[MailingLists]]&lt;br /&gt;
* [[Bounties]]&lt;br /&gt;
* [[HyperFish]]&lt;br /&gt;
&lt;br /&gt;
= Wiki internal =&lt;br /&gt;
* [[Sandbox]]: Testbed for testing editing skills.&lt;br /&gt;
* [[Translations]]: What about some translation work&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2107</id>
		<title>OggPCM</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2107"/>
		<updated>2005-11-16T09:52:36Z</updated>

		<summary type="html">&lt;p&gt;Erikd: Channel Mapping Header : Fix boundary conditions re 0x80000000.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This page was created as an alternative to the original [[OggPCM]]. The matter is currently a topic of [http://lists.xiph.org/pipermail/ogg-dev/2005-November/thread.html heated debate] and is now being voted on&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Alternate format for OggPCM ==&lt;br /&gt;
&lt;br /&gt;
The following is an alternate format for OggPCM. This is a work in progress and not a final proposal.&lt;br /&gt;
&lt;br /&gt;
Note that unless otherwise noted, all multi-byte fields use the network byte order (big endian). The first packed in a stream MUST be the main header packet. The second packet MUST be the comment packet. Some extra header packets MAY be included after the comment header, provided this is identified in the main header. The packets that follow MUST all be data packets.&lt;br /&gt;
&lt;br /&gt;
=== Main Header Packet ===&lt;br /&gt;
Multibyte fields in the header packets are packed in big endian order, to be consistent with network byte order. A header packet contains the following fields: &lt;br /&gt;
&lt;br /&gt;
 64  &amp;quot;PCM     &amp;quot; Codec identifier&lt;br /&gt;
 16  0x00   Version Major (breaks backwards compatability to increment)&lt;br /&gt;
 16  0x00   Version Minor (backwards compatable, ie, more supported format id&#039;s)&lt;br /&gt;
 32  [uint] PCM format&lt;br /&gt;
 32  [uint] Sampling rate [Hz]&lt;br /&gt;
 8   [uint] Significant bits&lt;br /&gt;
 8   [uint] Number of Channels (&amp;lt; 256)&lt;br /&gt;
 16  [uint] Maximum number of frames per packet&lt;br /&gt;
 32  [uint] Number of extra header packets&lt;br /&gt;
&lt;br /&gt;
A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Codec identifier&amp;quot; is 64 bit long since most other Ogg codecs specify their identifier within the first 64 bits rather than the first 32 bits, so this allows applications to match on all 64 bits consistently.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum number of frames per packet&amp;quot; field is meant to notify an application reading the file that no data packet will contain more than a certain number of frames.  This not only makes implementation easier, but also provides information on how much needs to be buffered when streaming PCM files. A value of 0 means a maximum of 65536 frames. Implementations SHOULD make this field such that packets do not get split into multiple pages.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;significant bits&amp;quot; field specifies how many bits are actually used. The other bits MUST be zero. This can be used to support audio with any resolution. For example, 12-bit PCM can be supported as &amp;quot;16 bit PCM&amp;quot; for the format and 12 for the number of significant bits.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is the same as the bit width specified by the format, the significant bits field may be set to zero.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is less than that specified by the bit width, the data shall be justified to fill the most significant bits. For 12 bit PCM in a 16 bit format, the 12 valid bits will occupy the 12 most significant bits of the 16 bit word and the least significant 4 bits shall be zero.&lt;br /&gt;
&lt;br /&gt;
Since the main header packet and the comment packet are mandatory, the &amp;quot;extra header packets&amp;quot; field counts any additional header packets (aside from these two) that can be provided before the start of the data packets.&lt;br /&gt;
&lt;br /&gt;
=== Comment packet ===&lt;br /&gt;
&lt;br /&gt;
The codec header is followed by a &amp;quot;vorbis comment&amp;quot; packet and by optional extra headers, if any. The format used is the same as for Vorbis with the exception that there is no packet identifier (so the packet is exactly like it is for Speex).&lt;br /&gt;
&lt;br /&gt;
=== Extra Headers (optional) ===&lt;br /&gt;
&lt;br /&gt;
Extra header packets contain additional information about the OggPCM stream. Each extra header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32  [uint] Header ID&lt;br /&gt;
 ...        Header data&lt;br /&gt;
&lt;br /&gt;
Two examples for such optional extra header packets are the channel mapping and the channel conversion header packets.&lt;br /&gt;
&lt;br /&gt;
==== Channel Mapping Header ====&lt;br /&gt;
&lt;br /&gt;
The channel mapping header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32 0x00000000   Header ID&lt;br /&gt;
 16 [uint]   Major version&lt;br /&gt;
 16 [uint]   Minor version&lt;br /&gt;
 32 [uint]   Channel type&lt;br /&gt;
 32xN [uint] Channel map (one for each channel)&lt;br /&gt;
&lt;br /&gt;
As an example, stereo might be encoded as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
&lt;br /&gt;
or as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
&lt;br /&gt;
All channel_types less than 0x80000000 are reserved for use by Xiph; 0x80000000 and above are allowed for application specific extensions.&lt;br /&gt;
&lt;br /&gt;
==== Channel Conversion Header ====&lt;br /&gt;
&lt;br /&gt;
Any number of channel conversion headers can be specified. This header specifies how to down-mix the data to another format.&lt;br /&gt;
&lt;br /&gt;
 32 0x00000001 Remixing Header Id&lt;br /&gt;
 16 [uint]     Major version&lt;br /&gt;
 16 [uint]     Minor version&lt;br /&gt;
 32 [uint]     Target Channel type&lt;br /&gt;
 32xMxN [sint] Target Channel (M) x Src Channel (N) Gain array&lt;br /&gt;
&lt;br /&gt;
The ordering of the mixing matrix is such that source channel gains are consecutive. The gain (note: *signed* integer) has the 16 MSBs for the integer part (including sign) and 16 bits for the fracional part of the gain. Note: the gain can be negative.&lt;br /&gt;
&lt;br /&gt;
=== Data Packets ===&lt;br /&gt;
&lt;br /&gt;
Data packets contain the raw PCM audio in interleaved format (complete frames are encoded sequentially) with the following definitions/restrictions:&lt;br /&gt;
&lt;br /&gt;
* A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
* Any OggPCM packet MUST only contain complete frames (ie samples for all channels at a given sampling instance). Partial frames are forbidden.&lt;br /&gt;
* There is no padding allowed in a frame except when some bits (&amp;lt;8) are needed to complete a byte. This means that packet size has a direct relationship to the number of frames in the packet (for purposes of seeking).&lt;br /&gt;
* Recommended packet size is smaller than 4k since interleaving and seeking in Ogg bitstreams is done on the resolution of packets and thus larger packet sizes create suboptimal bitstreams.&lt;br /&gt;
&lt;br /&gt;
=== Supported PCM Formats ===&lt;br /&gt;
&lt;br /&gt;
  Format ID     Short Name             Description&lt;br /&gt;
  -- Integer coding&lt;br /&gt;
  0x00000000    OGGPCM_FMT_S8          Signed integer 8 bit&lt;br /&gt;
  0x00000001    OGGPCM_FMT_U8          Unsigned integer 8 bit&lt;br /&gt;
  0x00000002    OGGPCM_FMT_S16_LE      Signed integer 16 bit little endian&lt;br /&gt;
  0x00000003    OGGPCM_FMT_S16_BE      Signed integer 16 bit big endian&lt;br /&gt;
  0x00000004    OGGPCM_FMT_S24_LE      Signed integer 24 bit little endian&lt;br /&gt;
  0x00000005    OGGPCM_FMT_S24_BE      Signed integer 24 bit big endian&lt;br /&gt;
  0x00000006    OGGPCM_FMT_S32_LE      Signed integer 32 bit little endian&lt;br /&gt;
  0x00000007    OGGPCM_FMT_S32_BE      Signed integer 32 bit big endian&lt;br /&gt;
  --&lt;br /&gt;
  -- Compressed PCM&lt;br /&gt;
  0x00000010    OGGPCM_FMT_ULAW        G.711 u-law encoding (8 bit)&lt;br /&gt;
  0x00000011    OGGPCM_FMT_ALAW        G.711 A-law encoding (8 bit)&lt;br /&gt;
  --&lt;br /&gt;
  -- IEEE Floating point coding&lt;br /&gt;
  0x00000020    OGGPCM_FMT_FLT32_LE    IEEE Float [-1,1] 32 bit little endian&lt;br /&gt;
  0x00000021    OGGPCM_FMT_FLT32_BE    IEEE Float [-1,1] 32 bit big endian&lt;br /&gt;
  0x00000022    OGGPCM_FMT_FLT64_LE    IEEE Float [-1,1] 64 bit little endian&lt;br /&gt;
  0x00000023    OGGPCM_FMT_FLT64_BE    IEEE Float [-1,1] 64 bit big endian&lt;br /&gt;
&lt;br /&gt;
Format IDs below 0x80000000 are reserved for use by Xiph and all the ones above are allowed for application-specific formats.&lt;br /&gt;
&lt;br /&gt;
== Related Links ==&lt;br /&gt;
Short info about AC-3: http://www.mediatwins.com/en/support/kb_topic_11.html&lt;br /&gt;
&lt;br /&gt;
AC-3 spec: http://www.atsc.org/standards/a_52a.pdf &amp;lt;br&amp;gt;&lt;br /&gt;
Note: around p34/140 it appears to be how the channel mapping is encoded.&lt;br /&gt;
&lt;br /&gt;
.wav extended headers for multi channel: http://www.microsoft.com/whdc/device/audio/multichaud.mspx&lt;br /&gt;
&lt;br /&gt;
General surround info: http://www.surroundassociates.com/fqmain.html&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2059</id>
		<title>OggPCM</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2059"/>
		<updated>2005-11-14T16:23:48Z</updated>

		<summary type="html">&lt;p&gt;Erikd: Tweak justified bits explanation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alternate format for OggPCM ==&lt;br /&gt;
&lt;br /&gt;
The following is an alternate format for OggPCM. This is a work in progress and not a final proposal.&lt;br /&gt;
&lt;br /&gt;
Note that unless otherwise noted, all multi-byte fields use the network byte order (big endian). The first packed in a stream MUST be the main header packet. The second packet MUST be the comment packet. Some extra header packets MAY be included after the comment header, provided this is identified in the main header. The packets that follow MUST all be data packets.&lt;br /&gt;
&lt;br /&gt;
=== Main Header Packet ===&lt;br /&gt;
Multibyte fields in the header packets are packed in big endian order, to be consistent with network byte order. A header packet contains the following fields: &lt;br /&gt;
&lt;br /&gt;
 32  &amp;quot;PCM &amp;quot; Codec identifier &lt;br /&gt;
 16  0x00   Version Major (breaks backwards compatability to increment)&lt;br /&gt;
 16  0x00   Version Minor (backwards compatable, ie, more supported format id&#039;s)&lt;br /&gt;
 32  [uint] PCM format&lt;br /&gt;
 32  [uint] Significant bits&lt;br /&gt;
 32  [uint] Sampling rate&lt;br /&gt;
 32  [uint] Number of Channels (&amp;lt; 256)&lt;br /&gt;
 16  [uint] Maximum number of frames per packet&lt;br /&gt;
 16  [uint] Number of extra headers&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum number of frames per packet&amp;quot; field is meant to notify an application reading the file that no data packet will contain more than a certain number of frames. This not only makes implementation easier, but also provides information on how much needs to be buffered when streaming PCM files. A value of 0 means a maximum of 65536 frames. Implementations SHOULD make this field such that packets do not get split into multiple pages.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;significant bits&amp;quot; field specifies how many bits are actually used. The other bits MUST be zero. This can be used to support audio with any resolution. For example, 12-bit PCM can be supported as &amp;quot;16 bit PCM&amp;quot; for the format and 12 for the number of significant bits.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is the same as the bit width specified by the format, the significant bits field may be set to zero.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is less than that specified by the bit width, the data shall be justified to fill the most significant bits. For 12 bit PCM in a 16 bit format, the 12 valid bits will occupy the 12 most significant bits of the 16 bit word and the least significant 4 bits shall be zero.&lt;br /&gt;
&lt;br /&gt;
=== Comment packet ===&lt;br /&gt;
&lt;br /&gt;
The codec header is followed by a &amp;quot;vorbis comment&amp;quot; packet and by optional extra headers, if any. The format used is the same as for Vorbis with the exception that there is no packet identifier (so the packet is exactly like it is for Speex).&lt;br /&gt;
&lt;br /&gt;
=== Extra Headers (optional) ===&lt;br /&gt;
&lt;br /&gt;
Extra headers contain additional information about the OggPCM stream. Each extra header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32  [uint] Header ID&lt;br /&gt;
 ...        Header data&lt;br /&gt;
&lt;br /&gt;
==== Channel Mapping Header ====&lt;br /&gt;
&lt;br /&gt;
The channel mapping header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32 0x00000000   Header ID&lt;br /&gt;
 16 [uint]   Major version&lt;br /&gt;
 16 [uint]   Minor version&lt;br /&gt;
 32 [uint]   Channel type&lt;br /&gt;
 32xN [uint] Channel map (one for each channel)&lt;br /&gt;
&lt;br /&gt;
As an example, stereo might be encoded as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
&lt;br /&gt;
or as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
&lt;br /&gt;
All channel_types less than 0x80000000 are reserved for use by Xiph and all the ones above are allowed for application specific extensions.&lt;br /&gt;
&lt;br /&gt;
==== Channel Conversion Header ====&lt;br /&gt;
&lt;br /&gt;
Any number of channel conversion headers can be specified. This header specifies how to down-mix the data to another format.&lt;br /&gt;
&lt;br /&gt;
 32 0x00000001 Remixing Header Id&lt;br /&gt;
 16 [uint]     Major version&lt;br /&gt;
 16 [uint]     Minor version&lt;br /&gt;
 32 [uint]     Target Channel type&lt;br /&gt;
 32xMxN [sint] Target Channel (M) x Src Channel (N) Gain array&lt;br /&gt;
&lt;br /&gt;
The ordering of the mixing matrix is such that source channel gains are consecutive. The gain (note: *signed* integer) has the 16 MSBs for the integer part (including sign) and 16 bits for the fracional part of the gain. Note: the gain can be negative.&lt;br /&gt;
&lt;br /&gt;
=== Data Packets ===&lt;br /&gt;
&lt;br /&gt;
Data packets contain the raw PCM audio in interleaved format (complete frames are encoded sequentially) with the following definitions/restrictions:&lt;br /&gt;
&lt;br /&gt;
* A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
* Any OggPCM packet should only contain complete frames (ie samples for all channels at a given sampling instance). Partial frames are forbidden.&lt;br /&gt;
* There is no padding allowed in a frame except when some bits (&amp;lt;8) are needed to complete a byte. This means that packet size has a direct relationship to the number of frames in the packet (for purposes of seeking).&lt;br /&gt;
&lt;br /&gt;
=== Supported PCM Formats ===&lt;br /&gt;
&lt;br /&gt;
 Format ID  Short Name             Description&lt;br /&gt;
  -- Integer coding&lt;br /&gt;
  0x00000000    OGGPCM_FMT_S8          Signed integer 8 bit&lt;br /&gt;
  0x00000001    OGGPCM_FMT_U8          Unsigned integer 8 bit&lt;br /&gt;
  0x00000002    OGGPCM_FMT_S16_LE      Signed integer 16 bit little endian&lt;br /&gt;
  0x00000003    OGGPCM_FMT_S16_BE      Signed integer 16 bit big endian&lt;br /&gt;
  0x00000004    OGGPCM_FMT_S24_LE      Signed integer 24 bit little endian&lt;br /&gt;
  0x00000005    OGGPCM_FMT_S24_BE      Signed integer 24 bit big endian&lt;br /&gt;
  0x00000006    OGGPCM_FMT_S32_LE      Signed integer 32 bit little endian&lt;br /&gt;
  0x00000007    OGGPCM_FMT_S32_BE      Signed integer 32 bit big endian&lt;br /&gt;
  --&lt;br /&gt;
  -- Compressed PCM&lt;br /&gt;
  0x00000008    OGGPCM_FMT_ULAW        G.711 u-law encoding (8 bit)&lt;br /&gt;
  0x00000009    OGGPCM_FMT_ALAW        G.711 A-law encoding (8 bit)&lt;br /&gt;
  0x0000000A    OGGPCM_FMT_ULAW12      Wideband u-law encoding (12 bit)&lt;br /&gt;
  0x0000000B    OGGPCM_FMT_ALAW12      Wideband A-law encoding (12 bit)&lt;br /&gt;
  --&lt;br /&gt;
  -- IEEE Floating point coding&lt;br /&gt;
  0x00000010    OGGPCM_FMT_FLT32_LE    IEEE Float [-1,1] 32 bit little endian&lt;br /&gt;
  0x00000011    OGGPCM_FMT_FLT32_BE    IEEE Float [-1,1] 32 bit big endian&lt;br /&gt;
  0x00000012    OGGPCM_FMT_FLT64_LE    IEEE Float [-1,1] 64 bit little endian&lt;br /&gt;
  0x00000013    OGGPCM_FMT_FLT64_BE    IEEE Float [-1,1] 64 bit big endian&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2058</id>
		<title>OggPCM</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2058"/>
		<updated>2005-11-14T16:03:21Z</updated>

		<summary type="html">&lt;p&gt;Erikd: Justify to most significant bits.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alternate format for OggPCM ==&lt;br /&gt;
&lt;br /&gt;
The following is an alternate format for OggPCM. This is a work in progress and not a final proposal.&lt;br /&gt;
&lt;br /&gt;
Note that unless otherwise noted, all multi-byte fields use the network byte order (big endian). The first packed in a stream MUST be the main header packet. The second packet MUST be the comment packet. Some extra header packets MAY be included after the comment header, provided this is identified in the main header. The packets that follow MUST all be data packets.&lt;br /&gt;
&lt;br /&gt;
=== Main Header Packet ===&lt;br /&gt;
Multibyte fields in the header packets are packed in big endian order, to be consistent with network byte order. A header packet contains the following fields: &lt;br /&gt;
&lt;br /&gt;
 32  &amp;quot;PCM &amp;quot; Codec identifier &lt;br /&gt;
 16  0x00   Version Major (breaks backwards compatability to increment)&lt;br /&gt;
 16  0x00   Version Minor (backwards compatable, ie, more supported format id&#039;s)&lt;br /&gt;
 32  [uint] PCM format&lt;br /&gt;
 32  [uint] Significant bits&lt;br /&gt;
 32  [uint] Sampling rate&lt;br /&gt;
 32  [uint] Number of Channels (&amp;lt; 256)&lt;br /&gt;
 16  [uint] Maximum number of frames per packet&lt;br /&gt;
 16  [uint] Number of extra headers&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum number of frames per packet&amp;quot; field is meant to notify an application reading the file that no data packet will contain more than a certain number of frames. This not only makes implementation easier, but also provides information on how much needs to be buffered when streaming PCM files. A value of 0 means a maximum of 65536 frames. Implementations SHOULD make this field such that packets do not get split into multiple pages.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;significant bits&amp;quot; field specifies how many bits are actually used. The other bits MUST be zero. This can be used to support audio with any resolution. For example, 12-bit PCM can be supported as &amp;quot;16 bit PCM&amp;quot; for the format and 12 for the number of significant bits.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is the same as the bit width specified by the format, the significant bits field may be set to zero.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is less than the bit width, the signifcant bits shall be justified to fill the most significant bits.&lt;br /&gt;
&lt;br /&gt;
=== Comment packet ===&lt;br /&gt;
&lt;br /&gt;
The codec header is followed by a &amp;quot;vorbis comment&amp;quot; packet and by optional extra headers, if any. The format used is the same as for Vorbis with the exception that there is no packet identifier (so the packet is exactly like it is for Speex).&lt;br /&gt;
&lt;br /&gt;
=== Extra Headers (optional) ===&lt;br /&gt;
&lt;br /&gt;
Extra headers contain additional information about the OggPCM stream. Each extra header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32  [uint] Header ID&lt;br /&gt;
 ...        Header data&lt;br /&gt;
&lt;br /&gt;
==== Channel Mapping Header ====&lt;br /&gt;
&lt;br /&gt;
The channel mapping header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32 0x00000000   Header ID&lt;br /&gt;
 16 [uint]   Major version&lt;br /&gt;
 16 [uint]   Minor version&lt;br /&gt;
 32 [uint]   Channel type&lt;br /&gt;
 32xN [uint] Channel map (one for each channel)&lt;br /&gt;
&lt;br /&gt;
As an example, stereo might be encoded as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
&lt;br /&gt;
or as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
&lt;br /&gt;
All channel_types less than 0x80000000 are reserved for use by Xiph and all the ones above are allowed for application specific extensions.&lt;br /&gt;
&lt;br /&gt;
==== Channel Conversion Header ====&lt;br /&gt;
&lt;br /&gt;
Any number of channel conversion headers can be specified. This header specifies how to down-mix the data to another format.&lt;br /&gt;
&lt;br /&gt;
 32 0x00000001 Remixing Header Id&lt;br /&gt;
 16 [uint]     Major version&lt;br /&gt;
 16 [uint]     Minor version&lt;br /&gt;
 32 [uint]     Target Channel type&lt;br /&gt;
 32xMxN [sint] Target Channel (M) x Src Channel (N) Gain array&lt;br /&gt;
&lt;br /&gt;
The ordering of the mixing matrix is such that source channel gains are consecutive. The gain (note: *signed* integer) has the 16 MSBs for the integer part (including sign) and 16 bits for the fracional part of the gain. Note: the gain can be negative.&lt;br /&gt;
&lt;br /&gt;
=== Data Packets ===&lt;br /&gt;
&lt;br /&gt;
Data packets contain the raw PCM audio in interleaved format (complete frames are encoded sequentially) with the following definitions/restrictions:&lt;br /&gt;
&lt;br /&gt;
* A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
* Any OggPCM packet should only contain complete frames (ie samples for all channels at a given sampling instance). Partial frames are forbidden.&lt;br /&gt;
* There is no padding allowed in a frame except when some bits (&amp;lt;8) are needed to complete a byte. This means that packet size has a direct relationship to the number of frames in the packet (for purposes of seeking).&lt;br /&gt;
&lt;br /&gt;
=== Supported PCM Formats ===&lt;br /&gt;
&lt;br /&gt;
 Format ID  Short Name             Description&lt;br /&gt;
  -- Integer coding&lt;br /&gt;
  0x00000000    OGGPCM_FMT_S8          Signed integer 8 bit&lt;br /&gt;
  0x00000001    OGGPCM_FMT_U8          Unsigned integer 8 bit&lt;br /&gt;
  0x00000002    OGGPCM_FMT_S16_LE      Signed integer 16 bit little endian&lt;br /&gt;
  0x00000003    OGGPCM_FMT_S16_BE      Signed integer 16 bit big endian&lt;br /&gt;
  0x00000004    OGGPCM_FMT_S24_LE      Signed integer 24 bit little endian&lt;br /&gt;
  0x00000005    OGGPCM_FMT_S24_BE      Signed integer 24 bit big endian&lt;br /&gt;
  0x00000006    OGGPCM_FMT_S32_LE      Signed integer 32 bit little endian&lt;br /&gt;
  0x00000007    OGGPCM_FMT_S32_BE      Signed integer 32 bit big endian&lt;br /&gt;
  --&lt;br /&gt;
  -- Compressed PCM&lt;br /&gt;
  0x00000008    OGGPCM_FMT_ULAW        G.711 u-law encoding (8 bit)&lt;br /&gt;
  0x00000009    OGGPCM_FMT_ALAW        G.711 A-law encoding (8 bit)&lt;br /&gt;
  0x0000000A    OGGPCM_FMT_ULAW12      Wideband u-law encoding (12 bit)&lt;br /&gt;
  0x0000000B    OGGPCM_FMT_ALAW12      Wideband A-law encoding (12 bit)&lt;br /&gt;
  --&lt;br /&gt;
  -- IEEE Floating point coding&lt;br /&gt;
  0x00000010    OGGPCM_FMT_FLT32_LE    IEEE Float [-1,1] 32 bit little endian&lt;br /&gt;
  0x00000011    OGGPCM_FMT_FLT32_BE    IEEE Float [-1,1] 32 bit big endian&lt;br /&gt;
  0x00000012    OGGPCM_FMT_FLT64_LE    IEEE Float [-1,1] 64 bit little endian&lt;br /&gt;
  0x00000013    OGGPCM_FMT_FLT64_BE    IEEE Float [-1,1] 64 bit big endian&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2057</id>
		<title>OggPCM</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=OggPCM&amp;diff=2057"/>
		<updated>2005-11-14T15:58:42Z</updated>

		<summary type="html">&lt;p&gt;Erikd: Significant bits == 0 means all bits significant.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Alternate format for OggPCM ==&lt;br /&gt;
&lt;br /&gt;
The following is an alternate format for OggPCM. This is a work in progress and not a final proposal.&lt;br /&gt;
&lt;br /&gt;
Note that unless otherwise noted, all multi-byte fields use the network byte order (big endian). The first packed in a stream MUST be the main header packet. The second packet MUST be the comment packet. Some extra header packets MAY be included after the comment header, provided this is identified in the main header. The packets that follow MUST all be data packets.&lt;br /&gt;
&lt;br /&gt;
=== Main Header Packet ===&lt;br /&gt;
Multibyte fields in the header packets are packed in big endian order, to be consistent with network byte order. A header packet contains the following fields: &lt;br /&gt;
&lt;br /&gt;
 32  &amp;quot;PCM &amp;quot; Codec identifier &lt;br /&gt;
 16  0x00   Version Major (breaks backwards compatability to increment)&lt;br /&gt;
 16  0x00   Version Minor (backwards compatable, ie, more supported format id&#039;s)&lt;br /&gt;
 32  [uint] PCM format&lt;br /&gt;
 32  [uint] Significant bits&lt;br /&gt;
 32  [uint] Sampling rate&lt;br /&gt;
 32  [uint] Number of Channels (&amp;lt; 256)&lt;br /&gt;
 16  [uint] Maximum number of frames per packet&lt;br /&gt;
 16  [uint] Number of extra headers&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Maximum number of frames per packet&amp;quot; field is meant to notify an application reading the file that no data packet will contain more than a certain number of frames. This not only makes implementation easier, but also provides information on how much needs to be buffered when streaming PCM files. A value of 0 means a maximum of 65536 frames. Implementations SHOULD make this field such that packets do not get split into multiple pages.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;significant bits&amp;quot; field specifies how many bits are actually used. The other bits MUST be zero. This can be used to support audio with any resolution. For example, 12-bit PCM can be supported as &amp;quot;16 bit PCM&amp;quot; for the format and 12 for the number of significant bits.&lt;br /&gt;
&lt;br /&gt;
For streams where the number of significant bits is the same as the bit width specified by the format, the significant bits field may be set to zero.&lt;br /&gt;
&lt;br /&gt;
=== Comment packet ===&lt;br /&gt;
&lt;br /&gt;
The codec header is followed by a &amp;quot;vorbis comment&amp;quot; packet and by optional extra headers, if any. The format used is the same as for Vorbis with the exception that there is no packet identifier (so the packet is exactly like it is for Speex).&lt;br /&gt;
&lt;br /&gt;
=== Extra Headers (optional) ===&lt;br /&gt;
&lt;br /&gt;
Extra headers contain additional information about the OggPCM stream. Each extra header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32  [uint] Header ID&lt;br /&gt;
 ...        Header data&lt;br /&gt;
&lt;br /&gt;
==== Channel Mapping Header ====&lt;br /&gt;
&lt;br /&gt;
The channel mapping header is defined as:&lt;br /&gt;
&lt;br /&gt;
 32 0x00000000   Header ID&lt;br /&gt;
 16 [uint]   Major version&lt;br /&gt;
 16 [uint]   Minor version&lt;br /&gt;
 32 [uint]   Channel type&lt;br /&gt;
 32xN [uint] Channel map (one for each channel)&lt;br /&gt;
&lt;br /&gt;
As an example, stereo might be encoded as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
&lt;br /&gt;
or as:&lt;br /&gt;
&lt;br /&gt;
 channel_type = OGG_CHANNEL_MAP_STEREO&lt;br /&gt;
 channel_map [0] = OGG_CHANNEL_STEREO_RIGHT&lt;br /&gt;
 channel_map [1] = OGG_CHANNEL_STEREO_LEFT&lt;br /&gt;
&lt;br /&gt;
All channel_types less than 0x80000000 are reserved for use by Xiph and all the ones above are allowed for application specific extensions.&lt;br /&gt;
&lt;br /&gt;
==== Channel Conversion Header ====&lt;br /&gt;
&lt;br /&gt;
Any number of channel conversion headers can be specified. This header specifies how to down-mix the data to another format.&lt;br /&gt;
&lt;br /&gt;
 32 0x00000001 Remixing Header Id&lt;br /&gt;
 16 [uint]     Major version&lt;br /&gt;
 16 [uint]     Minor version&lt;br /&gt;
 32 [uint]     Target Channel type&lt;br /&gt;
 32xMxN [sint] Target Channel (M) x Src Channel (N) Gain array&lt;br /&gt;
&lt;br /&gt;
The ordering of the mixing matrix is such that source channel gains are consecutive. The gain (note: *signed* integer) has the 16 MSBs for the integer part (including sign) and 16 bits for the fracional part of the gain. Note: the gain can be negative.&lt;br /&gt;
&lt;br /&gt;
=== Data Packets ===&lt;br /&gt;
&lt;br /&gt;
Data packets contain the raw PCM audio in interleaved format (complete frames are encoded sequentially) with the following definitions/restrictions:&lt;br /&gt;
&lt;br /&gt;
* A PCM &amp;quot;frame&amp;quot; is composed of samples for all channels at a given time.&lt;br /&gt;
* Any OggPCM packet should only contain complete frames (ie samples for all channels at a given sampling instance). Partial frames are forbidden.&lt;br /&gt;
* There is no padding allowed in a frame except when some bits (&amp;lt;8) are needed to complete a byte. This means that packet size has a direct relationship to the number of frames in the packet (for purposes of seeking).&lt;br /&gt;
&lt;br /&gt;
=== Supported PCM Formats ===&lt;br /&gt;
&lt;br /&gt;
 Format ID  Short Name             Description&lt;br /&gt;
  -- Integer coding&lt;br /&gt;
  0x00000000    OGGPCM_FMT_S8          Signed integer 8 bit&lt;br /&gt;
  0x00000001    OGGPCM_FMT_U8          Unsigned integer 8 bit&lt;br /&gt;
  0x00000002    OGGPCM_FMT_S16_LE      Signed integer 16 bit little endian&lt;br /&gt;
  0x00000003    OGGPCM_FMT_S16_BE      Signed integer 16 bit big endian&lt;br /&gt;
  0x00000004    OGGPCM_FMT_S24_LE      Signed integer 24 bit little endian&lt;br /&gt;
  0x00000005    OGGPCM_FMT_S24_BE      Signed integer 24 bit big endian&lt;br /&gt;
  0x00000006    OGGPCM_FMT_S32_LE      Signed integer 32 bit little endian&lt;br /&gt;
  0x00000007    OGGPCM_FMT_S32_BE      Signed integer 32 bit big endian&lt;br /&gt;
  --&lt;br /&gt;
  -- Compressed PCM&lt;br /&gt;
  0x00000008    OGGPCM_FMT_ULAW        G.711 u-law encoding (8 bit)&lt;br /&gt;
  0x00000009    OGGPCM_FMT_ALAW        G.711 A-law encoding (8 bit)&lt;br /&gt;
  0x0000000A    OGGPCM_FMT_ULAW12      Wideband u-law encoding (12 bit)&lt;br /&gt;
  0x0000000B    OGGPCM_FMT_ALAW12      Wideband A-law encoding (12 bit)&lt;br /&gt;
  --&lt;br /&gt;
  -- IEEE Floating point coding&lt;br /&gt;
  0x00000010    OGGPCM_FMT_FLT32_LE    IEEE Float [-1,1] 32 bit little endian&lt;br /&gt;
  0x00000011    OGGPCM_FMT_FLT32_BE    IEEE Float [-1,1] 32 bit big endian&lt;br /&gt;
  0x00000012    OGGPCM_FMT_FLT64_LE    IEEE Float [-1,1] 64 bit little endian&lt;br /&gt;
  0x00000013    OGGPCM_FMT_FLT64_BE    IEEE Float [-1,1] 64 bit big endian&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1979</id>
		<title>Talk:OggPCM Draft1</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1979"/>
		<updated>2005-11-10T08:08:48Z</updated>

		<summary type="html">&lt;p&gt;Erikd: /* Do we want/need the 32-bit data packet header? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Do we need signed/unsigned data flag? ===&lt;br /&gt;
&lt;br /&gt;
* 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&#039;t hurt to support it.  Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* I don&#039;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&#039;s fixed then a few packages will always have to modify the data, and most will never get it wrong. If it&#039;s variable then every package will have to do something sometimes, or fail occasionally. &lt;br /&gt;
--[[User:Gumboot|Gumboot]] 01:28, 8 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I see no reason to support any unsigned PCM format other than 8 bit. For instance, I know of no container format which supports unsigned 16 bit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to record int/float data flag? ===&lt;br /&gt;
&lt;br /&gt;
* Some codecs (Vorbis) use floating point samples natively.  Others only support int.  Support for int/float data flag is thus important. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* Please don&#039;t make determination of the data format depend on multiple fields. Instead use an enumeration so that something like little endian 16 bit PCM can be specifed as OGG_PCM_LE_PCM_16 and big endian 16 bit doubles can be specified as OGG_PCM_BE_FLOAT_64. This scheme is far more transparent and self documenting. If the format field is 8 bits, this scheme supports 256 formats; if its 16 bit it will support 65536 formats.&lt;br /&gt;
&lt;br /&gt;
I also suggest leaving the format associated with a value of zero as an invalid format.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to offer endian data flag?  If not, which is used? ===&lt;br /&gt;
&lt;br /&gt;
* LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it.  It&#039;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&#039;t even an issue. Supporting both is possible, too, but adds complexity to a format intended to be &#039;&#039;simple&#039;&#039;. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* We should just standardize on little endian ordering for the data. It&#039;s commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV&#039;s will already know how to support it. &lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I agree that we should use little endian as standard, however, I&#039;m questioning if big endian should be supported as well... after all, it&#039;d be trivial for a plugin to convert from one to another.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Big and little endian data formats should both be supported with equal status. There should not even be a default; the endian-ness should be explicit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Is it worth supporting a vorbiscomment header? ===&lt;br /&gt;
&lt;br /&gt;
* It&#039;d be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information.  Besides, if you don&#039;t put it in then five other people will do it five different ways. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float? ===&lt;br /&gt;
* One doesn&#039;t. Standardize on IEEE floats and be done with it. Simple, remember? :)&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I&#039;m uncertain exactly what this question is.  Hopefully the submitter can clarify? &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Many file formats (WAV, AIFF, AU and others) support 64 bit float data. WAV stores floats as little endian data and AIFF stores if as big endian data. OggPCM should support both 32 and 64 bit floats of both endian-nesses (is that a word?). I don&#039;t know of any other floating point format that needs consideration.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Are samples padded to some round number of bits? ===&lt;br /&gt;
* I don&#039;t know of any PCM formats for non-octet based samples, but if you want to specify something, I&#039;d say pack them into the MSB&#039;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.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* The occurrence of N bit PCM where N is not a multiple of 8 bits is so rare that it should probably be ignored. In addition, there really isn&#039;t any reason to treat 10 bit data packed into the 10 most significant bits of a 16 bit int any different from a real 16 bit value. So why make any distinction?&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
== Do we want/need the 32-bit data packet header? ==&lt;br /&gt;
* 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]]&lt;br /&gt;
&lt;br /&gt;
* I can definitely see people wanting to use comment pages, so I&#039;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&#039;ll get a buffer aligned to a word boundary, in which case having the header has no penalty.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* 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&#039;re really worried about, we could always add 4 bytes, but I really don&#039;t think it should be necessary.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* On UltraSparc and Alpha CPUs (both 64 bit) accessing a 64 bit double at an address that is not 8 byte aligned causes a segmentation fault. However, accessing unaligned doubles on x86 (ie 32 bit) is slower than accessing aligned doubles. You might want to consider this.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=User:Erikd&amp;diff=2215</id>
		<title>User:Erikd</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=User:Erikd&amp;diff=2215"/>
		<updated>2005-11-10T02:59:03Z</updated>

		<summary type="html">&lt;p&gt;Erikd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I&#039;m the main author and maintainer of libsndfile [[http://www.mega-nerd.com/libsndfile/]].&lt;br /&gt;
&lt;br /&gt;
I&#039;m hoping to help out on the specification of [[OggPCM]].&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1976</id>
		<title>Talk:OggPCM Draft1</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1976"/>
		<updated>2005-11-10T02:55:44Z</updated>

		<summary type="html">&lt;p&gt;Erikd: /* Are samples padded to some round number of bits? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Do we need signed/unsigned data flag? ===&lt;br /&gt;
&lt;br /&gt;
* 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&#039;t hurt to support it.  Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* I don&#039;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&#039;s fixed then a few packages will always have to modify the data, and most will never get it wrong. If it&#039;s variable then every package will have to do something sometimes, or fail occasionally. &lt;br /&gt;
--[[User:Gumboot|Gumboot]] 01:28, 8 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I see no reason to support any unsigned PCM format other than 8 bit. For instance, I know of no container format which supports unsigned 16 bit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to record int/float data flag? ===&lt;br /&gt;
&lt;br /&gt;
* Some codecs (Vorbis) use floating point samples natively.  Others only support int.  Support for int/float data flag is thus important. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* Please don&#039;t make determination of the data format depend on multiple fields. Instead use an enumeration so that something like little endian 16 bit PCM can be specifed as OGG_PCM_LE_PCM_16 and big endian 16 bit doubles can be specified as OGG_PCM_BE_FLOAT_64. This scheme is far more transparent and self documenting. If the format field is 8 bits, this scheme supports 256 formats; if its 16 bit it will support 65536 formats.&lt;br /&gt;
&lt;br /&gt;
I also suggest leaving the format associated with a value of zero as an invalid format.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to offer endian data flag?  If not, which is used? ===&lt;br /&gt;
&lt;br /&gt;
* LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it.  It&#039;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&#039;t even an issue. Supporting both is possible, too, but adds complexity to a format intended to be &#039;&#039;simple&#039;&#039;. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* We should just standardize on little endian ordering for the data. It&#039;s commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV&#039;s will already know how to support it. &lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I agree that we should use little endian as standard, however, I&#039;m questioning if big endian should be supported as well... after all, it&#039;d be trivial for a plugin to convert from one to another.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Big and little endian data formats should both be supported with equal status. There should not even be a default; the endian-ness should be explicit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Is it worth supporting a vorbiscomment header? ===&lt;br /&gt;
&lt;br /&gt;
* It&#039;d be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information.  Besides, if you don&#039;t put it in then five other people will do it five different ways. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float? ===&lt;br /&gt;
* One doesn&#039;t. Standardize on IEEE floats and be done with it. Simple, remember? :)&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I&#039;m uncertain exactly what this question is.  Hopefully the submitter can clarify? &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Many file formats (WAV, AIFF, AU and others) support 64 bit float data. WAV stores floats as little endian data and AIFF stores if as big endian data. OggPCM should support both 32 and 64 bit floats of both endian-nesses (is that a word?). I don&#039;t know of any other floating point format that needs consideration.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Are samples padded to some round number of bits? ===&lt;br /&gt;
* I don&#039;t know of any PCM formats for non-octet based samples, but if you want to specify something, I&#039;d say pack them into the MSB&#039;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.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* The occurrence of N bit PCM where N is not a multiple of 8 bits is so rare that it should probably be ignored. In addition, there really isn&#039;t any reason to treat 10 bit data packed into the 10 most significant bits of a 16 bit int any different from a real 16 bit value. So why make any distinction?&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
== Do we want/need the 32-bit data packet header? ==&lt;br /&gt;
* 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]]&lt;br /&gt;
&lt;br /&gt;
* I can definitely see people wanting to use comment pages, so I&#039;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&#039;ll get a buffer aligned to a word boundary, in which case having the header has no penalty.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* 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&#039;re really worried about, we could always add 4 bytes, but I really don&#039;t think it should be necessary.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1972</id>
		<title>Talk:OggPCM Draft1</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1972"/>
		<updated>2005-11-10T02:34:44Z</updated>

		<summary type="html">&lt;p&gt;Erikd: /* How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Do we need signed/unsigned data flag? ===&lt;br /&gt;
&lt;br /&gt;
* 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&#039;t hurt to support it.  Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* I don&#039;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&#039;s fixed then a few packages will always have to modify the data, and most will never get it wrong. If it&#039;s variable then every package will have to do something sometimes, or fail occasionally. &lt;br /&gt;
--[[User:Gumboot|Gumboot]] 01:28, 8 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I see no reason to support any unsigned PCM format other than 8 bit. For instance, I know of no container format which supports unsigned 16 bit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to record int/float data flag? ===&lt;br /&gt;
&lt;br /&gt;
* Some codecs (Vorbis) use floating point samples natively.  Others only support int.  Support for int/float data flag is thus important. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* Please don&#039;t make determination of the data format depend on multiple fields. Instead use an enumeration so that something like little endian 16 bit PCM can be specifed as OGG_PCM_LE_PCM_16 and big endian 16 bit doubles can be specified as OGG_PCM_BE_FLOAT_64. This scheme is far more transparent and self documenting. If the format field is 8 bits, this scheme supports 256 formats; if its 16 bit it will support 65536 formats.&lt;br /&gt;
&lt;br /&gt;
I also suggest leaving the format associated with a value of zero as an invalid format.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to offer endian data flag?  If not, which is used? ===&lt;br /&gt;
&lt;br /&gt;
* LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it.  It&#039;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&#039;t even an issue. Supporting both is possible, too, but adds complexity to a format intended to be &#039;&#039;simple&#039;&#039;. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* We should just standardize on little endian ordering for the data. It&#039;s commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV&#039;s will already know how to support it. &lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I agree that we should use little endian as standard, however, I&#039;m questioning if big endian should be supported as well... after all, it&#039;d be trivial for a plugin to convert from one to another.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Big and little endian data formats should both be supported with equal status. There should not even be a default; the endian-ness should be explicit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Is it worth supporting a vorbiscomment header? ===&lt;br /&gt;
&lt;br /&gt;
* It&#039;d be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information.  Besides, if you don&#039;t put it in then five other people will do it five different ways. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float? ===&lt;br /&gt;
* One doesn&#039;t. Standardize on IEEE floats and be done with it. Simple, remember? :)&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I&#039;m uncertain exactly what this question is.  Hopefully the submitter can clarify? &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Many file formats (WAV, AIFF, AU and others) support 64 bit float data. WAV stores floats as little endian data and AIFF stores if as big endian data. OggPCM should support both 32 and 64 bit floats of both endian-nesses (is that a word?). I don&#039;t know of any other floating point format that needs consideration.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Are samples padded to some round number of bits? ===&lt;br /&gt;
* I don&#039;t know of any PCM formats for non-octet based samples, but if you want to specify something, I&#039;d say pack them into the MSB&#039;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.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Do we want/need the 32-bit data packet header? ==&lt;br /&gt;
* 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]]&lt;br /&gt;
&lt;br /&gt;
* I can definitely see people wanting to use comment pages, so I&#039;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&#039;ll get a buffer aligned to a word boundary, in which case having the header has no penalty.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* 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&#039;re really worried about, we could always add 4 bytes, but I really don&#039;t think it should be necessary.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1971</id>
		<title>Talk:OggPCM Draft1</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1971"/>
		<updated>2005-11-10T01:24:58Z</updated>

		<summary type="html">&lt;p&gt;Erikd: /* Do we need to record int/float data flag? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Do we need signed/unsigned data flag? ===&lt;br /&gt;
&lt;br /&gt;
* 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&#039;t hurt to support it.  Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* I don&#039;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&#039;s fixed then a few packages will always have to modify the data, and most will never get it wrong. If it&#039;s variable then every package will have to do something sometimes, or fail occasionally. &lt;br /&gt;
--[[User:Gumboot|Gumboot]] 01:28, 8 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I see no reason to support any unsigned PCM format other than 8 bit. For instance, I know of no container format which supports unsigned 16 bit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to record int/float data flag? ===&lt;br /&gt;
&lt;br /&gt;
* Some codecs (Vorbis) use floating point samples natively.  Others only support int.  Support for int/float data flag is thus important. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* Please don&#039;t make determination of the data format depend on multiple fields. Instead use an enumeration so that something like little endian 16 bit PCM can be specifed as OGG_PCM_LE_PCM_16 and big endian 16 bit doubles can be specified as OGG_PCM_BE_FLOAT_64. This scheme is far more transparent and self documenting. If the format field is 8 bits, this scheme supports 256 formats; if its 16 bit it will support 65536 formats.&lt;br /&gt;
&lt;br /&gt;
I also suggest leaving the format associated with a value of zero as an invalid format.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to offer endian data flag?  If not, which is used? ===&lt;br /&gt;
&lt;br /&gt;
* LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it.  It&#039;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&#039;t even an issue. Supporting both is possible, too, but adds complexity to a format intended to be &#039;&#039;simple&#039;&#039;. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* We should just standardize on little endian ordering for the data. It&#039;s commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV&#039;s will already know how to support it. &lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I agree that we should use little endian as standard, however, I&#039;m questioning if big endian should be supported as well... after all, it&#039;d be trivial for a plugin to convert from one to another.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Big and little endian data formats should both be supported with equal status. There should not even be a default; the endian-ness should be explicit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Is it worth supporting a vorbiscomment header? ===&lt;br /&gt;
&lt;br /&gt;
* It&#039;d be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information.  Besides, if you don&#039;t put it in then five other people will do it five different ways. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float? ===&lt;br /&gt;
* One doesn&#039;t. Standardize on IEEE floats and be done with it. Simple, remember? :)&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I&#039;m uncertain exactly what this question is.  Hopefully the submitter can clarify? &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Many file formats (WAV, AIFF, AU and others) support 64 bit float data. WAV stores floats as little endian data and AIFF stores if as big endian data. OggPCM should support both.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Are samples padded to some round number of bits? ===&lt;br /&gt;
* I don&#039;t know of any PCM formats for non-octet based samples, but if you want to specify something, I&#039;d say pack them into the MSB&#039;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.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Do we want/need the 32-bit data packet header? ==&lt;br /&gt;
* 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]]&lt;br /&gt;
&lt;br /&gt;
* I can definitely see people wanting to use comment pages, so I&#039;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&#039;ll get a buffer aligned to a word boundary, in which case having the header has no penalty.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* 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&#039;re really worried about, we could always add 4 bytes, but I really don&#039;t think it should be necessary.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1970</id>
		<title>Talk:OggPCM Draft1</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1970"/>
		<updated>2005-11-10T00:59:23Z</updated>

		<summary type="html">&lt;p&gt;Erikd: /* How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Do we need signed/unsigned data flag? ===&lt;br /&gt;
&lt;br /&gt;
* 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&#039;t hurt to support it.  Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* I don&#039;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&#039;s fixed then a few packages will always have to modify the data, and most will never get it wrong. If it&#039;s variable then every package will have to do something sometimes, or fail occasionally. &lt;br /&gt;
--[[User:Gumboot|Gumboot]] 01:28, 8 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I see no reason to support any unsigned PCM format other than 8 bit. For instance, I know of no container format which supports unsigned 16 bit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to record int/float data flag? ===&lt;br /&gt;
&lt;br /&gt;
* Some codecs (Vorbis) use floating point samples natively.  Others only support int.  Support for int/float data flag is thus important. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Do we need to offer endian data flag?  If not, which is used? ===&lt;br /&gt;
&lt;br /&gt;
* LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it.  It&#039;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&#039;t even an issue. Supporting both is possible, too, but adds complexity to a format intended to be &#039;&#039;simple&#039;&#039;. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* We should just standardize on little endian ordering for the data. It&#039;s commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV&#039;s will already know how to support it. &lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I agree that we should use little endian as standard, however, I&#039;m questioning if big endian should be supported as well... after all, it&#039;d be trivial for a plugin to convert from one to another.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Big and little endian data formats should both be supported with equal status. There should not even be a default; the endian-ness should be explicit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Is it worth supporting a vorbiscomment header? ===&lt;br /&gt;
&lt;br /&gt;
* It&#039;d be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information.  Besides, if you don&#039;t put it in then five other people will do it five different ways. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float? ===&lt;br /&gt;
* One doesn&#039;t. Standardize on IEEE floats and be done with it. Simple, remember? :)&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I&#039;m uncertain exactly what this question is.  Hopefully the submitter can clarify? &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Many file formats (WAV, AIFF, AU and others) support 64 bit float data. WAV stores floats as little endian data and AIFF stores if as big endian data. OggPCM should support both.&lt;br /&gt;
--[[Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Are samples padded to some round number of bits? ===&lt;br /&gt;
* I don&#039;t know of any PCM formats for non-octet based samples, but if you want to specify something, I&#039;d say pack them into the MSB&#039;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.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Do we want/need the 32-bit data packet header? ==&lt;br /&gt;
* 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]]&lt;br /&gt;
&lt;br /&gt;
* I can definitely see people wanting to use comment pages, so I&#039;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&#039;ll get a buffer aligned to a word boundary, in which case having the header has no penalty.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* 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&#039;re really worried about, we could always add 4 bytes, but I really don&#039;t think it should be necessary.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1969</id>
		<title>Talk:OggPCM Draft1</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1969"/>
		<updated>2005-11-10T00:57:26Z</updated>

		<summary type="html">&lt;p&gt;Erikd: /* Do we need to offer endian data flag?  If not, which is used? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Do we need signed/unsigned data flag? ===&lt;br /&gt;
&lt;br /&gt;
* 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&#039;t hurt to support it.  Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* I don&#039;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&#039;s fixed then a few packages will always have to modify the data, and most will never get it wrong. If it&#039;s variable then every package will have to do something sometimes, or fail occasionally. &lt;br /&gt;
--[[User:Gumboot|Gumboot]] 01:28, 8 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I see no reason to support any unsigned PCM format other than 8 bit. For instance, I know of no container format which supports unsigned 16 bit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to record int/float data flag? ===&lt;br /&gt;
&lt;br /&gt;
* Some codecs (Vorbis) use floating point samples natively.  Others only support int.  Support for int/float data flag is thus important. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Do we need to offer endian data flag?  If not, which is used? ===&lt;br /&gt;
&lt;br /&gt;
* LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it.  It&#039;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&#039;t even an issue. Supporting both is possible, too, but adds complexity to a format intended to be &#039;&#039;simple&#039;&#039;. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* We should just standardize on little endian ordering for the data. It&#039;s commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV&#039;s will already know how to support it. &lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I agree that we should use little endian as standard, however, I&#039;m questioning if big endian should be supported as well... after all, it&#039;d be trivial for a plugin to convert from one to another.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* Big and little endian data formats should both be supported with equal status. There should not even be a default; the endian-ness should be explicit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Is it worth supporting a vorbiscomment header? ===&lt;br /&gt;
&lt;br /&gt;
* It&#039;d be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information.  Besides, if you don&#039;t put it in then five other people will do it five different ways. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float? ===&lt;br /&gt;
* One doesn&#039;t. Standardize on IEEE floats and be done with it. Simple, remember? :)&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I&#039;m uncertain exactly what this question is.  Hopefully the submitter can clarify? &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Are samples padded to some round number of bits? ===&lt;br /&gt;
* I don&#039;t know of any PCM formats for non-octet based samples, but if you want to specify something, I&#039;d say pack them into the MSB&#039;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.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Do we want/need the 32-bit data packet header? ==&lt;br /&gt;
* 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]]&lt;br /&gt;
&lt;br /&gt;
* I can definitely see people wanting to use comment pages, so I&#039;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&#039;ll get a buffer aligned to a word boundary, in which case having the header has no penalty.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* 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&#039;re really worried about, we could always add 4 bytes, but I really don&#039;t think it should be necessary.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
	<entry>
		<id>https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1968</id>
		<title>Talk:OggPCM Draft1</title>
		<link rel="alternate" type="text/html" href="https://wiki.xiph.org/index.php?title=Talk:OggPCM_Draft1&amp;diff=1968"/>
		<updated>2005-11-10T00:55:35Z</updated>

		<summary type="html">&lt;p&gt;Erikd: /* Do we need signed/unsigned data flag? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Do we need signed/unsigned data flag? ===&lt;br /&gt;
&lt;br /&gt;
* 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&#039;t hurt to support it.  Applications can be built to support one or multiple formats, thus requesting conversion if not supported by the codec. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* I don&#039;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&#039;s fixed then a few packages will always have to modify the data, and most will never get it wrong. If it&#039;s variable then every package will have to do something sometimes, or fail occasionally. &lt;br /&gt;
--[[User:Gumboot|Gumboot]] 01:28, 8 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I see no reason to support any unsigned PCM format other than 8 bit. For instance, I know of no container format which supports unsigned 16 bit.&lt;br /&gt;
--[[User:Erikd|Erikd]]&lt;br /&gt;
&lt;br /&gt;
=== Do we need to record int/float data flag? ===&lt;br /&gt;
&lt;br /&gt;
* Some codecs (Vorbis) use floating point samples natively.  Others only support int.  Support for int/float data flag is thus important. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Do we need to offer endian data flag?  If not, which is used? ===&lt;br /&gt;
&lt;br /&gt;
* LSB/MSB can be changed losslessly, one should probobally be settled on for the data and stick with it.  It&#039;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&#039;t even an issue. Supporting both is possible, too, but adds complexity to a format intended to be &#039;&#039;simple&#039;&#039;. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
* We should just standardize on little endian ordering for the data. It&#039;s commonly used and well supported in hardware and software. Any cross architecture application that can deal WAV&#039;s will already know how to support it. &lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I agree that we should use little endian as standard, however, I&#039;m questioning if big endian should be supported as well... after all, it&#039;d be trivial for a plugin to convert from one to another.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
=== Is it worth supporting a vorbiscomment header? ===&lt;br /&gt;
&lt;br /&gt;
* It&#039;d be useful to be able to carry information like what was decoded, or CDDB IDs, or replaygain information.  Besides, if you don&#039;t put it in then five other people will do it five different ways. &lt;br /&gt;
--[[User:Arc|Arc]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How does one interpret a file where the Bits per Sample is neither 32 nor 64 and the Data Type is float? ===&lt;br /&gt;
* One doesn&#039;t. Standardize on IEEE floats and be done with it. Simple, remember? :)&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* I&#039;m uncertain exactly what this question is.  Hopefully the submitter can clarify? &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Are samples padded to some round number of bits? ===&lt;br /&gt;
* I don&#039;t know of any PCM formats for non-octet based samples, but if you want to specify something, I&#039;d say pack them into the MSB&#039;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.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
== Do we want/need the 32-bit data packet header? ==&lt;br /&gt;
* 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]]&lt;br /&gt;
&lt;br /&gt;
* I can definitely see people wanting to use comment pages, so I&#039;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&#039;ll get a buffer aligned to a word boundary, in which case having the header has no penalty.&lt;br /&gt;
--[[User:Jkoleszar|Jkoleszar]] 11:48, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
* 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&#039;re really worried about, we could always add 4 bytes, but I really don&#039;t think it should be necessary.  &lt;br /&gt;
--[[User:Arc|Arc]] 13:11, 9 Nov 2005 (PST)&lt;/div&gt;</summary>
		<author><name>Erikd</name></author>
	</entry>
</feed>