Lines Matching full:vorbis
4 <head><title>Vorbis I specification</title>
22 <h2 class="titleHead">Vorbis I specification</h2>
228 href="#x1-126000A" id="QQ2-1-138">Embedding Vorbis into an Ogg stream</a></span>
241 href="#x1-132000B" id="QQ2-1-144">Vorbis encapsulation in RTP</a></span>
251 <!--l. 8--><p class="noindent" >This document provides a high level description of the Vorbis codec’s construction. A bit-by-bit
254 href="#x1-580004">Codec Setup and Packet Decode<!--tex4ht:ref: vorbis:spec:codec --></a>”. The later
255 sections assume a high-level understanding of the Vorbis decode process, which is provided
260 <!--l. 16--><p class="noindent" >Vorbis is a general purpose perceptual audio CODEC intended to allow maximum encoder
264 rate stereo at below 48kbps without resampling to a lower rate. Vorbis is also intended for lower
271 <!--l. 30--><p class="noindent" >Vorbis I is a forward-adaptive monolithic transform CODEC based on the Modified Discrete
273 Vorbis II to offer better transient response and reproduction using a transform better suited to
281 <!--l. 39--><p class="noindent" >The Vorbis CODEC design assumes a complex, psychoacoustically-aware encoder and simple,
282 low-complexity decoder. Vorbis decode is computationally simpler than mp3, although it does
283 require more working memory as Vorbis has no static probability model; the vector codebooks
284 used in the first stage of decoding from the bitstream are packed in their entirety into the Vorbis
288 <!--l. 50--><p class="noindent" >Vorbis provides none of its own framing, synchronization or protection against errors; it
292 reassembles the frames into a facsimile of the original audio stream. Vorbis is a free-form
299 <!--l. 64--><p class="noindent" >Vorbis packets are thus intended to be used with a transport mechanism that provides free-form
302 document, we will assume that Vorbis is to be embedded in an Ogg stream specifically,
303 although this is by no means a requirement or fundamental assumption in the Vorbis
305 <!--l. 72--><p class="noindent" >The specification for embedding Vorbis into an Ogg transport stream is in <a
308 href="#x1-126000A">Embedding Vorbis into an Ogg stream<!--tex4ht:ref: vorbis:over:ogg --></a>”.
312 <!--l. 79--><p class="noindent" >Vorbis’ heritage is as a research CODEC and its current design reflects a desire to allow multiple
319 <!--l. 85--><p class="noindent" >The single most controversial design decision in Vorbis (and the most unusual for a Vorbis
328 class="cmbx-12">Note:</span></span> Vorbis <span
331 <!--l. 101--><p class="noindent" >Thus, Vorbis headers are both required for decode to begin and relatively large as bitstream
333 is recommended (and Xiph.Org’s Vorbis encoder follows this suggestion).
338 fundamentally limit Vorbis’ suitable application space.
342 <!--l. 116--><p class="noindent" >The Vorbis format is well-defined by its decode specification; any encoder that produces packets
343 that are correctly decoded by the reference Vorbis decoder described below may be considered
344 a proper Vorbis encoder. A decoder must faithfully and completely implement the
345 specification defined below (except where noted) to be considered a proper Vorbis
353 <!--l. 124--><p class="noindent" >Although Vorbis decode is computationally simple, it may still run into specific limitations of an
379 <!--l. 147--><p class="noindent" >Global codec configuration consists of a few audio related fields (sample rate, channels), Vorbis
380 version (always ’0’ in Vorbis I), bitrate hints, and the lists of component instances. All other
388 <!--l. 154--><p class="noindent" >Each Vorbis frame is coded according to a master ’mode’. A bitstream may use one or many
395 <!--l. 164--><p class="noindent" >A ’mode’ configuration consists of a frame size setting, window type (always 0, the Vorbis
396 window, in Vorbis I), transform type (always type 0, the MDCT, in Vorbis I) and a mapping
413 <!--l. 188--><p class="noindent" >Assume a Vorbis stream that contains six channels in the standard 5.1 format. The sixth
426 <!--l. 201--><p class="noindent" >Vorbis encodes a spectral ’floor’ vector for each PCM channel. This vector is a low-resolution
437 <!--l. 218--><p class="noindent" >Floor 0 is not to be considered deprecated, but it is of limited modern use. No known Vorbis
463 <!--l. 248--><p class="noindent" >The entropy coding in a Vorbis I codebook is provided by a standard Huffman binary tree
476 stream to be decoded. Vorbis uses three header packets; all are required, in-order, by
478 the Vorbis stream. In Vorbis I, all packets after the three initial headers are audio
485 The identification header identifies the bitstream as Vorbis, Vorbis version, and the simple audio
497 href="#x1-810005">comment field and header specification<!--tex4ht:ref: vorbis:spec:comment --></a>”.
533 class="enumerate" id="x1-23018x9">inverse monolithic transform of audio spectrum vector, always an MDCT in Vorbis
557 Vorbis I uses four packet types. The first three packet types mark each of the three Vorbis
560 <!--l. 324--><p class="noindent" >Following the three header packets, all packets in a Vorbis I stream are audio. The first step of
570 Vorbis allows an encoder to set up multiple, numbered packet ’modes’, as described earlier, all of
571 which may be used in a given Vorbis stream. The mode is encoded as an integer used as a direct
576 Vorbis frames may be one of two PCM sample sizes specified during codec setup. In Vorbis I,
577 legal frame sizes are powers of two from 64 to 8192 samples. Aside from coupling, Vorbis
583 <!--l. 348--><p class="noindent" >Vorbis uses an overlapping transform, namely the MDCT, to blend one frame into the next,
615 modification), Vorbis also codes two flag bits to specify pre- and post- window shape. Although
622 Vorbis windows all use the slope function
645 <!--l. 404--><p class="noindent" >Vorbis codes residue vectors in groups by submap; the coding is done in submap order from
651 A detailed discussion of stereo in the Vorbis codec can be found in the document
653 href="stereo.html" >Stereo Channel Coupling in the Vorbis CODEC</a>. Vorbis is not limited to only stereo
656 <!--l. 419--><p class="noindent" >Vorbis coupling applies to pairs of residue vectors at a time; decoupling is done in-place a
715 lapped with surrounding frames using an appropriate window (such as the Vorbis window) before
764 <!--l. 8--><p class="noindent" >The Vorbis codec uses relatively unstructured raw packets containing arbitrary-width binary
768 (octets), sixteen bits, thirty-two bits or, less commonly other fixed word sizes. The Vorbis
783 to be a group of two, four or eight bytes (16, 32 or 64 bits). Note however that the Vorbis
784 bitpacking convention is still well defined for any native byte size; Vorbis uses the native
807 <!--l. 59--><p class="noindent" >The Vorbis bitpacking convention specifies storage and bitstream manipulation at the byte, not
816 <!--l. 70--><p class="noindent" >The Vorbis codec has need to code arbitrary bit-width integers, from zero to 32 bits
1803 insufficient remaining data to fulfill the desired read size. Vorbis uses truncated packets as a
1829 <!--l. 8--><p class="noindent" >Unlike practically every other mainstream audio codec, Vorbis has no statically configured
1839 <!--l. 19--><p class="noindent" >The codebook mechanism is built on top of the vorbis bitpacker. Both the codebooks themselves
1843 href="#x1-360002">Bitpacking Convention<!--tex4ht:ref: vorbis:spec:bitpacking --></a>”.
1850 href="#x1-360002">Bitpacking Convention<!--tex4ht:ref: vorbis:spec:bitpacking --></a>” for discussion
2581 <!--l. 136--><p class="noindent" >After all codeword lengths have been decoded, the decoder reads the vector lookup table. Vorbis
3619 of Vorbis I. This document assumes a high-level understanding of the Vorbis decode
3622 href="#x1-20001">Introduction and Description<!--tex4ht:ref: vorbis:spec:intro --></a>”. <a
3625 href="#x1-360002">Bitpacking Convention<!--tex4ht:ref: vorbis:spec:bitpacking --></a>” covers reading and writing bit fields from and to bitstream
3630 <!--l. 19--><p class="noindent" >A Vorbis bitstream begins with three header packets. The header packets are, in order, the
3684 definitively as Vorbis, and provide a few externally relevant pieces of information about the audio
3821 blocksize values are 64, 128, 256, 512, 1024, 2048, 4096 and 8192 in Vorbis I. <span
3847 header specification<!--tex4ht:ref: vorbis:spec:comment --></a>”.
3851 <!--l. 92--><p class="noindent" >Vorbis codec setup is configurable to an extreme degree:
3865 configurations (placeholders in Vorbis I), floor configurations, residue configurations, channel
3884 href="#x1-470003">Probability Model and Codebooks<!--tex4ht:ref: vorbis:spec:codebook --></a>”. Save each configuration, in order, in an array
3890 These hooks are placeholders in Vorbis I. Nevertheless, the configuration placeholder values must
3905 Vorbis uses two floor types; header decode is handed to the decode abstraction of the appropriate
3928 href="#x1-890006">Floor type 0 setup and decode<!--tex4ht:ref: vorbis:spec:floor0 --></a>”; save this configuration in slot <span
3940 href="#x1-950007">Floor type 1 setup and decode<!--tex4ht:ref: vorbis:spec:floor1 --></a>”; save this configuration in slot <span
3952 Vorbis uses three residue types; header decode of each type is identical.
3973 href="#x1-1020008">Residue setup and decode<!--tex4ht:ref: vorbis:spec:residue --></a>”; save this configuration in slot <span
3986 channel mapping applications. Vorbis I uses a single mapping type (0), with implicit PCM
4004 the mapping type in Vorbis I.
4161 Vorbis I for <span
4184 <!--l. 279--><p class="noindent" >Following the three header packets, all packets in a Vorbis I stream are audio. The first step of
4202 href="#x1-1170009.2.1">ilog</a>([vorbis˙mode˙count]-1) bits <span
4241 href="#x1-260001.3.2">Window shape decode (long windows only)<!--tex4ht:ref: vorbis:spec:window --></a>” for an illustration of
4251 href="#x1-260001.3.2">Window shape decode (long windows only)<!--tex4ht:ref: vorbis:spec:window --></a>” for an illustration of
4259 <!--l. 321--><p class="noindent" >Vorbis windows all use the slope function <span
4439 class="cmtt-12">[i] </span>of vector [vorbis˙mapping˙mux]
4444 class="cmtt-12">[submap_number] </span>of vector [vorbis˙submap˙floor]
4454 href="#x1-930006.2.2">packet decode<!--tex4ht:ref: vorbis:spec:floor0-decode --></a>”
4461 href="#x1-1000007.2.2">packet decode<!--tex4ht:ref: vorbis:spec:floor1-decode --></a>”
4764 only)<!--tex4ht:ref: vorbis:spec:window --></a>”). The overlapped portion produced from overlapping the previous and current frame data
4788 <!--l. 608--><p class="noindent" >Vorbis I specifies only a channel mapping type 0. In mapping type 0, channel mapping is
4841 <!--l. 656--><p class="noindent" >Applications using Vorbis for dedicated purposes may define channel mapping as seen fit. Future
4856 <!--l. 8--><p class="noindent" >The Vorbis text comment header is the second (of three) header packets that begin a Vorbis
4890 packing conventions of the vorbis codec. However, since data in the comment header
5071 class="cmtt-8"> Vorbis";</span>
5256 class="cmtt-12">vorbis/lib/info.c</span>, <span
5270 <!--l. 8--><p class="noindent" >Vorbis floor type zero uses Line Spectral Pair (LSP, also alternately known as Line Spectral
5889 <!--l. 8--><p class="noindent" >Vorbis floor type one uses a piecewise straight-line representation to encode a spectral envelope
8987 <!--l. 15--><p class="noindent" >Whatever the exact qualities, the Vorbis residue abstraction codes the residue vectors into the
8988 bitstream packet, and then reconstructs the vectors during decode. Vorbis makes use of three
9704 encoding stages (8 in Vorbis I, as constrained by the elements of the cascade bitmap being eight
11762 <!--l. 8--><p class="noindent" >The equations below are used in multiple places by the Vorbis
11915 <!--l. 50--><p class="noindent" >”float32˙unpack(x)” is intended to translate the packed binary representation of a Vorbis
11917 purposes of this example, we will unpack a Vorbis float32 into a host-native floating point
13528 id="x1-126000A"></a>Embedding Vorbis into an Ogg stream</h3>
13532 <!--l. 8--><p class="noindent" >This document describes using Ogg logical and physical transport streams to encapsulate Vorbis
13536 href="#x1-20001">Introduction and Description<!--tex4ht:ref: vorbis:spec:intro --></a>” provides an overview of the construction of
13537 Vorbis audio packets.
13547 <!--l. 24--><p class="noindent" >The Ogg/Vorbis I specification currently dictates that Ogg/Vorbis streams use Ogg transport
13550 <li class="itemize">A meta-headerless Ogg file encapsulates the Vorbis I packets
13555 <li class="itemize">The Ogg stream must be unmultiplexed (only one stream, a Vorbis audio stream,
13561 <!--l. 41--><p class="noindent" >This is not to say that it is not currently possible to multiplex Vorbis with other media
13563 becoming a popular container for low-bitrate movies consisting of DivX video and Vorbis
13564 audio. However, a ’Vorbis I audio file’ is taken to imply Vorbis audio existing alone
13565 within a degenerate Ogg stream. A compliant ’Vorbis audio player’ is not required to
13566 implement Ogg support beyond the specific support of Vorbis within a degenrate Ogg
13577 class="cmtt-12">audio/ogg</span>. Vorbis data encapsulated in Ogg may appear in any of those types. RTP
13578 encapsulated Vorbis should use <span
13579 class="cmtt-12">audio/vorbis </span>+ <span
13580 class="cmtt-12">audio/vorbis-config</span>.
13584 <!--l. 67--><p class="noindent" >Ogg encapsulation of a Vorbis packet stream is straightforward.
13586 <li class="itemize">The first Vorbis packet (the identification header), which uniquely identifies a stream
13587 as Vorbis audio, is placed alone in the first page of the logical Ogg stream. This
13593 <li class="itemize">The second and third vorbis packets (comment and setup headers) may span one or
13609 <li class="itemize">Vorbis packets may span page boundaries.
13611 <li class="itemize">The granule position of pages containing Vorbis audio is in units of PCM audio
13622 necessarily the middle sample from that block. If, eg, the current Vorbis packet
13623 encodes a ”long block” and the next Vorbis packet encodes a ”short block”, the last
13641 editing of the stream start time of already-encoded Vorbis streams. The number
13667 id="x1-132000B"></a>Vorbis encapsulation in RTP</h3>
13669 class="cmti-12">“RTP Payload Format for Vorbis Encoded Audio” </span>for description of
13670 how to embed Vorbis audio in an RTP stream.
13688 <!--l. 17--><p class="noindent" >Ogg Vorbis is the first Ogg audio CODEC. Anyone may freely use and distribute the Ogg and
13689 Vorbis specification, whether in a private, public or corporate capacity. However, the Xiph.org
13690 Foundation and the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis specification
13692 <!--l. 23--><p class="noindent" >Xiph.org’s Vorbis software CODEC implementation is distributed under a BSD-like license. This
13693 does not restrict third parties from distributing independent implementations of Vorbis software
13695 <!--l. 28--><p class="noindent" >Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (tm) of the <a