<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.xiph.org/skins/common/feed.css?272"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.xiph.org/index.php?title=Special:Contributions/Derf&amp;feed=atom&amp;limit=50&amp;target=Derf&amp;year=&amp;month=</id>
		<title>XiphWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.xiph.org/index.php?title=Special:Contributions/Derf&amp;feed=atom&amp;limit=50&amp;target=Derf&amp;year=&amp;month="/>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/Special:Contributions/Derf"/>
		<updated>2013-05-23T23:27:25Z</updated>
		<subtitle>From XiphWiki</subtitle>
		<generator>MediaWiki 1.16.1</generator>

	<entry>
		<id>http://wiki.xiph.org/Talk:TransOgg_Seeking_Proposals</id>
		<title>Talk:TransOgg Seeking Proposals</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/Talk:TransOgg_Seeking_Proposals"/>
				<updated>2013-04-09T22:12:30Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Created page with &amp;quot;''&amp;gt; The DTS and backreference encoding was defined by-codec,&amp;lt;br/&amp;gt; ''&amp;gt; and thus decoding the timestamps required additional&amp;lt;br/&amp;gt; ''&amp;gt; infrastructure that most frameworks had to cod...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''&amp;gt; The DTS and backreference encoding was defined by-codec,&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; and thus decoding the timestamps required additional&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; infrastructure that most frameworks had to code from&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; scratch. Several frameworks never implemented precise&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; seeking for this reason alone.''&lt;br /&gt;
&lt;br /&gt;
In our defense, this allowed people to repeatedly mux things into Ogg that would have been impossible based on what we knew when Ogg was designed: the Theora keyframe backreference scheme, the Dirac generalized B-frame scheme, the VP8 &amp;quot;invisible&amp;quot; ALT refs, the Opus pre-skip and pre-roll, etc.&lt;br /&gt;
&lt;br /&gt;
We can argue that we now know all these things and that no more new ones will come along, but the MKV folks thought that, too, and the last two (alt-refs and pre-skip/pre-roll) proved them wrong.&lt;br /&gt;
&lt;br /&gt;
Of course, they also don't handle basic Vorbis end-time trimming correctly, so it's not like they even got the stuff that was known at the time correct. A good design here is hard work. That's not a reason not to try, and I know you know all of this, but I think we should be aware of the risks.&lt;br /&gt;
&lt;br /&gt;
''&amp;gt; Xiph never implemented its own all-encompassing framework&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; to provide an example of complete seeking that worked in&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; any Ogg file.''&lt;br /&gt;
&lt;br /&gt;
Arguably, even if we had, people who already have their own frameworks (gstreamer, FFmpeg, VLC, etc.) wouldn't have used it.&lt;br /&gt;
&lt;br /&gt;
''&amp;gt; Stream structure discovery was also based on performing&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; multiple bisection searches to find link boundaries.''&lt;br /&gt;
&lt;br /&gt;
The important point here is that because you have '''no''' information about where the link boundary is, nor what kind of streams are contained in the data after the boundary, you can't do much better than dumb bisection (I tried in libopusfile, with some success, but it was basically improving the constant out front... each bisection was still log(N) where N is the size of the link).&lt;br /&gt;
&lt;br /&gt;
But this can be solved by a simple back-pointer at the end of each link. That makes link enumeration 1 seek per link.&lt;br /&gt;
&lt;br /&gt;
''&amp;gt; Given the practically poor and unstable performance of&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; preceding bisection seeking implmentations, it will be&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; difficult to sell adopter opinion on an updated bisection&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; design, even one that farts unicorns.''&lt;br /&gt;
&lt;br /&gt;
This is actually a really important point. I think we should get buy-in from people who actually want to use this for something ''before'' we try go off and make it. The guys making NUT spent just as much effort on design work as we did (their conversations actually sounded an awful lot like the ones we had designing Ogg), and yet... no one uses NUT. Our resources and attention are finite.&lt;br /&gt;
&lt;br /&gt;
''&amp;gt; Although it is still possible to mux an invalid file, it&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; is much harder to end up with a stream in which&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; second-order seeking 'helper' structures disagree with&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; the authoritative timestamps within the page data.''&lt;br /&gt;
&lt;br /&gt;
The seeking implementation still has to deal with a bunch of potentially invalid data to avoid going off the rails. For example, timestamps that are aren't ordered properly, timestamps that don't lie in the range of the stream start and end times, timestamps whose difference overflows a 64-bit signed integer, etc. Large amount of garbage data at the end of the file make most code used to find the stream length O(N^2) instead of O(N) (it's not hard to write O(N) code, but most people just don't realize the potential problem). The list goes on...&lt;br /&gt;
&lt;br /&gt;
''&amp;gt; WebM went one step further by mandating an index and&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; eliminating the Matroska bisection seek mechanism entirely.''&lt;br /&gt;
&lt;br /&gt;
Which they then walked back when they realized they wanted live streaming support, too. But that doesn't stop lots of things breaking on indexless files.&lt;br /&gt;
&lt;br /&gt;
''&amp;gt; The index can be grabbed from the stream tail&amp;lt;br/&amp;gt;&lt;br /&gt;
''&amp;gt; asynchronously.''&lt;br /&gt;
&lt;br /&gt;
The likelihood of this getting implemented is very low. Every single media framework wants to know two things '''before''' it starts playing: is the file seekable, and how long is it. This affects the controls presented, the playback time display, etc. Nobody is prepared for information about either of these points to change during the middle of playback.&lt;br /&gt;
&lt;br /&gt;
If you need an index to seek, you need to check if it's there before you say you can seek (because it's often missing or damaged, especially if it's at the end of a file). If the index is at the end, it just makes this more expensive. The only real advantage is that you can write the file in a single pass.&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/Opus-1.0.2</id>
		<title>Opus-1.0.2</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/Opus-1.0.2"/>
				<updated>2012-12-06T00:30:34Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Quality-impacting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Opus 1.0.2 fixes an out-of-bounds read that could be triggered by a malicious Opus packet causing an integer wrap-around in the padding code. Considering that the packet would have to be at least 16 MB in size and that no out-of-bounds write is possible, the severity is very low. This new release also has the following changes:&lt;br /&gt;
&lt;br /&gt;
== Quality-impacting ==&lt;br /&gt;
* Changed the behaviour of the PLC to always fill the caller's buffer&lt;br /&gt;
* Properly decode in-band FEC for packets with mutiple Opus frames&lt;br /&gt;
* Hybrid mode quality improvements and fixes&lt;br /&gt;
* Fixed bugs in the CELT mode PLC&lt;br /&gt;
* Redundant mode transition fixes&lt;br /&gt;
&lt;br /&gt;
== Other minor changes ==&lt;br /&gt;
* Stack reduction&lt;br /&gt;
* Doc fixes (many)&lt;br /&gt;
* 16-bit fixes&lt;br /&gt;
* Misc build fixes&lt;br /&gt;
* New API calls: OPUS_GET_LAST_PACKET_DURATION ctl() and opus_packet_get_nb_samples()&lt;br /&gt;
* Minor code cleanup&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OPUS_TODO</id>
		<title>OPUS TODO</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OPUS_TODO"/>
				<updated>2012-11-15T01:38:28Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Future work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Spec ==&lt;br /&gt;
* Ogg mapping&lt;br /&gt;
* Matroska mapping. See: [[MatroskaOpus]]&lt;br /&gt;
* RTP payload format&lt;br /&gt;
&lt;br /&gt;
== Website ==&lt;br /&gt;
* De-uglify webpage&lt;br /&gt;
* Promotional material&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* Oggz-validate (should also validate opus toc)&lt;br /&gt;
&lt;br /&gt;
== Opus-tools ==&lt;br /&gt;
* A simple real time streaming example tool&lt;br /&gt;
* Replaygain (half done— needs a gain tool)&lt;br /&gt;
&lt;br /&gt;
== Future work ==&lt;br /&gt;
* Smart automatic mode decision&lt;br /&gt;
* psymodel based VBR&lt;br /&gt;
* Remove copy in inverse MDCT&lt;br /&gt;
* Save some float&amp;lt;-&amp;gt;int conversions&lt;br /&gt;
* Improvements to LP mode CBR (greg has some code)&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/MatroskaOpus</id>
		<title>MatroskaOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/MatroskaOpus"/>
				<updated>2012-07-05T21:37:35Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Document some more of the outstanding issues with the Matroska mapping&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''DRAFT''' ==&lt;br /&gt;
&lt;br /&gt;
This is an encapsulation spec for the [[Opus]] codec in [[http://matroska.org/ Matroska]]. There are a number of outstanding functional issues with muxing Opus in Matroska, and until those are resolved, use of this spec is NOT RECOMMENDED.&lt;br /&gt;
&lt;br /&gt;
Opus has few signaling requirements, so a simple mapping:&lt;br /&gt;
&lt;br /&gt;
 - CodecID is A_OPUS&lt;br /&gt;
 - SampleFrequency is always 48000&lt;br /&gt;
 - Channels is 1 or 2 based on what the muxer knows about the input&lt;br /&gt;
 - CodecPrivate is void.&lt;br /&gt;
&lt;br /&gt;
However, this doesn't work for multistream. Supporting multistream requires signalling the number of Opus streams packed in each frame and the mapping from those to output channels through the container.&lt;br /&gt;
&lt;br /&gt;
To support multistream, we place the complete 'OpusHead' header packet from [[OggOpus]], as defined there, in the CodecPrivate element. This provides the number of streams and the channel mapping table, as well as related features like pre-skip and gain which improve the chances of lossless remuxing between the two encapsulations.&lt;br /&gt;
&lt;br /&gt;
 - CodecID is A_OPUS&lt;br /&gt;
 - SampleFrequecy is 48000&lt;br /&gt;
 - Channels is number of output PCM channels&lt;br /&gt;
 - CodecPrivate is the 'OpusHead' packet, identical to the Ogg mapping&lt;br /&gt;
&lt;br /&gt;
The second 'OpusTags' header packet from OggOpus is not used in the Matroska encapsulation. Matroska has its own system for tag metadata, and this avoids duplicating it and the need for sub-framing to index multiple packets within the CodecPrivate element.&lt;br /&gt;
&lt;br /&gt;
If the CodecPrivate is empty, players should treat it as the simpler mapping, I guess.&lt;br /&gt;
&lt;br /&gt;
== Questions ==&lt;br /&gt;
&lt;br /&gt;
Should we say muxers MAY or SHOULD NOT produce simple streams without filling in CodecPrivate?&lt;br /&gt;
&lt;br /&gt;
How does the OpusHead pre-skip field interact with the timestamps? The SimpleBlock timestamp is signed 16 bits, so the format can signal about half of the pre-skip if playback timestamps are to start at zero.&lt;br /&gt;
&lt;br /&gt;
One could set an incorrect timestamp on the skipped blocks, and rely on the decoder to drop them based on the OpusHead preskip value. As long as the initial blocks are timestamped &amp;lt;= start of output this shouldn't affect seeking.&lt;br /&gt;
&lt;br /&gt;
How important is it that timestamps start at zero in a Matroska file?&lt;br /&gt;
&lt;br /&gt;
The SimpleBlock structure also has an 'invisible' bit, which tell the player to decode, but not display, the contained frames. This lets the muxer signal the pre-skip semantics with frame accuracy, but not sample accuracy. If players implement this it will at least help with sync. Libav does not appear to support the invisible bit.&lt;br /&gt;
&lt;br /&gt;
Seeking in Opus files requires a pre-roll (recommended to be at least 80 ms). However, currently Matroska requires its index entries to point directly to the data whose timestamp matches the corresponding seek point, not some place arbitrarily before that timestamp. These two requirements are incompatible, and mean that seeking in Opus will be broken in all existing Matroska software. In particularly unlucky cases (e.g., around a transient), playing back audio decoded without any pre-roll can produce extremely loud (possibly equipment-damaging) results.&lt;br /&gt;
&lt;br /&gt;
How can sample-accurate end-time trimming work in Matroska? Currently all software encapsulating Vorbis in Matroska is broken in this regard, and muxing a Vorbis file in Matroska causes it to get longer (i.e., produce more audio output than the original Ogg file). It would be unfortunate to repeat this disaster for Opus.&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/MIMETypesCodecs</id>
		<title>MIMETypesCodecs</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/MIMETypesCodecs"/>
				<updated>2012-07-03T16:19:46Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Add Opus to the list of allowed codecs for Ogg mime types.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Specification of MIME types and respective codecs parameter ==&lt;br /&gt;
&lt;br /&gt;
Also includes a specification of the recommended file extensions to use with Ogg.&lt;br /&gt;
&lt;br /&gt;
=== MIME Types ===&lt;br /&gt;
&lt;br /&gt;
The following MIME types are now officially registered with IANA and specified with the IETF as [http://www.ietf.org/rfc/rfc5334.txt RFC 5334]:&lt;br /&gt;
&lt;br /&gt;
* video/ogg - for video (with audio) encapsulated in Ogg&lt;br /&gt;
** recommends a Skeleton logical bitstrem&lt;br /&gt;
** .ogv file extension&lt;br /&gt;
** Macintosh File Type Code: OggV&lt;br /&gt;
&lt;br /&gt;
* audio/ogg - for audio encapsulated in Ogg&lt;br /&gt;
** recommends a Skeleton logical bitstrem&lt;br /&gt;
** .oga file extension, .ogg for Vorbis I, .spx for Speex&lt;br /&gt;
** Macintosh File Type Code: OggA&lt;br /&gt;
&lt;br /&gt;
* application/ogg - for complex, multitrack, multiplexed files encapsulated in Ogg&lt;br /&gt;
** requires a Skeleton logical bitstream&lt;br /&gt;
** .ogx file extension&lt;br /&gt;
** Macintosh File Type Code: OggX&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MIME_Types_and_File_Extensions|Other MIME types]] are still in the process.&lt;br /&gt;
&lt;br /&gt;
=== Codecs Parameter ===&lt;br /&gt;
&lt;br /&gt;
[http://www.rfc-editor.org/rfc/rfc4281.txt Typically], MIME types of media encapsulation formats use the optional &amp;quot;codecs&amp;quot; parameter to specify which codes are being used in a particular file.&lt;br /&gt;
&lt;br /&gt;
Codecs encapsulated in Ogg require a text identifier at the beginning of the first header page to identify the encapsulated codecs.  The following table contains the identifiers for existing Xiph codecs and the codecs parameter names used for */ogg MIME types (in alphabetical order):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;codecstable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Codecs Parameter Name&lt;br /&gt;
! Codec Type&lt;br /&gt;
! Codec Identifier&lt;br /&gt;
(decimal, hex, octal)&lt;br /&gt;
! Version Field (if available)&lt;br /&gt;
|-&lt;br /&gt;
| [http://svn.annodex.net/liboggz/trunk/src/liboggz/oggz_auto.h celt]&lt;br /&gt;
| audio&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'CELT\ \ \ \ '&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x43 0x45 0x4c 0x54 0x20 0x20 0x20 0x20'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0103 0105 0114 0124 0040 0040 0040 0040'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[28,4]: version id&lt;br /&gt;
|-&lt;br /&gt;
| [http://svn.annodex.net/liboggz/trunk/src/liboggz/oggz_auto.h cmml]&lt;br /&gt;
| text&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'CMML\0\0\0\0'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x43 0x4d 0x4d 0x4c 0x00 0x00 0x00 0x00'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0103 0115 0115 0114 0000 0000 0000 0000'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[8,2]: major version number,&lt;br /&gt;
char[10,2]: minor version number&lt;br /&gt;
|-&lt;br /&gt;
| [http://wiki.xiph.org/index.php/OggDirac  dirac]&lt;br /&gt;
| video&lt;br /&gt;
| char[0,5]: &amp;lt;tt&amp;gt;'BBCD\0'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x42 0x42 0x43 0x44 0x00'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0102 0102 0103 0104 0000'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| ??&lt;br /&gt;
|-&lt;br /&gt;
| [http://flac.sourceforge.net/ogg_mapping.html  flac]&lt;br /&gt;
| audio&lt;br /&gt;
| char[0,5]: &amp;lt;tt&amp;gt;'\177FLAC'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x7F 0x46 0x4C 0x41 0x43'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0177 0106 0114 0101 0103'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[5,1]: binary major version number, &lt;br /&gt;
char[6,1]: binary minor version number of mapping&lt;br /&gt;
|-&lt;br /&gt;
| [[OggMNG|jng]]&lt;br /&gt;
| video&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'\213JNG\r\n\032\n'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x8b 0x4a 0x4e 0x47 0x0D 0x0A 0x1A 0x0A'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0213 0112 0116 0107 0015 0012 0032 0012'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| ??&lt;br /&gt;
|-&lt;br /&gt;
| [[OggKate|kate]]&lt;br /&gt;
| text&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'\x80kate\0\0\0'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x80 0x6b 0x61 0x74 0x65 0x00 0x00 0x00'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0200 0153 0141 0164 0145 0000 0000 0000'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[9,1]: major version number,&lt;br /&gt;
char[10,1]: minor version number&lt;br /&gt;
|-&lt;br /&gt;
| [http://lists.xiph.org/pipermail/vorbis-dev/2001-August/004501.html  midi]&lt;br /&gt;
| text&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'OggMIDI\0'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x4f 0x67 0x67 0x4d 0x49 0x44 0x49 0x00'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0117 0147 0147 0115 0111 0104 0111 0000'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[8,1]: version field&lt;br /&gt;
|-&lt;br /&gt;
| [[OggMNG|mng]]&lt;br /&gt;
| video&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'\212MNG\r\n\032\n'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x8a 0x4d 0x4e 0x47 0x0D 0x0A 0x1A 0x0A'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0212 0115 0116 0107 0015 0012 0032 0012'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| ??&lt;br /&gt;
|-&lt;br /&gt;
| [[OggOpus|opus]]&lt;br /&gt;
| audio&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'OpusHead'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x4f 0x70 0x75 0x73 0x48 0x65 0x61 0x64'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0117 0160 0165 0163 0110 0150 0141 0145 1044'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[8,1]: version field&lt;br /&gt;
|-&lt;br /&gt;
| [[OggPCM|pcm]]&lt;br /&gt;
| audio&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'PCM\ \ \ \ \ '&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x50 0x43 0x4d 0x20 0x20 0x20 0x20 0x20'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0120 0103 0115 0040 0040 0040 0040 0040'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[8,2]: version major field,&lt;br /&gt;
char[10,2]: version minor field&lt;br /&gt;
|-&lt;br /&gt;
| [[OggMNG|png]]&lt;br /&gt;
| video&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'\211PNG\r\n\032\n'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x89 0x50 0x4e 0x47 0x0D 0x0A 0x1A 0x0A'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0211 0120 0116 0107 0015 0012 0032 0012'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| ??&lt;br /&gt;
|-&lt;br /&gt;
| [http://svn.annodex.net/liboggz/trunk/src/liboggz/oggz_auto.h  speex]&lt;br /&gt;
| audio&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'Speex\ \ \ '&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x53 0x70 0x65 0x65 0x78 0x20 0x20 0x20'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0123 0160 0145 0145 0170 0040 0040 0040'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[28,4]: version id&lt;br /&gt;
|-&lt;br /&gt;
| [http://svn.annodex.net/liboggz/trunk/src/liboggz/oggz_auto.h  theora]&lt;br /&gt;
| video&lt;br /&gt;
| char[0,7]: &amp;lt;tt&amp;gt;'\x80theora'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x80 0x74 0x68 0x65 0x6f 0x72 0x61'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0180 0164 0150 0145 0157 0162 0141'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[7,1]: major version number,&lt;br /&gt;
char[8,1]: minor version number,&lt;br /&gt;
&lt;br /&gt;
char[9,1]: version revision number&lt;br /&gt;
|-&lt;br /&gt;
| [http://svn.annodex.net/liboggz/trunk/src/liboggz/oggz_auto.h  vorbis]&lt;br /&gt;
| audio&lt;br /&gt;
| char[0,7]: &amp;lt;tt&amp;gt;'\x01vorbis'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x01 0x76 0x6f 0x72 0x62 0x69 0x73'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0001 0166 0157 0162 0142 0151 0163'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[7,4]: version field&lt;br /&gt;
|-&lt;br /&gt;
| [[OggYUV4MPEG|yuv4mpeg]]&lt;br /&gt;
| video&lt;br /&gt;
| char[0,8]: &amp;lt;tt&amp;gt;'YUV4MPEG'&amp;lt;/tt&amp;gt;&lt;br /&gt;
hex: &amp;lt;tt&amp;gt;'0x59 0x55 0x56 0x34 0x4d 0x50 0x45 0x47'&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oct: &amp;lt;tt&amp;gt;'0131 0125 0126 0064 0115 0120 0105 0107'&amp;lt;/tt&amp;gt;&lt;br /&gt;
| char[8,1] = '2' (0x32) for yuv4mpeg format version 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;char[x,y]&amp;quot; fields mean here: start at byte number x (counting from 0) for a length of y bytes.&lt;br /&gt;
&lt;br /&gt;
[[Category:Ogg]]&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OpusFAQ</id>
		<title>OpusFAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OpusFAQ"/>
				<updated>2012-05-25T03:28:52Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Opus logo trans.png|right]]&lt;br /&gt;
&lt;br /&gt;
== General Questions ==&lt;br /&gt;
&lt;br /&gt;
=== What is Opus? ===&lt;br /&gt;
&lt;br /&gt;
Opus is a format for compressing audio to efficiently transmit it across networks. Opus allows for music-grade high quality audio at low data rates while not delaying the signal much. Opus is distinguished from most formats for high quality audio (AAC, Vorbis, MP3) by having low delay and it is distinguished from most low delay formats (G.711, GSM, Speex) by supporting high audio quality.&lt;br /&gt;
&lt;br /&gt;
=== Who created Opus? ===&lt;br /&gt;
&lt;br /&gt;
Opus was created by combining Xiph.Org's CELT development codec and Skype's SILK codec as part of a cooperative effort in the IETF codec working group. Opus has been in development since early 2007, and &amp;lt;!-- as of ???? is an IETF proposed standard: '''RFC TBD''' --&amp;gt; has been recommended by the working group for promotion as a proposed standard.&lt;br /&gt;
&lt;br /&gt;
=== Is the SILK part of Opus compatible with the SILK implementation shipped in Skype? ===&lt;br /&gt;
&lt;br /&gt;
No. The SILK codec, as submitted by Skype to the IETF, was heavily modified as part of its integration within Opus. The modifications are significant enough that it is not possible to just write a &amp;quot;translator&amp;quot; and even sharing code between Opus and the &amp;quot;old SILK&amp;quot; would be highly non-trivial.&lt;br /&gt;
&lt;br /&gt;
=== How do I use Opus / What programs use Opus? ===&lt;br /&gt;
&lt;br /&gt;
=== What are the licensing requirements? ===&lt;br /&gt;
&lt;br /&gt;
The reference Opus source code is released under the BSD license, which is a very permissive Open Source license. Commercial use and distribution (including in proprietary software) is permitted, provided that some conditions specified in the license are met. &lt;br /&gt;
&lt;br /&gt;
Opus is also covered by some patents, for which royalty-free usage rights are granted, under conditions that the authors believe are compatible with most (all?) open source licenses, including the GPL (v2 and v3).&lt;br /&gt;
&lt;br /&gt;
=== How does the quality of Opus compare to other codecs? ===&lt;br /&gt;
&lt;br /&gt;
== Opus for Software developers ==&lt;br /&gt;
&lt;br /&gt;
=== What is difference between supporting Opus and supporting Speex/G.711/MP3? ===&lt;br /&gt;
&lt;br /&gt;
Opus has variable frame durations which can change on the fly, so an Opus decoder needs to be ready to accept packets with durations that are any multiple of 2.5ms up to a maximum of 120ms.  &lt;br /&gt;
&lt;br /&gt;
The opus encoder and decoder do not need to have matched sampling rates, bandwidths, or channel counts.  Its recommended to always just decode at the highest rate the hardware supports (e.g. 48kHz stereo) so the user gets the full quality of whatever the far end is sending.&lt;br /&gt;
&lt;br /&gt;
=== Forward Error correction (FEC) doesn't appear to do anything! HELP! ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The inband FEC feature of Opus helps reduce the harm of packet loss by encoding some information about the prior packet.&lt;br /&gt;
&lt;br /&gt;
In order to make use of inband FEC the decoder must delay its output by at least one frame so that it can call the decoder with the decode_fec argument on the ''next'' frame in order to reconstruct the missed frame. This works best if it's integrated with a jitter buffer.&lt;br /&gt;
&lt;br /&gt;
FEC is only used by the encoder under certain conditions: the feature must be enabled via the OPUS_SET_INBAND_FEC CTL, the encoder must be told to expect loss via the OPUS_SET_PACKET_LOSS_PERC CTL, and the codec must be operated in any of the linear prediction or Hybrid modes. Frame durations of &amp;lt;10ms and very high bitrates will use the MDCT modes, where FEC is not available.&lt;br /&gt;
&lt;br /&gt;
Even when FEC is not used, telling the encoder about the level of loss will help it make more intelligent decisions. By default the implementation assumes there is no loss.&lt;br /&gt;
&lt;br /&gt;
=== What is Opus Custom? ===&lt;br /&gt;
&lt;br /&gt;
Opus Custom is an '''optional''' part of the Opus standard that allows for sampling rates other than 8, 12, 16, 24, or 48 kHz and frame sizes other than multiples of 2.5 ms. Opus Custom requires additional out-of-band signalling that Opus does not normally require and disables many of Opus' coding modes. Also, because it is an optional part of the specification, using Opus Custom may lead to compatibility problems. For these reasons, its use is discouraged outside of very specific applications, e.g.:&lt;br /&gt;
* ultra low delay applications where synchronization with the soundcard buffer is important. &lt;br /&gt;
* low-power embedded applications where compatibility with others is not important.&lt;br /&gt;
&lt;br /&gt;
For almost all other types of applications, Opus Custom should not be used.&lt;br /&gt;
&lt;br /&gt;
=== How do I use 44.1 kHz or some other sampling rate not directly supported by Opus? ===&lt;br /&gt;
&lt;br /&gt;
Tools which read or write Opus should inter-work with other sampling rate by transparently performing sample rate conversion behind the scenes. It's generally preferable to run the output at 48kHz even when you know the original input was 44.1kHz because many inexpensive audio interfaces have poor quality output for 44.1k.&lt;br /&gt;
&lt;br /&gt;
In particular, software developers should not use Opus Custom for 44.1 kHz support, except in the very specific circumstances outlined above.&lt;br /&gt;
&lt;br /&gt;
=== Which implementation should I use? ===&lt;br /&gt;
&lt;br /&gt;
While the implementation in the latest IETF draft (and eventually RFC) of Opus is what ''defines'' the standard, it is likely not the best and most up-to-date implementation. The [http://opus-codec.org/ Opus] website was set up for the purpose of continually improving the implementation— in terms of speed, encoding quality, device compatibility, etc— while still conforming to the standard. All Opus implementations are compatible by definition.&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OpusFAQ</id>
		<title>OpusFAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OpusFAQ"/>
				<updated>2012-05-25T02:51:33Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Opus logo trans.png|right]]&lt;br /&gt;
&lt;br /&gt;
=== What is Opus? ===&lt;br /&gt;
&lt;br /&gt;
Opus is a format for compressing audio to efficiently transmit it across networks. Opus allows for music-grade high quality audio at low data rates while not delaying the signal much. Opus is distinguished from most formats for high quality audio (AAC, Vorbis, MP3) by having low delay and it is distinguished from most low delay formats (G.711, GSM, Speex) by supporting high audio quality.&lt;br /&gt;
&lt;br /&gt;
=== Who created Opus? ===&lt;br /&gt;
&lt;br /&gt;
Opus was created by combining Xiph.Org's CELT development codec and Skype's SILK codec as part of a public cooperation in the IETF codec working group. Opus has been in development since early 2007, and &amp;lt;!-- as of ???? is an IETF proposed standard: '''RFC TBD''' --&amp;gt; has been recommended by the working group for promotion as a proposed standard.&lt;br /&gt;
&lt;br /&gt;
=== Is the SILK part of Opus compatible with the SILK implementation shipped in Skype? ===&lt;br /&gt;
&lt;br /&gt;
No. The SILK codec, as submitted by Skype to the IETF, was heavily modified as part of its integration within Opus. The modifications are significant enough that it is not possible to just write a &amp;quot;translator&amp;quot; and even sharing code between Opus and the &amp;quot;old SILK&amp;quot; would be highly non-trivial.&lt;br /&gt;
&lt;br /&gt;
=== What are the licensing requirements? ===&lt;br /&gt;
&lt;br /&gt;
The reference Opus source code is released under the BSD license, which is a very permissive Open Source license. Commercial use and distribution (including in proprietary software) is permitted, provided that some conditions specified in the license are met. &lt;br /&gt;
&lt;br /&gt;
Opus is also covered by some patents, for which royalty-free usage rights are granted, under conditions that the authors believe are compatible with most (all?) open source licenses, including the GPL (v2 and v3).&lt;br /&gt;
&lt;br /&gt;
=== How does the quality of Opus compare to other codecs? ===&lt;br /&gt;
&lt;br /&gt;
=== What is Opus Custom? ===&lt;br /&gt;
&lt;br /&gt;
Opus Custom is an '''optional''' part of the Opus standard that allows for sampling rates other than 8, 12, 16, 24, or 48 kHz and frame sizes other than multiples of 2.5 ms. Opus Custom requires additional out-of-band signalling that Opus does not normally require and disables many of Opus' coding modes. Also, because it is an optional part of the specification, using Opus Custom may lead to compatibility problems. For these reasons, its use is discouraged outside of very specific applications, e.g.:&lt;br /&gt;
* ultra low delay applications where synchronization with the soundcard buffer is important. &lt;br /&gt;
* low-power embedded applications where compatibility with others is not important.&lt;br /&gt;
&lt;br /&gt;
For almost all other types of applications, Opus Custom should not be used.&lt;br /&gt;
&lt;br /&gt;
=== How do I use 44.1 kHz or some other sampling rate not directly supported by Opus? ===&lt;br /&gt;
&lt;br /&gt;
Tools which read or write Opus should inter-work with other sampling rate by transparently performing sample rate conversion behind the scenes.&lt;br /&gt;
&lt;br /&gt;
Software developers should not use Opus Custom for 44.1 kHz support, except in the very specific circumstances outlined above.&lt;br /&gt;
&lt;br /&gt;
=== Which implementation should I get? ===&lt;br /&gt;
&lt;br /&gt;
While the implementation in the latest IETF draft (and eventually RFC) of Opus is what defines the standard, it is likely not the best and most up-to-date implementation. The [http://opus-codec.org/ Opus] website was set up for the purpose of continually improving the implementation while still conforming to the standard. All Opus implementations are compatible but better Opus encoders can deliver higher quality audio and some implementations may be faster or slower or work better on different platforms.&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OpusFAQ</id>
		<title>OpusFAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OpusFAQ"/>
				<updated>2012-05-24T20:58:35Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Is the SILK part of Opus compatible with the SILK implementation shipped in Skype? ===&lt;br /&gt;
&lt;br /&gt;
No. The SILK codec, as submitted by Skype to the IETF, was heavily modified as part of its integration within Opus. The modifications are significant enough that it is not possible to just write a &amp;quot;translator&amp;quot; and even sharing code between Opus and the &amp;quot;old SILK&amp;quot; would be highly non-trivial.&lt;br /&gt;
&lt;br /&gt;
=== What is Opus Custom? ===&lt;br /&gt;
&lt;br /&gt;
Opus Custom is an '''optional''' part of the Opus standard that allows for sampling rates other than 8, 12, 16, 24, or 48 kHz and frame sizes other than multiples of 2.5 ms. Opus Custom requires additional out-of-band signalling that Opus does not normally require. Also, because it is an optional part of the specification, using Opus Custom may lead to compatibility problems. For these reasons, its use is discouraged outside of very specific applications, e.g.:&lt;br /&gt;
* ultra low delay applications where synchronization with the soundcard buffer is important. &lt;br /&gt;
* low-power embedded applications where compatibility with others is not important.&lt;br /&gt;
&lt;br /&gt;
For almost all other types of applications, Opus Custom should not be used.&lt;br /&gt;
&lt;br /&gt;
=== How do I use 44.1 kHz or some other sampling rate not supported by Opus? ===&lt;br /&gt;
&lt;br /&gt;
In the vast majority of cases, the best way to support other sampling rates is to perform sample rate conversion to 48 kHz. You should not use Opus Custom just for 44.1 kHz support, except in the very specific circumstances outlined above.&lt;br /&gt;
&lt;br /&gt;
=== What are the licensing requirements? ===&lt;br /&gt;
&lt;br /&gt;
The Opus source code is released under the BSD license, which is a very permissive Open Source license. Commercial use and distribution (including in proprietary software) is permitted, provided that some conditions specified in the license are met. &lt;br /&gt;
&lt;br /&gt;
Opus is also covered by some patents, for which royalty-free usage rights are granted, under conditions that the authors believe are compatible with most (all?) open source licenses, including the GPL (v2 and v3).&lt;br /&gt;
&lt;br /&gt;
=== How does the quality of Opus compare to other codecs? ===&lt;br /&gt;
&lt;br /&gt;
=== Which implementation should I get? ===&lt;br /&gt;
&lt;br /&gt;
While the implementation in the latest IETF draft (and eventually RFC) of Opus is what defines the standard, it is likely not the best and most up-to-date implementation. The [http://opus-codec.org/ Opus] website was set up for the purpose of continually improving the implementation while still conforming to the standard.&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/TDLT</id>
		<title>TDLT</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/TDLT"/>
				<updated>2012-05-24T03:43:34Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Add start of 16x32 results&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page holds the results of Time Domain Lapped Transform (TDLT) optimization problems looking for integer transform coefficients that provide optimal coding gain.  Wherever possible the assumptions are stated.  Later we should include testing against actual image data to verify the results (see test data [http://people.xiph.org/~tterribe/tmp/subset1-y4m.tar.gz here]).&lt;br /&gt;
&lt;br /&gt;
The coding gain objective used as the objective is taken from slide 13 of Tim's presentation [http://people.xiph.org/~tterribe/pubs/lca2012/auckland/intro_to_video1.pdf An Introduction to Video Coding]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;need figure with block matrix diagrams&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The free parameters are initially just the coefficients p_0,...,p_m,q_0,...,q_m where m=(n/2)-1.  We limit these to being dyadic rationals, e.g., x/2^d with d=6, between [-1,1].&lt;br /&gt;
&lt;br /&gt;
Given p's and q's and assuming a linear ramp constrains the s's.&lt;br /&gt;
 &lt;br /&gt;
== 4x8 ==&lt;br /&gt;
&lt;br /&gt;
Optimal real-valued coefficients for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -0.18117338915051454&lt;br /&gt;
&lt;br /&gt;
q0 = 0.6331818230771687&lt;br /&gt;
&lt;br /&gt;
CG = 8.60603&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!&lt;br /&gt;
!p0&lt;br /&gt;
!q0&lt;br /&gt;
!s0&lt;br /&gt;
!s1&lt;br /&gt;
!CG&lt;br /&gt;
|-&lt;br /&gt;
|R=f&lt;br /&gt;
| -11/64&amp;lt;br&amp;gt;-0.171875&lt;br /&gt;
| 36/64&amp;lt;br&amp;gt;0.5625&lt;br /&gt;
| 91/64&amp;lt;br&amp;gt;1.421875&lt;br /&gt;
| 85/64&amp;lt;br&amp;gt;1.328125&lt;br /&gt;
| &amp;amp;nbsp;&amp;lt;br&amp;gt;8.63473&lt;br /&gt;
|-&lt;br /&gt;
|R=t,D=f&lt;br /&gt;
| -12/64&amp;lt;br&amp;gt;-0.1875&lt;br /&gt;
| 41/64&amp;lt;br&amp;gt;0.640625&lt;br /&gt;
| 92/64&amp;lt;br&amp;gt;1.4375&lt;br /&gt;
| 1093/768&amp;lt;br&amp;gt;1.423177&lt;br /&gt;
| &amp;amp;nbsp;&amp;lt;br&amp;gt;8.60486&lt;br /&gt;
|-&lt;br /&gt;
|R=t,D=t&lt;br /&gt;
| -16/64&amp;lt;br&amp;gt;-0.25&lt;br /&gt;
| 41/64&amp;lt;br&amp;gt;0.640625&lt;br /&gt;
| 92/64&amp;lt;br&amp;gt;1.4375&lt;br /&gt;
| 93/64&amp;lt;br&amp;gt;1.453125&lt;br /&gt;
| &amp;amp;nbsp;&amp;lt;br&amp;gt;8.59886&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 8x16 ==&lt;br /&gt;
&lt;br /&gt;
Optimal real-valued coefficients for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -0.39460731547057293&lt;br /&gt;
&lt;br /&gt;
p1 = -0.33002212811740816&lt;br /&gt;
&lt;br /&gt;
p2 = -0.12391270981321137&lt;br /&gt;
&lt;br /&gt;
q0 = 0.822154737511288&lt;br /&gt;
&lt;br /&gt;
q1 = 0.632488694485779&lt;br /&gt;
&lt;br /&gt;
q2 = 0.40214668677553894&lt;br /&gt;
&lt;br /&gt;
CG = 9.56867&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!&lt;br /&gt;
!p0&lt;br /&gt;
!p1&lt;br /&gt;
!p2&lt;br /&gt;
!q0&lt;br /&gt;
!q1&lt;br /&gt;
!q2&lt;br /&gt;
!s0&lt;br /&gt;
!s1&lt;br /&gt;
!s2&lt;br /&gt;
!s3&lt;br /&gt;
!CG&lt;br /&gt;
|-&lt;br /&gt;
|R=f&lt;br /&gt;
|-&lt;br /&gt;
|R=t,D=f&lt;br /&gt;
| -26/64&amp;lt;br&amp;gt;-0.40625&lt;br /&gt;
| -22/64&amp;lt;br&amp;gt;-0.34375&lt;br /&gt;
| -8/64&amp;lt;br&amp;gt;-0.125&lt;br /&gt;
| 53/64&amp;lt;br&amp;gt;0.828125&lt;br /&gt;
| 41/64&amp;lt;br&amp;gt;0.640625&lt;br /&gt;
| 26/64&amp;lt;br&amp;gt;0.40625&lt;br /&gt;
| 11/8&amp;lt;br&amp;gt;1.375&lt;br /&gt;
| 879/768&amp;lt;br&amp;gt;1.14453125&lt;br /&gt;
| 1469/1280&amp;lt;br&amp;gt;1.14765625&lt;br /&gt;
| 275/224&amp;lt;br&amp;gt;1.2276785714285714&lt;br /&gt;
| &amp;amp;nbsp;&amp;lt;br&amp;gt;9.56627&lt;br /&gt;
|-&lt;br /&gt;
|R=t,D=t&lt;br /&gt;
| -24/64&amp;lt;br&amp;gt;-0.375&lt;br /&gt;
| -20/64&amp;lt;br&amp;gt;-0.3125&lt;br /&gt;
| -4/64&amp;lt;br&amp;gt;-0.0625&lt;br /&gt;
| 53/64&amp;lt;br&amp;gt;0.828125&lt;br /&gt;
| 40/64&amp;lt;br&amp;gt;0.625&lt;br /&gt;
| 24/64&amp;lt;br&amp;gt;0.375&lt;br /&gt;
| 88/64&amp;lt;br&amp;gt;1.375&lt;br /&gt;
| 75/64&amp;lt;br&amp;gt;1.171875&lt;br /&gt;
| 76/64&amp;lt;br&amp;gt;1.1875&lt;br /&gt;
| 76/64&amp;lt;br&amp;gt;1.1875&lt;br /&gt;
| &amp;amp;nbsp;&amp;lt;br&amp;gt;9.56161&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== 16x32 ==&lt;br /&gt;
&lt;br /&gt;
Best-known real-valued coefficients for V (R=t):&lt;br /&gt;
&lt;br /&gt;
p0 = -0.42111473798940136&lt;br /&gt;
&lt;br /&gt;
p1 = -0.4121736499899753&lt;br /&gt;
&lt;br /&gt;
p2 = -0.3350240707669929&lt;br /&gt;
&lt;br /&gt;
p3 = -0.3224547931861314&lt;br /&gt;
&lt;br /&gt;
p4 = -0.25883387978005545&lt;br /&gt;
&lt;br /&gt;
p5 = -0.20951913473498104&lt;br /&gt;
&lt;br /&gt;
p6 = -0.0598657149803332&lt;br /&gt;
&lt;br /&gt;
q0 = 0.9107782439906195&lt;br /&gt;
&lt;br /&gt;
q1 = 0.8109855829278226&lt;br /&gt;
&lt;br /&gt;
q2 = 0.715846584586721&lt;br /&gt;
&lt;br /&gt;
q3 = 0.6135951570714172&lt;br /&gt;
&lt;br /&gt;
q4 = 0.49846644853347627&lt;br /&gt;
&lt;br /&gt;
q5 = 0.3945215834922529&lt;br /&gt;
&lt;br /&gt;
q6 = 0.21822275136248082&lt;br /&gt;
&lt;br /&gt;
CG = 9.81157&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!&lt;br /&gt;
!p0&lt;br /&gt;
!p1&lt;br /&gt;
!p2&lt;br /&gt;
!p3&lt;br /&gt;
!p4&lt;br /&gt;
!p5&lt;br /&gt;
!p6&lt;br /&gt;
!q0&lt;br /&gt;
!q1&lt;br /&gt;
!q2&lt;br /&gt;
!q3&lt;br /&gt;
!q4&lt;br /&gt;
!q5&lt;br /&gt;
!q6&lt;br /&gt;
!s0&lt;br /&gt;
!s1&lt;br /&gt;
!s2&lt;br /&gt;
!s3&lt;br /&gt;
!s4&lt;br /&gt;
!s5&lt;br /&gt;
!s6&lt;br /&gt;
!s7&lt;br /&gt;
!CG&lt;br /&gt;
|-&lt;br /&gt;
|R=f&lt;br /&gt;
|-&lt;br /&gt;
|R=t,D=f&lt;br /&gt;
| -26/64&amp;lt;br&amp;gt;-0.40625&lt;br /&gt;
| -23/64&amp;lt;br&amp;gt;-0.359375&lt;br /&gt;
| -20/64&amp;lt;br&amp;gt;-0.3125&lt;br /&gt;
| -18/64&amp;lt;br&amp;gt;-0.28125&lt;br /&gt;
| -14/64&amp;lt;br&amp;gt;-0.21875&lt;br /&gt;
| -14/64&amp;lt;br&amp;gt;-0.21875&lt;br /&gt;
| -2/64&amp;lt;br&amp;gt;-0.03125&lt;br /&gt;
| 58/64&amp;lt;br&amp;gt;0.90625&lt;br /&gt;
| 52/64&amp;lt;br&amp;gt;0.8125&lt;br /&gt;
| 45/64&amp;lt;br&amp;gt;0.703125&lt;br /&gt;
| 36/64&amp;lt;br&amp;gt;0.5625&lt;br /&gt;
| 31/64&amp;lt;br&amp;gt;0.484375&lt;br /&gt;
| 23/64&amp;lt;br&amp;gt;0.359375&lt;br /&gt;
| 16/64&amp;lt;br&amp;gt;0.25&lt;br /&gt;
| 3/2&amp;lt;br&amp;gt;1.5&lt;br /&gt;
| 77/64&amp;lt;br&amp;gt;1.20313&lt;br /&gt;
| 373/320&amp;lt;br&amp;gt;1.16563&lt;br /&gt;
| 543/448&amp;lt;br&amp;gt;1.21205&lt;br /&gt;
| 109/96&amp;lt;br&amp;gt;1.13542&lt;br /&gt;
| 1543/1408&amp;lt;br&amp;gt;1.09588&lt;br /&gt;
| 1823/1664&amp;lt;br&amp;gt;1.09555&lt;br /&gt;
| 131/120&amp;lt;br&amp;gt;1.09167&lt;br /&gt;
| &amp;amp;nbsp;&amp;lt;br&amp;gt;9.79008&lt;br /&gt;
|-&lt;br /&gt;
|R=t,D=t&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/TDLT</id>
		<title>TDLT</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/TDLT"/>
				<updated>2012-05-12T22:00:08Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page holds the results of Time Domain Lapped Transform (TDLT) optimization problems looking for integer transform coefficients that provide optimal coding gain.  Wherever possible the assumptions are stated.  Later we should include testing against actual image data to verify the results (see test data [http://people.xiph.org/~tterribe/tmp/subset1-y4m.tar.gz here]).&lt;br /&gt;
&lt;br /&gt;
The coding gain objective used as the objective is taken from slide 13 of Tim's presentation [http://people.xiph.org/~tterribe/pubs/lca2012/auckland/intro_to_video1.pdf An Introduction to Video Coding]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;need figure with block matrix diagrams&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The free parameters are initially just the coefficients p_0,...,p_m,q_0,...,q_m where m=(n/2)-1.  We limit these to being dyadic rationals, e.g., x/2^d with d=6, between [-1,1].&lt;br /&gt;
&lt;br /&gt;
Given p's and q's and assuming a linear ramp constrains the s's.&lt;br /&gt;
 &lt;br /&gt;
== 4x8 ==&lt;br /&gt;
&lt;br /&gt;
s0 = 4*(1-q0)&lt;br /&gt;
s1 = 4*(1-p0*(1-q0))/3&lt;br /&gt;
&lt;br /&gt;
Optimal real-valued coefficients for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -0.18117338915051454&lt;br /&gt;
&lt;br /&gt;
q0 = 0.6331818230771687&lt;br /&gt;
&lt;br /&gt;
CG = 8.60603&lt;br /&gt;
&lt;br /&gt;
Optimal integer-valued coefficients (d=6) for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -12/64 = -0.1875&lt;br /&gt;
&lt;br /&gt;
q0 = 41/64 = 0.640625&lt;br /&gt;
&lt;br /&gt;
CG = 8.60486&lt;br /&gt;
&lt;br /&gt;
Optimal integer-valued coefficients (d=6) were (1-p0*(1-q0)) is divisible by 3:&lt;br /&gt;
&lt;br /&gt;
p0 = -13/64 = -0.203125&lt;br /&gt;
&lt;br /&gt;
q0 = 41/64 = 0.640625&lt;br /&gt;
&lt;br /&gt;
CG = 8.60446&lt;br /&gt;
&lt;br /&gt;
== 8x16 ==&lt;br /&gt;
&lt;br /&gt;
Optimal real-valued coefficients for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -0.39460731547057293&lt;br /&gt;
&lt;br /&gt;
p1 = -0.33002212811740816&lt;br /&gt;
&lt;br /&gt;
p2 = -0.12391270981321137&lt;br /&gt;
&lt;br /&gt;
q0 = 0.822154737511288&lt;br /&gt;
&lt;br /&gt;
q1 = 0.632488694485779&lt;br /&gt;
&lt;br /&gt;
q2 = 0.40214668677553894&lt;br /&gt;
&lt;br /&gt;
CG = 9.56867&lt;br /&gt;
&lt;br /&gt;
Optimal [maybe] integer-valued coefficients (d=6) for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -26/64 = -0.40625&lt;br /&gt;
&lt;br /&gt;
p1 = -22/64 = -0.34375&lt;br /&gt;
&lt;br /&gt;
p2 = -8/64 = -0.125&lt;br /&gt;
&lt;br /&gt;
q0 = 53/64 = 0.828125&lt;br /&gt;
&lt;br /&gt;
q1 = 41/64 = 0.640625&lt;br /&gt;
&lt;br /&gt;
q2 = 26/64 = 0.40625&lt;br /&gt;
&lt;br /&gt;
9.56627&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/TDLT</id>
		<title>TDLT</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/TDLT"/>
				<updated>2012-05-12T21:51:02Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* 8x16 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page holds the results of Time Domain Lapped Transform (TDLT) optimization problems looking for integer transform coefficients that provide optimal coding gain.  Wherever possible the assumptions are stated.  Later we should include testing against actual image data to verify the results (see test data [http://people.xiph.org/~tterribe/tmp/subset1-y4m.tar.gz here]).&lt;br /&gt;
&lt;br /&gt;
The coding gain objective used as the objective is taken from slide 13 of Tim's presentation [http://people.xiph.org/~tterribe/pubs/lca2012/auckland/intro_to_video1.pdf An Introduction to Video Coding]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;need figure with block matrix diagrams&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The free parameters are initially just the coefficients p_0,...,p_m,q_0,...,q_m where m=(n/2)-1.  We limit these to being dyadic rationals, e.g., x/2^d with d=6, between [-1,1].&lt;br /&gt;
&lt;br /&gt;
Given p's and q's and assuming a linear ramp constrains the s's.&lt;br /&gt;
 &lt;br /&gt;
== 4x8 ==&lt;br /&gt;
&lt;br /&gt;
s0 = 4*(1-q0)&lt;br /&gt;
s1 = 4*(1-p0*(1-q0))/3&lt;br /&gt;
&lt;br /&gt;
Optimal real-valued coefficients for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -0.18117338915051454&lt;br /&gt;
&lt;br /&gt;
q0 = 0.6331818230771687&lt;br /&gt;
&lt;br /&gt;
CG = 8.60603&lt;br /&gt;
&lt;br /&gt;
Optimal integer-valued coefficients (d=6) for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -12/64 = -0.1875&lt;br /&gt;
&lt;br /&gt;
q0 = 41/64 = 0.640625&lt;br /&gt;
&lt;br /&gt;
CG = 8.60486&lt;br /&gt;
&lt;br /&gt;
Optimal integer-valued coefficients (d=6) were (1-p0*(1-q0)) is divisible by 3:&lt;br /&gt;
&lt;br /&gt;
p0 = -13/64 = -0.203125&lt;br /&gt;
&lt;br /&gt;
q0 = 41/64 = 0.640625&lt;br /&gt;
&lt;br /&gt;
CG = 8.60446&lt;br /&gt;
&lt;br /&gt;
== 8x16 ==&lt;br /&gt;
&lt;br /&gt;
Optimal real-valued coefficients for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -0.4045289182698497&lt;br /&gt;
&lt;br /&gt;
p1 = -0.33468137871117265&lt;br /&gt;
&lt;br /&gt;
p2 = -0.12545831989246597&lt;br /&gt;
&lt;br /&gt;
q0 = 0.8222196599456361&lt;br /&gt;
&lt;br /&gt;
q1 = 0.634500829289973&lt;br /&gt;
&lt;br /&gt;
q2 = 0.4034606713167927&lt;br /&gt;
&lt;br /&gt;
CG = 9.56856&lt;br /&gt;
&lt;br /&gt;
Optimal [maybe] integer-valued coefficients (d=6) for V:&lt;br /&gt;
&lt;br /&gt;
p0 = -26/64 = -0.40625&lt;br /&gt;
&lt;br /&gt;
p1 = -22/64 = -0.34375&lt;br /&gt;
&lt;br /&gt;
p2 = -8/64 = -0.125&lt;br /&gt;
&lt;br /&gt;
q0 = 53/64 = 0.828125&lt;br /&gt;
&lt;br /&gt;
q1 = 41/64 = 0.640625&lt;br /&gt;
&lt;br /&gt;
q2 = 26/64 = 0.40625&lt;br /&gt;
&lt;br /&gt;
9.56627&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T17:29:36Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Upgrade pre-skip recommendation for cropping to RFC 2119 strength.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first audio packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below.&lt;br /&gt;
&lt;br /&gt;
All other pages with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer can assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 1  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
Brief description of each field:&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): 0x01 for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed definition of each field:&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be '1' for this version of the encapsulation specification. This 8-bit field is partitioned into two sub-fields. The lower four bits constitute a &amp;quot;minor revision&amp;quot;, while the upper four bits correspond to a &amp;quot;major revision&amp;quot;. I.e., the current major revision is '0', and the current minor revision is '1'. Implementations SHOULD treat streams with an unknown minor revision as backwards-compatible as long as they recognize the major revision. When encountering a stream with an unknown major revision, implementations SHOULD assume it is not backwards compatible. The initial version '1' was chosen to keep implementations from relying on this byte as a null terminator for the OpusHead string.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, a pre-skip of at least 3840 samples (80 ms) is RECOMMENDED to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Encoders SHOULD use no more padding than required to make a variable bitrate (VBR) stream constant bitrate (CBR). Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message.&lt;br /&gt;
&lt;br /&gt;
In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of (61,298*N - 2) bytes, or about 60 kB per Opus stream. With 255 streams, this is 15,630,988 bytes (14.9 MB) and can span up to 61,298 Ogg pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 streams, each containing 120 ms of audio encoded as 2.5 ms frames, each frame using the maximum possible number of bytes (1275) and stored in the least efficient manner allowed (a VBR code 3 Opus packet). Even in such a packet, most of the data will be zeros, as 2.5 ms frames, which are required to run in the MDCT mode, cannot actually use all 1275 bytes. The largest packet consisting entirely of useful data is (15,326*N - 2) bytes, or about 15 kB per stream. This corresponds to 120 ms of audio encoded as 10 ms frames in either LP or Hybrid mode, but at a data rate of over 1 Mbps, which makes little sense for the quality achieved. A more reasonable limit is (7,664*N - 2) bytes, or about 7.5 kB per stream. This corresponds to 120 ms of audio encoded as 20 ms stereo MDCT-mode frames, with a total bitrate just under 511 kbps (not counting the Ogg encapsulation overhead). With N=8, the maximum useful number of streams for the channel meanings currently defined by mapping family 1, this gives a maximum packet size of 61,310 bytes, or just under 60 kB. This is still quite conservative, as it assumes each output channel is taken from one decoded channel of a stereo packet. An implementation could reasonably choose any of these numbers for its internal limits.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T17:25:32Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first audio packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below.&lt;br /&gt;
&lt;br /&gt;
All other pages with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer can assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 1  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
Brief description of each field:&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): 0x01 for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed definition of each field:&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be '1' for this version of the encapsulation specification. This 8-bit field is partitioned into two sub-fields. The lower four bits constitute a &amp;quot;minor revision&amp;quot;, while the upper four bits correspond to a &amp;quot;major revision&amp;quot;. I.e., the current major revision is '0', and the current minor revision is '1'. Implementations SHOULD treat streams with an unknown minor revision as backwards-compatible as long as they recognize the major revision. When encountering a stream with an unknown major revision, implementations SHOULD assume it is not backwards compatible. The initial version '1' was chosen to keep implementations from relying on this byte as a null terminator for the OpusHead string.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Encoders SHOULD use no more padding than required to make a variable bitrate (VBR) stream constant bitrate (CBR). Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message.&lt;br /&gt;
&lt;br /&gt;
In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of (61,298*N - 2) bytes, or about 60 kB per Opus stream. With 255 streams, this is 15,630,988 bytes (14.9 MB) and can span up to 61,298 Ogg pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 streams, each containing 120 ms of audio encoded as 2.5 ms frames, each frame using the maximum possible number of bytes (1275) and stored in the least efficient manner allowed (a VBR code 3 Opus packet). Even in such a packet, most of the data will be zeros, as 2.5 ms frames, which are required to run in the MDCT mode, cannot actually use all 1275 bytes. The largest packet consisting entirely of useful data is (15,326*N - 2) bytes, or about 15 kB per stream. This corresponds to 120 ms of audio encoded as 10 ms frames in either LP or Hybrid mode, but at a data rate of over 1 Mbps, which makes little sense for the quality achieved. A more reasonable limit is (7,664*N - 2) bytes, or about 7.5 kB per stream. This corresponds to 120 ms of audio encoded as 20 ms stereo MDCT-mode frames, with a total bitrate just under 511 kbps (not counting the Ogg encapsulation overhead). With N=8, the maximum useful number of streams for the channel meanings currently defined by mapping family 1, this gives a maximum packet size of 61,310 bytes, or just under 60 kB. This is still quite conservative, as it assumes each output channel is taken from one decoded channel of a stereo packet. An implementation could reasonably choose any of these numbers for its internal limits.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T17:15:21Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below.&lt;br /&gt;
&lt;br /&gt;
All other pages with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer can assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be '1' for this version of the encapsulation specification. This 8-bit field is partitioned into two sub-fields. The lower four bits constitute a &amp;quot;minor revision&amp;quot;, while the upper four bits correspond to a &amp;quot;major revision&amp;quot;. Implementations SHOULD treat streams with an unknown minor revision as backwards-compatible as long as they recognize the major revision. When encountering a stream with an unknown major revision, implementations SHOULD assume it is not backwards compatible. The initial version '1' was chosen to keep implementations from relying on this byte as a null terminator for the OpusHead string.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Encoders SHOULD use no more padding than required to make a variable bitrate (VBR) stream constant bitrate (CBR). Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message.&lt;br /&gt;
&lt;br /&gt;
In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of (61,298*N - 2) bytes, or about 60 kB per Opus stream. With 255 streams, this is 15,630,988 bytes (14.9 MB) and can span up to 61,298 Ogg pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 streams, each containing 120 ms of audio encoded as 2.5 ms frames, each frame using the maximum possible number of bytes (1275) and stored in the least efficient manner allowed (a VBR code 3 Opus packet). Even in such a packet, most of the data will be zeros, as 2.5 ms frames, which are required to run in the MDCT mode, cannot actually use all 1275 bytes. The largest packet consisting entirely of useful data is (15,326*N - 2) bytes, or about 15 kB per stream. This corresponds to 120 ms of audio encoded as 10 ms frames in either LP or Hybrid mode, but at a data rate of over 1 Mbps, which makes little sense for the quality achieved. A more reasonable limit is (7,664*N - 2) bytes, or about 7.5 kB per stream. This corresponds to 120 ms of audio encoded as 20 ms stereo MDCT-mode frames, with a total bitrate just under 511 kbps (not counting the Ogg encapsulation overhead). With N=8, the maximum useful number of streams for the channel meanings currently defined by mapping family 1, this gives a maximum packet size of 61,310 bytes, or just under 60 kB. This is still quite conservative, as it assumes each output channel is taken from one decoded channel of a stereo packet. An implementation could reasonably choose any of these numbers for its internal limits.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T17:12:15Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Recommend against excessive padding.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below.&lt;br /&gt;
&lt;br /&gt;
All other pages with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer can assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be '1' for this version of the encapsulation specification. This 8-bit field is partitioned into two sub-fields. The lower four bits constitute a &amp;quot;minor revision&amp;quot;, while the upper four bits correspond to a &amp;quot;major revision&amp;quot;. Implementations SHOULD treat streams with an unknown minor revision as backwards-compatible as long as they recognize the major revision. When encountering a stream with an unknown major revision, implementations SHOULD assume it is not backwards compatible. The initial version '1' was chosen to keep implementations from relying on this byte as a null terminator for the OpusHead string.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Encoders SHOULD use no more padding than required to make a VBR stream CBR. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message.&lt;br /&gt;
&lt;br /&gt;
In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of (61,298*N - 2) bytes, or about 60 kB per Opus stream. With 255 streams, this is 15,630,988 bytes (14.9 MB) and can span up to 61,298 Ogg pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 streams, each containing 120 ms of audio encoded as 2.5 ms frames, each frame using the maximum possible number of bytes (1275) and stored in the least efficient manner allowed (a VBR code 3 Opus packet). Even in such a packet, most of the data will be zeros, as 2.5 ms frames, which are required to run in the MDCT mode, cannot actually use all 1275 bytes. The largest packet consisting entirely of useful data is (15,326*N - 2) bytes, or about 15 kB per stream. This corresponds to 120 ms of audio encoded as 10 ms frames in either LP or Hybrid mode, but at a data rate of over 1 Mbps, which makes little sense for the quality achieved. A more reasonable limit is (7,664*N - 2) bytes, or about 7.5 kB per stream. This corresponds to 120 ms of audio encoded as 20 ms stereo MDCT-mode frames, with a total bitrate just under 511 kbps (not counting the Ogg encapsulation overhead). With N=8, the maximum useful number of streams for the channel meanings currently defined by mapping family 1, this gives a maximum packet size of 61,310 bytes, or just under 60 kB. This is still quite conservative, as it assumes each output channel is taken from one decoded channel of a stereo packet. An implementation could reasonably choose any of these numbers for its internal limits.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T17:09:43Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below.&lt;br /&gt;
&lt;br /&gt;
All other pages with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer can assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be '1' for this version of the encapsulation specification. This 8-bit field is partitioned into two sub-fields. The lower four bits constitute a &amp;quot;minor revision&amp;quot;, while the upper four bits correspond to a &amp;quot;major revision&amp;quot;. Implementations SHOULD treat streams with an unknown minor revision as backwards-compatible as long as they recognize the major revision. When encountering a stream with an unknown major revision, implementations SHOULD assume it is not backwards compatible. The initial version '1' was chosen to keep implementations from relying on this byte as a null terminator for the OpusHead string.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message.&lt;br /&gt;
&lt;br /&gt;
In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of (61,298*N - 2) bytes, or about 60 kB per Opus stream. With 255 streams, this is 15,630,988 bytes (14.9 MB) and can span up to 61,298 Ogg pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 streams, each containing 120 ms of audio encoded as 2.5 ms frames, each frame using the maximum possible number of bytes (1275) and stored in the least efficient manner allowed (a VBR code 3 Opus packet). Even in such a packet, most of the data will be zeros, as 2.5 ms frames, which are required to run in the MDCT mode, cannot actually use all 1275 bytes. The largest packet consisting entirely of useful data is (15,326*N - 2) bytes, or about 15 kB per stream. This corresponds to 120 ms of audio encoded as 10 ms frames in either LP or Hybrid mode, but at a data rate of over 1 Mbps, which makes little sense for the quality achieved. A more reasonable limit is (7,664*N - 2) bytes, or about 7.5 kB per stream. This corresponds to 120 ms of audio encoded as 20 ms stereo MDCT-mode frames, with a total bitrate just under 511 kbps (not counting the Ogg encapsulation overhead). With N=8, the maximum useful number of streams for the channel meanings currently defined by mapping family 1, this gives a maximum packet size of 61,310 bytes, or just under 60 kB. This is still quite conservative, as it assumes each output channel is taken from one decoded channel of a stereo packet. An implementation could reasonably choose any of these numbers for its internal limits.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T16:59:49Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Add more reasonable implementation guidance for packet size limits.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below.&lt;br /&gt;
&lt;br /&gt;
All other pages with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer can assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be '1' for this version of the encapsulation specification. This 8-bit field is partitioned into two sub-fields. The lower four bits constitute a &amp;quot;minor revision&amp;quot;, while the upper four bits correspond to a &amp;quot;major revision&amp;quot;. Implementations SHOULD treat streams with an unknown minor revision as backwards-compatible as long as they recognize the major revision. When encountering a stream with an unknown major revision, implementations SHOULD assume it is not backwards compatible. The initial version '1' was chosen to keep implementations from relying on this byte as a null terminator for the OpusHead string.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message.&lt;br /&gt;
&lt;br /&gt;
In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of (61,298*N - 2) bytes, or about 60 kB per Opus stream. With 255 streams, this is 15,630,988 bytes (14.9 MB) and can span up to 61,298 Ogg pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 streams, each containing 120 ms of audio encoded as 2.5 ms frames, each frame using the maximum possible number of bytes (1275) and stored in the least efficient manner allowed (a VBR code 3 Opus packet). Even in such a packet, most of the data will be zeros, as 2.5 ms frames, which are required to run in the MDCT mode, cannot actually use all 1275 bytes. The largest packet consisting entirely of useful data is (15,326*N - 2) bytes, or about 15 kB per stream. This corresponds to 120 ms of audio encoded as 10 ms frames in either LP or Hybrid mode, but at a data rate of over 1 Mbps, which makes little sense for the quality achieved. A more reasonable limit is (7,664*N - 2) bytes, or about 7.5 kB per stream. This corresponds to 120 ms of audio encoded as 20 ms stereo MDCT-mode frames, with a total bitrate just under 511 kbps (not counting the Ogg encapsulation overhead). With N=8, the maximum useful number of streams for the channel assignments currently defined by mapping 1, this gives a maximum packet size of 61,310 bytes, or just under 60 kB. This is still quite conservative, as it assumes each output channel is taken from one decoded channel of a stereo packet. An implementation could reasonably choose any of these numbers for its internal limits.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T15:34:58Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be '1' for this version of the encapsulation specification. This 8-bit field is partitioned into two sub-fields. The lower four bits constitute a &amp;quot;minor revision&amp;quot;, while the upper four bits correspond to a &amp;quot;major revision&amp;quot;. Implementations SHOULD treat streams with an unknown minor revision as backwards-compatible as long as they recognize the major revision. When encountering a stream with an unknown major revision, implementations SHOULD assume it is not backwards compatible. The initial version '1' was chosen to keep implementations from relying on this byte as a null terminator for the OpusHead string.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T15:32:50Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Add details for the split version field. Bump the minor revision to '1' (files with '0' are still backwards compatible).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be '1' for this version of the encapsulation specification. This 8-bit field is partitioned into two sub-fields. The lower four bits constitute a &amp;quot;minor revision&amp;quot;, while the upper four bits correspond to a &amp;quot;major revision&amp;quot;. Implementations should treat streams with an unknown minor revision as backwards-compatible as long as they recognize the major revision. When encountering a stream with an unknown major revision, implementations SHOULD assume it is not backwards compatible. The initial version '1' was chosen to keep implementations from relying on this byte as a null terminator for the OpusHead string.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T15:19:32Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be zero for this version of the encapsulation spec. We do not plan to revise the spec, but this also acts as a null terminator for the signature bytes and helps align the rest of the fields.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples (80 ms) prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T00:31:13Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Granule Position */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field MUST be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be zero for this version of the encapsulation spec. We do not plan to revise the spec, but this also acts as a null terminator for the signature bytes and helps align the rest of the fields.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T00:27:34Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Packet Organization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set (which would indicate the first packet is continued from a previous page). Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field SHOULD be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be zero for this version of the encapsulation spec. We do not plan to revise the spec, but this also acts as a null terminator for the signature bytes and helps align the rest of the fields.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T00:23:00Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set. Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field SHOULD be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be zero for this version of the encapsulation spec. We do not plan to revise the spec, but this also acts as a null terminator for the signature bytes and helps align the rest of the fields.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment Header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T00:18:05Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Packet Organization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set. Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field SHOULD be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;=&lt;br /&gt;
   255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be zero for this version of the encapsulation spec. We do not plan to revise the spec, but this also acts as a null terminator for the signature bytes and helps align the rest of the fields.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T00:15:07Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Packet Organization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous, logical [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set. Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. There MUST NOT be any more pages in an Opus logical stream after a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field SHOULD be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;=&lt;br /&gt;
   255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be zero for this version of the encapsulation spec. We do not plan to revise the spec, but this also acts as a null terminator for the signature bytes and helps align the rest of the fields.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-10T00:09:20Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set. Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. Additional pages MUST NOT follow a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field SHOULD be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;=&lt;br /&gt;
   255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be zero for this version of the encapsulation spec. We do not plan to revise the spec, but this also acts as a null terminator for the signature bytes and helps align the rest of the fields.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2012-05-09T23:36:46Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Clean up the description of the granule position restrictions, and explicitly detail all the edge cases I can think of.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg Mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See the [http://tools.ietf.org/html/draft-ietf-codec-opus Opus Specification] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about Opus is either fixed or dynamically switchable, so most of the usual ID and setup header parameters in the header packets of an Ogg encapsulation aren't needed. In particular, bitrate, packet duration, mono/stereo flags, and coding modes are all dynamically switchable from packet to packet. The first one or two bytes in each data packet, the start of the 'TOC sequence' that defines the layout of the packet, specifies all of these parameters for that particular packet. See Section 3 of the Opus Specification for the exact format of the TOC sequence.&lt;br /&gt;
&lt;br /&gt;
The remaining parameters that must be signaled are&lt;br /&gt;
&lt;br /&gt;
* The magic number for stream identification,&lt;br /&gt;
* The stream count and coupling for multichannel audio, and&lt;br /&gt;
* Any metadata or tags.&lt;br /&gt;
&lt;br /&gt;
=== Packet Organization ===&lt;br /&gt;
&lt;br /&gt;
Opus is framed in a continuous [http://www.xiph.org/ogg/doc/framing.html Ogg stream]. &lt;br /&gt;
&lt;br /&gt;
There are two mandatory headers. The granule position of the pages containing these headers MUST be zero.&lt;br /&gt;
&lt;br /&gt;
The first packet in the logical Ogg stream MUST contain the identification header, which uniquely identifies a stream as Opus audio. It MUST begin with the 8 bytes &amp;quot;OpusHead&amp;quot;. It MUST be placed alone in the first page of the logical Ogg stream. This page MUST have the ’beginning of stream’ flag set.&lt;br /&gt;
&lt;br /&gt;
The second Opus packet MUST contain the comment header. It must begin with the 8 bytes &amp;quot;OpusTags&amp;quot;. It MAY span one or more pages, beginning on the second page of the logical stream. However many pages it spans, the comment header packet MUST finish the page on which it ends.&lt;br /&gt;
&lt;br /&gt;
All subsequent pages are audio data pages and the packets they contain are audio data packets. The first audio page SHOULD NOT have the 'continued packet' flag set. Packets MUST be placed into Ogg pages in order until the end of stream. Audio packets MAY span page boundaries. A decoder MUST treat a zero-byte audio packet as if it were an Opus packet with an illegal TOC sequence. The last page SHOULD have the 'end of stream' flag set, but implementations should be prepared to deal with truncated streams which do not have a page marked 'end of stream'. The final packet SHOULD complete on the last page, i.e., the final lacing value should be less than 255. Additional pages MUST NOT follow a page marked 'end of stream'.&lt;br /&gt;
&lt;br /&gt;
=== Granule Position ===&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page encodes the total number of PCM samples in the stream up to and including the last fully-decodable sample from the last packet ''completed'' on that page. A page that is entirely spanned by a single packet (that completes on a subsequent page) has no granule position, and the granule position field SHOULD be set to the special value ’-1’ in two's complement.&lt;br /&gt;
&lt;br /&gt;
The granule position of an audio page is in units of PCM audio samples at a fixed rate of 48 kHz (per channel; a stereo stream’s granule position does not increment at twice the speed of a mono stream). It is possible to run a decoder at other sampling rates, but the format and this specification always count samples assuming a 48 kHz decoding rate.&lt;br /&gt;
&lt;br /&gt;
The duration of an Opus packet may be any multiple of 2.5 ms, up to a maximum of 120 ms. This duration is encoded in the TOC sequence at the beginning of each packet. The number of samples returned by a decoder corresponds to this duration exactly, even for the first few packets. For example, a 20 ms packet fed to a decoder running at 48 kHz will always return 960 samples. A demuxer can parse these TOC sequences to work backwards or forwards from a packet with a known granule position (i.e., the last packet completed on some page) in order to assign granule positions to every packet, or even every individual sample. The one exception is the last page in the stream, as described below. Every other page with completed packets after the first MUST have a granule position equal to the number of samples contained in packets that complete on that page plus the granule position of the most recent page with completed packets. This guarantees that a demuxer will assign individual packets the same granule position when working forwards as when working backwards. There must not be any gaps. In order to support capturing a stream that uses discontinuous transmission (DTX), an encoder SHOULD emit packets that explicitly request the use of Packet Loss Concealment (PLC) (i.e., with a frame length of 0, as defined in Section 3.2.1 of the Opus Specification) in place of the packets that were not transmitted.&lt;br /&gt;
&lt;br /&gt;
There is some amount of latency introduced during the decoding process, to allow for overlap in the MDCT modes, stereo mixing in the LP modes, and resampling, and the encoder will introduce even more latency (though the exact amount is not specified). Therefore the first few samples produced by the decoder do not correspond to any real, input audio, but are instead composed of padding inserted by the encoder to compensate for this latency. These samples must be stored and decoded, as Opus is an asymptotically convergent predictive codec, meaning the decoded contents of each frame depend on the recent history of decoder inputs. A 'pre-skip' field in the ID header signals the number of samples which should be skipped at the beginning of the stream. This provides sufficient history to the decoder so that it has already converged before the stream's output begins. It may also be used to perform sample-accurate cropping of existing encoded streams. This amount need not be a multiple of 2.5 ms, may be smaller than a single packet, or may span several the contents of several packets.&lt;br /&gt;
&lt;br /&gt;
The PCM sample position is determined from the granule position using the formula&lt;br /&gt;
&lt;br /&gt;
 'PCM sample position' = 'granule position' - 'pre-skip' .&lt;br /&gt;
&lt;br /&gt;
For example, if the granule position of the first page is 59971, and the pre-skip is 11971, then the PCM sample position of the last decoded sample from the first page is 48000. This may be converted into a playback time using the formula&lt;br /&gt;
&lt;br /&gt;
                   'PCM sample position'&lt;br /&gt;
 'playback time' = --------------------- .&lt;br /&gt;
                          48000.0&lt;br /&gt;
&lt;br /&gt;
The initial PCM sample position before any samples are played is normally '0'. In this case, the PCM sample position of the first audio sample to be played starts at '1', because it marks the time on the clock ''after'' that sample has been played, and a stream that is exactly one second long has a final PCM sample position of '48000', as in the example here.&lt;br /&gt;
&lt;br /&gt;
Vorbis streams use a granule position smaller than the number of audio samples contained in the first page to indicate that some of those samples must be trimmed from the output. However, to do so it requires that the first page contains exactly two packets, in order to allow the decoder to perform PCM position adjustments before needing to return any PCM data. Opus uses the pre-skip mechanism for this purpose instead, since the encoder may introduce more than a single packet's worth of latency, and since very large packets in streams with a very large number of channels may not fit on a single page.&lt;br /&gt;
&lt;br /&gt;
The page with the 'end of stream' flag set MAY have a granule position that indicates the page contains less audio data than would normally be returned by decoding up through the final packet. This is used to end the stream somewhere other than an even frame boundary. The granule position of the most recent audio page with completed packets is used to make this determination, or '0' is used if there were no previous audio pages with a completed packet. The difference between these granule positions indicates how many samples to keep after decoding the packets that completed on the final page. The remaining samples are discarded. The number of discarded samples SHOULD be smaller than the number decoded from the last packet.&lt;br /&gt;
&lt;br /&gt;
The granule position of the first audio page with a completed packet MAY be larger than the number of samples contained in packets that complete on that page, however it MUST NOT be smaller, unless that page has the 'end of stream' flag set. Allowing a granule position larger than the number of samples allows the beginning of a stream to be cropped without rewriting the granule position of all the remaining pages. This means that the PCM sample position just before the first sample to be played may be larger than '0', but the PCM sample position relative to '0' should still be used for the purposes of synchronization when multiplexing with other logical streams. This does not affect the behavior of pre-skip: exactly 'pre-skip' samples should be skipped from the beginning of the decoded output, even if the initial PCM sample position is greater than zero.&lt;br /&gt;
&lt;br /&gt;
On the other hand, a granule position that is smaller than the number of decoded samples prevents a demuxer from working backwards to assign each packet or each individual sample a valid granule position, since granule positions must be non-negative. A decoder MUST reject as invalid any stream where the granule position is smaller than the number of samples contained in packets that complete on the first page with a completed packet, unless that page has the 'end of stream' flag set. It MAY defer this action until it decodes the last packet completed on that page. If that page has the 'end of stream' flag set, a demuxer can work forwards from the granule position '0', but MUST reject as invalid any stream where the granule position is smaller than the 'pre-skip' amount. This would indicate that more samples should be skipped from the initial decoded output than exist in the stream.&lt;br /&gt;
&lt;br /&gt;
==== ID Header ====&lt;br /&gt;
&lt;br /&gt;
      0                   1                   2                   3&lt;br /&gt;
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'O'     |      'p'      |     'u'       |     's'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |       'H'     |       'e'     |     'a'       |     'd'       |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |  version = 0  | channel count |           pre-skip            |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |                original input sample rate in Hz               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
     |    output gain Q7.8 in dB     |  channel map  |               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     :          optional channel mapping table...                    :&lt;br /&gt;
     |                                                               |&lt;br /&gt;
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits unsigned): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits unsigned, little endian)&lt;br /&gt;
 - Input sample rate (32 bits unsigned, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when&lt;br /&gt;
   decoding&lt;br /&gt;
 - Channel mapping family (8 bits unsigned)&lt;br /&gt;
  --  0 = one stream: mono or L,R stereo&lt;br /&gt;
  --  1 = channels in vorbis spec order: mono or L,R stereo or ... or FL,C,FR,RL,RR,LFE, ...&lt;br /&gt;
  --  2..254 = reserved (treat as 255)&lt;br /&gt;
  --  255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits unsigned): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits unsigned): MUST satisfy M &amp;lt;= N, M+N &amp;lt;=&lt;br /&gt;
   255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits unsigned) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be zero for this version of the encapsulation spec. We do not plan to revise the spec, but this also acts as a null terminator for the signature bytes and helps align the rest of the fields.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output when starting playback, and also the number to subtract from a page's granule position to calculate its PCM sample position.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least 3840 samples (80 ms) to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use for playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal audio bandwidths of 4, 6, 8, 12, and 20 kHz. Each packet in the stream may have a different audio bandwidth. Regardless of the audio bandwidth, the reference decoder supports decoding any stream at a sample rate of 8, 12, 16, 24, or 48 kHz. The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
* If the hardware supports 48 kHz playback, decode at 48 kHz,&lt;br /&gt;
* else if the hardware's highest available sample rate is a supported rate, decode at this sample rate,&lt;br /&gt;
* else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample,&lt;br /&gt;
* else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the 'input sample rate' field allows the encoder to pass the sample rate of the original input stream as metadata. This may be useful when the user requires the output sample rate to match the input sample rate. For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
A value of zero indicates 'unspecified'. Encoders SHOULD write the actual input rate or zero, but decoder implementations which do something with this field SHOULD take care to behave sanely if given crazy values (e.g. don't &lt;br /&gt;
actually upsample the output to 10 MHz if requested).&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder. Virtually all players and media frameworks should apply it by default. If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes. The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero. The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
The gain is the 20 log&amp;lt;sub&amp;gt;10&amp;lt;/sub&amp;gt; ratio of output to input sample values to be applied to the decoder output. E.g. &amp;lt;code&amp;gt;sample *= pow(10, header.gain/(20.*256))&amp;lt;/code&amp;gt; where header.gain is the raw 16 bit Q7.8 value from the header.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels. Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
* Family 0 (RTP mapping)&lt;br /&gt;
** Allowed numbers of channels: 1 or 2&lt;br /&gt;
** 1 channel: monophonic (mono)&lt;br /&gt;
** 2 channels: stereo (left, right)&lt;br /&gt;
** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
* Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis channel order])&lt;br /&gt;
** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
* Family 255 (no defined channel meaning)&lt;br /&gt;
** Allowed numbers of channels: 1...255&lt;br /&gt;
** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel. Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved. A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware. Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus Specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus Specification. All the Opus packets in a single Ogg packet MUST be constrained to produce the same number of decoded samples. A decoder SHOULD treat any Opus packet whose duration is different from that of the first Opus packet in an Ogg packet as if it were an Opus packet with an illegal TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (a single channel) or stereo (two channels) by appropriate initialization of the decoder. The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) MUST be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - The remaining data follows the vorbis-comment header design used in OggVorbis (without the &amp;quot;framing-bit&amp;quot;), OggTheora, and Speex:&lt;br /&gt;
  * Vendor string (always present).&lt;br /&gt;
  ** 4-byte little-endian length field, followed by length bytes of UTF-8 vendor string.&lt;br /&gt;
  * TAG=value metadata strings (zero or more).&lt;br /&gt;
  ** 4-byte little-endian string count.&lt;br /&gt;
  ** Count strings consisting of 4-byte little-endian length and length bytes of UTF-8 string in &amp;quot;tag=value&amp;quot; form.&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume. The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field. This field is similar to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace. If present, it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain). If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain. If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;. If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead 'output gain' field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other Implementation Notes ==&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least 3840 samples prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
Technically valid Opus packets can be arbitrarily large due to the padding format, although the amount of non-padding data they can contain is bounded. These packets may be spread over a similarly enormous number of Ogg pages. Decoders SHOULD avoid attempting to allocate excessive amounts of memory when presented with a very large packet. The presence of an extremely large packet in the stream could indicate a potential memory exhaustion attack or stream corruption. Decoders should reject a packet that is too large to process, and print a warning message. In an Ogg Opus stream, the largest possible valid packet that does not use padding has a size of 15630988 bytes (14.9 MiB) and can span up to 61298 Ogg Pages, all but one of which will have a granulepos of -1. This is of course a very extreme packet, consisting of 255 channels, each containing 120ms of audio encoded as 2.5ms frames, each frame using the maximum possible number of bytes and stored in the least efficient manner allowed.&lt;br /&gt;
&lt;br /&gt;
== Test Vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OggOpus</id>
		<title>OggOpus</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OggOpus"/>
				<updated>2011-11-18T05:08:57Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: Rewrite draft spec.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ogg mapping for Opus ==&lt;br /&gt;
&lt;br /&gt;
The IETF Opus codec is a low-latency audio codec optimized for both voice and general-purpose audio. See [http://tools.ietf.org/html/draft-ietf-codec-opus the spec] for technical details.&lt;br /&gt;
&lt;br /&gt;
Almost everything about this codec is either fixed or dynamically switchable, so the usual id and setup header parameters in the header packets of an Ogg encapsulation aren't useful. In particular, bitrate, frame size, mono/stereo, and coding modes are all dynamically switchable from packet to packet. A one-byte header on each data packet defines the parameters for that particular packet.&lt;br /&gt;
&lt;br /&gt;
Remaining parameters we need to signal are:&lt;br /&gt;
&lt;br /&gt;
* magic number for stream identification&lt;br /&gt;
* comment/metadata tags&lt;br /&gt;
&lt;br /&gt;
Additionally there's been a desire to support some kind of channel bonding for surround, and some kind of option signalling for &amp;quot;Opus Custom&amp;quot;, in particular the granulerate.&lt;br /&gt;
&lt;br /&gt;
=== Draft spec ===&lt;br /&gt;
&lt;br /&gt;
Granulepos is the count of decodeable samples at a fixed rate of 48 kHz.&lt;br /&gt;
&lt;br /&gt;
Two headers: id, comment&lt;br /&gt;
&lt;br /&gt;
==== Id header ====&lt;br /&gt;
&lt;br /&gt;
 - Magic signature: &amp;quot;OpusHead&amp;quot; (64 bits)&lt;br /&gt;
 - Version number (8 bits): zero for this spec&lt;br /&gt;
 - Channel count 'c' (8 bits): MUST be &amp;gt; 0&lt;br /&gt;
 - Pre-skip (16 bits)&lt;br /&gt;
 - Input sample rate (32 bits, little endian): informational only&lt;br /&gt;
 - Output gain (16 bits, little endian, signed Q7.8 in dB) to apply when decoding&lt;br /&gt;
 - Channel mapping family (8 bits)&lt;br /&gt;
  --  0 = one stream, RTP order, 1 = channels in vorbis spec order, 2..254 reserved (treat as 255), 255 = no defined channel meaning&lt;br /&gt;
 If channel mapping family &amp;gt; 0&lt;br /&gt;
 - Stream count 'N' (8 bits): MUST be &amp;gt; 0&lt;br /&gt;
 - Two-channel stream count 'M' (8 bits): MUST satisfy M &amp;lt;= N, M+N &amp;lt;= 255&lt;br /&gt;
 - Channel mapping (8*c bits)&lt;br /&gt;
   -- one stream index (8 bits) per channel (255 means silent throughout the file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some discussion is in order.&lt;br /&gt;
&lt;br /&gt;
* '''Magic signature'''&lt;br /&gt;
The magic signature &amp;quot;OpusHead&amp;quot; allows codec identification and is human readable. Starting with 'Op' helps distinguish it from data packets, as this is an invalid TOC sequence.&lt;br /&gt;
&lt;br /&gt;
* '''Version'''&lt;br /&gt;
The version number must always be zero for this version of the encapsulation spec. We do not plan to revise the spec, but this also acts as a null terminator for the signature bytes and helps align the rest of the fields.&lt;br /&gt;
&lt;br /&gt;
* '''Channel count''' 'c'&lt;br /&gt;
The number of channels byte specifies the number of output channels (1...255) for this Ogg Opus stream.&lt;br /&gt;
&lt;br /&gt;
* '''Pre-skip'''&lt;br /&gt;
This is the number of samples (at 48 kHz) to discard from the decoder output before starting playback.&lt;br /&gt;
&lt;br /&gt;
The purpose of pre-skip is to allow a time-segment of an existing Opus stream to be saved as an independent Ogg file, with single-sample time granularity, without re-encoding.  Opus is an asymptotically convergent predictive codec, so the decoded contents of each frame depend on the recent history of decoder inputs.  Pre-skip can be used to provide sufficient history to the decoder so that it has already converged before the stream's output begins.&lt;br /&gt;
&lt;br /&gt;
When constructing cropped Ogg Opus streams, we recommend a pre-skip of at least '''FIXME''' samples to ensure complete convergence.&lt;br /&gt;
&lt;br /&gt;
* '''Input sample rate'''&lt;br /&gt;
This is ''not'' the sample rate to use playback of the encoded data.&lt;br /&gt;
&lt;br /&gt;
Opus has a handful of coding modes, with internal sample rates of 8, 12, 16, 24, and 48 kHz. Each packet in the stream may have a different internal sample rate. Regardless of the internal sample rate, the reference decoder supports decoding any stream to any of these sample rates.  The original sample rate of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player SHOULD select the playback sample rate according to the following procedure:&lt;br /&gt;
** If the hardware supports 48 kHz playback, decode at 48 kHz&lt;br /&gt;
** else if the hardware's highest available sample rate is a supported rate, decode at this sample rate&lt;br /&gt;
** else if the hardware's highest available sample rate is less than 48 kHz, decode at the next higher supported rate and resample&lt;br /&gt;
** else decode at 48 kHz and resample.&lt;br /&gt;
&lt;br /&gt;
However, the Ogg mapping allows the encoder to pass the sample rate of the original input stream as metadata.  This may be useful when the user requires the output sample rate to match the input sample rate.  For example, a non-player decoder writing PCM format to disk might choose to resample the output audio back to the original input rate to reduce surprise to the user, who might reasonably expect to get back a file with the same sample rate as the one they fed to the encoder.&lt;br /&gt;
&lt;br /&gt;
* '''Output gain'''&lt;br /&gt;
This is a gain to be applied by the decoder.  Virtually all players and media frameworks should apply it by default.  If a player chooses to apply any volume adjustment or gain modification, such as the R128_TRACK_GAIN or a user-facing volume knob, the adjustment MUST be applied ''in addition'' to this output gain in order to achieve playback at the desired volume.&lt;br /&gt;
&lt;br /&gt;
An encoder SHOULD set the output gain to zero, and instead apply any gain prior to encoding, when this is possible and does not conflict with the user's wishes.  The output gain should only be nonzero when the gain is adjusted after encoding, or when the user wishes to adjust the gain for playback while preserving the ability to recover the original signal amplitude.&lt;br /&gt;
&lt;br /&gt;
Note that although the output gain has enormous range (+/- 128 dB, enough to amplify inaudible sounds to the threshold of physical pain), most applications can only reasonably use a small portion of this range around zero.  The large range serves in part to ensure that gain can always be losslessly transferred between OpusHead and R128_TRACK_GAIN (see below) without saturating.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping family'''&lt;br /&gt;
This byte indicates the order and semantic meaning of the various channels encoded in each Opus packet.  &lt;br /&gt;
&lt;br /&gt;
Each possible value of this byte indicates a ''mapping family'', which defines a set of allowed numbers of channels, and the ordered set of channel names for each allowed number of channels.  Currently there are three defined mapping families, although more may be added:&lt;br /&gt;
&lt;br /&gt;
** Family 0 (RTP mapping)&lt;br /&gt;
*** Allowed numbers of channels: 1 or 2&lt;br /&gt;
*** 1 channel: monophonic (mono)&lt;br /&gt;
*** 2 channels: stereo (left, right)&lt;br /&gt;
*** '''Special mapping''': this channel mapping value also indicates that the contents consists of a single Opus stream that is stereo if and only if c==2, with stream index 0 mapped to channel 0, and (if stereo) stream index 1 mapped to channel 1.  When the channel mapping byte has this value, no further fields are present in OpusHead.&lt;br /&gt;
** Family 1 ([http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 Vorbis mapping])&lt;br /&gt;
*** Allowed numbers of channels: 1 ... 8&lt;br /&gt;
*** Channel meanings depend on the number of channels, see the Vorbis mapping for details.&lt;br /&gt;
** Family 255 (no defined channel meaning)&lt;br /&gt;
*** Allowed numbers of channels: 1...255&lt;br /&gt;
*** Channels are unidentified.  General-purpose players SHOULD NOT attempt to play these streams, and offline decoders MAY deinterleave the output into separate PCM files, one per channel.  Decoders SHOULD NOT produce output for channels mapped to stream index 255 (pure silence) unless they have no other way to indicate the index of non-silent channels.&lt;br /&gt;
&lt;br /&gt;
The remaining channel mapping families (2...254) are reserved.  A decoder encountering a reserved mapping byte should act as though the mapping byte is 255.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus player MUST play any Ogg Opus stream with a channel mapping family of 0 or 1, even if the number of channels does not match the physically connected audio hardware.  Players SHOULD perform channel mixing to increase or reduce the number of channels as needed.&lt;br /&gt;
&lt;br /&gt;
* '''Stream count''' 'N'&lt;br /&gt;
This field indicates the total number of streams so the decoder can correctly parse the packed Opus packets inside the Ogg packet.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to 1, and is not coded.&lt;br /&gt;
&lt;br /&gt;
A multi-channel Opus file is composed of one or more individual Opus streams, each of which produce one or two channels of decoded data. Each Ogg packet contains one Opus packet from each stream. The first N-1 Opus packets are packed using the self-delimiting framing from Appendix B of the Opus specification. The remaining Opus packet is packed using the regular, undelimited framing from Section 3 of the Opus specification. All the Opus packets in a single Ogg packet are constrained to produce the same number of decoded samples.&lt;br /&gt;
&lt;br /&gt;
* '''Two-channel stream count''' 'M'&lt;br /&gt;
Describes the number of streams whose decoders should be configured to produce two channels. This must be no larger than the number of total streams.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, this value defaults to c-1 (i.e., 0 for mono and 1 for stereo), and is not coded.&lt;br /&gt;
&lt;br /&gt;
Each packet in an Opus stream has an internal channel count of 1 or 2, which can change from packet to packet. This is selected by the encoder depending on the bitrate and the contents being encoded. The original channel count of the encoder input is not preserved by the lossy compression.&lt;br /&gt;
&lt;br /&gt;
Regardless of the internal channel count, any Opus stream may be decoded as mono (single channel) or stereo (two channels) by appropriate initialization of the decoder.  The &amp;quot;two-channel stream count&amp;quot; field indicates that the first M Opus decoders should be initialized in stereo mode, and the remaining N-M decoders should be initialized in mono mode. The total number of decoded channels (M+N) must be no larger than 255, as there is no way to index more channels than that in the channel mapping.&lt;br /&gt;
&lt;br /&gt;
* '''Channel mapping'''&lt;br /&gt;
Contains one index per output channel indicating which decoded channel should be used. If the index is less than 2*M, the output MUST be taken from decoding stream (index/2) as stereo and selecting the left channel if index is even, and the right channel if index is odd. If the index is 2*M or larger, the output MUST be taken from decoding stream (index-M) as mono. As a special case, an index of 255 means that the corresponding output channel MUST contain pure silence.&lt;br /&gt;
&lt;br /&gt;
For channel mapping family 0, the first index defaults to 0, and if c==2, the second index defaults to 1. Neither index is coded.&lt;br /&gt;
&lt;br /&gt;
The number of output channels (c) is not constrained to match the number of decoded channels (M+N). A single index MAY appear multiple times, i.e., the same decoded channel may be mapped to multiple output channels. Some decoded channels might not be assigned to any output channel, as well.&lt;br /&gt;
&lt;br /&gt;
==== Comment header ====&lt;br /&gt;
&lt;br /&gt;
 - 8 byte 'OpusTags' magic signature (64 bits)&lt;br /&gt;
 - rest follows the vorbis-comment header design used in OggVorbis, OggTheora, and Speex.&lt;br /&gt;
  ** Vendor string (always present)&lt;br /&gt;
  ** tag=value metadata strings (zero or more)&lt;br /&gt;
&lt;br /&gt;
One new comment field is introduced for Ogg Opus:&lt;br /&gt;
 R128_TRACK_GAIN=-573  &lt;br /&gt;
representing the volume shift needed to normalize the track's volume.  The gain is a Q7.8 fixed point number in dB, as in the OpusHead &amp;quot;output gain&amp;quot; field.  This field acts similarly to the [[VorbisComment#Replay_Gain|REPLAYGAIN_TRACK_GAIN field in Vorbis]], although the normal volume reference is the [http://tech.ebu.ch/loudness EBU-R128] standard.&lt;br /&gt;
&lt;br /&gt;
An Ogg Opus file MUST NOT have more than one such field, and if present its value MUST be an integer from -32768 to +32767 inclusive, represented in ASCII with no whitespace.  If present it MUST correctly represent the R128 normalization gain (relative to the OpusHead output gain).  If a player chooses to make use of the TRACK_GAIN, it MUST be applied ''in addition'' to the OpusHead output gain.  If an encoder populates the TRACK_GAIN field, and the output gain is not otherwise constrained or specified, the encoder SHOULD write the R128 gain into the OpusHead output gain and write &amp;quot;R128_TRACK_GAIN=0&amp;quot;.  If a tool modifies the OpusHead &amp;quot;output gain&amp;quot; field, it MUST also update or remove the R128_TRACK_GAIN comment field.&lt;br /&gt;
&lt;br /&gt;
There is no comment field corresponding to Replaygain's ALBUM_GAIN; that information should instead be stored in the OpusHead &amp;quot;output gain&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
To avoid confusion with multiple normalization schemes, an OpusTags packet SHOULD NOT contain any of the REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, or REPLAYGAIN_ALBUM_PEAK fields.&lt;br /&gt;
&lt;br /&gt;
== Other implementation notes ==&lt;br /&gt;
As [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-130000A.2 in Ogg Vorbis], a granule position on the final page in a stream that indicates less audio data than the final packet would normally return is used to end the stream on other than even frame boundaries. The difference between the actual available data returned and the declared amount indicates how many trailing samples to discard from the decoding process.&lt;br /&gt;
&lt;br /&gt;
When seeking within an Ogg Opus stream, the decoder should start decoding (and discarding the output) at least '''FIXME''' samples prior to the seek point in order to ensure that the output audio is correct at the seek point.&lt;br /&gt;
&lt;br /&gt;
== Test vectors ==&lt;br /&gt;
&lt;br /&gt;
* [[OggOpus/testvectors|Planned test vectors for OggOpus]]&lt;br /&gt;
* Opus test vectors&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/OPUS_TODO</id>
		<title>OPUS TODO</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/OPUS_TODO"/>
				<updated>2011-10-03T17:55:42Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* SILK issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Code ==&lt;br /&gt;
&lt;br /&gt;
=== For IETF draft ===&lt;br /&gt;
* Code cleanup (any left?)&lt;br /&gt;
* Multi-channel signalling (done, needs more testing)&lt;br /&gt;
* Make opus-compare fail for single seriously trashed frames&lt;br /&gt;
&lt;br /&gt;
== SILK issues ==&lt;br /&gt;
* PLC buffer not fully initialized (fix needs verifying)&lt;br /&gt;
* Mid and side using different sampling rates (fix needs verifying)&lt;br /&gt;
* &amp;lt;s&amp;gt;LLBR stereo issue (has a proposed fix)&amp;lt;/s&amp;gt;&lt;br /&gt;
** &amp;lt;s&amp;gt;Introduces prefill bug (fixed on greg's tree)&amp;lt;/s&amp;gt;&lt;br /&gt;
*&amp;lt;s&amp;gt;Artefacts on SILK mono&amp;lt;-&amp;gt;stereo switching&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Artefacts on SILK frame size switching (e.g. 960,480 glitches)&amp;lt;/s&amp;gt;&lt;br /&gt;
* Reduce SILK bandpass switching artefacts&lt;br /&gt;
* &amp;lt;s&amp;gt;Use of signed overflow (undefined in C), intentionally and otherwise. &amp;lt;/s&amp;gt;&lt;br /&gt;
* Encoder triggers DTX randomly (even if not enabled) for 40/60 ms stereo frames&lt;br /&gt;
* &amp;lt;s&amp;gt;CLANG ARITHMETIC UNDEFINED at &amp;lt;silk/silk_NSQ_del_dec.c, (652:33)&amp;gt; : Op: *, Reason : Signed Multiplication Overflow, BINARY OPERATION: left (int32): 90005 right (int32): -25578&amp;lt;/s&amp;gt;&lt;br /&gt;
* CLANG ARITHMETIC UNDEFINED at &amp;lt;silk/decode_core.c, (108:40)&amp;gt; : Op: *, Reason : Signed Multiplication Overflow, BINARY OPERATION: left (int32): 916258817 right (int32): -3 &lt;br /&gt;
* CLANG ARITHMETIC UNDEFINED at &amp;lt;silk/decode_core.c, (108:40)&amp;gt; : Op: +, Reason : Signed Addition Overflow, BINARY OPERATION: left (int32): -418535217 right (int32): -1832517634&lt;br /&gt;
* CLANG ARITHMETIC UNDEFINED at &amp;lt;./silk/Inlines.h, (120:13)&amp;gt; : Op: -=, Reason : Signed Subtraction Overflow, BINARY OPERATION: left (int32): 2147454976 right (int32): -2147467848 &lt;br /&gt;
&amp;lt;!-- ./test_opus voip 48000 2 32000 -bandwidth WB -framesize 10 /home/gmaxwell/big-fb.sw /dev/null --&amp;gt;&lt;br /&gt;
* CLANG ARITHMETIC UNDEFINED at &amp;lt;silk/LPC_analysis_filter.c, (68:25)&amp;gt; : Op: +, Reason : Signed Addition Overflow, BINARY OPERATION: left (int32): -2053682997 right (int32): -96356645 &lt;br /&gt;
* CLANG ARITHMETIC UNDEFINED at &amp;lt;silk/LPC_analysis_filter.c, (67:25)&amp;gt; : Op: +, Reason : Signed Addition Overflow, BINARY OPERATION: left (int32): 2144927654 right (int32): 9275188 &lt;br /&gt;
* CLANG ARITHMETIC UNDEFINED at &amp;lt;silk/LPC_analysis_filter.c, (63:21)&amp;gt; : Op: +, Reason : Signed Addition Overflow, BINARY OPERATION: left (int32): -1503335005 right (int32): -978520921 &lt;br /&gt;
* CLANG ARITHMETIC UNDEFINED at &amp;lt;silk/LPC_analysis_filter.c, (64:21)&amp;gt; : Op: +, Reason : Signed Addition Overflow, BINARY OPERATION: left (int32): 1813111370 right (int32): 545673470 &lt;br /&gt;
* CLANG ARITHMETIC UNDEFINED at &amp;lt;silk/LPC_analysis_filter.c, (65:21)&amp;gt; : Op: +, Reason : Signed Addition Overflow, BINARY OPERATION: left (int32): 2121005902 right (int32): 274731600&lt;br /&gt;
* CLANG ARITHMETIC UNDEFINED at &amp;lt;silk/LPC_analysis_filter.c, (72:21)&amp;gt; : Op: -, Reason : Signed Subtraction Overflow, BINARY OPERATION: left (int32): -79495168 right (int32): 2131398803&lt;br /&gt;
&amp;lt;!-- voip 16000 2 16000 -framesize 20 /home/gmaxwell/big-fb.sw /dev/null --&amp;gt;&lt;br /&gt;
* Review Tim's &amp;quot;LSB with no pulses&amp;quot; fix&lt;br /&gt;
* Fix decoder-side resampling delay for rates other than 48 kHz and document behavior.&lt;br /&gt;
&lt;br /&gt;
=== Later ===&lt;br /&gt;
* &amp;lt;strike&amp;gt;Exposed CELT constrained VBR&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Fixed-point build&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Fix build system (right now it fails to build shared libraries, drops .o files all over)&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Floating point API&amp;lt;/strike&amp;gt;&lt;br /&gt;
* Usable command-line tools (&amp;lt;s&amp;gt;opus is a major regression from libcelt right now&amp;lt;/s&amp;gt;)&lt;br /&gt;
* Smart automatic mode decision&lt;br /&gt;
* psymodel based VBR&lt;br /&gt;
* Remove copy in inverse MDCT&lt;br /&gt;
* Save some float&amp;lt;-&amp;gt;int conversions&lt;br /&gt;
&lt;br /&gt;
== Spec ==&lt;br /&gt;
&lt;br /&gt;
* Finish codec draft&lt;br /&gt;
* Ogg mapping (including multi-channel). See: [[OggOpus]]&lt;br /&gt;
* RTP payload format&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* Logo&lt;br /&gt;
* Test vectors&lt;br /&gt;
* Listening tests&lt;br /&gt;
* Documentation (at a minimum every exported symbol should have complete and accurate documentation)&lt;br /&gt;
* Add content to opus-codec.org&lt;br /&gt;
* Oggz-validate (should also validate opus toc)&lt;br /&gt;
** The above documentation&lt;br /&gt;
** Presentations &lt;br /&gt;
** Examples and test results  (hyperlink to Monty's demo, gmaxwell's HA results page, etc)&lt;br /&gt;
* Useful example software (e.g. streaming software that works correctly) (opus-tools in xiph git)&lt;br /&gt;
** &amp;lt;s&amp;gt;Support for resampling in tools&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Third party software ==&lt;br /&gt;
* Support in ekiga&lt;br /&gt;
* Support in mumble&lt;br /&gt;
* Support in asterisk&lt;br /&gt;
* Support in firefox (rtcweb and in ogg)&lt;br /&gt;
* Support in VLC&lt;br /&gt;
* Support in ogg123&lt;br /&gt;
* Support in ffmpeg&lt;br /&gt;
* Support in rockbox&lt;br /&gt;
* Support in foobar2000&lt;br /&gt;
* Support in gstreamer&lt;br /&gt;
* Support in mplayer&lt;br /&gt;
* Support in xmms&lt;br /&gt;
* Support in oggdsf&lt;br /&gt;
* Support in xiphqt&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/Notes_on_testing_theora</id>
		<title>Notes on testing theora</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/Notes_on_testing_theora"/>
				<updated>2010-04-11T12:40:20Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Comparable operating modes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is still in development, and it's something of a rant at this point in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== On testing ==&lt;br /&gt;
&lt;br /&gt;
Testing correctly is enormously difficult.  I've yet to see a video codec comparison that didn't have at least one material flaw which could be expected to influence the results. This includes my own testing.&lt;br /&gt;
&lt;br /&gt;
Much of this difficulty comes from the fact that we're trying to measure highly dimensional and highly flexible things in a fair manner. Achieving real fairness is often not possible, because the operating space of two codecs doesn't often completely overlap.  How you combine these orthogonal dimensions into one metric of &amp;quot;better&amp;quot; or &amp;quot;worse&amp;quot; is necessarily subjective. &lt;br /&gt;
&lt;br /&gt;
Testing is so difficult that experts in testing, codec developers, and academics have all gotten it wrong.   If you're not willing to spend the time to take a serious effort to understand exactly what is happening, then you should probably abandon any hope of performing a rigorous test and instead admit that your test is just a casual one which might only be applicable to your own usage.&lt;br /&gt;
&lt;br /&gt;
All that said, I'm tired of seeing the same mistakes repeated over and over again. So I thought I'd make this list so that when you fail, as you inevitably will, you can at least fail in new and interesting ways.   --[[User:Gmaxwell|Gmaxwell]] 21:17, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Comparable operating modes ==&lt;br /&gt;
&lt;br /&gt;
By default libtheora provides either a constant QI encode (target quality), a rate-controlled encode (target bitrate), or a two-pass rate controlled encode (target bitrate). The defaults for each are designed for the situations in which they're expected to be used, and ''not'' for consistent codec testing.&lt;br /&gt;
&lt;br /&gt;
Libtheora's one-pass modes are designed for live streaming, which was its original target use case.  Thus, they are &amp;quot;zero&amp;quot; latency and use a short keyframe interval. The one-pass rate-controlled mode is also strictly buffer constrained (constant bit-rate over a small buffering window).  This hard CBR requirement significantly hurts quality at a given bitrate but it makes streaming more reliable and lower latency.  Encoders for many other formats provide this kind of behavior only if you explicitly ask for it.  You can relax, but not disable, this constraint in libtheora if it is not useful for your application, or use a target quality if your application does not require particular bitrates.  The frequent keyframes also require a lot more bits, but improve loss robustness and startup times.&lt;br /&gt;
&lt;br /&gt;
Libtheora's two-pass mode does not impose a hard CBR constraint by default, and uses a higher keyframe interval. It's also able to look ahead at the stream to aid its rate control decisions.  This is similar to the default behavior of many encoders for other formats.  You can still request a hard CBR constraint if it is useful for your application.&lt;br /&gt;
&lt;br /&gt;
You should not compare libtheora's one-pass, one frame in/one frame out, hard CBR mode against other codecs' one-pass VBR mode with several seconds of lookahead. Even though they are both one pass, you are comparing holodecks to oranges. You should also explicitly set the keyframe interval to the same value for every codec you use. Every codec has a different default, and even relatively similar values may give statistically significant differences in the results, depending on how well they allow keyframes to align with scene changes.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
Some formats offer multiple profiles, and some devices can only decode some profiles and not others.  Arguably this means that they aren't a single format, but are instead a collection of related formats under a common name.   Theora has only a single profile. &lt;br /&gt;
&lt;br /&gt;
It isn't reasonable to compare Theora's  &amp;quot;one setting works everwhere&amp;quot; to the best characteristics of different profiles of a competing encoder.&lt;br /&gt;
&lt;br /&gt;
If you compare Theora against a high complexity profile that restricts what devices that other format can play on, understand that you've added a subjective factor to the comparison.  There isn't anything wrong with this, and it can be impossible to avoid, but it should be understood.  You cannot simultaneously compare Theora's quality/bitrate performance against the most complex profile another codec offers and compare its device support to the simplest.&lt;br /&gt;
&lt;br /&gt;
=== Encoder speed levels ===&lt;br /&gt;
&lt;br /&gt;
Although it is fairly fast, libtheora's encoder is not extensively optimized for performance. It's basically been made fast enough to encode streaming resolutions on normal hardware. As of now, current development efforts have gone into improving other parts of the codec. There is a lot of low-hanging fruit in this area.&lt;br /&gt;
&lt;br /&gt;
In particular speed level 2 is provided as an emergency &amp;quot;make it go fast without regard to bitrate&amp;quot; knob. It disables half of the formats' features as a quick measure to make the encoder faster for some real-time applications.  The same kind of speed is possible without sacrificing as much quality/bitrate, but no one has had a chance to write code for that yet.&lt;br /&gt;
&lt;br /&gt;
For a comparison you should probably test libtheora at the default speed.  It's completely fair to note that other encoders currently offer additional speed knobs that make them much faster than libtheora.  It's not really fair to run libtheora at speed level 2 then measure the quality at low bitrates. Unless you want to measure it against MJPEG. The quality/bitrate at speed level 2 is poor. It's supposed to be. It constrains the format to act similar to MJPEG with limited delta frames.&lt;br /&gt;
&lt;br /&gt;
== General points on &amp;quot;objective&amp;quot; measures like PSNR and SSIM ==&lt;br /&gt;
Objective measurements like PSNR and SSIM are tools for measuring &amp;quot;quality&amp;quot; which don't require a human to judge the quality, the computer does it for you. As such, they can enormously reduce the cost of testing.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, much of the art in codec development comes from the fact that computers are not particular good judges of quality.   So what a tool that measures PSNR or SSIM isn't measuring quality, it's measuring PSNR or SSIM.  Under particular circumstances these metrics can be shown to correlate well with human quality judgements. But &amp;quot;particular circumstances&amp;quot; do not mean 'all circumstances'— it isn't too difficult to construct  modified images that get a great objective measure but look like crap, and it is VERY easy to modify in image in a way which is almost imperceptible but which ruins the objective measures.   I'm not aware of any study demonstrating that any of the available objective measures are useful across different significantly different compression techniques, but if used correctly they are probably usable as a rough yard stick.&lt;br /&gt;
&lt;br /&gt;
The key there being used correctly.  There seems to be a problem with using them correctly, since roughly a majority of comparisons seem to screw this up. &lt;br /&gt;
&lt;br /&gt;
'''If you are comparing PSNR or SSIM and the scores for all your test cases do not converge to a similar very high quality at very high bitrates then you are almost certainly doing something wrong.'''&lt;br /&gt;
&lt;br /&gt;
... or you've found some kind of gross bug in the encoder.   Depending on the nature of the bug, your objective measure may not predict human results at all.&lt;br /&gt;
&lt;br /&gt;
=== Offsets ===&lt;br /&gt;
&lt;br /&gt;
The primary cause of getting strange and invalid results from PSNR or SSIM is offset handling.&lt;br /&gt;
&lt;br /&gt;
If you shift a video over a couple of pixels a human observer will hardly notice.  But your SSIM or PSNR will become very bad.&lt;br /&gt;
&lt;br /&gt;
If you see this kind of behaviour,  ''look'' at the results and see if they agree with the numbers.  If the PSNR/SSIM says the video looks no better at 10mbit than it did at 1mbit, but to your eyes it clearly does then your test is broken and useless. &lt;br /&gt;
&lt;br /&gt;
Additionally, different formats have the sub-sampled pixels for chroma at different locations.  Theora _always_ uses the MPEG-1/MJPEG convention. MPEG2 has another convention which is used by default by most other codecs.  Getting the chroma location wrong doesn't produce a ''visible'' harm on most material, but it does screw up PSNR or SSIM.  Many media formats, frameworks, and libraries do not even have the ability to specify which subsampling should be used, and thus do whatever that particular programmer expected would be &amp;quot;normal&amp;quot;.  Most PC player software, even software focused on modern MPEG formats, always decodes as in the MJPEG style, because its is computationally cheaper.  Other software pedantically tries to correct for chroma tagged in one format when it is set up to handle a different one, even though these tags are often wrong.  Unless you know exactly what your tools are doing, you are at risk of one of them screwing this up.  If you apply objective measures in the original YUV space, difference in handling the chroma offset should be limited to damaging the chroma PSNR/SSIM scores, which makes this error more obvious.&lt;br /&gt;
&lt;br /&gt;
If you are planning on comparing your PSNR or SSIM scores with someone else's, you probably shouldn't bother. There is too much inconsistency between tools, too much likelihood of using somewhat different input clips.  This is why its important that you publish your input material— without it people have no hope of reproducing your results, and without reproducing your results the public should have zero trust that you didn't make a simple measurement error.&lt;br /&gt;
&lt;br /&gt;
=== Frame drops ===&lt;br /&gt;
&lt;br /&gt;
If Theora runs out of bits in its hard-bitrate constraint or determines that a frame has almost no motion it will output a zero byte packet. Some decoders simply ignore the zero byte packets, and depend on their normal AV sync mechanisms to keep things well timed.   However, if you are dumping the output to a file for analysis with a SSIM/PSNR tool, these 'lost' frames will result in an time-offset and frames will be compared with the wrong source frames.   This will have somewhere between a big and a huge negative impact on the scores. &lt;br /&gt;
&lt;br /&gt;
'''If your output doesn't have the same number of frames as the input. Stop. You've done something wrong'''.&lt;br /&gt;
&lt;br /&gt;
This case can also cause the &amp;quot;never gets good at high bitrates&amp;quot; behaviour.&lt;br /&gt;
&lt;br /&gt;
=== Levels ===&lt;br /&gt;
&lt;br /&gt;
Objective measures are also very sensitive to changes in luma levels (brightening / darkening). The best way to avoid this case is to measure in the colorspace that the codec worked in, without conversions.  '''Do not convert to RGB before using objective metrics on codecs that operate in YUV''', because you will probably screw it up in a non-obvious way.  &lt;br /&gt;
&lt;br /&gt;
=== Input files ===&lt;br /&gt;
&lt;br /&gt;
It's obvious to most people attempting testing that you must begin with the same input for all of the codecs under test.  It's less obvious that you may run into problems if you begin with RGB input:  Current codecs all operate in some YUV colorspace rather than RGB. If you use RGB files for your inputs differences in the conversion from RGB to YUV between different tools may reduce the objective scores for some formats compared to others. &lt;br /&gt;
&lt;br /&gt;
These differences can even create visible quality differences in corner cases. &lt;br /&gt;
&lt;br /&gt;
== General points on subjective testing ==&lt;br /&gt;
&lt;br /&gt;
=== Codec X has &amp;quot;better colors&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Modern lossy codecs don't do anything which should grossly change the overall brightness, hue, or saturation of an image.  If the colours look different in your comparison, your software is probably mishandling colorspace conversions. Figure out what is broken and try again.&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/Notes_on_testing_theora</id>
		<title>Notes on testing theora</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/Notes_on_testing_theora"/>
				<updated>2010-04-11T12:31:47Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Comparable operating modes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is still in development, and it's something of a rant at this point in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== On testing ==&lt;br /&gt;
&lt;br /&gt;
Testing correctly is enormously difficult.  I've yet to see a video codec comparison that didn't have at least one material flaw which could be expected to influence the results. This includes my own testing.&lt;br /&gt;
&lt;br /&gt;
Much of this difficulty comes from the fact that we're trying to measure highly dimensional and highly flexible things in a fair manner. Achieving real fairness is often not possible, because the operating space of two codecs doesn't often completely overlap.  How you combine these orthogonal dimensions into one metric of &amp;quot;better&amp;quot; or &amp;quot;worse&amp;quot; is necessarily subjective. &lt;br /&gt;
&lt;br /&gt;
Testing is so difficult that experts in testing, codec developers, and academics have all gotten it wrong.   If you're not willing to spend the time to take a serious effort to understand exactly what is happening, then you should probably abandon any hope of performing a rigorous test and instead admit that your test is just a casual one which might only be applicable to your own usage.&lt;br /&gt;
&lt;br /&gt;
All that said, I'm tired of seeing the same mistakes repeated over and over again. So I thought I'd make this list so that when you fail, as you inevitably will, you can at least fail in new and interesting ways.   --[[User:Gmaxwell|Gmaxwell]] 21:17, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Comparable operating modes ==&lt;br /&gt;
&lt;br /&gt;
By default libtheora provides either a constant QI encode (target quality), a rate-controlled encode (target bitrate), or a two-pass rate controlled encode (target bitrate). The defaults for each are designed for the situations in which they're expected to be used, and ''not'' for consistent codec testing.&lt;br /&gt;
&lt;br /&gt;
Libtheora's one-pass modes are designed for live streaming, which was our original target use case.  Thus, they are &amp;quot;zero&amp;quot; latency and use a short keyframe interval. The one-pass rate-controlled mode is strictly buffer constrained (constant bit-rate over a small buffering window).  This hard CBR requirement significantly hurts quality at a given bitrate but it makes streaming more reliable and lower latency.  Encoders for many other formats provide this kind of behavior only if you explicitly ask for it.  You can relax, but not disable, this constraint in libtheora if it is not useful for your application, or use a target quality if your application does not require particular bitrates.  The frequent keyframes also require a lot more bits, but improve loss robustness and startup times.&lt;br /&gt;
&lt;br /&gt;
Libtheora's two-pass mode does not impose a hard CBR constraint by default, and uses a higher keyframe interval. It's also able to look ahead at the stream to aid its rate control decisions.  This is similar to the default behavior of many encoders for other formats.  You can still request a hard CBR constraint if it is useful for your application.&lt;br /&gt;
&lt;br /&gt;
You should not compare libtheora's one-pass, one frame in/one frame out, hard CBR mode against other codecs' one-pass VBR mode with several seconds of lookahead. Even though they are both one pass, you are comparing holodecks to oranges. You should also explicitly set the keyframe interval to the same value for every codec you use. Every codec has a different default, and even relatively similar values may give statistically significant differences in the results, depending on how well they allow keyframes to align with scene changes.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
Some formats offer multiple profiles, and some devices can only decode some profiles and not others.  Arguably this means that they aren't a single format, but are instead a collection of related formats under a common name.   Theora has only a single profile. &lt;br /&gt;
&lt;br /&gt;
It isn't reasonable to compare Theora's  &amp;quot;one setting works everwhere&amp;quot; to the best characteristics of different profiles of a competing encoder.&lt;br /&gt;
&lt;br /&gt;
If you compare Theora against a high complexity profile that restricts what devices that other format can play on, understand that you've added a subjective factor to the comparison.  There isn't anything wrong with this, and it can be impossible to avoid, but it should be understood.  You cannot simultaneously compare Theora's quality/bitrate performance against the most complex profile another codec offers and compare its device support to the simplest.&lt;br /&gt;
&lt;br /&gt;
=== Encoder speed levels ===&lt;br /&gt;
&lt;br /&gt;
Although it is fairly fast, Libtheora's encoder is not extensively optimized for performance. It's basically been made fast enough to encode streaming resolutions on normal hardware. As of currently development efforts have gone into improving other parts of the codec. There is a lot of low-hanging fruit in this area.&lt;br /&gt;
&lt;br /&gt;
In particular speed level 2 is provided as an emergency &amp;quot;make it go fast without regard to bitrate&amp;quot; knob. It disables half of the formats features as a quick measure to make the encoder faster for some real-time applications.  The same kinds of speed are possible without sacrificing quality/bitrate, but no one has bother developing  code them yet. &lt;br /&gt;
&lt;br /&gt;
For a comparison you should probably test libtheora at the default speed.  It's completely fair to note that other encoders currently offer additional speed knobs that make them much faster than libtheora.  It's not really fair to run libtheora at speed level 2 then measure the quality at low bitrates. Unless you want to measure it against MJPEG. The quality/bitrate at speed level 2 is poor. It's supposed to be. It constrains the format to act similar to MJPEG with limited delta frames.&lt;br /&gt;
&lt;br /&gt;
== General points on &amp;quot;objective&amp;quot; measures like PSNR and SSIM ==&lt;br /&gt;
Objective measurements like PSNR and SSIM are tools for measuring &amp;quot;quality&amp;quot; which don't require a human to judge the quality, the computer does it for you. As such, they can enormously reduce the cost of testing.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, much of the art in codec development comes from the fact that computers are not particular good judges of quality.   So what a tool that measures PSNR or SSIM isn't measuring quality, it's measuring PSNR or SSIM.  Under particular circumstances these metrics can be shown to correlate well with human quality judgements. But &amp;quot;particular circumstances&amp;quot; do not mean 'all circumstances'— it isn't too difficult to construct  modified images that get a great objective measure but look like crap, and it is VERY easy to modify in image in a way which is almost imperceptible but which ruins the objective measures.   I'm not aware of any study demonstrating that any of the available objective measures are useful across different significantly different compression techniques, but if used correctly they are probably usable as a rough yard stick.&lt;br /&gt;
&lt;br /&gt;
The key there being used correctly.  There seems to be a problem with using them correctly, since roughly a majority of comparisons seem to screw this up. &lt;br /&gt;
&lt;br /&gt;
'''If you are comparing PSNR or SSIM and the scores for all your test cases do not converge to a similar very high quality at very high bitrates then you are almost certainly doing something wrong.'''&lt;br /&gt;
&lt;br /&gt;
... or you've found some kind of gross bug in the encoder.   Depending on the nature of the bug, your objective measure may not predict human results at all.&lt;br /&gt;
&lt;br /&gt;
=== Offsets ===&lt;br /&gt;
&lt;br /&gt;
The primary cause of getting strange and invalid results from PSNR or SSIM is offset handling.&lt;br /&gt;
&lt;br /&gt;
If you shift a video over a couple of pixels a human observer will hardly notice.  But your SSIM or PSNR will become very bad.&lt;br /&gt;
&lt;br /&gt;
If you see this kind of behaviour,  ''look'' at the results and see if they agree with the numbers.  If the PSNR/SSIM says the video looks no better at 10mbit than it did at 1mbit, but to your eyes it clearly does then your test is broken and useless. &lt;br /&gt;
&lt;br /&gt;
Additionally, different formats have the sub-sampled pixels for chroma at different locations.  Theora _always_ uses the MPEG-1/MJPEG convention. MPEG2 has another convention which is used by default by most other codecs.  Getting the chroma location wrong doesn't produce a ''visible'' harm on most material, but it does screw up PSNR or SSIM.  Many media formats, frameworks, and libraries do not even have the ability to specify which subsampling should be used, and thus do whatever that particular programmer expected would be &amp;quot;normal&amp;quot;.  Most PC player software, even software focused on modern MPEG formats, always decodes as in the MJPEG style, because its is computationally cheaper.  Other software pedantically tries to correct for chroma tagged in one format when it is set up to handle a different one, even though these tags are often wrong.  Unless you know exactly what your tools are doing, you are at risk of one of them screwing this up.  If you apply objective measures in the original YUV space, difference in handling the chroma offset should be limited to damaging the chroma PSNR/SSIM scores, which makes this error more obvious.&lt;br /&gt;
&lt;br /&gt;
If you are planning on comparing your PSNR or SSIM scores with someone else's, you probably shouldn't bother. There is too much inconsistency between tools, too much likelihood of using somewhat different input clips.  This is why its important that you publish your input material— without it people have no hope of reproducing your results, and without reproducing your results the public should have zero trust that you didn't make a simple measurement error.&lt;br /&gt;
&lt;br /&gt;
=== Frame drops ===&lt;br /&gt;
&lt;br /&gt;
If Theora runs out of bits in its hard-bitrate constraint or determines that a frame has almost no motion it will output a zero byte packet. Some decoders simply ignore the zero byte packets, and depend on their normal AV sync mechanisms to keep things well timed.   However, if you are dumping the output to a file for analysis with a SSIM/PSNR tool, these 'lost' frames will result in an time-offset and frames will be compared with the wrong source frames.   This will have somewhere between a big and a huge negative impact on the scores. &lt;br /&gt;
&lt;br /&gt;
'''If your output doesn't have the same number of frames as the input. Stop. You've done something wrong'''.&lt;br /&gt;
&lt;br /&gt;
This case can also cause the &amp;quot;never gets good at high bitrates&amp;quot; behaviour.&lt;br /&gt;
&lt;br /&gt;
=== Levels ===&lt;br /&gt;
&lt;br /&gt;
Objective measures are also very sensitive to changes in luma levels (brightening / darkening). The best way to avoid this case is to measure in the colorspace that the codec worked in, without conversions.  '''Do not convert to RGB before using objective metrics on codecs that operate in YUV''', because you will probably screw it up in a non-obvious way.  &lt;br /&gt;
&lt;br /&gt;
=== Input files ===&lt;br /&gt;
&lt;br /&gt;
It's obvious to most people attempting testing that you must begin with the same input for all of the codecs under test.  It's less obvious that you may run into problems if you begin with RGB input:  Current codecs all operate in some YUV colorspace rather than RGB. If you use RGB files for your inputs differences in the conversion from RGB to YUV between different tools may reduce the objective scores for some formats compared to others. &lt;br /&gt;
&lt;br /&gt;
These differences can even create visible quality differences in corner cases. &lt;br /&gt;
&lt;br /&gt;
== General points on subjective testing ==&lt;br /&gt;
&lt;br /&gt;
=== Codec X has &amp;quot;better colors&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Modern lossy codecs don't do anything which should grossly change the overall brightness, hue, or saturation of an image.  If the colours look different in your comparison, your software is probably mishandling colorspace conversions. Figure out what is broken and try again.&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/Notes_on_testing_theora</id>
		<title>Notes on testing theora</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/Notes_on_testing_theora"/>
				<updated>2010-04-11T12:02:48Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Offsets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is still in development, and it's something of a rant at this point in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== On testing ==&lt;br /&gt;
&lt;br /&gt;
Testing correctly is enormously difficult.  I've yet to see a video codec comparison that didn't have at least one material flaw which could be expected to influence the results. This includes my own testing.&lt;br /&gt;
&lt;br /&gt;
Much of this difficulty comes from the fact that we're trying to measure highly dimensional and highly flexible things in a fair manner. Achieving real fairness is often not possible, because the operating space of two codecs doesn't often completely overlap.  How you combine these orthogonal dimensions into one metric of &amp;quot;better&amp;quot; or &amp;quot;worse&amp;quot; is necessarily subjective. &lt;br /&gt;
&lt;br /&gt;
Testing is so difficult that experts in testing, codec developers, and academics have all gotten it wrong.   If you're not willing to spend the time to take a serious effort to understand exactly what is happening, then you should probably abandon any hope of performing a rigorous test and instead admit that your test is just a casual one which might only be applicable to your own usage.&lt;br /&gt;
&lt;br /&gt;
All that said, I'm tired of seeing the same mistakes repeated over and over again. So I thought I'd make this list so that when you fail, as you inevitably will, you can at least fail in new and interesting ways.   --[[User:Gmaxwell|Gmaxwell]] 21:17, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Comparable operating modes ==&lt;br /&gt;
&lt;br /&gt;
By default libtheora provides either a constant QI encode (target quality), a rate-controlled encode (target bitrate), or a two-pass rate controlled encode (target bitrate).&lt;br /&gt;
&lt;br /&gt;
Libtheora's default one-pass rate controlled mode is a strictly buffer constrained (constant bit-rate over a small buffering window) mode with &amp;quot;zero&amp;quot; latency.  The hard CBR requirement significantly hurts quality at a given bitrate but it makes streaming more reliable and lower latency.  Encoders for many other formats only provide this kind of behaviour if you explicitly ask for it. You can disable this constraint in one pass if it is not useful for your application. (Or, use a target quality if your application does not require particular bitrates)&lt;br /&gt;
&lt;br /&gt;
Libtheora's default two-pass does not impose a hard CBR constraint by default. It's also able to look ahead at the stream to aid its rate control decisions.  This is similar to the behaviour of many encoders for many other formats. You can request a hard CBR constraint if it is useful for you application.&lt;br /&gt;
&lt;br /&gt;
=== Profiles ===&lt;br /&gt;
&lt;br /&gt;
Some formats offer multiple profiles, and some devices can only decode some profiles and not others.  Arguably this means that they aren't a single format, but are instead a collection of related formats under a common name.   Theora has only a single profile. &lt;br /&gt;
&lt;br /&gt;
It isn't reasonable to compare Theora's  &amp;quot;one setting works everwhere&amp;quot; to the best characteristics of different profiles of a competing encoder.  &lt;br /&gt;
&lt;br /&gt;
If you compare Theora against a high complexity profile that restricts what devices that other format can play on, understand that you've added a subjective factor to the comparison.  There isn't anything wrong with this, and it can be impossible to avoid, but it should be understood. &lt;br /&gt;
&lt;br /&gt;
=== Encoder speed levels ===&lt;br /&gt;
&lt;br /&gt;
Although it is fairly fast, Libtheora's encoder is not extensively optimized for performance. It's basically been made fast enough to encode streaming resolutions on normal hardware. As of currently development efforts have gone into improving other parts of the codec. There is a lot of low-hanging fruit in this area for further development. &lt;br /&gt;
&lt;br /&gt;
In particular speed level 2 is provided as an emergency &amp;quot;make it go fast without regard to bitrate&amp;quot; knob. It disables half of the formats features as a quick measure to make the encoder faster for some real-time applications.  The same kinds of speed are possible without sacrificing quality/bitrate, but no one has bother developing  code them yet. &lt;br /&gt;
&lt;br /&gt;
For a comparison you should probably test libtheora at the default speed.  It's completely fair to note that other encoders currently offer additional speed knobs that make them much faster than libtheora.  It's not really fair to run libtheora at speed level 2 then measure the quality at low bitrates. Unless you want to measure it against MJPEG. The quality/bitrate at speed level 2 is poor. It's supposed to be. It constrains the format to act similar to MJPEG with limited delta frames.&lt;br /&gt;
&lt;br /&gt;
== General points on &amp;quot;objective&amp;quot; measures like PSNR and SSIM ==&lt;br /&gt;
Objective measurements like PSNR and SSIM are tools for measuring &amp;quot;quality&amp;quot; which don't require a human to judge the quality, the computer does it for you. As such, they can enormously reduce the cost of testing.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, much of the art in codec development comes from the fact that computers are not particular good judges of quality.   So what a tool that measures PSNR or SSIM isn't measuring quality, it's measuring PSNR or SSIM.  Under particular circumstances these metrics can be shown to correlate well with human quality judgements. But &amp;quot;particular circumstances&amp;quot; do not mean 'all circumstances'— it isn't too difficult to construct  modified images that get a great objective measure but look like crap, and it is VERY easy to modify in image in a way which is almost imperceptible but which ruins the objective measures.   I'm not aware of any study demonstrating that any of the available objective measures are useful across different significantly different compression techniques, but if used correctly they are probably usable as a rough yard stick.&lt;br /&gt;
&lt;br /&gt;
The key there being used correctly.  There seems to be a problem with using them correctly, since roughly a majority of comparisons seem to screw this up. &lt;br /&gt;
&lt;br /&gt;
'''If you are comparing PSNR or SSIM and the scores for all your test cases do not converge to a similar very high quality at very high bitrates then you are almost certainly doing something wrong.'''&lt;br /&gt;
&lt;br /&gt;
... or you've found some kind of gross bug in the encoder.   Depending on the nature of the bug, your objective measure may not predict human results at all.&lt;br /&gt;
&lt;br /&gt;
=== Offsets ===&lt;br /&gt;
&lt;br /&gt;
The primary cause of getting strange and invalid results from PSNR or SSIM is offset handling.&lt;br /&gt;
&lt;br /&gt;
If you shift a video over a couple of pixels a human observer will hardly notice.  But your SSIM or PSNR will become very bad.&lt;br /&gt;
&lt;br /&gt;
If you see this kind of behaviour,  ''look'' at the results and see if they agree with the numbers.  If the PSNR/SSIM says the video looks no better at 10mbit than it did at 1mbit, but to your eyes it clearly does then your test is broken and useless. &lt;br /&gt;
&lt;br /&gt;
Additionally, different formats have the sub-sampled pixels for chroma at different locations.  Theora _always_ uses the MPEG-1/MJPEG convention. MPEG2 has another convention which is used by default by most other codecs.  Getting the chroma location wrong doesn't produce a ''visible'' harm on most material, but it does screw up PSNR or SSIM.  Many media formats, frameworks, and libraries do not even have the ability to specify which subsampling should be used, and thus do whatever that particular programmer expected would be &amp;quot;normal&amp;quot;.  Most PC player software, even software focused on modern MPEG formats, always decodes as in the MJPEG style, because its is computationally cheaper.  Other software pedantically tries to correct for chroma tagged in one format when it is set up to handle a different one, even though these tags are often wrong.  Unless you know exactly what your tools are doing, you are at risk of one of them screwing this up.  If you apply objective measures in the original YUV space, difference in handling the chroma offset should be limited to damaging the chroma PSNR/SSIM scores, which makes this error more obvious.&lt;br /&gt;
&lt;br /&gt;
If you are planning on comparing your PSNR or SSIM scores with someone else's, you probably shouldn't bother. There is too much inconsistency between tools, too much likelihood of using somewhat different input clips.  This is why its important that you publish your input material— without it people have no hope of reproducing your results, and without reproducing your results the public should have zero trust that you didn't make a simple measurement error.&lt;br /&gt;
&lt;br /&gt;
=== Frame drops ===&lt;br /&gt;
&lt;br /&gt;
If Theora runs out of bits in its hard-bitrate constraint or determines that a frame has almost no motion it will output a zero byte packet. Some decoders simply ignore the zero byte packets, and depend on their normal AV sync mechanisms to keep things well timed.   However, if you are dumping the output to a file for analysis with a SSIM/PSNR tool, these 'lost' frames will result in an time-offset and frames will be compared with the wrong source frames.   This will have somewhere between a big and a huge negative impact on the scores. &lt;br /&gt;
&lt;br /&gt;
'''If your output doesn't have the same number of frames as the input. Stop. You've done something wrong'''.&lt;br /&gt;
&lt;br /&gt;
This case can also cause the &amp;quot;never gets good at high bitrates&amp;quot; behaviour.&lt;br /&gt;
&lt;br /&gt;
=== Levels ===&lt;br /&gt;
&lt;br /&gt;
Objective measures are also very sensitive to changes in luma levels (brightening / darkening). The best way to avoid this case is to measure in the colorspace that the codec worked in, without conversions.  '''Do not convert to RGB before using objective metrics on codecs that operate in YUV''', because you will probably screw it up in a non-obvious way.  &lt;br /&gt;
&lt;br /&gt;
=== Input files ===&lt;br /&gt;
&lt;br /&gt;
It's obvious to most people attempting testing that you must begin with the same input for all of the codecs under test.  It's less obvious that you may run into problems if you begin with RGB input:  Current codecs all operate in some YUV colorspace rather than RGB. If you use RGB files for your inputs differences in the conversion from RGB to YUV between different tools may reduce the objective scores for some formats compared to others. &lt;br /&gt;
&lt;br /&gt;
These differences can even create visible quality differences in corner cases. &lt;br /&gt;
&lt;br /&gt;
== General points on subjective testing ==&lt;br /&gt;
&lt;br /&gt;
=== Codec X has &amp;quot;better colors&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Modern lossy codecs don't do anything which should grossly change the overall brightness, hue, or saturation of an image.  If the colours look different in your comparison, your software is probably mishandling colorspace conversions. Figure out what is broken and try again.&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/TheoraTestsuite</id>
		<title>TheoraTestsuite</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/TheoraTestsuite"/>
				<updated>2010-01-15T04:34:15Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* some samples to test your theora decoder */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== some samples to test your theora decoder ==&lt;br /&gt;
&lt;br /&gt;
a decoder must play all these files without problems to comply with the theora specification.&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/320x240.ogg 320x240.ogg] [0.3 MB]&lt;br /&gt;
&lt;br /&gt;
* simple example&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/320x240.ogv 320x240.ogv] [0.3 MB]&lt;br /&gt;
&lt;br /&gt;
* simple example with Skeleton Stream&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/320x240.skeleton+cmml.ogv 320x240.skeleton+cmml.ogv] [0.3 MB]&lt;br /&gt;
&lt;br /&gt;
* simple example with Skeleton and CMML Stream&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/pixel_aspect_ratio.ogg pixel_aspect_ratio.ogg] - Frame Aspect Ratio: 1.82/1 [1.8 MB]&lt;br /&gt;
&lt;br /&gt;
* defined pixel aspect ratio in header, it also has a theora comment header&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/videotestsrc-720x576-16-15.ogg videotestsrc-720x576-16-15.ogg] - PAL DVD format / Frame Aspect Ratio: 1.33/1 [422K]&lt;br /&gt;
&lt;br /&gt;
* defined pixel aspect ratio in header&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/322x242_not-divisible-by-sixteen-framesize.ogg 322x242_not-divisible-by-sixteen-framesize.ogg] [0.3 MB]&lt;br /&gt;
&lt;br /&gt;
* if you see a black border around the testimage you should have a look at the Spec/2.2 on page 22, to see how to use: ti.width, ti.height, ti.frame_width, ti.frame_height, ti.offset_x, ti.offset_y&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/chained_streams.ogg chained_streams.ogg] [2.4 MB]&lt;br /&gt;
&lt;br /&gt;
* all other samples as a chained stream. (see Spec/A.3.1 on page 157)&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/multi2.ogg multi2.ogg] [171 K]&lt;br /&gt;
&lt;br /&gt;
* another chained file&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/mobile_itu601_i_422.ogg mobile_itu601_i_422.ogg] [8 MB]&lt;br /&gt;
&lt;br /&gt;
* 4:2:2 pixel format, in the original spec and supported by the mainline decoder since alpha8 and the mainline encoder since 1.1.&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/stockholm-vfr.ogg stockholm-vfr.ogg] [1.8 MB]&lt;br /&gt;
&lt;br /&gt;
* Hybrid 24fps/30fps clip encoded as 120fps with dropped frames.&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/offset_test.ogv offset_test.ogv] [0.2 MB]&lt;br /&gt;
&lt;br /&gt;
* Ogg Theora video with large offset, output should look like [http://v2v.cc/~j/theora_testsuite/offset_test.pass.png offset_test.pass.png], but not like [http://v2v.cc/~j/theora_testsuite/offset_test.fail.png offset_test.fail.png].&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/ducks_take_off_444_720p25.ogg ducks_take_off_444_720p25.ogg] [7.2 MB]&lt;br /&gt;
&lt;br /&gt;
* Ogg Theora video 4:4:4 pixel format.&lt;br /&gt;
&lt;br /&gt;
[http://v2v.cc/~j/theora_testsuite/sign_irene_cif-3qi-b.ogg sign_irene_cif-3qi-b.ogg] [1.3 MB]&lt;br /&gt;
&lt;br /&gt;
* Ogg Theora video using 3qi (adapative quantization).&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-12-06T23:31:58Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;A typeset version of this document as of November 24th 2009 is available at [http://www.xiph.org/doc/2009_CAMSS_xiph.pdf]&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: '''Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone. On Windows, DirectShow filters exist which also enable all Windows applications that use the DirectShow framework to use Xiph's Ogg, Theora, and Vorbis standards. A QuickTime component exists which enables use of Xiph's Ogg, Theora, and Vorbis standards in all Mac OS X applications that make use of the QuickTime framework---which includes Safari/Webkit, iMovie, QuickTime, and many others.'''&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: '''Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.'''&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: '''Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders ([http://ffmpeg.org/ FFmpeg] and [http://sourceforge.jp/projects/qtheora/ QTheora]), a Java decoder ([http://www.theora.org/cortado/ Jheora]), a [http://www.wreckedgames.com/downloads/cSharpTheora.zip C# decoder], an [http://svn.xiph.org/trunk/theora-fpga/ FPGA decoder], and an [http://sourceforge.net/projects/elphel/ FPGA encoder].'''&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: '''Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, and Ubisoft have supplied products with an implementation of the Theora standard.'''&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: '''Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving most applications the ability to use the codec.'''&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: '''Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products.'''&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: '''The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.'''&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: '''Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation. An [http://validator.xiph.org/ online validation service] is available.'''&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: '''Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.'''&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: '''Yes.  libtheora is made available under a permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations in addition to the reference.'''&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: '''Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit organizations such as Wikipedia, currently the 6th largest website in the world, and as one of a small number of preferred formats supported by other public institutions, such as the Norwegian government.'''&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: '''Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.'''&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
: '''Yes.  Most prominently, Theora has been used for eGovernment video distribution in the United States at [http://metavid.org Metavid].  Metavid is the most comprehensive, interactive archive of video footage from the United States legislature.  Metavid not only distributes video; they also enable citizen engagement by allowing them to annotate videos and correct transcripts.  Metavid distributes its entire archive in Theora format.  Metavid's source code is entirely open and reusable for any purpose, providing instant access to best practices for eGovernment with Theora.  Metavid's video display component is also available separately as [http://metavid.org/wiki/Mv_Embed mv_embed], which provides reusable best practices for easy Theora display on the web.'''&lt;br /&gt;
: '''Another important user of Theora is Wikipedia, which distributes video exclusively in Theora format.  Wikipedia's best practices for Theora distribution are encapsulated in [http://www.mediawiki.org/wiki/Extension:OggHandler OggHandler], which can be freely reused by anyone using the open-source MediaWiki software.'''&lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: '''Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.'''&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is well defined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: '''Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.'''&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: '''No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been in active use for over 20 years.'''&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: '''The formal specification of the Theora decoder has been stable for years.  However, the text of the specification is continuously revised, based on user feedback, to improve the clarity and accuracy of the description of the technology.'''&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: '''No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions. However, the core developers will review contributions and make sure they do not contradict the general architecture and they work well with the existing code and the test cases.'''&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: '''No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.'''&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: '''N/A.'''&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: '''N/A.'''&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: '''Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.'''&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: '''Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.'''&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: '''Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].'''&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: '''Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].'''&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: '''The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.'''&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: '''Xiph does not require the identification of specific patents that may be required to implement a standard; however, it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These licenses are made available online, for free, to all parties.'''&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: '''All standards, specifications, and software published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a contribution must either be entirely clear of any known patents, or any patents that read upon the contribution must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, are revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.'''&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: '''Xiph's recommended IPR requirements are the same as our mandatory requirements.'''&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: '''Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notably, the Xiph [http://wiki.xiph.org/OggKate OggKate] codec for time-aligned text and image content provides support for subtitles for internationalisation, captions for the hearing-impaired, and textual audio descriptions for the visually impaired. Further, Ogg supports multiple tracks of audio and video content in one container, such that sign language tracks and audio descriptions can be included in one file. For this to work, Xiph has defined [http://wiki.xiph.org/Ogg_Skeleton Skeleton] which holds metadata about each track encapsulated within a single Ogg file. When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.'''&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: '''Yes.  Xiph's standards always precisely specify the requirements that an implementation must meet in order to be considered conformant.'''&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: '''Yes.  Xiph maintains a freely available suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] and an [http://validator.xiph.org online validation service] that can be used by anyone to check confirm basic conformance, in addition to tools such as the oggz-validate program included with liboggz, which has been widely used for conformance testing.'''&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: '''Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.'''&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: '''Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors who act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.'''&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: '''Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.'''&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
: '''Yes.  The Xiph codecs can be precisely identified by [http://wiki.xiph.org/index.php/MIMETypesCodecs their MIME types], as formally defined by [http://tools.ietf.org/html/rfc5334 IETF RFC 5334], an open specification.'''&lt;br /&gt;
* open negotiation in formal specifications,&lt;br /&gt;
: '''Yes.  For example, a [http://tools.ietf.org/html/draft-barbato-avt-rtp-theora-01 draft RTP specification] describes how Theora interoperates with the [http://tools.ietf.org/html/rfc3264 Session Description Protocol] (SDP), a mechanism for negotiating the parameters of RTP sessions.'''&lt;br /&gt;
* open selection in formal specifications.&lt;br /&gt;
: '''Yes. There are many open specifications that provide a mechanism for selecting Theora from among many codecs.  One such specification is [http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#video HTML 5 video], which allows the user agent to select Theora based on its MIME type, using [http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#the-source-element the source element].'''&lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: '''Yes.  Xiph welcomes representatives from all companies and organizations as well as all individuals.'''&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: '''Yes.  Standardization occurs almost entirely in text-based, accessible internet communications channels, allowing participants with disabilities to engage fully in the standards development process.'''&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: '''Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].'''&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: '''Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate.'''&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: '''Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.'''&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: '''There is no explicitly stated objective of reaching consensus. However, when new contributions are made, the key specification developers will be able to veto the introduction of a new feature. Generally, differences are discussed openly and new features are adapted until they fit the overall architecture of the standard, at which stage they are introduced into the specification, standard and software.'''&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: '''The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.'''&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: '''Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.'''&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
: '''Yes.  Even if a member fails an appeal within the organization, because all of the technology Xiph standardizes is open and freely implementable, they are always free to develop their own, competing version.  Such competing versions may even still be eligible for standardization under the Xiph umbrella.'''&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
: '''The exact same process is used for revisions to the standard as was used for the original development of the standard, and thus the answers to all of the above questions remain the same.'''&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process?)&lt;br /&gt;
: '''Xiph.Org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.'''&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: '''Yes.  All Xiph.Org standards are freely licensed and will always be available.'''&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: '''Yes.  Xiph maintains its ecosystem of standards on a continuous basis.'''&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: '''Yes.  Xiph maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.'''&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: '''No.  Xiph also produces high-quality reusable reference implementations of its standards, released under an open license.'''&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-17T01:25:19Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Interoperability governance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone. Further, a QuickTime component exists which enables use of Xiph's Ogg, Theora, and Vorbis standards in all Mac OS X applications that make use of the QuickTime framework - which includes Safari/Webkit, iMovie, QuickTime, and many others. On Windows, DirectShow filters exist which also enable all Windows applications that use the DirectShow framework to use Xiph's Ogg, Theora, and Vorbis standards.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders ([http://ffmpeg.org/ FFmpeg] and [http://sourceforge.jp/projects/qtheora/ QTheora]), a Java decoder ([http://www.theora.org/cortado/ Jheora]), a [http://www.wreckedgames.com/downloads/cSharpTheora.zip C# decoder], an [http://svn.xiph.org/trunk/theora-fpga/ FPGA decoder], and an [http://sourceforge.net/projects/elphel/ FPGA encoder].&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation. An [http://validator.xiph.org/ online validation service] is available.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit organizations such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public institutions, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
: Yes.  Most prominently, Theora has been used for eGovernment video distribution in the United States at [http://metavid.org Metavid].  Metavid is the most comprehensive, interactive archive of video footage from the United States legislature.  Metavid not only distributes video; they also enable citizen engagement by allowing them to annotate videos and correct transcripts.  Metavid distributes its entire archive in Theora format.  Metavid's source code is entirely open and reusable for any purpose, providing instant access to best practices for eGovernment with Theora.  Metavid's video display component is also available separately as [http://metavid.org/wiki/Mv_Embed mv_embed], which provides reusable best practices for easy Theora display on the web.  &lt;br /&gt;
: Another important user of Theora is Wikipedia, which distributes video exclusively in Theora format.  Wikipedia's best practices for Theora distribution are encapsulated in [http://www.mediawiki.org/wiki/Extension:OggHandler OggHandler], which can be freely reused by anyone using the open-source MediaWiki software.&lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is well defined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: The formal specification of the Theora decoder has been stable for years.  However, the text of the specification is continuously revised, based on user feedback, to improve the clarity and accuracy of the description of the technology.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions. However, the core developers will review contributions and make sure they do not contradict the general architecture and they work well with the existing code and the test cases.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards, specifications, and software published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a contribution must either be entirely clear of any known patents, or any patents that read upon the contribution must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notably, the Xiph [http://wiki.xiph.org/OggKate OggKate] codec for time-aligned text and image content provides support for subtitles for internationalisation, captions for the hearing-impaired, and textual audio descriptions for the visually impaired. Further, Ogg supports multiple tracks of audio and video content in one container, such that sign language tracks and audio descriptions can be included into one file. For this to work, Xiph has defined [http://wiki.xiph.org/Ogg_Skeleton Skeleton] which holds metadata about each track encapsulated within a single Ogg file. When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a freely available suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] and an [http://validator.xiph.org online validation service] that can be used by anyone to check confirm basic conformance, in addition to tools such as the oggz-validate program included with liboggz, which has been widely used for conformance testing.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
: Yes.  The Xiph codecs can be precisely identified by [http://wiki.xiph.org/index.php/MIMETypesCodecs their MIME types], as formally defined by [http://tools.ietf.org/html/rfc5334 IETF RFC 5334], an open specification.&lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
: Yes.  For example, a [http://tools.ietf.org/html/draft-barbato-avt-rtp-theora-01 draft RTP specification] describes how Theora interoperates with the [http://tools.ietf.org/html/rfc3264 Session Description Protocol] (SDP), a mechanism for negotiating the parameters of RTP sessions.&lt;br /&gt;
* open selection in formal specifications.&lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: There is no explicitly stated objective of reaching consensus. However, when new contributions are made, the key specification developers will be able to veto on the introduction of a new feature. Generally, differences are discussed openly and new features are adapted until they fit the overall architecture of the standards, at which stage they are introduced into the specification, standards and software.&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
: Yes.  Even if a member fails an appeal within the organization, because all of the technology Xiph standardizes is open and freely implementable, they are always free to develop their own, competing version.  Such competing versions may even still be eligible for standardization under the Xiph umbrella.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
: The exact same process is used for revisions to the standard as was used for the original development of the standard, and thus the answers to all of the above questions remain the same.&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.Org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.Org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-17T01:09:08Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Maturity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone. Further, a QuickTime component exists which enables use of Xiph's Ogg, Theora, and Vorbis standards in all Mac OS X applications that make use of the QuickTime framework - which includes Safari/Webkit, iMovie, QuickTime, and many others. On Windows, DirectShow filters exist which also enable all Windows applications that use the DirectShow framework to use Xiph's Ogg, Theora, and Vorbis standards.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders ([http://ffmpeg.org/ FFmpeg] and [http://sourceforge.jp/projects/qtheora/ QTheora]), a Java decoder ([http://www.theora.org/cortado/ Jheora]), a [http://www.wreckedgames.com/downloads/cSharpTheora.zip C# decoder], an [http://svn.xiph.org/trunk/theora-fpga/ FPGA decoder], and an [http://sourceforge.net/projects/elphel/ FPGA encoder].&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation. An [http://validator.xiph.org/ online validation service] is available.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit organizations such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public institutions, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
: Yes.  Most prominently, Theora has been used for eGovernment video distribution in the United States at [http://metavid.org Metavid].  Metavid is the most comprehensive, interactive archive of video footage from the United States legislature.  Metavid not only distributes video; they also enable citizen engagement by allowing them to annotate videos and correct transcripts.  Metavid distributes its entire archive in Theora format.  Metavid's source code is entirely open and reusable for any purpose, providing instant access to best practices for eGovernment with Theora.  Metavid's video display component is also available separately as [http://metavid.org/wiki/Mv_Embed mv_embed], which provides reusable best practices for easy Theora display on the web.  &lt;br /&gt;
: Another important user of Theora is Wikipedia, which distributes video exclusively in Theora format.  Wikipedia's best practices for Theora distribution are encapsulated in [http://www.mediawiki.org/wiki/Extension:OggHandler OggHandler], which can be freely reused by anyone using the open-source MediaWiki software.&lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is well defined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: The formal specification of the Theora decoder has been stable for years.  However, the text of the specification is continuously revised, based on user feedback, to improve the clarity and accuracy of the description of the technology.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions. However, the core developers will review contributions and make sure they do not contradict the general architecture and they work well with the existing code and the test cases.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards, specifications, and software published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a contribution must either be entirely clear of any known patents, or any patents that read upon the contribution must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notably, the Xiph [http://wiki.xiph.org/OggKate OggKate] codec for time-aligned text and image content provides support for subtitles for internationalisation, captions for the hearing-impaired, and textual audio descriptions for the visually impaired. Further, Ogg supports multiple tracks of audio and video content in one container, such that sign language tracks and audio descriptions can be included into one file. For this to work, Xiph has defined [http://wiki.xiph.org/Ogg_Skeleton Skeleton] which holds metadata about each track encapsulated within a single Ogg file. When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a freely available suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] and an [http://validator.xiph.org online validation service] that can be used by anyone to check confirm basic conformance, in addition to tools such as the oggz-validate program included with liboggz, which has been widely used for conformance testing.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
: Yes.  The Xiph codecs can be precisely identified by [http://wiki.xiph.org/index.php/MIMETypesCodecs their MIME types], as formally defined by [http://www.ietf.org/rfc/rfc5334.txt IETF RFC 5334], an open specification.&lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications.&lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: There is no explicitly stated objective of reaching consensus. However, when new contributions are made, the key specification developers will be able to veto on the introduction of a new feature. Generally, differences are discussed openly and new features are adapted until they fit the overall architecture of the standards, at which stage they are introduced into the specification, standards and software.&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
: Yes.  Even if a member fails an appeal within the organization, because all of the technology Xiph standardizes is open and freely implementable, they are always free to develop their own, competing version.  Such competing versions may even still be eligible for standardization under the Xiph umbrella.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
: The exact same process is used for revisions to the standard as was used for the original development of the standard, and thus the answers to all of the above questions remain the same.&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.Org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.Org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-16T00:25:34Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Stop short of declaring FFmpeg &amp;quot;interoperable&amp;quot; until our open bug reports are fixed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone. Further, a QuickTime component exists which enables use of Xiph's Ogg, Theora, and Vorbis standards in all Mac OS X applications that make use of the QuickTime framework - which includes Safari/Webkit, iMovie, QuickTime, and many others. On Windows, DirectShow filters exist which also enable all Windows applications that use the DirectShow framework to use Xiph's Ogg, Theora, and Vorbis standards.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders ([http://ffmpeg.org/ FFmpeg] and [http://sourceforge.jp/projects/qtheora/ QTheora]), a Java decoder ([http://www.theora.org/cortado/ Jheora]), a [http://www.wreckedgames.com/downloads/cSharpTheora.zip C# decoder], an [http://svn.xiph.org/trunk/theora-fpga/ FPGA decoder], and an [http://sourceforge.net/projects/elphel/ FPGA encoder].&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation. An [http://validator.xiph.org/ online validation service] is available.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is well defined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification of the encoder is continuously revised based on user feedback to improve clarity and accuracy. The specification of the decoding part has been stable for years.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions. However, the core developers will review contributions and make sure they do not contradict the general architecture and they work well with the existing code and the test cases.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards, specifications, and software published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a contribution must either be entirely clear of any known patents, or any patents that read upon the contribution must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notably, the Xiph [http://wiki.xiph.org/OggKate OggKate] codec for time-aligned text and image content provides support for subtitles for internationalisation, captions for the hearing-impaired, and textual audio descriptions for the visually impaired. Further, Ogg supports multiple tracks of audio and video content in one container, such that sign language tracks and audio descriptions can be included into one file. For this to work, Xiph has defined [http://wiki.xiph.org/Ogg_Skeleton Skeleton] which holds metadata about each track encapsulated within a single Ogg file. When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a freely available suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] and an [http://validator.xiph.org online validation service] that can be used by anyone to check confirm basic conformance, in addition to tools such as the oggz-validate program included with liboggz, which has been widely used for conformance testing.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: There is no explicitly stated objective of reaching consensus. However, when new contributions are made, the key specification developers will be able to veto on the introduction of a new feature. Generally, differences are discussed openly and new features are adapted until they fit the overall architecture of the standards, at which stage they are introduced into the specification, standards and software.&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
: Yes.  Even if a member fails an appeal within the organization, because all of the technology Xiph standardizes is open and freely implementable, they are always free to develop their own, competing version.  Such competing versions may even still be eligible for standardization under the Xiph umbrella.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
: The exact same process is used for revisions to the standard as was used for the original development of the standard, and thus the answers to all of the above questions remain the same.&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.Org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.Org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-16T00:23:57Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Market support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone. Further, a QuickTime component exists which enables use of Xiph's Ogg, Theora, and Vorbis standards in all Mac OS X applications that make use of the QuickTime framework - which includes Safari/Webkit, iMovie, QuickTime, and many others. On Windows, DirectShow filters exist which also enable all Windows applications that use the DirectShow framework to use Xiph's Ogg, Theora, and Vorbis standards.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders ([http://ffmpeg.org/ FFmpeg] and [http://sourceforge.jp/projects/qtheora/ QTheora]), a Java decoder ([http://www.theora.org/cortado/ Jheora]), a [http://www.wreckedgames.com/downloads/cSharpTheora.zip C# decoder], an [http://svn.xiph.org/trunk/theora-fpga/ FPGA decoder], and an [http://sourceforge.net/projects/elphel/ FPGA encoder].&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation. An [http://validator.xiph.org/ online validation service] is available.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is well defined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification of the encoder is continuously revised based on user feedback to improve clarity and accuracy. The specification of the decoding part has been stable for years.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions. However, the core developers will review contributions and make sure they do not contradict the general architecture and they work well with the existing code and the test cases.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products. A particularly well known, independent, but interoperable implementation is provided by the FFmpeg open source project.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards, specifications, and software published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a contribution must either be entirely clear of any known patents, or any patents that read upon the contribution must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notably, the Xiph [http://wiki.xiph.org/OggKate OggKate] codec for time-aligned text and image content provides support for subtitles for internationalisation, captions for the hearing-impaired, and textual audio descriptions for the visually impaired. Further, Ogg supports multiple tracks of audio and video content in one container, such that sign language tracks and audio descriptions can be included into one file. For this to work, Xiph has defined [http://wiki.xiph.org/Ogg_Skeleton Skeleton] which holds metadata about each track encapsulated within a single Ogg file. When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a freely available suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] and an [http://validator.xiph.org online validation service] that can be used by anyone to check confirm basic conformance, in addition to tools such as the oggz-validate program included with liboggz, which has been widely used for conformance testing.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: There is no explicitly stated objective of reaching consensus. However, when new contributions are made, the key specification developers will be able to veto on the introduction of a new feature. Generally, differences are discussed openly and new features are adapted until they fit the overall architecture of the standards, at which stage they are introduced into the specification, standards and software.&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
: Yes.  Even if a member fails an appeal within the organization, because all of the technology Xiph standardizes is open and freely implementable, they are always free to develop their own, competing version.  Such competing versions may even still be eligible for standardization under the Xiph umbrella.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
: The exact same process is used for revisions to the standard as was used for the original development of the standard, and thus the answers to all of the above questions remain the same.&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.Org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.Org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-16T00:00:57Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Accessibility */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone. Further, a QuickTime component exists which enables use of Xiph's Ogg, Theora, and Vorbis standards in all Mac OS X applications that make use of the QuickTime framework - which includes Safari/Webkit, iMovie, QuickTime, and many others. On Windows, DirectShow filters exist which also enable all Windows applications that use the DirectShow framework to use Xiph's Ogg, Theora, and Vorbis standards.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation. An [http://validator.xiph.org/ online validation service] is available.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is well defined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification of the encoder is continuously revised based on user feedback to improve clarity and accuracy. The specification of the decoding part has been stable for years.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions. However, the core developers will review contributions and make sure they do not contradict the general architecture and they work well with the existing code and the test cases.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products. A particularly well known, independent, but interoperable implementation is provided by the FFmpeg open source project.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards, specifications, and software published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a contribution must either be entirely clear of any known patents, or any patents that read upon the contribution must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notably, the Xiph [http://wiki.xiph.org/OggKate OggKate] codec for time-aligned text and image content provides support for subtitles for internationalisation, captions for the hearing-impaired, and textual audio descriptions for the visually impaired. Further, Ogg supports multiple tracks of audio and video content in one container, such that sign language tracks and audio descriptions can be included into one file. For this to work, Xiph has defined [http://wiki.xiph.org/Ogg_Skeleton Skeleton] which holds metadata about each track encapsulated within a single Ogg file. When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a freely available suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] and an [http://validator.xiph.org online validation service] that can be used by anyone to check confirm basic conformance, in addition to tools such as the oggz-validate program included with liboggz, which has been widely used for conformance testing.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: There is no explicitly stated objective of reaching consensus. However, when new contributions are made, the key specification developers will be able to veto on the introduction of a new feature. Generally, differences are discussed openly and new features are adapted until they fit the overall architecture of the standards, at which stage they are introduced into the specification, standards and software.&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
: Yes.  Even if a member fails an appeal within the organization, because all of the technology Xiph standardizes is open and freely implementable, they are always free to develop their own, competing version.  Such competing versions may even still be eligible for standardization under the Xiph umbrella.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
: The exact same process is used for revisions to the standard as was used for the original development of the standard, and thus the answers to all of the above questions remain the same.&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.Org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.Org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T22:50:53Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Support */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that can be used by implementors to confirm basic conformance.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: There is no explicitly stated objective of reaching consensus.&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
: Yes.  Even if a member fails an appeal within the organization, because all of the technology Xiph standardizes is open and freely implementable, they are always free to develop their own, competing version.  Such competing versions may even still be eligible for standardization under the Xiph umbrella.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
: The exact same process is used for revisions to the standard as was used for the original development of the standard, and thus the answers to all of the above questions remain the same.&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.Org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.Org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T22:46:56Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Changes to the formal specification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that can be used by implementors to confirm basic conformance.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: There is no explicitly stated objective of reaching consensus.&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
: Yes.  Even if a member fails an appeal within the organization, because all of the technology Xiph standardizes is open and freely implementable, they are always free to develop their own, competing version.  Such competing versions may even still be eligible for standardization under the Xiph umbrella.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
: The exact same process is used for revisions to the standard as was used for the original development of the standard, and thus the answers to all of the above questions remain the same.&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T22:45:56Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Due Process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that can be used by implementors to confirm basic conformance.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: There is no explicitly stated objective of reaching consensus.&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
: Yes.  Even if a member fails an appeal within the organization, because all of the technology Xiph standardizes is open and freely implementable, they are always free to develop their own, competing version.  Such competing versions may even still be eligible for standardization under the Xiph umbrella.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T22:41:18Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Editorial revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that can be used by implementors to confirm basic conformance.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
: There is no explicitly stated objective of reaching consensus.&lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation).&lt;br /&gt;
: The standard can be approved without consensus via the decision of a &amp;quot;director&amp;quot; or similar.&lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T22:37:42Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Editorial revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that can be used by implementors to confirm basic conformance.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We charge no fee for and place no restrictions on attendance or participation.  For example, anyone interested in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation). &lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T22:33:18Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Maturity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
: Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that can be used by implementors to confirm basic conformance.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We place no restrictions on attendance or participation.  For example, anyone interesting in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation). &lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T22:32:08Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Editorial revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
: No.  Xiph does not normally provide a formal conformance testing process as part of a standard.&lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
: Yes.  Xiph maintains a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that can be used by implementors to confirm basic conformance.&lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
: Yes.  Informal conformance testing is available to implementors upon request, and Xiph has provided such testing for a number of implementations in the past.&lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
: Yes.  Xiph does not require certification, but maintains the right to withhold the use of our trademarks from implementors that act in bad faith.  Implementors may, however, request explicit permission to use our trademarks with a conforming implementation.&lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We place no restrictions on attendance or participation.  For example, anyone interesting in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation). &lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T22:19:48Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Editorial revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available);&lt;br /&gt;
: The reference implementations of each codec include all necessary IPR and copyright licenses for that codec, including all documentation, and are freely available to everyone.&lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available);&lt;br /&gt;
: Xiph does not require the identification of specific patents that may be required to implement a standard, however it does require an open-source compatible, royalty free license from a contributor for any such patents they may own before the corresponding technology can be included in a standard. These license are made available online, for free, to all parties.&lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: All standards published by the Xiph.Org Foundation are required to have &amp;quot;open-source compatible&amp;quot; IPR.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under a transferable, irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].  Other common &amp;quot;royalty free&amp;quot; patent licenses are either not transferable, revocable under certain conditions (such as patent infringement litigation against the originating party), or otherwise impose restrictions that would prevent distribution under common [http://www.opensource.org/ OSI]-approved licenses.  These would not be acceptable.&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's recommended IPR requirements are the same as our mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph.org ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We place no restrictions on attendance or participation.  For example, anyone interesting in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation). &lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T22:01:51Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Editorial revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].  All previous revisions are available from Xiph's [http://svn.xiph.org/ revision control system].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available); &lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available); &lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: Xiph.org standards have a mandatory requirement that our standards be absolutely free of IPR encumbrance.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under an irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's mandatory IPR requirements are the most stringent possible, and so our IPR recommendation is necessarily the same as the mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph.org ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We place no restrictions on attendance or participation.  For example, anyone interesting in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation). &lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T21:59:29Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Editorial revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph's standards have successfully been implemented by many organisations in a wide variety of environments.  We maintain (non-exhaustive) [http://wiki.xiph.org/TheoraSoftwarePlayers lists] of products which implement Theora support, many of them open source, so that others may use them as a reference when preparing their own products.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].  In addition, the specification documents Theora's compatibility with ITU-R B.470, ITU-R B.601, ITU-R B.709, SMPTE-170M, [http://tools.ietf.org/html/rfc2044 UTF-8], ISO 10646, and [http://www.xiph.org/vorbis/doc/Vorbis_I_spec.pdf Ogg Vorbis].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph.org standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available); &lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available); &lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: Xiph.org standards have a mandatory requirement that our standards be absolutely free of IPR encumbrance.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under an irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's mandatory IPR requirements are the most stringent possible, and so our IPR recommendation is necessarily the same as the mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph.org ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We place no restrictions on attendance or participation.  For example, anyone interesting in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation). &lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T21:43:45Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Editorial revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?entryid=2620&amp;amp;blogid=14&amp;amp;pn=1 some real controversy].&lt;br /&gt;
&lt;br /&gt;
The method of assessment is the Common Assessment Method for Standards and Specifications, including the questions below.&lt;br /&gt;
&lt;br /&gt;
= CAMSS Questions =&lt;br /&gt;
== Part 4: Market Criteria ==&lt;br /&gt;
&lt;br /&gt;
This group of Market criteria analyses the formal specification in the scope of its market environment, and more precisely it examines the implementations of the formal specification and the market players. This implies identifying to which extent the formal specification benefits from market support and wide adoption, what are its level of maturity and its capacity of reusability.&lt;br /&gt;
&lt;br /&gt;
Market support is evaluated through an analysis of how many products implementing the formal specification exist, what their market share is and who their end-users are. The quality and the completeness (in case of partitioning) of the implementations of the formal specification can also be analysed. Availability of existing or planned mechanisms to assess conformity of implementations to the standard or to the specification could also be identified. The existence of at least one reference implementation (i.e.: mentioning a recognized certification process) - and of which one is an open source implementation - can also be relevant to the assessment. Wide adoption can also be assessed across domains (i.e.: public and private sectors), in an open environment, and/or in a similar field (i.e.: best practices).&lt;br /&gt;
&lt;br /&gt;
A formal specification is mature if it has been in use and development for long enough that most of its initial problems have been overcome and its underlying technology is well understood and well defined. Maturity is also assessed by identifying if all aspects of the formal specification are considered as validated by usage, (i.e.: if the formal specification is partitioned), and if the reported issues have been solved and documented.&lt;br /&gt;
&lt;br /&gt;
Reusability of a formal specification is enabled if it includes guidelines for its implementation in a given context. The identification of successful implementations of the standard or specification should focus on good practices in a similar field. Its incompatibility with related standards or specifications should also be taken into account.&lt;br /&gt;
&lt;br /&gt;
The ideas behind the Market Criteria can also be expressed in the form of the following questions:&lt;br /&gt;
&lt;br /&gt;
=== Market support ===&lt;br /&gt;
* Does the standard have strong support in the marketplace? &lt;br /&gt;
: Yes.  For example, among web browsers, support for Xiph's Ogg, Theora, and Vorbis standards is now included by default in Mozilla Firefox, Google Chrome, and the latest versions of Opera, representing hundreds of millions of installed users just in this market alone.&lt;br /&gt;
* What products exist for this formal specification ? &lt;br /&gt;
: Theora is a video codec, and as such the required products are encoders, decoders, and transmission systems.  All three types of products are widely available for Theora.&lt;br /&gt;
* How many implementations of the formal specification are there? &lt;br /&gt;
: Xiph does not require implementors to acquire any license before implementing the specification.  Therefore, we do not have a definitive count of the number of implementations.  In addition to the reference implementation, which has been ported to most modern platforms and highly optimized for x86 and ARM CPUs and TI C64x+ DSPs, we are aware of a number of independent, conformant or mostly-conformant implementations.  These include two C decoders (ffmpeg and QTheora), a Java decoder (Jheora), a C# decoder, an FPGA decoder, and an FPGA encoder.&lt;br /&gt;
* Are there products from different suppliers in the market that implement this formal specification ? &lt;br /&gt;
: Yes.  Corporations such as Atari, Canonical, DailyMotion, Elphel, Fluendo, Google, Mozilla, Novell, Opera, Red Hat, Sun Microsystems, Ubisoft, and countless others have supplied products with an implementation of the Theora standard.&lt;br /&gt;
* Are there many products readily available from a variety of suppliers? &lt;br /&gt;
: Yes. Theora has been deployed in embedded devices, security cameras, video games, video conferencing systems, web browsers, home theater systems, and many other products.  A complete, legal, open-source reference implementation can also be downloaded free of charge, including components for all major media frameworks (DirectShow, gstreamer, and Quicktime), giving the plethora of applications which use these frameworks the ability to use the codec.&lt;br /&gt;
* What is the market share of the products implementing the formal specification, versus other implementations of competing formal specifications ? &lt;br /&gt;
: Theora playback is extremely widely available, covering virtually the entire market of personal computers.  Theora is also increasingly available in mobile and embedded devices.  Since we do not require licensing for products that implement the specification, we do not have market share numbers that can be compared with competing formal specifications.  Because implementations are readily available and free, Theora is included in many products that support multiple codecs, and is sometimes the only video codec included in free software products, which must be freely redistributable.&lt;br /&gt;
* Who are the end-users of these products implementing the formal specification?&lt;br /&gt;
: The end users are television viewers, video gamers, web surfers, movie makers, business people, video distribution services, and anyone else who interacts with moving pictures.&lt;br /&gt;
&lt;br /&gt;
=== Maturity ===&lt;br /&gt;
* Are there any existing or planned mechanisms to assess conformity of the implementations of the formal specification? &lt;br /&gt;
: Yes.  In addition to a continuous peer review process, we maintain a suite of [http://v2v.cc/~j/theora_testsuite/ test vectors] that allow implementors to assess decoder conformity. We also provide free online developer support and testing for those attempting to make a conforming implementation.&lt;br /&gt;
* Is there a reference implementation (i.e.: mentioning a recognized certification process)? &lt;br /&gt;
: Yes.  Xiph maintains a reference implementation called [http://downloads.xiph.org/releases/theora/ libtheora].  In addition to serving as a reference, libtheora is also highly optimized to achieve the maximum possible speed, accuracy, reliability, efficiency, and video quality.  As a result, many implementors of Theora adopt the reference implementation.&lt;br /&gt;
* Is there an open source implementation? &lt;br /&gt;
: Yes.  libtheora is made available under a completely permissive BSD-like license.  Its open-source nature also contributes to its quality as a reference implementation, as implementors are welcome to contribute their improvements to the reference.  There are also several other open source implementations.&lt;br /&gt;
* Does the formal specification show wide adoption? &lt;br /&gt;
** across different domains? (I.e.: public and private) &lt;br /&gt;
: Yes.  In addition to the private companies mentioned in the previous section, Theora has also been specified as the sole format supported by non-profit institutions such as Wikipedia, currently the 6th largest website in the world, or as one of a small number of preferred formats supported by other public organizations, such as the Norwegian government.&lt;br /&gt;
** in an open environment? &lt;br /&gt;
: Yes.  On open/free operating systems such as those distributed by Novell/SuSE, Canonical, and Red Hat, Theora is the primary default video codec.&lt;br /&gt;
** in a similar field? (i.e.: can best practices be identified?) &lt;br /&gt;
* Has the formal specification been in use and development long enough that most of its initial problems have been overcome? &lt;br /&gt;
: Yes.  Theora was derived from VP3, which was originally released in May 2000.  The Theora specification was completed in 2004.  Theora has now been used in a wide variety of applications, on the full spectrum of computing devices.&lt;br /&gt;
* Is the underlying technology of the standard well-understood? (e.g., a reference model is welldefined, appropriate concepts of the technology are in widespread use, the technology may have been in use for many years, a formal mathematical model is defined, etc.) &lt;br /&gt;
Yes.  The underlying technology has been in use for nearly a decade, and most of the concepts have been in widespread use for even longer.&lt;br /&gt;
* Is the formal specification based upon technology that has not been well-defined and may be relatively new? &lt;br /&gt;
: No.  The formal specification is based on technology from the On2 VP3 codec, which is substantially similar to simple block-transform codecs like H.261. This class of codecs is extremely well understood, and has been actively in use for over 20 years.&lt;br /&gt;
* Has the formal specification been revised? (Yes/No, Nof) &lt;br /&gt;
: Yes.  The specification is continuously revised based on user feedback to improve clarity and accuracy.&lt;br /&gt;
* Is the formal specification under the auspices of an architectural board? (Yes/No) &lt;br /&gt;
: No.  Although officially maintained by the Xiph.Org Foundation, anyone is free to join this organization, and one need not even be a member to make contributions.&lt;br /&gt;
* Is the formal specification partitioned in its functionality? (Yes/No) &lt;br /&gt;
: No.  Theora is very deliberately not partitioned, to avoid the confusion created by a &amp;quot;standard&amp;quot; composed of many incompatible &amp;quot;profiles&amp;quot;.  The Theora standard does not have any optional components.  A compliant Theora decoder can correctly process any Theora stream.&lt;br /&gt;
** To what extent does each partition participate to its overall functionality? (NN%) &lt;br /&gt;
: N/A.&lt;br /&gt;
** To what extent is each partition implemented? (NN%) (cf market adoption)&lt;br /&gt;
: N/A.&lt;br /&gt;
&lt;br /&gt;
=== Re-usability === &lt;br /&gt;
* Does the formal specification provide guidelines for its implementation in a given organisation? &lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification document] provides &amp;quot;non-normative&amp;quot; advice and explanation for implementors of Theora decoders and encoders, including example algorithms for implementing required mathematical transforms.  Xiph also maintains [http://wiki.xiph.org/Main_Page a documentation base] for implementors who desire more guidelines beyond the specification itself.&lt;br /&gt;
* Can other cases where similar systems implement the formal specification be considered as successful implementations and good practices? &lt;br /&gt;
: Xiph.org standards have successfully been implemented by many organisations in a wide variety of environments.  We encourage independent implementations and unexpected applications of our standards.&lt;br /&gt;
* Is its compatibility with related formal specification documented?&lt;br /&gt;
: Yes.  For example, [http://theora.org/doc/Theora.pdf the Theora specification] also documents the use of Theora within the [http://www.ietf.org/rfc/rfc3533.txt standard Ogg encapsulation format], and the [http://svn.xiph.org/trunk/theora/doc/draft-ietf-avt-rtp-theora-00.txt TheoraRTP draft specification] explains how to transmit Theora using the [http://tools.ietf.org/html/rfc3550 RTP standard].&lt;br /&gt;
&lt;br /&gt;
== Part 5: Standardisation Criteria == &lt;br /&gt;
From Idabc-camss&lt;br /&gt;
&lt;br /&gt;
Note: Throughout this section, “Organisation” refers to the standardisation/fora/consortia body in charge of the formal specification.&lt;br /&gt;
&lt;br /&gt;
Significant characteristics of the way the organisation operates are for example the way it gives the possibility to stakeholders to influence the evolution of the formal specification, or which conditions it attaches to the use of the formal specification or its implementation. Moreover, it is important to know how the formal specification is defined, supported, and made available, as well as how interaction with stakeholders is managed by the organisation during these steps. Governance of interoperability testing with other formal specifications is also indicative.&lt;br /&gt;
&lt;br /&gt;
The standardisation criteria analyses therefore the following elements:&lt;br /&gt;
&lt;br /&gt;
=== Availability of Documentation ===&lt;br /&gt;
The availability of documentation criteria is linked to cost and online availability. Access to all preliminary results documentation can be online, online for members only, offline, offline, for members only or not available. Access can be free or for a fee (which fee?).&lt;br /&gt;
: Every Xiph.org standard is permanently available online to everyone at no cost.  For example, we invite everyone to download [http://theora.org/doc/Theora.pdf the most up-to-date copy of the Theora specification], and [http://xiph.org/vorbis/doc/Vorbis_I_spec.html the latest revision of Vorbis].&lt;br /&gt;
&lt;br /&gt;
=== Intellectual Property Right ===&lt;br /&gt;
The Intellectual Property Rights evaluation criteria relates to the ability for implementers to use the formal specification in products without legal or financial implications. The IPR policy of the organisation is therefore evaluated according to: &lt;br /&gt;
* the availability of the IPR or copyright policies of the organisation (available on-line or off-line, or not available); &lt;br /&gt;
* the organisation’s governance to disclose any IPR from any contributor (ex-ante, online, offline, for free for all, for a fee for all, for members only, not available); &lt;br /&gt;
* the level of IPR set &amp;quot;mandatory&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability , patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none); &lt;br /&gt;
: Xiph.org standards have a mandatory requirement that our standards be absolutely free of IPR encumbrance.  This means that a standard must either be entirely clear of any known patents, or any patents that read upon the standard must be available under an irrevocable public nonassertion agreement to all people everywhere.  For example, see [http://svn.xiph.org/trunk/theora/LICENSE our On2 patent nonassertion warrant].&lt;br /&gt;
* the level of IPR &amp;quot;recommended&amp;quot; by the organisation (no patent, royalty free patent, patent and RAND with limited liability, patent and classic RAND, patent with explicit licensing, patent with defensive licensing, or none). [Note: RAND (Reasonable and Non Discriminatory License) is based on a &amp;quot;fairness&amp;quot; concept. Companies agree that if they receive any patents on technologies that become essential to the standard then they agree to allow other groups attempting to implement the standard to use these patents and they agree that the charges for the patents shall be reasonable. &amp;quot;RAND with limited availability&amp;quot; is a version of RAND where the &amp;quot;reasonable charges&amp;quot; have an upper limit.]&lt;br /&gt;
: Xiph's mandatory IPR requirements are the most stringent possible, and so our IPR recommendation is necessarily the same as the mandatory requirements.&lt;br /&gt;
&lt;br /&gt;
=== Accessibility ===&lt;br /&gt;
&lt;br /&gt;
The accessibility evaluation criteria describe the importance of equal and safe accessibility by the users of implementations of formal specifications. This aspect can be related to safety (physical safety and conformance safety) and accessibility of physical impaired people (design for all).&lt;br /&gt;
&lt;br /&gt;
Focus is made particularly on accessibility and conformance safety. Conformance testing is testing to determine whether a system meets some specified formal specification. The result can be results from a test suite. Conformance validation is when the conformance test uniquely qualifies a given implementation as conformant or not. Conformance certification is a process that provides a public and easily visible &amp;quot;stamp of approval&amp;quot; that an implementation of a standard validates as conformant.&lt;br /&gt;
&lt;br /&gt;
The following questions allow an assessment of accessibility and conformance safety: &lt;br /&gt;
* Does a mechanism that ensures disability support by a formal specification exist? (Y/N) &lt;br /&gt;
: Yes.  Xiph.org ensures support for users with disabilities by providing specifications for accessible technologies independent of the codec itself.  Notable Xiph specifications include [http://wiki.xiph.org/OggKate OggKate] and [http://wiki.xiph.org/index.php/CMML CMML], which provide subtitles for the hearing-impaired, as well as [http://wiki.xiph.org/Ogg_Skeleton Skeleton], which can specify scene description audio tracks for the visually impaired.  When Theora is transmitted or stored in an Ogg container, it is automatically compatible with these accessibility measures.&lt;br /&gt;
* Is conformance governance always part of a standard? (Y/N) &lt;br /&gt;
* Is a conformance test offered to implementers? (Y/N) &lt;br /&gt;
* Is conformance validation available to implementers? (Y/N) &lt;br /&gt;
* Is conformance certification available? (Y/N) &lt;br /&gt;
* Is localisation of a formal specification possible? (Y/N)&lt;br /&gt;
: Yes.  We welcome anyone who wishes to translate Xiph specifications into other languages.  We have no policy requiring that the normative specification be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Interoperability governance === &lt;br /&gt;
The interoperability governance evaluation criteria relates to how interoperability is identified and maintained between interoperable formal specifications. In order to do this, the organisation may provide governance for: &lt;br /&gt;
* open identification in formal specifications, &lt;br /&gt;
* open negotiation in formal specifications, &lt;br /&gt;
* open selection in formal specifications. &lt;br /&gt;
&lt;br /&gt;
=== Meeting and consultation ===&lt;br /&gt;
The meeting and consultation evaluation criteria relates to the process of defining a formal specification. As formal specifications are usually defined by committees, and these committees normally consist of members of the organisation, this criteria studies how to become a member and which are the financial barriers for this, as well as how are non-members able to have an influence on the process of defining the formal specification. It analyses: &lt;br /&gt;
* if the organisation is open to all types of companies and organisations and to individuals; &lt;br /&gt;
: Yes.  Xiph welcomes representatives from all companies and organizations.&lt;br /&gt;
* if the standardisation process may specifically allow participation of members with limited abilities when relevant; &lt;br /&gt;
: Yes.  Standardization occurs almost entirely in internet communications channels, allowing participants with disabilities to engage fully in the standards development process.  We also encourage nonexperts and students to assist us as they can, and to learn about Xiph technologies by participating in the standards development process.&lt;br /&gt;
* if meetings are open to all members;&lt;br /&gt;
: Xiph meetings are open to everyone.  We place no restrictions on attendance or participation.  For example, anyone interesting in contributing to the Theora specification may join [http://lists.xiph.org/pipermail/theora-dev/ the Theora development mailing list].&lt;br /&gt;
* if all can participate in the formal specification creation process; &lt;br /&gt;
: Yes.  All people are welcome to participate in the specification creation process.  No dues or fees are required to participate&lt;br /&gt;
* if non-members can participate in the formal specification creation process.&lt;br /&gt;
: Yes.  Xiph does not maintain an explicit list of members, and no one is excluded from contributing to specifications as they are developed.&lt;br /&gt;
&lt;br /&gt;
=== Consensus ===&lt;br /&gt;
Consensus is decision making primarily with regard to the approval of formal specifications and review with interest groups (non-members). The consensus evaluation criterion is evaluated with the following questions:&lt;br /&gt;
* Does the organisation have a stated objective of reaching consensus when making decisions on standards? &lt;br /&gt;
* If consensus is not reached, can the standard be approved? (answers are: cannot be approved but referred back to working group/committee, approved with 75% majority, approved with 66% majority, approved with 51% majority, can be decided by a &amp;quot;director&amp;quot; or similar in the organisation). &lt;br /&gt;
* Is there a formal process for external review of standard proposals by interest groups (nonmembers)?&lt;br /&gt;
: Since anyone may participate in the development process and make proposals, there is no need for a separate formal process to include proposals by nonmembers.&lt;br /&gt;
&lt;br /&gt;
=== Due Process ===&lt;br /&gt;
The due process evaluation criteria relates to the level of respect of each member of the organisation with regard to its rights. More specifically, it must be assured that if a member believes an error has been made in the process of defining a formal specification, it must be possible to appeal this to an independent, higher instance. The question is therefore: can a member formally appeal or raise objections to a procedure or to a technical specification to an independent, higher instance?&lt;br /&gt;
&lt;br /&gt;
=== Changes to the formal specification ===&lt;br /&gt;
The suggested changes made to a formal specification need to be presented, evaluated and approved in the same way as the formal specification was first defined. This criteria therefore applies the above criteria to the changes made to the formal specification(availability of documentation, Intellectual Property Right, accessibility, interoperability governance, meeting and consultation, consensus, due process).&lt;br /&gt;
&lt;br /&gt;
=== Support ===&lt;br /&gt;
It is critical that the organisation takes responsibility for the formal specification throughout its life span. This can be done in several ways such as for example a regular periodic review of the formal specification. The support criteria relates to the level of commitment the organisation has taken to support the formal specification throughout its life: &lt;br /&gt;
* does the organisation provide support until removal of the published formal specification from public domain (Including this process? &lt;br /&gt;
: Xiph.org standards are never removed from the public domain.  Xiph endeavors to provide support for as long as the standard remains in use.&lt;br /&gt;
* does the organisation make the formal specification still available even when in non-maintenance mode?&lt;br /&gt;
: Yes.  All Xiph.org standards are freely licensed and will always be available.&lt;br /&gt;
* does the organisation add new features and keep the formal specification up-to-date?&lt;br /&gt;
: Yes.  Xiph.org maintains its ecosystem of standards on a continuous basis.&lt;br /&gt;
* does the organisation rectify problems identified in initial implementations?&lt;br /&gt;
: Yes.  Xiph.org maintains [https://trac.xiph.org/report a problem reporting system] that is open to the public, and invites everyone to submit suggestions for improvements.  Improvements are made both to the standards documents and to the reference implementations.&lt;br /&gt;
* does the organisation only create the formal specification?&lt;br /&gt;
: No.  Xiph.org also produces high-quality reusable reference implementations of its standards, released under an open license.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;/div&gt;</summary>
		<author><name>Derf</name></author>	</entry>

	<entry>
		<id>http://wiki.xiph.org/IDABC_Questionnaire_2009</id>
		<title>IDABC Questionnaire 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.xiph.org/IDABC_Questionnaire_2009"/>
				<updated>2009-11-15T21:00:35Z</updated>
		
		<summary type="html">&lt;p&gt;Derf: /* Editorial revisions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strong&amp;gt;This is a draft document. A work in progress. A scratchpad for ideas. It should not be widely circulated in this form.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Context =&lt;br /&gt;
We received [http://lists.xiph.org/pipermail/theora/2009-November/002996.html an e-mail] from a consultant studying the suitability of Theora for use in &amp;quot;eGovernment&amp;quot;, on behalf of the [http://ec.europa.eu/idabc/ IDABC], an EU governmental agency responsible for &amp;quot;Interoperability&amp;quot; with an emphasis on open source.  The investigation is in the context of [http://ec.europa.eu/idabc/en/document/7728 European Interoperability Framework], about which there has been [http://www.computerworlduk.com/community/blogs/index.cfm?