<html >
<head><title>Vorbis I specification</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
-<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
+<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
+<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
<!-- html -->
<meta name="src" content="Vorbis_I_spec.tex">
-<meta name="date" content="2012-02-03 17:06:00">
+<meta name="date" content="2015-02-26 13:44:00">
<link rel="stylesheet" type="text/css" href="Vorbis_I_spec.css">
</head><body
>
<div class="author" ><span
class="cmr-17">Xiph.Org Foundation</span></div><br />
<div class="date" ><span
-class="cmr-17">February 3, 2012</span></div>
+class="cmr-17">February 26, 2015</span></div>
</div>
<h3 class="likesectionHead"><a
id="x1-1000"></a>Contents</h3>
<br />   <span class="subsubsectionToc" >3.2.1 <a
href="#x1-510003.2.1" id="QQ2-1-54">codebook decode</a></span>
<br />  <span class="subsectionToc" >3.3 <a
-href="#x1-570003.3" id="QQ2-1-62">Use of the codebook abstraction</a></span>
+href="#x1-580003.3" id="QQ2-1-63">Use of the codebook abstraction</a></span>
<br /> <span class="sectionToc" >4 <a
-href="#x1-580004" id="QQ2-1-63">Codec Setup and Packet Decode</a></span>
+href="#x1-590004" id="QQ2-1-64">Codec Setup and Packet Decode</a></span>
<br />  <span class="subsectionToc" >4.1 <a
-href="#x1-590004.1" id="QQ2-1-64">Overview</a></span>
+href="#x1-600004.1" id="QQ2-1-65">Overview</a></span>
<br />  <span class="subsectionToc" >4.2 <a
-href="#x1-600004.2" id="QQ2-1-65">Header decode and decode setup</a></span>
+href="#x1-610004.2" id="QQ2-1-66">Header decode and decode setup</a></span>
<br />   <span class="subsubsectionToc" >4.2.1 <a
-href="#x1-610004.2.1" id="QQ2-1-66">Common header decode</a></span>
+href="#x1-620004.2.1" id="QQ2-1-67">Common header decode</a></span>
<br />   <span class="subsubsectionToc" >4.2.2 <a
-href="#x1-620004.2.2" id="QQ2-1-67">Identification header</a></span>
+href="#x1-630004.2.2" id="QQ2-1-68">Identification header</a></span>
<br />   <span class="subsubsectionToc" >4.2.3 <a
-href="#x1-630004.2.3" id="QQ2-1-68">Comment header</a></span>
+href="#x1-640004.2.3" id="QQ2-1-69">Comment header</a></span>
<br />   <span class="subsubsectionToc" >4.2.4 <a
-href="#x1-640004.2.4" id="QQ2-1-69">Setup header</a></span>
+href="#x1-650004.2.4" id="QQ2-1-70">Setup header</a></span>
<br />  <span class="subsectionToc" >4.3 <a
-href="#x1-710004.3" id="QQ2-1-77">Audio packet decode and synthesis</a></span>
+href="#x1-720004.3" id="QQ2-1-78">Audio packet decode and synthesis</a></span>
<br />   <span class="subsubsectionToc" >4.3.1 <a
-href="#x1-720004.3.1" id="QQ2-1-78">packet type, mode and window decode</a></span>
+href="#x1-730004.3.1" id="QQ2-1-79">packet type, mode and window decode</a></span>
<br />   <span class="subsubsectionToc" >4.3.2 <a
-href="#x1-730004.3.2" id="QQ2-1-79">floor curve decode</a></span>
+href="#x1-740004.3.2" id="QQ2-1-80">floor curve decode</a></span>
<br />   <span class="subsubsectionToc" >4.3.3 <a
-href="#x1-740004.3.3" id="QQ2-1-80">nonzero vector propagate</a></span>
+href="#x1-750004.3.3" id="QQ2-1-81">nonzero vector propagate</a></span>
<br />   <span class="subsubsectionToc" >4.3.4 <a
-href="#x1-750004.3.4" id="QQ2-1-81">residue decode</a></span>
+href="#x1-760004.3.4" id="QQ2-1-82">residue decode</a></span>
<br />   <span class="subsubsectionToc" >4.3.5 <a
-href="#x1-760004.3.5" id="QQ2-1-82">inverse coupling</a></span>
+href="#x1-770004.3.5" id="QQ2-1-83">inverse coupling</a></span>
<br />   <span class="subsubsectionToc" >4.3.6 <a
-href="#x1-770004.3.6" id="QQ2-1-83">dot product</a></span>
+href="#x1-780004.3.6" id="QQ2-1-84">dot product</a></span>
<br />   <span class="subsubsectionToc" >4.3.7 <a
-href="#x1-780004.3.7" id="QQ2-1-84">inverse MDCT</a></span>
+href="#x1-790004.3.7" id="QQ2-1-85">inverse MDCT</a></span>
<br />   <span class="subsubsectionToc" >4.3.8 <a
-href="#x1-790004.3.8" id="QQ2-1-85">overlap_add</a></span>
+href="#x1-800004.3.8" id="QQ2-1-86">overlap_add</a></span>
<br />   <span class="subsubsectionToc" >4.3.9 <a
-href="#x1-800004.3.9" id="QQ2-1-86">output channel order</a></span>
+href="#x1-810004.3.9" id="QQ2-1-87">output channel order</a></span>
<br /> <span class="sectionToc" >5 <a
-href="#x1-810005" id="QQ2-1-87">comment field and header specification</a></span>
+href="#x1-820005" id="QQ2-1-88">comment field and header specification</a></span>
<br />  <span class="subsectionToc" >5.1 <a
-href="#x1-820005.1" id="QQ2-1-88">Overview</a></span>
+href="#x1-830005.1" id="QQ2-1-89">Overview</a></span>
<br />  <span class="subsectionToc" >5.2 <a
-href="#x1-830005.2" id="QQ2-1-89">Comment encoding</a></span>
+href="#x1-840005.2" id="QQ2-1-90">Comment encoding</a></span>
<br />   <span class="subsubsectionToc" >5.2.1 <a
-href="#x1-840005.2.1" id="QQ2-1-90">Structure</a></span>
+href="#x1-850005.2.1" id="QQ2-1-91">Structure</a></span>
<br />   <span class="subsubsectionToc" >5.2.2 <a
-href="#x1-850005.2.2" id="QQ2-1-91">Content vector format</a></span>
+href="#x1-860005.2.2" id="QQ2-1-92">Content vector format</a></span>
<br />   <span class="subsubsectionToc" >5.2.3 <a
-href="#x1-880005.2.3" id="QQ2-1-94">Encoding</a></span>
+href="#x1-890005.2.3" id="QQ2-1-95">Encoding</a></span>
<br /> <span class="sectionToc" >6 <a
-href="#x1-890006" id="QQ2-1-95">Floor type 0 setup and decode</a></span>
+href="#x1-900006" id="QQ2-1-96">Floor type 0 setup and decode</a></span>
<br />  <span class="subsectionToc" >6.1 <a
-href="#x1-900006.1" id="QQ2-1-96">Overview</a></span>
+href="#x1-910006.1" id="QQ2-1-97">Overview</a></span>
<br />  <span class="subsectionToc" >6.2 <a
-href="#x1-910006.2" id="QQ2-1-97">Floor 0 format</a></span>
+href="#x1-920006.2" id="QQ2-1-98">Floor 0 format</a></span>
<br />   <span class="subsubsectionToc" >6.2.1 <a
-href="#x1-920006.2.1" id="QQ2-1-98">header decode</a></span>
+href="#x1-930006.2.1" id="QQ2-1-99">header decode</a></span>
<br />   <span class="subsubsectionToc" >6.2.2 <a
-href="#x1-930006.2.2" id="QQ2-1-99">packet decode</a></span>
+href="#x1-940006.2.2" id="QQ2-1-100">packet decode</a></span>
<br />   <span class="subsubsectionToc" >6.2.3 <a
-href="#x1-940006.2.3" id="QQ2-1-100">curve computation</a></span>
+href="#x1-950006.2.3" id="QQ2-1-101">curve computation</a></span>
<br /> <span class="sectionToc" >7 <a
-href="#x1-950007" id="QQ2-1-101">Floor type 1 setup and decode</a></span>
+href="#x1-960007" id="QQ2-1-102">Floor type 1 setup and decode</a></span>
<br />  <span class="subsectionToc" >7.1 <a
-href="#x1-960007.1" id="QQ2-1-102">Overview</a></span>
+href="#x1-970007.1" id="QQ2-1-103">Overview</a></span>
<br />  <span class="subsectionToc" >7.2 <a
-href="#x1-970007.2" id="QQ2-1-103">Floor 1 format</a></span>
+href="#x1-980007.2" id="QQ2-1-104">Floor 1 format</a></span>
<br />   <span class="subsubsectionToc" >7.2.1 <a
-href="#x1-980007.2.1" id="QQ2-1-104">model</a></span>
+href="#x1-990007.2.1" id="QQ2-1-105">model</a></span>
<br />   <span class="subsubsectionToc" >7.2.2 <a
-href="#x1-990007.2.2" id="QQ2-1-109">header decode</a></span>
+href="#x1-1000007.2.2" id="QQ2-1-110">header decode</a></span>
<br />   <span class="subsubsectionToc" >7.2.3 <a
-href="#x1-1000007.2.3" id="QQ2-1-110">packet decode</a></span>
+href="#x1-1010007.2.3" id="QQ2-1-111">packet decode</a></span>
<br />   <span class="subsubsectionToc" >7.2.4 <a
-href="#x1-1010007.2.4" id="QQ2-1-111">curve computation</a></span>
+href="#x1-1020007.2.4" id="QQ2-1-112">curve computation</a></span>
<br /> <span class="sectionToc" >8 <a
-href="#x1-1020008" id="QQ2-1-112">Residue setup and decode</a></span>
+href="#x1-1030008" id="QQ2-1-113">Residue setup and decode</a></span>
<br />  <span class="subsectionToc" >8.1 <a
-href="#x1-1030008.1" id="QQ2-1-113">Overview</a></span>
+href="#x1-1040008.1" id="QQ2-1-114">Overview</a></span>
<br />  <span class="subsectionToc" >8.2 <a
-href="#x1-1040008.2" id="QQ2-1-114">Residue format</a></span>
+href="#x1-1050008.2" id="QQ2-1-115">Residue format</a></span>
<br />  <span class="subsectionToc" >8.3 <a
-href="#x1-1050008.3" id="QQ2-1-116">residue 0</a></span>
+href="#x1-1060008.3" id="QQ2-1-117">residue 0</a></span>
<br />  <span class="subsectionToc" >8.4 <a
-href="#x1-1060008.4" id="QQ2-1-117">residue 1</a></span>
+href="#x1-1070008.4" id="QQ2-1-118">residue 1</a></span>
<br />  <span class="subsectionToc" >8.5 <a
-href="#x1-1070008.5" id="QQ2-1-118">residue 2</a></span>
+href="#x1-1080008.5" id="QQ2-1-119">residue 2</a></span>
<br />  <span class="subsectionToc" >8.6 <a
-href="#x1-1080008.6" id="QQ2-1-120">Residue decode</a></span>
+href="#x1-1090008.6" id="QQ2-1-121">Residue decode</a></span>
<br />   <span class="subsubsectionToc" >8.6.1 <a
-href="#x1-1090008.6.1" id="QQ2-1-121">header decode</a></span>
+href="#x1-1100008.6.1" id="QQ2-1-122">header decode</a></span>
<br />   <span class="subsubsectionToc" >8.6.2 <a
-href="#x1-1100008.6.2" id="QQ2-1-122">packet decode</a></span>
+href="#x1-1110008.6.2" id="QQ2-1-123">packet decode</a></span>
<br />   <span class="subsubsectionToc" >8.6.3 <a
-href="#x1-1110008.6.3" id="QQ2-1-123">format 0 specifics</a></span>
+href="#x1-1120008.6.3" id="QQ2-1-124">format 0 specifics</a></span>
<br />   <span class="subsubsectionToc" >8.6.4 <a
-href="#x1-1120008.6.4" id="QQ2-1-124">format 1 specifics</a></span>
+href="#x1-1130008.6.4" id="QQ2-1-125">format 1 specifics</a></span>
<br />   <span class="subsubsectionToc" >8.6.5 <a
-href="#x1-1130008.6.5" id="QQ2-1-125">format 2 specifics</a></span>
+href="#x1-1140008.6.5" id="QQ2-1-126">format 2 specifics</a></span>
<br /> <span class="sectionToc" >9 <a
-href="#x1-1140009" id="QQ2-1-126">Helper equations</a></span>
+href="#x1-1150009" id="QQ2-1-127">Helper equations</a></span>
<br />  <span class="subsectionToc" >9.1 <a
-href="#x1-1150009.1" id="QQ2-1-127">Overview</a></span>
+href="#x1-1160009.1" id="QQ2-1-128">Overview</a></span>
<br />  <span class="subsectionToc" >9.2 <a
-href="#x1-1160009.2" id="QQ2-1-128">Functions</a></span>
+href="#x1-1170009.2" id="QQ2-1-129">Functions</a></span>
<br />   <span class="subsubsectionToc" >9.2.1 <a
-href="#x1-1170009.2.1" id="QQ2-1-129">ilog</a></span>
+href="#x1-1180009.2.1" id="QQ2-1-130">ilog</a></span>
<br />   <span class="subsubsectionToc" >9.2.2 <a
-href="#x1-1180009.2.2" id="QQ2-1-130">float32_unpack</a></span>
+href="#x1-1190009.2.2" id="QQ2-1-131">float32_unpack</a></span>
<br />   <span class="subsubsectionToc" >9.2.3 <a
-href="#x1-1190009.2.3" id="QQ2-1-131">lookup1_values</a></span>
+href="#x1-1200009.2.3" id="QQ2-1-132">lookup1_values</a></span>
<br />   <span class="subsubsectionToc" >9.2.4 <a
-href="#x1-1200009.2.4" id="QQ2-1-132">low_neighbor</a></span>
+href="#x1-1210009.2.4" id="QQ2-1-133">low_neighbor</a></span>
<br />   <span class="subsubsectionToc" >9.2.5 <a
-href="#x1-1210009.2.5" id="QQ2-1-133">high_neighbor</a></span>
+href="#x1-1220009.2.5" id="QQ2-1-134">high_neighbor</a></span>
<br />   <span class="subsubsectionToc" >9.2.6 <a
-href="#x1-1220009.2.6" id="QQ2-1-134">render_point</a></span>
+href="#x1-1230009.2.6" id="QQ2-1-135">render_point</a></span>
<br />   <span class="subsubsectionToc" >9.2.7 <a
-href="#x1-1230009.2.7" id="QQ2-1-135">render_line</a></span>
+href="#x1-1240009.2.7" id="QQ2-1-136">render_line</a></span>
<br /> <span class="sectionToc" >10 <a
-href="#x1-12400010" id="QQ2-1-136">Tables</a></span>
+href="#x1-12500010" id="QQ2-1-137">Tables</a></span>
<br />  <span class="subsectionToc" >10.1 <a
-href="#x1-12500010.1" id="QQ2-1-137">floor1_inverse_dB_table</a></span>
+href="#x1-12600010.1" id="QQ2-1-138">floor1_inverse_dB_table</a></span>
<br /> <span class="sectionToc" >A <a
-href="#x1-126000A" id="QQ2-1-138">Embedding Vorbis into an Ogg stream</a></span>
+href="#x1-127000A" id="QQ2-1-139">Embedding Vorbis into an Ogg stream</a></span>
<br />  <span class="subsectionToc" >A.1 <a
-href="#x1-127000A.1" id="QQ2-1-139">Overview</a></span>
+href="#x1-128000A.1" id="QQ2-1-140">Overview</a></span>
<br />   <span class="subsubsectionToc" >A.1.1 <a
-href="#x1-128000A.1.1" id="QQ2-1-140">Restrictions</a></span>
+href="#x1-129000A.1.1" id="QQ2-1-141">Restrictions</a></span>
<br />   <span class="subsubsectionToc" >A.1.2 <a
-href="#x1-129000A.1.2" id="QQ2-1-141">MIME type</a></span>
+href="#x1-130000A.1.2" id="QQ2-1-142">MIME type</a></span>
<br />  <span class="subsectionToc" >A.2 <a
-href="#x1-130000A.2" id="QQ2-1-142">Encapsulation</a></span>
+href="#x1-131000A.2" id="QQ2-1-143">Encapsulation</a></span>
<br /> <span class="sectionToc" >B <a
-href="#x1-132000B" id="QQ2-1-144">Vorbis encapsulation in RTP</a></span>
+href="#x1-133000B" id="QQ2-1-145">Vorbis encapsulation in RTP</a></span>
</div>
id="x1-30001.1"></a>Overview</h4>
<!--l. 8--><p class="noindent" >This document provides a high level description of the Vorbis codec’s construction. A bit-by-bit
specification appears beginning in <a
-href="#x1-580004">Section 4</a>, “<a
-href="#x1-580004">Codec Setup and Packet Decode<!--tex4ht:ref: vorbis:spec:codec --></a>”. The later
+href="#x1-590004">section 4</a>, “<a
+href="#x1-590004">Codec Setup and Packet Decode<!--tex4ht:ref: vorbis:spec:codec --></a>”. The later
sections assume a high-level understanding of the Vorbis decode process, which is provided
here.
<!--l. 15--><p class="noindent" >
although this is by no means a requirement or fundamental assumption in the Vorbis
design.
<!--l. 72--><p class="noindent" >The specification for embedding Vorbis into an Ogg transport stream is in <a
-href="#x1-126000A">Section A</a>,
+href="#x1-127000A">section A</a>,
“<a
-href="#x1-126000A">Embedding Vorbis into an Ogg stream<!--tex4ht:ref: vorbis:over:ogg --></a>”.
+href="#x1-127000A">Embedding Vorbis into an Ogg stream<!--tex4ht:ref: vorbis:over:ogg --></a>”.
<!--l. 77--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">1.1.4. </span> <a
id="x1-70001.1.4"></a>Codec Setup and Probability Model</h5>
The comment header includes user text comments (“tags”) and a vendor string for the
application/library that produced the bitstream. The encoding and proper use of the comment
header is described in <a
-href="#x1-810005">Section 5</a>, “<a
-href="#x1-810005">comment field and header specification<!--tex4ht:ref: vorbis:spec:comment --></a>”.
+href="#x1-820005">section 5</a>, “<a
+href="#x1-820005">comment field and header specification<!--tex4ht:ref: vorbis:spec:comment --></a>”.
<!--l. 284--><p class="noindent" ><span class="paragraphHead"><a
id="x1-220001.3.1"></a><span
class="cmbx-12">Setup Header</span></span>
Vorbis windows all use the slope function
<center class="math-display" >
<img
-src="Vorbis_I_spec0x.png" alt="y = sin (.5 ∗ π sin2((x + .5)∕n ∗ π)).
+src="Vorbis_I_spec0x.png" alt="y = sin (.5 * π sin2((x + .5)∕n * π)).
in all cases because it happens to mostly work with the current Xiph.Org reference
encoder.
<!--l. 462--><p class="noindent" >However, floor vector values can span <span
-class="cmsy-10x-x-120">∼</span>140dB (<span
-class="cmsy-10x-x-120">∼</span>24 bits unsigned), and the audio spectrum
+class="cmsy-10x-x-120">~</span>140dB (<span
+class="cmsy-10x-x-120">~</span>24 bits unsigned), and the audio spectrum
vector should represent a minimum of 120dB (<span
-class="cmsy-10x-x-120">∼</span>21 bits with sign), even when output is to a 16
+class="cmsy-10x-x-120">~</span>21 bits with sign), even when output is to a 16
bit PCM device. For the residue vector to represent full scale if the floor is nailed
to <span
-class="cmsy-10x-x-120">−</span>140dB, it must be able to span 0 to +140dB. For the residue vector to reach
+class="cmsy-10x-x-120">-</span>140dB, it must be able to span 0 to +140dB. For the residue vector to reach
full scale if the floor is nailed at 0dB, it must be able to represent <span
-class="cmsy-10x-x-120">−</span>140dB to +0dB.
+class="cmsy-10x-x-120">-</span>140dB to +0dB.
Thus, in order to handle full range dynamics, a residue vector may span <span
-class="cmsy-10x-x-120">−</span>140dB to
+class="cmsy-10x-x-120">-</span>140dB to
+140dB entirely within spec. A 280dB range is approximately 48 bits with sign; thus the
residue vector must be able to represent a 48 bit range and the dot product must
be able to handle an effective 48 bit times 24 bit multiplication. This range may be
attention however to returning the correct data range; the amount of data to be returned
is:
<!--l. 519--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb1">
-<a
+<div class="fancyvrb" id="fancyvrb1"><a
id="x1-35002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> window_blocksize(previous_window)/4+window_blocksize(current_window)/4</span>
-</div>
+class="cmtt-8"> window_blocksize(previous_window)/4+window_blocksize(current_window)/4</span></div>
<!--l. 523--><p class="noindent" >from the center of the previous window to the center of the current window.
<!--l. 526--><p class="noindent" >Data is not returned from the first frame; it must be used to ’prime’ the decode engine. The
encoder accounts for this priming when calculating PCM offsets; after the first frame, the proper
id="x1-430002.1.6"></a>coding example</h5>
<!--l. 103--><p class="noindent" >Code the 4 bit integer value ’12’ [b1100] into an empty bytestream. Bytestream result:
<!--l. 106--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb2">
-<a
+<div class="fancyvrb" id="fancyvrb2"><a
id="x1-43002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> |</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> |</span><br class="fancyvrb" /><a
id="x1-43004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> V</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> V</span><br class="fancyvrb" /><a
id="x1-43006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-43008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3</span><span
class="cmtt-8"> 2</span><span
class="cmtt-8"> 1</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
id="x1-43010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> 0]</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> <-</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> <-</span><br class="fancyvrb" /><a
id="x1-43012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
id="x1-43016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
id="x1-43018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> ...</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ...</span><br class="fancyvrb" /><a
id="x1-43020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> ==</span><span
class="cmtt-8"> 1</span><span
-class="cmtt-8"> byte</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> byte</span><br class="fancyvrb" /><a
id="x1-43022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
<!--l. 121--><p class="noindent" >Continue by coding the 3 bit integer value ’-1’ [b111]:
<!--l. 123--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb3">
-<a
+<div class="fancyvrb" id="fancyvrb3"><a
id="x1-43024r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> |</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> |</span><br class="fancyvrb" /><a
id="x1-43026r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> V</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> V</span><br class="fancyvrb" /><a
id="x1-43028r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-43030r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3</span><span
class="cmtt-8"> 2</span><span
class="cmtt-8"> 1</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
id="x1-43032r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> 0]</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> <-</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> <-</span><br class="fancyvrb" /><a
id="x1-43034r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ]</span>
-
-
-
<br class="fancyvrb" /><a
id="x1-43036r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
id="x1-43038r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
id="x1-43040r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> ...</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ...</span><br class="fancyvrb" /><a
id="x1-43042r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> ==</span><span
class="cmtt-8"> 1</span><span
-class="cmtt-8"> byte</span>
-</div>
+class="cmtt-8"> byte</span></div>
<!--l. 137--><p class="noindent" >Continue by coding the 7 bit integer value ’17’ [b0010001]:
<!--l. 139--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb4">
-<a
+<div class="fancyvrb" id="fancyvrb4"><a
id="x1-43044r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> |</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> |</span><br class="fancyvrb" /><a
id="x1-43046r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> V</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> V</span><br class="fancyvrb" /><a
id="x1-43048r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-43050r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3</span><span
class="cmtt-8"> 2</span><span
class="cmtt-8"> 1</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
id="x1-43052r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 0</span><span
-class="cmtt-8"> 0]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0]</span><br class="fancyvrb" /><a
id="x1-43054r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> 0]</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> <-</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> <-</span><br class="fancyvrb" /><a
id="x1-43056r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
id="x1-43060r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> ...</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ...</span><br class="fancyvrb" /><a
id="x1-43062r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> ==</span><span
class="cmtt-8"> 2</span><span
-class="cmtt-8"> bytes</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> bytes</span><br class="fancyvrb" /><a
id="x1-43064r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bit</span><span
class="cmtt-8"> cursor</span><span
class="cmtt-8"> ==</span><span
-class="cmtt-8"> 6</span>
-</div>
+class="cmtt-8"> 6</span></div>
<!--l. 154--><p class="noindent" >Continue by coding the 13 bit integer value ’6969’ [b110 11001110 01]:
<!--l. 156--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb5">
-<a
+<div class="fancyvrb" id="fancyvrb5"><a
id="x1-43066r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> |</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> |</span><br class="fancyvrb" /><a
id="x1-43068r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> V</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> V</span><br class="fancyvrb" /><a
id="x1-43070r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-43072r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3</span><span
class="cmtt-8"> 2</span><span
class="cmtt-8"> 1</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
id="x1-43074r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 0</span><span
-class="cmtt-8"> 0]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0]</span><br class="fancyvrb" /><a
id="x1-43076r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 1</span><span
-class="cmtt-8"> 0]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0]</span><br class="fancyvrb" /><a
id="x1-43080r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 0]</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> <-</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> <-</span><br class="fancyvrb" /><a
id="x1-43082r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> ...</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ...</span><br class="fancyvrb" /><a
id="x1-43084r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> ==</span><span
class="cmtt-8"> 4</span><span
-class="cmtt-8"> bytes</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> bytes</span><br class="fancyvrb" /><a
id="x1-43086r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
+
+
+
<!--l. 173--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">2.1.7. </span> <a
id="x1-440002.1.7"></a>decoding example</h5>
<!--l. 175--><p class="noindent" >Reading from the beginning of the bytestream encoded in the above example:
<!--l. 177--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb6">
-
-
-
-<a
+<div class="fancyvrb" id="fancyvrb6"><a
id="x1-44002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> |</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> |</span><br class="fancyvrb" /><a
id="x1-44004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> V</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> V</span><br class="fancyvrb" /><a
id="x1-44006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-44008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3</span><span
class="cmtt-8"> 2</span><span
class="cmtt-8"> 1</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
id="x1-44010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> 0</span><span
-class="cmtt-8"> 0]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0]</span><br class="fancyvrb" /><a
id="x1-44014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 1</span><span
-class="cmtt-8"> 0]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0]</span><br class="fancyvrb" /><a
id="x1-44016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> ==</span><span
class="cmtt-8"> 4</span><span
-class="cmtt-8"> bytes</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> bytes</span><br class="fancyvrb" /><a
id="x1-44018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
<!--l. 190--><p class="noindent" >We read two, two-bit integer fields, resulting in the returned numbers ’b00’ and ’b11’. Two things
are worth noting here:
<ul class="itemize1">
<!--l. 222--><p class="noindent" >Attempting to read past the end of an encoded packet results in an ’end-of-packet’ condition.
End-of-packet is not to be considered an error; it is merely a state indicating that there is
insufficient remaining data to fulfill the desired read size. Vorbis uses truncated packets as a
-normal mode of operation, and as such, decoders must handle reading past the end of a packet as
-a typical mode of operation. Any further read operations after an ’end-of-packet’ condition shall
-also return ’end-of-packet’.
+normal mode of operation, and as such, decoders must handle reading past the end of a packet as
+a typical mode of operation. Any further read operations after an ’end-of-packet’ condition shall
+also return ’end-of-packet’.
<!--l. 233--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">2.1.9. </span> <a
id="x1-460002.1.9"></a>reading zero bits</h5>
<!--l. 19--><p class="noindent" >The codebook mechanism is built on top of the vorbis bitpacker. Both the codebooks themselves
and the codewords they decode are unrolled from a packet as a series of arbitrary-width values
read from the stream according to <a
-href="#x1-360002">Section 2</a>, “<a
+href="#x1-360002">section 2</a>, “<a
href="#x1-360002">Bitpacking Convention<!--tex4ht:ref: vorbis:spec:bitpacking --></a>”.
<!--l. 27--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">3.2. </span> <a
id="x1-500003.2"></a>Packed codebook format</h4>
<!--l. 29--><p class="noindent" >For purposes of the examples below, we assume that the storage system’s native byte width is
eight bits. This is not universally true; see <a
-href="#x1-360002">Section 2</a>, “<a
+href="#x1-360002">section 2</a>, “<a
href="#x1-360002">Bitpacking Convention<!--tex4ht:ref: vorbis:spec:bitpacking --></a>” for discussion
relating to non-eight-bit bytes.
id="x1-510003.2.1"></a>codebook decode</h5>
<!--l. 36--><p class="noindent" >A codebook begins with a 24 bit sync pattern, 0x564342:
<!--l. 38--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb7">
-<a
+<div class="fancyvrb" id="fancyvrb7"><a
id="x1-51002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ]</span><span
-class="cmtt-8"> (0x42)</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> (0x42)</span><br class="fancyvrb" /><a
id="x1-51004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> ]</span><span
-class="cmtt-8"> (0x43)</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> (0x43)</span><br class="fancyvrb" /><a
id="x1-51006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ]</span><span
-class="cmtt-8"> (0x56)</span>
-</div>
+class="cmtt-8"> (0x56)</span></div>
<!--l. 44--><p class="noindent" >16 bit <span
class="cmtt-12">[codebook_dimensions] </span>and 24 bit <span
class="cmtt-12">[codebook_entries] </span>fields:
<!--l. 46--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb8">
-<a
+<div class="fancyvrb" id="fancyvrb8"><a
id="x1-51008r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51010r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> X</span><span
class="cmtt-8"> X</span><span
class="cmtt-8"> X</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
id="x1-51012r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [codebook_dimensions]</span><span
class="cmtt-8"> (16</span><span
class="cmtt-8"> bit</span><span
-class="cmtt-8"> unsigned)</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> unsigned)</span><br class="fancyvrb" /><a
id="x1-51014r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> X</span><span
class="cmtt-8"> X</span><span
class="cmtt-8"> X</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
id="x1-51018r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> X</span><span
class="cmtt-8"> X</span><span
class="cmtt-8"> X</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
id="x1-51020r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [codebook_entries]</span><span
class="cmtt-8"> (24</span><span
class="cmtt-8"> bit</span><span
-class="cmtt-8"> unsigned)</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> unsigned)</span><br class="fancyvrb" /><a
id="x1-51022r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
<!--l. 57--><p class="noindent" >Next is the <span
class="cmtt-12">[ordered] </span>bit flag:
<!--l. 59--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb9">
-<a
+<div class="fancyvrb" id="fancyvrb9"><a
id="x1-51024r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51026r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ]</span><span
class="cmtt-8"> [ordered]</span><span
class="cmtt-8"> (1</span><span
-class="cmtt-8"> bit)</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> bit)</span><br class="fancyvrb" /><a
id="x1-51028r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
<!--l. 65--><p class="noindent" >Each entry, numbering a total of <span
class="cmtt-12">[codebook_entries]</span>, is assigned a codeword length.
We now read the list of codeword lengths and store these lengths in the array
<!--l. 77--><p class="noindent" >The decoder first reads one additional bit flag, the <span
class="cmtt-12">[sparse] </span>flag. This flag determines
whether or not the codebook contains unused entries that are not to be included in
-
-
-
the codeword decode tree:
<!--l. 82--><p class="noindent" >
- <div class="fancyvrb" id="fancyvrb10">
-<a
+ <div class="fancyvrb" id="fancyvrb10"><a
id="x1-51030r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [sparse]</span><span
class="cmtt-8"> flag</span><span
class="cmtt-8"> (1</span><span
-class="cmtt-8"> bit)</span>
-</div>
+class="cmtt-8"> bit)</span></div>
<!--l. 86--><p class="noindent" >The decoder now performs for each of the <span
class="cmtt-12">[codebook_entries] </span>codebook entries:
<!--l. 89--><p class="noindent" >
- <div class="fancyvrb" id="fancyvrb11">
-<a
+ <div class="fancyvrb" id="fancyvrb11"><a
id="x1-51032r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51034r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> set)</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
+class="cmsy-8">{</span><br class="fancyvrb" /><a
id="x1-51036r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51038r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> one</span><span
-class="cmtt-8"> bit;</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> bit;</span><br class="fancyvrb" /><a
id="x1-51040r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> set)</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
+class="cmsy-8">{</span><br class="fancyvrb" /><a
id="x1-51042r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51044r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> five</span><span
class="cmtt-8"> bit</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer;</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> integer;</span><br class="fancyvrb" /><a
id="x1-51046r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> this</span><span
class="cmtt-8"> entry</span><span
class="cmtt-8"> is</span><span
-class="cmtt-8"> [length]+1;</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> [length]+1;</span><br class="fancyvrb" /><a
id="x1-51048r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51050r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmsy-8">}</span><span
class="cmtt-8"> else</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
+class="cmsy-8">{</span><br class="fancyvrb" /><a
id="x1-51052r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51054r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> mark</span><span
class="cmtt-8"> it</span><span
class="cmtt-8"> as</span><span
-class="cmtt-8"> such.</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> such.</span><br class="fancyvrb" /><a
id="x1-51056r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51058r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
+class="cmsy-8">}</span><br class="fancyvrb" /><a
id="x1-51060r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51062r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> set</span><span
class="cmtt-8"> </span><span
class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51064r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51066r18"></a><span
class="cmr-6">18</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> five</span><span
class="cmtt-8"> bit</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer;</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> integer;</span><br class="fancyvrb" /><a
id="x1-51068r19"></a><span
class="cmr-6">19</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> this</span><span
class="cmtt-8"> entry</span><span
class="cmtt-8"> is</span><span
-class="cmtt-8"> [length]+1;</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> [length]+1;</span><br class="fancyvrb" /><a
id="x1-51070r20"></a><span
class="cmr-6">20</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51072r21"></a><span
class="cmr-6">21</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
+class="cmsy-8">}</span><br class="fancyvrb" /><a
id="x1-51074r22"></a><span
class="cmr-6">22</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
+
+
+
</li>
<li class="itemize">If the <span
class="cmtt-12">[ordered] </span>flag is set, the codeword list for this codebook is encoded in
encoder reads the number of codewords per length. That is, beginning at entry
zero:
<!--l. 120--><p class="noindent" >
- <div class="fancyvrb" id="fancyvrb12">
-<a
+ <div class="fancyvrb" id="fancyvrb12"><a
id="x1-51076r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
class="cmtt-8"> [current_entry]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 0;</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0;</span><br class="fancyvrb" /><a
id="x1-51078r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> and</span><span
class="cmtt-8"> add</span><span
class="cmtt-8"> 1;</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51080r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> </span><a
-href="#x1-1170009.2.1"><span
+href="#x1-1180009.2.1"><span
class="cmtt-8">ilog</span></a><span
class="cmtt-8">([codebook_entries]</span><span
class="cmtt-8"> -</span><span
class="cmtt-8"> an</span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51082r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> through</span><span
class="cmtt-8"> [current_entry]+[number]-1,</span><span
class="cmtt-8"> inclusive,</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51084r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> array</span><span
class="cmtt-8"> to</span><span
class="cmtt-8"> [current_length]</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51086r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> to</span><span
class="cmtt-8"> [number]</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [current_entry]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> [current_entry]</span><br class="fancyvrb" /><a
id="x1-51088r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [current_length]</span><span
class="cmtt-8"> by</span><span
class="cmtt-8"> 1</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51090r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> than</span><span
class="cmtt-8"> [codebook_entries]</span><span
class="cmtt-8"> ERROR</span><span
-class="cmtt-8"> CONDITION;</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> CONDITION;</span><br class="fancyvrb" /><a
id="x1-51092r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> this</span><span
class="cmtt-8"> stream.</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51094r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> process</span><span
class="cmtt-8"> starting</span><span
class="cmtt-8"> at</span><span
-class="cmtt-8"> 3)</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 3)</span><br class="fancyvrb" /><a
id="x1-51096r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 9)</span><span
-class="cmtt-8"> done.</span>
-
-
-
-</div>
+class="cmtt-8"> done.</span></div>
</li></ul>
<!--l. 136--><p class="noindent" >After all codeword lengths have been decoded, the decoder reads the vector lookup table. Vorbis
I supports three lookup types:
3. </dt><dd
class="enumerate-enumitem">Explicitly populated value mapping (tessellated or ’foam’ VQ)</dd></dl>
<!--l. 149--><p class="noindent" >The lookup table type is read as a four bit unsigned integer:
-<div class="fancyvrb" id="fancyvrb13">
-<a
+<div class="fancyvrb" id="fancyvrb13"><a
id="x1-51101r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> an</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-</div>
+class="cmtt-8"> integer</span></div>
<!--l. 154--><p class="noindent" >Codebook decode precedes according to <span
class="cmtt-12">[codebook_lookup_type]</span>:
<ul class="itemize1">
rather than building vectors from a smaller list of possible scalar values. Lookup
decode proceeds as follows:
<!--l. 168--><p class="noindent" >
- <div class="fancyvrb" id="fancyvrb14">
-<a
+ <div class="fancyvrb" id="fancyvrb14"><a
id="x1-51103r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [codebook_minimum_value]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> </span><a
-href="#x1-1180009.2.2"><span
+href="#x1-1190009.2.2"><span
class="cmtt-8">float32_unpack</span></a><span
class="cmtt-8">(</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> an</span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer)</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51105r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [codebook_delta_value]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> </span><a
-href="#x1-1180009.2.2"><span
+href="#x1-1190009.2.2"><span
class="cmtt-8">float32_unpack</span></a><span
class="cmtt-8">(</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> an</span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer)</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51107r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> and</span><span
class="cmtt-8"> add</span><span
-class="cmtt-8"> 1</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 1</span><br class="fancyvrb" /><a
id="x1-51109r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> a</span><span
class="cmtt-8"> boolean</span><span
-class="cmtt-8"> flag</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> flag</span><br class="fancyvrb" /><a
id="x1-51111r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+
+
+
+ <br class="fancyvrb" /><a
id="x1-51113r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
+class="cmsy-8">{</span><br class="fancyvrb" /><a
id="x1-51115r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51117r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [codebook_lookup_values]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> </span><a
-href="#x1-1190009.2.3"><span
+href="#x1-1200009.2.3"><span
class="cmtt-8">lookup1_values</span></a><span
class="cmtt-8">([codebook_entries],</span><span
class="cmtt-8"> [codebook_dimensions]</span><span
class="cmtt-8"> )</span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51119r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51121r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmsy-8">}</span><span
class="cmtt-8"> else</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
+class="cmsy-8">{</span><br class="fancyvrb" /><a
id="x1-51123r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51125r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [codebook_entries]</span><span
class="cmtt-8"> *</span><span
-class="cmtt-8"> [codebook_dimensions]</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> [codebook_dimensions]</span><br class="fancyvrb" /><a
id="x1-51127r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> </span><br class="fancyvrb" /><a
id="x1-51129r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
+class="cmsy-8">}</span><br class="fancyvrb" /><a
id="x1-51131r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51133r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> [codebook_value_bits]</span><span
class="cmtt-8"> each;</span>
-
-
-
-<br class="fancyvrb" /><a
+ <br class="fancyvrb" /><a
id="x1-51135r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> in</span><span
class="cmtt-8"> the</span><span
class="cmtt-8"> array</span><span
-class="cmtt-8"> [codebook_multiplicands]</span>
-</div>
+class="cmtt-8"> [codebook_multiplicands]</span></div>
</li>
<li class="itemize">A <span
class="cmtt-12">[codebook_lookup_type] </span>of greater than two is reserved and indicates a stream that is
codeword entries) is assigned, in order, the lowest valued unused binary Huffman codeword
possible. Assume the following codeword length list:
<!--l. 209--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb15">
-<a
+<div class="fancyvrb" id="fancyvrb15"><a
id="x1-52002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> entry</span><span
class="cmtt-8"> 0:</span><span
class="cmtt-8"> length</span><span
-class="cmtt-8"> 2</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 2</span><br class="fancyvrb" /><a
id="x1-52004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> entry</span><span
class="cmtt-8"> 1:</span><span
class="cmtt-8"> length</span><span
-class="cmtt-8"> 4</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 4</span><br class="fancyvrb" /><a
id="x1-52006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> entry</span><span
class="cmtt-8"> 2:</span><span
class="cmtt-8"> length</span><span
-class="cmtt-8"> 4</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 4</span><br class="fancyvrb" /><a
id="x1-52008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> entry</span><span
class="cmtt-8"> 3:</span><span
class="cmtt-8"> length</span><span
-class="cmtt-8"> 4</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 4</span><br class="fancyvrb" /><a
id="x1-52010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> entry</span><span
class="cmtt-8"> 4:</span><span
class="cmtt-8"> length</span><span
-class="cmtt-8"> 4</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 4</span><br class="fancyvrb" /><a
id="x1-52012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> entry</span><span
class="cmtt-8"> 6:</span><span
class="cmtt-8"> length</span><span
-class="cmtt-8"> 3</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 3</span><br class="fancyvrb" /><a
id="x1-52016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> entry</span><span
class="cmtt-8"> 7:</span><span
class="cmtt-8"> length</span><span
-class="cmtt-8"> 3</span>
-</div>
+class="cmtt-8"> 3</span></div>
<!--l. 220--><p class="noindent" >Assigning codewords in order (lowest possible value of the appropriate length to highest) results
in the following codeword list:
<!--l. 223--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb16">
-<a
+<div class="fancyvrb" id="fancyvrb16"><a
id="x1-52018r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> 2</span><span
class="cmtt-8"> codeword</span><span
-class="cmtt-8"> 00</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 00</span><br class="fancyvrb" /><a
id="x1-52020r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> 4</span><span
class="cmtt-8"> codeword</span><span
-class="cmtt-8"> 0100</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0100</span><br class="fancyvrb" /><a
id="x1-52022r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> 4</span><span
class="cmtt-8"> codeword</span><span
-class="cmtt-8"> 0101</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0101</span><br class="fancyvrb" /><a
id="x1-52024r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> 4</span><span
class="cmtt-8"> codeword</span><span
-class="cmtt-8"> 0111</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 0111</span><br class="fancyvrb" /><a
id="x1-52028r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> 2</span><span
class="cmtt-8"> codeword</span><span
-class="cmtt-8"> 10</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 10</span><br class="fancyvrb" /><a
id="x1-52030r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> 3</span><span
class="cmtt-8"> codeword</span><span
-class="cmtt-8"> 110</span>
-<br class="fancyvrb" /><a
+class="cmtt-8"> 110</span><br class="fancyvrb" /><a
id="x1-52032r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> length</span><span
class="cmtt-8"> 3</span><span
class="cmtt-8"> codeword</span><span
-class="cmtt-8"> 111</span>
-</div>
-
-
-
+class="cmtt-8"> 111</span></div>
<!--l. 235--><p class="noindent" ><span class="likesubparagraphHead"><a
id="x1-530003.2.1"></a><span
class="cmbx-12">Note:</span></span> Unlike most binary numerical values in this document, we intend the above codewords to
bit is the MSb.
<!--l. 243--><p class="noindent" >It is clear that the codeword length list represents a Huffman decision tree with the entry
numbers equivalent to the leaves numbered left-to-right:
+
+
+
<div class="center"
>
<!--l. 247--><p class="noindent" >
</div>
<!--l. 266--><p class="noindent" >Similarly, in the original codebook, it’s clear that the tree is fully populated and a ninth
codeword is impossible. Both underspecified and overspecified trees are an error condition
-rendering the stream undecodable. Take special care that a codebook with a single used
-entry is handled properly; it consists of a single codework of zero bits and ’reading’
-a value out of such a codebook always returns the single used value and sinks zero
-bits.
-<!--l. 274--><p class="noindent" >Codebook entries marked ’unused’ are simply skipped in the assigning process. They have no
+rendering the stream undecodable.
+<!--l. 271--><p class="noindent" >Codebook entries marked ’unused’ are simply skipped in the assigning process. They have no
codeword and do not appear in the decision tree, thus it’s impossible for any bit pattern read
from the stream to decode to that entry number.
+<!--l. 276--><p class="noindent" ><span class="paragraphHead"><a
+ id="x1-540003.2.1"></a><span
+class="cmbx-12">Errata 20150226: Single entry codebooks</span></span>
+A ’single-entry codebook’ is a codebook with one active codeword entry. A single-entry codebook
+may be either a fully populated codebook with only one declared entry, or a sparse codebook
+with only one entry marked used. The Vorbis I spec provides no means to specify a codeword
+length of zero, and as a result, a single-entry codebook is inherently malformed because it is
+underpopulated. The original specification did not address directly the matter of single-entry
+codebooks; they were implicitly illegal as it was not possible to write such a codebook with a
+valid tree structure.
-<!--l. 281--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-540003.2.1"></a><span
+<!--l. 288--><p class="noindent" >In r14811 of the libvorbis reference implementation, Xiph added an additional check to the
+codebook implementation to reject underpopulated Huffman trees. This change led to the
+discovery of single-entry books used ’in the wild’ when the new, stricter checks rejected a number
+of apparently working streams.
+<!--l. 294--><p class="noindent" >In order to minimize breakage of deployed (if technically erroneous) streams, r16073 of the
+reference implementation explicitly special-cased single-entry codebooks to tolerate the
+single-entry case. Commit r16073 also added the following to the specification:
+<!--l. 303--><p class="noindent" >“<span class="sout">Take special care that a codebook with a single used entry is handled properly; it consists of a
+single codework of zero bits and reading a value out of such a codebook always returns the single
+used value and sinks zero bits. </span>”
+<!--l. 305--><p class="noindent" >The intent was to clarify the spec and codify current practice. However, this addition is
+erroneously at odds with the intent of preserving usability of existing streams using single-entry
+codebooks, disagrees with the code changes that reinstated decoding, and does not address how
+single-entry codebooks should be encoded.
+<!--l. 311--><p class="noindent" >As such, the above addition made in r16037 is struck from the specification and replaced by the
+following:
+<!--l. 330--><p class="noindent" >
+ <div class="quote">
+ <!--l. 330--><p class="noindent" >It is possible to declare a Vorbis codebook containing a single codework
+ entry. A single-entry codebook may be either a fully populated codebook with
+ <span
+class="cmtt-12">[codebook_entries] </span>set to 1, or a sparse codebook marking only one entry
+ used. Note that it is not possible to also encode a <span
+class="cmtt-12">[codeword_length] </span>of zero
+ for the single used codeword, as the unsigned value written to the stream
+ is <span
+class="cmtt-12">[codeword_length]-1</span>. Instead, encoder implementations should indicate a
+ <span
+class="cmtt-12">[codeword_length] </span>of 1 and ’write’ the codeword to a stream during audio
+ encoding by writing a single zero bit.
+ <!--l. 330--><p class="noindent" >Decoder implementations shall reject a codebook if it contains only one used
+ entry and the encoded <span
+class="cmtt-12">[codeword_length] </span>of that entry is not 1. ’Reading’ a
+ value from single-entry codebook always returns the single used codeword value
+ and sinks one bit. Decoders should tolerate that the bit read from the stream
+ be ’1’ instead of ’0’; both values shall return the single used codeword.</div>
+<!--l. 332--><p class="noindent" ><span class="paragraphHead"><a
+ id="x1-550003.2.1"></a><span
class="cmbx-12">VQ lookup table vector representation</span></span>
Unpacking the VQ lookup table vectors relies on the following values:
-<div class="fancyvrb" id="fancyvrb17">
-<a
- id="x1-54002r1"></a><span
+
+
+
+<div class="fancyvrb" id="fancyvrb17"><a
+ id="x1-55002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> the</span><span
class="cmtt-8"> [codebook\_multiplicands]</span><span
-class="cmtt-8"> array</span>
-<br class="fancyvrb" /><a
- id="x1-54004r2"></a><span
+class="cmtt-8"> array</span><br class="fancyvrb" /><a
+ id="x1-55004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook\_minimum\_value]</span>
-<br class="fancyvrb" /><a
- id="x1-54006r3"></a><span
+class="cmtt-8"> [codebook\_minimum\_value]</span><br class="fancyvrb" /><a
+ id="x1-55006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook\_delta\_value]</span>
-<br class="fancyvrb" /><a
- id="x1-54008r4"></a><span
+class="cmtt-8"> [codebook\_delta\_value]</span><br class="fancyvrb" /><a
+ id="x1-55008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [codebook\_sequence\_p]</span>
<br class="fancyvrb" /><a
- id="x1-54010r5"></a><span
+ id="x1-55010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook\_lookup\_type]</span>
-<br class="fancyvrb" /><a
- id="x1-54012r6"></a><span
+class="cmtt-8"> [codebook\_lookup\_type]</span><br class="fancyvrb" /><a
+ id="x1-55012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook\_entries]</span>
-<br class="fancyvrb" /><a
- id="x1-54014r7"></a><span
+class="cmtt-8"> [codebook\_entries]</span><br class="fancyvrb" /><a
+ id="x1-55014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook\_dimensions]</span>
-<br class="fancyvrb" /><a
- id="x1-54016r8"></a><span
+class="cmtt-8"> [codebook\_dimensions]</span><br class="fancyvrb" /><a
+ id="x1-55016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook\_lookup\_values]</span>
-</div>
-<!--l. 297--><p class="noindent" >Decoding (unpacking) a specific vector in the vector lookup table proceeds according to
+class="cmtt-8"> [codebook\_lookup\_values]</span></div>
+<!--l. 348--><p class="noindent" >Decoding (unpacking) a specific vector in the vector lookup table proceeds according to
<span
class="cmtt-12">[codebook_lookup_type]</span>. The unpacked vector values are what a codebook would return
during audio packet decode in a VQ context.
-<!--l. 302--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-550003.2.1"></a><span
+<!--l. 353--><p class="noindent" ><span class="paragraphHead"><a
+ id="x1-560003.2.1"></a><span
class="cmbx-12">Vector value decode: Lookup type 1</span></span>
Lookup type one specifies a lattice VQ lookup table built algorithmically from a list of
scalar values. Calculate (unpack) the final values of a codebook entry vector from
vector representing the vector of values for entry number <span
class="cmtt-12">[lookup_offset] </span>in this
codebook):
-<!--l. 311--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb18">
-<a
- id="x1-55002r1"></a><span
+<!--l. 362--><p class="noindent" >
+<div class="fancyvrb" id="fancyvrb18"><a
+ id="x1-56002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
class="cmtt-8"> [last]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 0;</span>
-<br class="fancyvrb" /><a
- id="x1-55004r2"></a><span
+class="cmtt-8"> 0;</span><br class="fancyvrb" /><a
+ id="x1-56004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2)</span><span
class="cmtt-8"> [index_divisor]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 1;</span>
-<br class="fancyvrb" /><a
- id="x1-55006r3"></a><span
+class="cmtt-8"> 1;</span><br class="fancyvrb" /><a
+ id="x1-56006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmsy-8">{</span>
<br class="fancyvrb" /><a
- id="x1-55008r4"></a><span
+ id="x1-56008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-55010r5"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-56010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> using</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-55012r6"></a><span
+ id="x1-56012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> modulo</span><span
-class="cmtt-8"> [codebook_lookup_values]</span>
-<br class="fancyvrb" /><a
- id="x1-55014r7"></a><span
+class="cmtt-8"> [codebook_lookup_values]</span><br class="fancyvrb" /><a
+ id="x1-56014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-55016r8"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-56016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [i]</span><span
class="cmtt-8"> =</span>
<br class="fancyvrb" /><a
- id="x1-55018r9"></a><span
+ id="x1-56018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> *</span>
<br class="fancyvrb" /><a
- id="x1-55020r10"></a><span
+ id="x1-56020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> +</span><span
class="cmtt-8"> [codebook_minimum_value]</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [last];</span>
-<br class="fancyvrb" /><a
- id="x1-55022r11"></a><span
+class="cmtt-8"> [last];</span><br class="fancyvrb" /><a
+ id="x1-56022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-55024r12"></a><span
+ id="x1-56024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> [value_vector]</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [i]</span>
-<br class="fancyvrb" /><a
- id="x1-55026r13"></a><span
+class="cmtt-8"> [i]</span><br class="fancyvrb" /><a
+ id="x1-56026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-55028r14"></a><span
+ id="x1-56028r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [index_divisor]</span><span
class="cmtt-8"> *</span><span
-class="cmtt-8"> [codebook_lookup_values]</span>
-<br class="fancyvrb" /><a
- id="x1-55030r15"></a><span
+class="cmtt-8"> [codebook_lookup_values]</span><br class="fancyvrb" /><a
+ id="x1-56030r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-55032r16"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-56032r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-55034r17"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-56034r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-55036r18"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-56036r18"></a><span
class="cmr-6">18</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 8)</span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> calculation</span><span
-class="cmtt-8"> completed.</span>
-</div>
-
-
-
-<!--l. 334--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-560003.2.1"></a><span
+class="cmtt-8"> completed.</span></div>
+<!--l. 385--><p class="noindent" ><span class="paragraphHead"><a
+ id="x1-570003.2.1"></a><span
class="cmbx-12">Vector value decode: Lookup type 2</span></span>
Lookup type two specifies a VQ lookup table in which each scalar in each vector is explicitly set
by the <span
class="cmtt-12">[value_vector] </span>is the output vector representing the vector of values for entry number
<span
class="cmtt-12">[lookup_offset] </span>in this codebook):
-<!--l. 344--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb19">
-<a
- id="x1-56002r1"></a><span
+<!--l. 395--><p class="noindent" >
+<div class="fancyvrb" id="fancyvrb19"><a
+ id="x1-57002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
class="cmtt-8"> [last]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 0;</span>
-<br class="fancyvrb" /><a
- id="x1-56004r2"></a><span
+class="cmtt-8"> 0;</span><br class="fancyvrb" /><a
+ id="x1-57004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> *</span><span
class="cmtt-8"> [codebook_dimensions]</span>
<br class="fancyvrb" /><a
- id="x1-56006r3"></a><span
+ id="x1-57006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> value</span><span
class="cmtt-8"> vector)</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-56008r4"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-57008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-56010r5"></a><span
+ id="x1-57010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [value_vector]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span><span
-class="cmtt-8"> =</span>
-<br class="fancyvrb" /><a
- id="x1-56012r6"></a><span
+class="cmtt-8"> =</span><br class="fancyvrb" /><a
+ id="x1-57012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> *</span>
<br class="fancyvrb" /><a
- id="x1-56014r7"></a><span
+ id="x1-57014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> +</span><span
class="cmtt-8"> [codebook_minimum_value]</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [last];</span>
-<br class="fancyvrb" /><a
- id="x1-56016r8"></a><span
+class="cmtt-8"> [last];</span><br class="fancyvrb" /><a
+ id="x1-57016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-56018r9"></a><span
+ id="x1-57018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> [value_vector]</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [i]</span>
-<br class="fancyvrb" /><a
- id="x1-56020r10"></a><span
+class="cmtt-8"> [i]</span><br class="fancyvrb" /><a
+ id="x1-57020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-56022r11"></a><span
+ id="x1-57022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 6)</span><span
class="cmtt-8"> increment</span><span
-class="cmtt-8"> [multiplicand_offset]</span>
-<br class="fancyvrb" /><a
- id="x1-56024r12"></a><span
+class="cmtt-8"> [multiplicand_offset]</span><br class="fancyvrb" /><a
+ id="x1-57024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-56026r13"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-57026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-56028r14"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-57028r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-56030r15"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-57030r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 7)</span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> calculation</span><span
-class="cmtt-8"> completed.</span>
-</div>
-<!--l. 370--><p class="noindent" >
+class="cmtt-8"> completed.</span></div>
+
+
+
+<!--l. 421--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">3.3. </span> <a
- id="x1-570003.3"></a>Use of the codebook abstraction</h4>
-<!--l. 372--><p class="noindent" >The decoder uses the codebook abstraction much as it does the bit-unpacking convention; a
+ id="x1-580003.3"></a>Use of the codebook abstraction</h4>
+<!--l. 423--><p class="noindent" >The decoder uses the codebook abstraction much as it does the bit-unpacking convention; a
specific codebook reads a codeword from the bitstream, decoding it into an entry number, and
then returns that entry number to the decoder (when used in a scalar entropy coding context), or
uses that entry number as an offset into the VQ lookup table, returning a vector of values (when
used in a context desiring a VQ value). Scalar or VQ context is always explicit; any
call to the codebook mechanism requests either a scalar entry number or a lookup
vector.
-<!--l. 382--><p class="noindent" >Note that VQ lookup type zero indicates that there is no lookup table; requesting
+<!--l. 433--><p class="noindent" >Note that VQ lookup type zero indicates that there is no lookup table; requesting
decode using a codebook of lookup type 0 in any context expecting a vector return
value (even in a case where a vector of dimension one) is forbidden. If decoder setup
or decode requests such an action, that is an error condition rendering the packet
-
-
-
undecodable.
-<!--l. 389--><p class="noindent" >Using a codebook to read from the packet bitstream consists first of reading and decoding the
+<!--l. 440--><p class="noindent" >Using a codebook to read from the packet bitstream consists first of reading and decoding the
next codeword in the bitstream. The decoder reads bits until the accumulated bits match a
codeword in the codebook. This process can be though of as logically walking the
Huffman decode tree by reading one bit at a time from the bitstream, and using the
hits a leaf in the decision tree; the result is the entry number corresponding to that
leaf. Reading past the end of a packet propagates the ’end-of-stream’ condition to the
decoder.
-<!--l. 401--><p class="noindent" >When used in a scalar context, the resulting codeword entry is the desired return
+<!--l. 452--><p class="noindent" >When used in a scalar context, the resulting codeword entry is the desired return
value.
-<!--l. 404--><p class="noindent" >When used in a VQ context, the codeword entry number is used as an offset into the VQ lookup
+<!--l. 455--><p class="noindent" >When used in a VQ context, the codeword entry number is used as an offset into the VQ lookup
table. The value returned to the decoder is the vector of scalars corresponding to this
offset.
<h3 class="sectionHead"><span class="titlemark">4. </span> <a
- id="x1-580004"></a>Codec Setup and Packet Decode</h3>
+ id="x1-590004"></a>Codec Setup and Packet Decode</h3>
<!--l. 7--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">4.1. </span> <a
- id="x1-590004.1"></a>Overview</h4>
+ id="x1-600004.1"></a>Overview</h4>
<!--l. 9--><p class="noindent" >This document serves as the top-level reference document for the bit-by-bit decode specification
of Vorbis I. This document assumes a high-level understanding of the Vorbis decode
process, which is provided in <a
-href="#x1-20001">Section 1</a>, “<a
+href="#x1-20001">section 1</a>, “<a
href="#x1-20001">Introduction and Description<!--tex4ht:ref: vorbis:spec:intro --></a>”. <a
-href="#x1-360002">Section 2</a>,
+href="#x1-360002">section 2</a>,
“<a
href="#x1-360002">Bitpacking Convention<!--tex4ht:ref: vorbis:spec:bitpacking --></a>” covers reading and writing bit fields from and to bitstream
packets.
<!--l. 17--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">4.2. </span> <a
- id="x1-600004.2"></a>Header decode and decode setup</h4>
+ id="x1-610004.2"></a>Header decode and decode setup</h4>
<!--l. 19--><p class="noindent" >A Vorbis bitstream begins with three header packets. The header packets are, in order, the
identification header, the comments header, and the setup header. All are required for decode
compliance. An end-of-packet condition during decoding the first or third header packet renders
condition.
<!--l. 26--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.2.1. </span> <a
- id="x1-610004.2.1"></a>Common header decode</h5>
+ id="x1-620004.2.1"></a>Common header decode</h5>
<!--l. 28--><p class="noindent" >Each header packet begins with the same header fields.
<!--l. 31--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb20">
-<a
- id="x1-61002r1"></a><span
+<div class="fancyvrb" id="fancyvrb20"><a
+ id="x1-62002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> :</span><span
class="cmtt-8"> 8</span><span
class="cmtt-8"> bit</span><span
-class="cmtt-8"> value</span>
-<br class="fancyvrb" /><a
- id="x1-61004r2"></a><span
+class="cmtt-8"> value</span><br class="fancyvrb" /><a
+ id="x1-62004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ’v’,’o’,’r’,’b’,’i’,’s’</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> six</span><span
-class="cmtt-8"> octets</span>
-</div>
-
-
-
+class="cmtt-8"> octets</span></div>
<!--l. 36--><p class="noindent" >Decode continues according to packet type; the identification header is type 1, the comment
header type 3 and the setup header type 5 (these types are all odd as a packet with a leading
single bit of ’0’ is an audio packet). The packets must occur in the order of identification,
+
+
+
comment, setup.
<!--l. 44--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.2.2. </span> <a
- id="x1-620004.2.2"></a>Identification header</h5>
+ id="x1-630004.2.2"></a>Identification header</h5>
<!--l. 46--><p class="noindent" >The identification header is a short header of only a few fields used to declare the stream
definitively as Vorbis, and provide a few externally relevant pieces of information about the audio
stream. The identification header is coded as follows:
<!--l. 51--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb21">
-<a
- id="x1-62002r1"></a><span
+<div class="fancyvrb" id="fancyvrb21"><a
+ id="x1-63002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
- id="x1-62004r2"></a><span
+class="cmtt-8"> integer</span><br class="fancyvrb" /><a
+ id="x1-63004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span>
<br class="fancyvrb" /><a
- id="x1-62006r3"></a><span
+ id="x1-63006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
- id="x1-62008r4"></a><span
+class="cmtt-8"> integer</span><br class="fancyvrb" /><a
+ id="x1-63008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> signed</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-62010r5"></a><span
+ id="x1-63010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> signed</span><span
-class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
- id="x1-62012r6"></a><span
+class="cmtt-8"> integer</span><br class="fancyvrb" /><a
+ id="x1-63012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> signed</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-62014r7"></a><span
+ id="x1-63014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer)</span>
-<br class="fancyvrb" /><a
- id="x1-62016r8"></a><span
+class="cmtt-8"> integer)</span><br class="fancyvrb" /><a
+ id="x1-63016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer)</span>
<br class="fancyvrb" /><a
- id="x1-62018r9"></a><span
+ id="x1-63018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> one</span><span
-class="cmtt-8"> bit</span>
-</div>
+class="cmtt-8"> bit</span></div>
<!--l. 63--><p class="noindent" ><span
class="cmtt-12">[vorbis_version] </span>is to read ’0’ in order to be compatible with this document. Both
<span
fixed-rate bitstream
</li>
<li class="itemize">Only nominal set implies a VBR or ABR stream that averages the nominal bitrate
-
-
-
</li>
<li class="itemize">Maximum and or minimum set implies a VBR bitstream that obeys the bitrate limits
</li>
<li class="itemize">None set indicates the encoder does not care to speculate.</li></ul>
+
+
+
<!--l. 85--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.2.3. </span> <a
- id="x1-630004.2.3"></a>Comment header</h5>
+ id="x1-640004.2.3"></a>Comment header</h5>
<!--l. 86--><p class="noindent" >Comment header decode and data specification is covered in <a
-href="#x1-810005">Section 5</a>, “<a
-href="#x1-810005">comment field and
+href="#x1-820005">section 5</a>, “<a
+href="#x1-820005">comment field and
header specification<!--tex4ht:ref: vorbis:spec:comment --></a>”.
<!--l. 90--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.2.4. </span> <a
- id="x1-640004.2.4"></a>Setup header</h5>
+ id="x1-650004.2.4"></a>Setup header</h5>
<!--l. 92--><p class="noindent" >Vorbis codec setup is configurable to an extreme degree:
<div class="center"
>
>
<br /> <div class="caption"
><span class="id">Figure 6: </span><span
-class="content">decoder pipeline configuration</span></div><!--tex4ht:label?: x1-640016 -->
+class="content">decoder pipeline configuration</span></div><!--tex4ht:label?: x1-650016 -->
</div>
<!--l. 100--><p class="noindent" >The setup header contains the bulk of the codec setup information needed for decode. The setup
header contains, in order, the lists of codebook configurations, time-domain transform
mapping configurations and mode configurations. It finishes with a framing bit of ’1’. Header
decode proceeds in the following order:
<!--l. 108--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-650004.2.4"></a><span
+ id="x1-660004.2.4"></a><span
class="cmbx-12">Codebooks</span></span>
-
-
-
<dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
1. </dt><dd
class="enumerate-enumitem"><span
2. </dt><dd
class="enumerate-enumitem">Decode <span
class="cmtt-12">[vorbis_codebook_count] </span>codebooks in order as defined in <a
-href="#x1-470003">Section 3</a>,
+href="#x1-470003">section 3</a>,
“<a
href="#x1-470003">Probability Model and Codebooks<!--tex4ht:ref: vorbis:spec:codebook --></a>”. Save each configuration, in order, in an array
of codebook configurations <span
class="cmtt-12">[vorbis_codebook_configurations]</span>.</dd></dl>
+
+
+
<!--l. 120--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-660004.2.4"></a><span
+ id="x1-670004.2.4"></a><span
class="cmbx-12">Time domain transforms</span></span>
These hooks are placeholders in Vorbis I. Nevertheless, the configuration placeholder values must
be read to maintain bitstream sync.
class="cmtt-12">[vorbis_time_count] </span>16 bit values; each value should be zero. If any value is
nonzero, this is an error condition and the stream is undecodable.</dd></dl>
<!--l. 133--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-670004.2.4"></a><span
+ id="x1-680004.2.4"></a><span
class="cmbx-12">Floors</span></span>
Vorbis uses two floor types; header decode is handed to the decode abstraction of the appropriate
type.
</dd><dt class="enumerate-enumitem">
b) </dt><dd
class="enumerate-enumitem">If the floor type is zero, decode the floor configuration as defined in <a
-href="#x1-890006">Section 6</a>,
+href="#x1-900006">section 6</a>,
“<a
-href="#x1-890006">Floor type 0 setup and decode<!--tex4ht:ref: vorbis:spec:floor0 --></a>”; save this configuration in slot <span
+href="#x1-900006">Floor type 0 setup and decode<!--tex4ht:ref: vorbis:spec:floor0 --></a>”; save this configuration in slot <span
class="cmtt-12">[i] </span>of the floor
configuration array <span
class="cmtt-12">[vorbis_floor_configurations]</span>.
-
-
-
</dd><dt class="enumerate-enumitem">
c) </dt><dd
class="enumerate-enumitem">If the floor type is one, decode the floor configuration as defined in <a
-href="#x1-950007">Section 7</a>,
+href="#x1-960007">section 7</a>,
“<a
-href="#x1-950007">Floor type 1 setup and decode<!--tex4ht:ref: vorbis:spec:floor1 --></a>”; save this configuration in slot <span
+href="#x1-960007">Floor type 1 setup and decode<!--tex4ht:ref: vorbis:spec:floor1 --></a>”; save this configuration in slot <span
class="cmtt-12">[i] </span>of the floor
configuration array <span
class="cmtt-12">[vorbis_floor_configurations]</span>.
d) </dt><dd
class="enumerate-enumitem">If the the floor type is greater than one, this stream is undecodable; ERROR
CONDITION</dd></dl>
+
+
+
</dd></dl>
<!--l. 157--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-680004.2.4"></a><span
+ id="x1-690004.2.4"></a><span
class="cmbx-12">Residues</span></span>
Vorbis uses three residue types; header decode of each type is identical.
<!--l. 163--><p class="noindent" >
b) </dt><dd
class="enumerate-enumitem">If the residue type is zero, one or two, decode the residue configuration as defined
in <a
-href="#x1-1020008">Section 8</a>, “<a
-href="#x1-1020008">Residue setup and decode<!--tex4ht:ref: vorbis:spec:residue --></a>”; save this configuration in slot <span
+href="#x1-1030008">section 8</a>, “<a
+href="#x1-1030008">Residue setup and decode<!--tex4ht:ref: vorbis:spec:residue --></a>”; save this configuration in slot <span
class="cmtt-12">[i] </span>of
the residue configuration array <span
class="cmtt-12">[vorbis_residue_configurations]</span>.
CONDITION</dd></dl>
</dd></dl>
<!--l. 177--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-690004.2.4"></a><span
+ id="x1-700004.2.4"></a><span
class="cmbx-12">Mappings</span></span>
Mappings are used to set up specific pipelines for encoding multichannel audio with varying
channel mapping applications. Vorbis I uses a single mapping type (0), with implicit PCM
channel mappings.
-
-
-
<!--l. 188--><p class="noindent" >
<dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
1. </dt><dd
class="enumerate-enumitem">For each <span
class="cmtt-12">[i] </span>of <span
class="cmtt-12">[vorbis_mapping_count] </span>mapping numbers:
+
+
+
<dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
a) </dt><dd
class="enumerate-enumitem">read the mapping type: 16 bits as unsigned integer. There’s no reason to save
class="cmtt-12">[vorbis_mapping_magnitude] </span>element <span
class="cmtt-12">[j]</span>= read
<a
-href="#x1-1170009.2.1">ilog</a>(<span
+href="#x1-1180009.2.1">ilog</a>(<span
class="cmtt-12">[audio_channels] </span>- 1) bits as unsigned integer
</li>
<li class="itemize">vector <span
class="cmtt-12">[vorbis_mapping_angle] </span>element <span
class="cmtt-12">[j]</span>= read
<a
-href="#x1-1170009.2.1">ilog</a>(<span
+href="#x1-1180009.2.1">ilog</a>(<span
class="cmtt-12">[audio_channels] </span>- 1) bits as unsigned integer
</li>
-
-
-
<li class="itemize">the numbers read in the above two steps are channel numbers
representing the channel to treat as magnitude and the channel
to treat as angle, respectively. If for any coupling step the
the angle channel is greater than <span
class="cmtt-12">[audio_channels]</span>-1, the stream
is undecodable.</li></ul>
+
+
+
</li></ul>
</dd><dt class="enumerate-enumitem">
B. </dt><dd
<span
class="cmtt-12">[vorbis_mapping_submap_residue] </span>element <span
class="cmtt-12">[j]</span>
-
-
-
</dd><dt class="enumerate-enumitem">
E. </dt><dd
class="enumerate-enumitem">verify the residue number is not greater than the highest number residue
<span
class="cmtt-12">[vorbis_mapping_configurations]</span>.</dd></dl>
</dd></dl>
+
+
+
</dd></dl>
<!--l. 247--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-700004.2.4"></a><span
+ id="x1-710004.2.4"></a><span
class="cmbx-12">Modes</span></span>
<dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
1. </dt><dd
3. </dt><dd
class="enumerate-enumitem">read 1 bit as a framing flag. If unset, a framing error occurred and the stream is not
decodable.</dd></dl>
-
-
-
<!--l. 268--><p class="noindent" >After reading mode descriptions, setup header decode is complete.
<!--l. 277--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">4.3. </span> <a
- id="x1-710004.3"></a>Audio packet decode and synthesis</h4>
+ id="x1-720004.3"></a>Audio packet decode and synthesis</h4>
+
+
+
<!--l. 279--><p class="noindent" >Following the three header packets, all packets in a Vorbis I stream are audio. The first step of
audio packet decode is to read and verify the packet type. <span
class="cmti-12">A non-audio packet when audio is</span>
class="cmti-12">packet and not attempt decoding it to audio</span>.
<!--l. 286--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.1. </span> <a
- id="x1-720004.3.1"></a>packet type, mode and window decode</h5>
+ id="x1-730004.3.1"></a>packet type, mode and window decode</h5>
<!--l. 289--><p class="noindent" >
<dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
1. </dt><dd
</dd><dt class="enumerate-enumitem">
2. </dt><dd
class="enumerate-enumitem">read <a
-href="#x1-1170009.2.1">ilog</a>([vorbis_mode_count]-1) bits <span
+href="#x1-1180009.2.1">ilog</a>([vorbis_mode_count]-1) bits <span
class="cmtt-12">[mode_number]</span>
</dd><dt class="enumerate-enumitem">
3. </dt><dd
ii. </dt><dd
class="enumerate-enumitem">read 1 bit for <span
class="cmtt-12">[next_window_flag]</span>
-
-
-
</dd><dt class="enumerate-enumitem">
iii. </dt><dd
class="enumerate-enumitem">if <span
class="cmtt-12">[next_window_flag] </span>is not set, the right half of the window will be
a hybrid window for lapping with a short block. See <a
href="#x1-260001.3.2">paragraph 1.3.2</a>,
+
+
+
“<a
href="#x1-260001.3.2">Window shape decode (long windows only)<!--tex4ht:ref: vorbis:spec:window --></a>” for an illustration of
overlapping dissimilar windows. Else, the left right window will have normal
</dd></dl>
<!--l. 321--><p class="noindent" >Vorbis windows all use the slope function <span
class="cmmi-12">y </span>= sin(<img
-src="Vorbis_I_spec1x.png" alt="π2" class="frac" align="middle"> <span
-class="cmsy-10x-x-120">∗</span> sin <sup><span
+src="Vorbis_I_spec1x.png" alt="π
+2" class="frac" align="middle"> <span
+class="cmsy-10x-x-120">*</span> sin <sup><span
class="cmr-8">2</span></sup>((<span
class="cmmi-12">x </span>+ 0<span
class="cmmi-12">.</span>5)<span
class="cmmi-12">∕n </span><span
-class="cmsy-10x-x-120">∗ </span><span
-class="cmmi-12">π</span>)), where <span
+class="cmsy-10x-x-120">* </span><span
+class="cmmi-12">π</span>)), where <span
class="cmmi-12">n </span>is window
size and <span
class="cmmi-12">x </span>ranges 0<span
-class="cmmi-12">…</span><span
+class="cmmi-12">…</span><span
class="cmmi-12">n</span><span
-class="cmsy-10x-x-120">− </span>1, but dissimilar lapping requirements can affect overall shape. Window
+class="cmsy-10x-x-120">- </span>1, but dissimilar lapping requirements can affect overall shape. Window
generation proceeds as follows:
<!--l. 327--><p class="noindent" >
<dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
class="enumerate-enumitem"><span
class="cmtt-12">[left_window_end] </span>= <span
class="cmtt-12">[window_center]</span>
-
-
-
</dd><dt class="enumerate-enumitem">
c) </dt><dd
class="enumerate-enumitem"><span
class="cmtt-12">[right_window_end] </span>= <span
class="cmtt-12">[n]*3</span>/4 + <span
class="cmtt-12">[blocksize_0]</span>/4
+
+
+
</dd><dt class="enumerate-enumitem">
c) </dt><dd
class="enumerate-enumitem"><span
class="cmtt-12">[left_window_end]</span>-1, window(<span
class="cmtt-12">[i]</span>) =
sin(<img
-src="Vorbis_I_spec2x.png" alt="π
+src="Vorbis_I_spec2x.png" alt="π
2" class="frac" align="middle"> <span
-class="cmsy-10x-x-120">∗</span> sin <sup><span
+class="cmsy-10x-x-120">*</span> sin <sup><span
class="cmr-8">2</span></sup>( (<span
class="cmtt-12">[i]</span>-<span
class="cmtt-12">[left_window_start]</span>+0.5) / <span
class="cmtt-12">[left_n] </span><span
-class="cmsy-10x-x-120">∗</span><img
-src="Vorbis_I_spec3x.png" alt="π
+class="cmsy-10x-x-120">*</span><img
+src="Vorbis_I_spec3x.png" alt="π
2" class="frac" align="middle">) )
</dd><dt class="enumerate-enumitem">
6. </dt><dd
class="cmtt-12">[right_window_end]</span>-1, window(<span
class="cmtt-12">[i]</span>) =
sin(<img
-src="Vorbis_I_spec4x.png" alt="π
-2" class="frac" align="middle"> <span
-class="cmsy-10x-x-120">∗</span> sin <sup><span
+src="Vorbis_I_spec4x.png" alt="π2" class="frac" align="middle"> <span
+class="cmsy-10x-x-120">*</span> sin <sup><span
class="cmr-8">2</span></sup>( (<span
class="cmtt-12">[i]</span>-<span
class="cmtt-12">[right_window_start]</span>+0.5) / <span
class="cmtt-12">[right_n] </span><span
-class="cmsy-10x-x-120">∗</span><img
-src="Vorbis_I_spec5x.png" alt="π
-2" class="frac" align="middle"> + <img
-src="Vorbis_I_spec6x.png" alt="π
-2" class="frac" align="middle">) )
+class="cmsy-10x-x-120">*</span><img
+src="Vorbis_I_spec5x.png" alt="π2" class="frac" align="middle"> + <img
+src="Vorbis_I_spec6x.png" alt="π2" class="frac" align="middle">) )
</dd><dt class="enumerate-enumitem">
8. </dt><dd
class="enumerate-enumitem">window from range <span
<!--l. 368--><p class="noindent" >An end-of-packet condition up to this point should be considered an error that discards this
packet from the stream. An end of packet condition past this point is to be considered a possible
nominal occurrence.
-
-
-
<!--l. 375--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.2. </span> <a
- id="x1-730004.3.2"></a>floor curve decode</h5>
+ id="x1-740004.3.2"></a>floor curve decode</h5>
<!--l. 377--><p class="noindent" >From this point on, we assume out decode context is using mode number <span
class="cmtt-12">[mode_number]</span>
from configuration array <span
array <span
class="cmtt-12">[vorbis_mapping_configurations]</span>.
<!--l. 384--><p class="noindent" >Floor curves are decoded one-by-one in channel order.
+
+
+
<!--l. 386--><p class="noindent" >For each floor <span
class="cmtt-12">[i] </span>of <span
class="cmtt-12">[audio_channels]</span>
class="cmtt-12">[floor_number]</span>) is zero then decode the floor for
channel <span
class="cmtt-12">[i] </span>according to the <a
-href="#x1-930006.2.2">subsubsection 6.2.2</a>, “<a
-href="#x1-930006.2.2">packet decode<!--tex4ht:ref: vorbis:spec:floor0-decode --></a>”
+href="#x1-940006.2.2">subsubsection 6.2.2</a>, “<a
+href="#x1-940006.2.2">packet decode<!--tex4ht:ref: vorbis:spec:floor0-decode --></a>”
</dd><dt class="enumerate-enumitem">
4. </dt><dd
class="enumerate-enumitem">if the type of this floor is one then decode the floor for channel <span
class="cmtt-12">[i] </span>according to the
<a
-href="#x1-1000007.2.3">subsubsection 7.2.3</a>, “<a
-href="#x1-1000007.2.3">packet decode<!--tex4ht:ref: vorbis:spec:floor1-decode --></a>”
+href="#x1-1010007.2.3">subsubsection 7.2.3</a>, “<a
+href="#x1-1010007.2.3">packet decode<!--tex4ht:ref: vorbis:spec:floor1-decode --></a>”
</dd><dt class="enumerate-enumitem">
5. </dt><dd
class="enumerate-enumitem">save the needed decoded floor information for channel for later synthesis
output vectors and skipping to the add/overlap output stage.
<!--l. 412--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.3. </span> <a
- id="x1-740004.3.3"></a>nonzero vector propagate</h5>
+ id="x1-750004.3.3"></a>nonzero vector propagate</h5>
<!--l. 414--><p class="noindent" >A possible result of floor decode is that a specific vector is marked ’unused’ which indicates that
that final output vector is all-zero values (and the floor is zero). The residue for that vector is not
coded in the stream, save for one complication. If some vectors are used and some are not,
-
-
-
channel coupling could result in mixing a zeroed and nonzeroed vector to produce two nonzeroed
vectors.
<!--l. 421--><p class="noindent" >for each <span
class="cmtt-12">[vorbis_mapping_angle] </span>element <span
class="cmtt-12">[i]</span>) are set to false, then both
must be set to false. Note that an ’unused’ floor has no decoded floor information; it
+
+
+
is important that this is remembered at floor curve synthesis time.</dd></dl>
<!--l. 436--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.4. </span> <a
- id="x1-750004.3.4"></a>residue decode</h5>
+ id="x1-760004.3.4"></a>residue decode</h5>
<!--l. 438--><p class="noindent" >Unlike floors, which are decoded in channel order, the residue vectors are decoded in submap
order.
<!--l. 441--><p class="noindent" >for each submap <span
ii. </dt><dd
class="enumerate-enumitem">increment <span
class="cmtt-12">[ch]</span></dd></dl>
-
-
-
</dd></dl>
</dd><dt class="enumerate-enumitem">
3. </dt><dd
class="cmtt-12">[ch] </span>vectors using residue <span
class="cmtt-12">[residue_number]</span>, according to type <span
class="cmtt-12">[residue_type]</span>,
+
+
+
also passing vector <span
class="cmtt-12">[do_not_decode_flag] </span>to indicate which vectors in the bundle should
not be decoded. Correct per-vector decode length is <span
</dd></dl>
<!--l. 480--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.5. </span> <a
- id="x1-760004.3.5"></a>inverse coupling</h5>
+ id="x1-770004.3.5"></a>inverse coupling</h5>
<!--l. 482--><p class="noindent" >for each <span
class="cmtt-12">[i] </span>from <span
class="cmtt-12">[vorbis_mapping_coupling_steps]</span>-1 descending to 0
class="enumerate-enumitem"><span
class="cmtt-12">[angle_vector] </span>= the residue vector for channel (vector <span
class="cmtt-12">[vorbis_mapping_angle]</span>
-
-
-
element <span
class="cmtt-12">[i]</span>)
</dd><dt class="enumerate-enumitem">
a) </dt><dd
class="enumerate-enumitem">if (<span
class="cmtt-12">[M] </span>is greater than zero)
+
+
+
<dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
i. </dt><dd
class="enumerate-enumitem">if (<span
class="cmtt-12">[M] </span>in vector <span
class="cmtt-12">[magnitude_vector] </span>to <span
class="cmtt-12">[new_M]</span>
-
-
-
</dd><dt class="enumerate-enumitem">
c) </dt><dd
class="enumerate-enumitem">set scalar value <span
class="cmtt-12">[angle_vector] </span>to <span
class="cmtt-12">[new_A]</span></dd></dl>
</dd></dl>
+
+
+
<!--l. 529--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.6. </span> <a
- id="x1-770004.3.6"></a>dot product</h5>
+ id="x1-780004.3.6"></a>dot product</h5>
<!--l. 531--><p class="noindent" >For each channel, synthesize the floor curve from the decoded floor information, according to
packet type. Note that the vector synthesis length for floor computation is <span
class="cmtt-12">[n]</span>/2.
in all cases because it happens to mostly work with the current Xiph.Org reference
encoder.
<!--l. 550--><p class="noindent" >However, floor vector values can span <span
-class="cmsy-10x-x-120">∼</span>140dB (<span
-class="cmsy-10x-x-120">∼</span>24 bits unsigned), and the audio spectrum
+class="cmsy-10x-x-120">~</span>140dB (<span
+class="cmsy-10x-x-120">~</span>24 bits unsigned), and the audio spectrum
vector should represent a minimum of 120dB (<span
-class="cmsy-10x-x-120">∼</span>21 bits with sign), even when output is to a 16
+class="cmsy-10x-x-120">~</span>21 bits with sign), even when output is to a 16
bit PCM device. For the residue vector to represent full scale if the floor is nailed
to <span
-class="cmsy-10x-x-120">−</span>140dB, it must be able to span 0 to +140dB. For the residue vector to reach
+class="cmsy-10x-x-120">-</span>140dB, it must be able to span 0 to +140dB. For the residue vector to reach
full scale if the floor is nailed at 0dB, it must be able to represent <span
-class="cmsy-10x-x-120">−</span>140dB to +0dB.
+class="cmsy-10x-x-120">-</span>140dB to +0dB.
Thus, in order to handle full range dynamics, a residue vector may span <span
-class="cmsy-10x-x-120">−</span>140dB to
+class="cmsy-10x-x-120">-</span>140dB to
+140dB entirely within spec. A 280dB range is approximately 48 bits with sign; thus the
residue vector must be able to represent a 48 bit range and the dot product must
be able to handle an effective 48 bit times 24 bit multiplication. This range may be
representation.
<!--l. 567--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.7. </span> <a
- id="x1-780004.3.7"></a>inverse MDCT</h5>
+ id="x1-790004.3.7"></a>inverse MDCT</h5>
<!--l. 569--><p class="noindent" >Convert the audio spectrum vector of each channel back into time domain PCM audio via an
-
-
-
inverse Modified Discrete Cosine Transform (MDCT). A detailed description of the MDCT is
available in <span class="cite">[<a
href="#XSporer/Brandenburg/Edler">1</a>]</span>. The window function used for the MDCT is the function described
earlier.
+
+
+
<!--l. 576--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.8. </span> <a
- id="x1-790004.3.8"></a>overlap_add</h5>
+ id="x1-800004.3.8"></a>overlap_add</h5>
<!--l. 578--><p class="noindent" >Windowed MDCT output is overlapped and added with the right hand data of the previous
window such that the 3/4 point of the previous window is aligned with the 1/4 point of the
current window (as illustrated in <a
attention however to returning the correct data range; the amount of data to be returned
is:
<!--l. 592--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb22">
-<a
- id="x1-79002r1"></a><span
+<div class="fancyvrb" id="fancyvrb22"><a
+ id="x1-80002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> window\_blocksize(previous\_window)/4+window\_blocksize(current\_window)/4</span>
-</div>
+class="cmtt-8"> window_blocksize(previous_window)/4+window_blocksize(current_window)/4</span></div>
<!--l. 596--><p class="noindent" >from the center (element windowsize/2) of the previous window to the center (element
windowsize/2-1, inclusive) of the current window.
<!--l. 599--><p class="noindent" >Data is not returned from the first frame; it must be used to ’prime’ the decode engine. The
PCM output offset is ’0’ (as no data has been returned yet).
<!--l. 606--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.9. </span> <a
- id="x1-800004.3.9"></a>output channel order</h5>
+ id="x1-810004.3.9"></a>output channel order</h5>
<!--l. 608--><p class="noindent" >Vorbis I specifies only a channel mapping type 0. In mapping type 0, channel mapping is
implicitly defined as follows for standard audio applications. As of revision 16781 (20100113), the
specification adds defined channel locations for 6.1 and 7.1 surround. Ordering/location for
-
-
-
greater-than-eight channels remains ’left to the implementation’.
<!--l. 614--><p class="noindent" >These channel orderings refer to order within the encoded stream. It is naturally possible for a
decoder to produce output with channels in any order. Any such decoder should explicitly
<span
class="cmssbx-10x-x-120">one channel</span> </dt><dd
class="description">the stream is monophonic
+
+
+
</dd><dt class="description">
<span
class="cmssbx-10x-x-120">two channels</span> </dt><dd
<h3 class="sectionHead"><span class="titlemark">5. </span> <a
- id="x1-810005"></a>comment field and header specification</h3>
+ id="x1-820005"></a>comment field and header specification</h3>
<!--l. 6--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">5.1. </span> <a
- id="x1-820005.1"></a>Overview</h4>
+ id="x1-830005.1"></a>Overview</h4>
<!--l. 8--><p class="noindent" >The Vorbis text comment header is the second (of three) header packets that begin a Vorbis
bitstream. It is meant for short text comments, not arbitrary metadata; arbitrary metadata
belongs in a separate logical bitstream (usually an XML stream type) that provides greater
for Moxy FrĂĽvous, 1997.</div>
<!--l. 29--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">5.2. </span> <a
- id="x1-830005.2"></a>Comment encoding</h4>
+ id="x1-840005.2"></a>Comment encoding</h4>
<!--l. 31--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">5.2.1. </span> <a
- id="x1-840005.2.1"></a>Structure</h5>
+ id="x1-850005.2.1"></a>Structure</h5>
<!--l. 33--><p class="noindent" >The comment header is logically a list of eight-bit-clean vectors; the number of vectors is
bounded to 2<sup><span
class="cmr-8">32</span></sup> <span
-class="cmsy-10x-x-120">− </span>1 and the length of each vector is limited to 2<sup><span
+class="cmsy-10x-x-120">- </span>1 and the length of each vector is limited to 2<sup><span
class="cmr-8">32</span></sup> <span
-class="cmsy-10x-x-120">− </span>1 bytes. The vector length is
+class="cmsy-10x-x-120">- </span>1 bytes. The vector length is
integers.
<!--l. 46--><p class="noindent" >The comment header is decoded as follows:
<!--l. 48--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb23">
-<a
- id="x1-84002r1"></a><span
+<div class="fancyvrb" id="fancyvrb23"><a
+ id="x1-85002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> 32</span><span
-class="cmtt-8"> bits</span>
-<br class="fancyvrb" /><a
- id="x1-84004r2"></a><span
+class="cmtt-8"> bits</span><br class="fancyvrb" /><a
+ id="x1-85004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [vendor\_length]</span><span
class="cmtt-8"> octets</span>
<br class="fancyvrb" /><a
- id="x1-84006r3"></a><span
+ id="x1-85006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> 32</span><span
-class="cmtt-8"> bits</span>
-<br class="fancyvrb" /><a
- id="x1-84008r4"></a><span
+class="cmtt-8"> bits</span><br class="fancyvrb" /><a
+ id="x1-85008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> times</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
- id="x1-84010r5"></a><span
+ id="x1-85010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> 32</span><span
-class="cmtt-8"> bits</span>
-<br class="fancyvrb" /><a
- id="x1-84012r6"></a><span
+class="cmtt-8"> bits</span><br class="fancyvrb" /><a
+ id="x1-85012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [length]</span><span
class="cmtt-8"> octets</span>
<br class="fancyvrb" /><a
- id="x1-84014r7"></a><span
+ id="x1-85014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-84016r8"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-85016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> single</span><span
class="cmtt-8"> bit</span><span
class="cmtt-8"> as</span><span
-class="cmtt-8"> boolean</span>
-<br class="fancyvrb" /><a
- id="x1-84018r9"></a><span
+class="cmtt-8"> boolean</span><br class="fancyvrb" /><a
+ id="x1-85018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> end-of-packet</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> then</span><span
-class="cmtt-8"> ERROR</span>
-<br class="fancyvrb" /><a
- id="x1-84020r10"></a><span
+class="cmtt-8"> ERROR</span><br class="fancyvrb" /><a
+ id="x1-85020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 9)</span><span
-class="cmtt-8"> done.</span>
-</div>
+class="cmtt-8"> done.</span></div>
<!--l. 64--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">5.2.2. </span> <a
- id="x1-850005.2.2"></a>Content vector format</h5>
+ id="x1-860005.2.2"></a>Content vector format</h5>
<!--l. 66--><p class="noindent" >The comment vectors are structured similarly to a UNIX environment variable. That is,
comment fields consist of a field name and a corresponding value and look like:
<!--l. 70--><p class="noindent" >
<div class="quote">
<!--l. 71--><p class="noindent" >
- <div class="fancyvrb" id="fancyvrb24">
-<a
- id="x1-85002r1"></a><span
+ <div class="fancyvrb" id="fancyvrb24"><a
+ id="x1-86002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> comment[0]="ARTIST=me";</span>
-<br class="fancyvrb" /><a
- id="x1-85004r2"></a><span
+class="cmtt-8"> comment[0]="ARTIST=me";</span><br class="fancyvrb" /><a
+ id="x1-86004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> comment[1]="TITLE=the</span><span
class="cmtt-8"> sound</span><span
class="cmtt-8"> of</span><span
-class="cmtt-8"> Vorbis";</span>
-</div>
+class="cmtt-8"> Vorbis";</span></div>
</div>
-
-
-
<!--l. 77--><p class="noindent" >The field name is case-insensitive and may consist of ASCII 0x20 through 0x7D, 0x3D (’=’)
excluded. ASCII 0x41 through 0x5A inclusive (characters A-Z) is to be considered equivalent to
ASCII 0x61 through 0x7A inclusive (characters a-z).
terminate the field name.
<!--l. 87--><p class="noindent" >0x3D is followed by 8 bit clean UTF-8 encoded value of the field contents to the end of the
field.
+
+
+
<!--l. 91--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-860005.2.2"></a><span
+ id="x1-870005.2.2"></a><span
class="cmbx-12">Field names</span></span>
Below is a proposed, minimal list of standard field names with a description of intended use. No
single or group of field names is mandatory; a comment header may contain one, all or none of
class="cmssbx-10x-x-120">COPYRIGHT</span> </dt><dd
class="description">Copyright attribution, e.g., ’2001 Nobody’s Band’ or ’1999 Jack Moffitt’
</dd><dt class="description">
-
-
-
<span
class="cmssbx-10x-x-120">LICENSE</span> </dt><dd
class="description">License information, eg, ’All Rights Reserved’, ’Any Use Permitted’, a URL to
class="cmssbx-10x-x-120">DESCRIPTION</span> </dt><dd
class="description">A short text description of the contents
</dd><dt class="description">
+
+
+
<span
class="cmssbx-10x-x-120">GENRE</span> </dt><dd
class="description">A short text indication of music genre
more information on ISRC numbers.
</dd></dl>
<!--l. 158--><p class="noindent" ><span class="paragraphHead"><a
- id="x1-870005.2.2"></a><span
+ id="x1-880005.2.2"></a><span
class="cmbx-12">Implications</span></span>
Field names should not be ’internationalized’; this is a concession to simplicity not
an attempt to exclude the majority of the world that doesn’t speak English. Field
<!--l. 170--><p class="noindent" >Individual ’vendors’ may use non-standard field names within reason. The proper
use of comment fields should be clear through context at this point. Abuse will be
discouraged.
-
-
-
<!--l. 174--><p class="noindent" >There is no vendor-specific prefix to ’nonstandard’ field names. Vendors should make some effort
to avoid arbitrarily polluting the common namespace. We will generally collect the more useful
tags here to help with standardization.
<!--l. 183--><p class="noindent" >
<div class="quote">
<!--l. 184--><p class="noindent" >
- <div class="fancyvrb" id="fancyvrb25">
-<a
- id="x1-87002r1"></a><span
+
+
+
+ <div class="fancyvrb" id="fancyvrb25"><a
+ id="x1-88002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ARTIST=Dizzy</span><span
-class="cmtt-8"> Gillespie</span>
-<br class="fancyvrb" /><a
- id="x1-87004r2"></a><span
+class="cmtt-8"> Gillespie</span><br class="fancyvrb" /><a
+ id="x1-88004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ARTIST=Sonny</span><span
-class="cmtt-8"> Rollins</span>
-<br class="fancyvrb" /><a
- id="x1-87006r3"></a><span
+class="cmtt-8"> Rollins</span><br class="fancyvrb" /><a
+ id="x1-88006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ARTIST=Sonny</span><span
-class="cmtt-8"> Stitt</span>
-</div>
+class="cmtt-8"> Stitt</span></div>
</div>
<!--l. 197--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">5.2.3. </span> <a
- id="x1-880005.2.3"></a>Encoding</h5>
+ id="x1-890005.2.3"></a>Encoding</h5>
<!--l. 199--><p class="noindent" >The comment header comprises the entirety of the second bitstream header packet. Unlike the
first bitstream header packet, it is not generally the only packet on the second page and may not
be restricted to within the second bitstream page. The length of the comment header packet is
2. </dt><dd
class="enumerate-enumitem">Vendor string ([vendor string length] octets coded from beginning of string to end of
string, not null terminated)
-
-
-
</dd><dt class="enumerate-enumitem">
3. </dt><dd
class="enumerate-enumitem">Number of comment fields (32 bit unsigned quantity specifying number of fields)
+
+
+
<h3 class="sectionHead"><span class="titlemark">6. </span> <a
- id="x1-890006"></a>Floor type 0 setup and decode</h3>
+ id="x1-900006"></a>Floor type 0 setup and decode</h3>
<!--l. 6--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">6.1. </span> <a
- id="x1-900006.1"></a>Overview</h4>
+ id="x1-910006.1"></a>Overview</h4>
<!--l. 8--><p class="noindent" >Vorbis floor type zero uses Line Spectral Pair (LSP, also alternately known as Line Spectral
Frequency or LSF) representation to encode a smooth spectral envelope curve as the frequency
response of the LSP filter. This representation is equivalent to a traditional all-pole infinite
converted to LPC representation and vice-versa.
<!--l. 18--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">6.2. </span> <a
- id="x1-910006.2"></a>Floor 0 format</h4>
+ id="x1-920006.2"></a>Floor 0 format</h4>
<!--l. 20--><p class="noindent" >Floor zero configuration consists of six integer fields and a list of VQ codebooks for use in
coding/decoding the LSP filter coefficient values used by each frame.
<!--l. 24--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">6.2.1. </span> <a
- id="x1-920006.2.1"></a>header decode</h5>
+ id="x1-930006.2.1"></a>header decode</h5>
<!--l. 26--><p class="noindent" >Configuration information for instances of floor zero decodes from the codec setup header (third
packet). configuration decode proceeds as follows:
<!--l. 30--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb26">
-<a
- id="x1-92002r1"></a><span
+<div class="fancyvrb" id="fancyvrb26"><a
+ id="x1-93002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> 8</span><span
-class="cmtt-8"> bits</span>
-<br class="fancyvrb" /><a
- id="x1-92004r2"></a><span
+class="cmtt-8"> bits</span><br class="fancyvrb" /><a
+ id="x1-93004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 16</span><span
class="cmtt-8"> bits</span>
<br class="fancyvrb" /><a
- id="x1-92006r3"></a><span
+ id="x1-93006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> 16</span><span
-class="cmtt-8"> bits</span>
-<br class="fancyvrb" /><a
- id="x1-92008r4"></a><span
+class="cmtt-8"> bits</span><br class="fancyvrb" /><a
+ id="x1-93008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> six</span><span
class="cmtt-8"> bits</span>
<br class="fancyvrb" /><a
- id="x1-92010r5"></a><span
+ id="x1-93010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> eight</span><span
class="cmtt-8"> bits</span>
<br class="fancyvrb" /><a
- id="x1-92012r6"></a><span
+ id="x1-93012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> add</span><span
class="cmtt-8"> 1</span>
<br class="fancyvrb" /><a
- id="x1-92014r7"></a><span
+ id="x1-93014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> eight</span><span
class="cmtt-8"> bits</span><span
-class="cmtt-8"> each;</span>
-</div>
+class="cmtt-8"> each;</span></div>
undecodable.
<!--l. 48--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">6.2.2. </span> <a
- id="x1-930006.2.2"></a>packet decode</h5>
+ id="x1-940006.2.2"></a>packet decode</h5>
<!--l. 50--><p class="noindent" >Extracting a floor0 curve from an audio packet consists of first decoding the curve
amplitude and <span
class="cmtt-12">[floor0_order] </span>LSP coefficient values from the bitstream, and then
computing the floor curve, which is defined as the frequency response of the decoded LSP
filter.
<!--l. 56--><p class="noindent" >Packet decode proceeds as follows:
-<div class="fancyvrb" id="fancyvrb27">
-<a
- id="x1-93002r1"></a><span
+<div class="fancyvrb" id="fancyvrb27"><a
+ id="x1-94002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> [floor0_amplitude_bits]</span><span
-class="cmtt-8"> bits</span>
-<br class="fancyvrb" /><a
- id="x1-93004r2"></a><span
+class="cmtt-8"> bits</span><br class="fancyvrb" /><a
+ id="x1-94004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmsy-8">{</span>
<br class="fancyvrb" /><a
- id="x1-93006r3"></a><span
+ id="x1-94006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> empty,</span><span
class="cmtt-8"> zero</span><span
class="cmtt-8"> length</span><span
-class="cmtt-8"> vector</span>
-<br class="fancyvrb" /><a
- id="x1-93008r4"></a><span
+class="cmtt-8"> vector</span><br class="fancyvrb" /><a
+ id="x1-94008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> </span><a
-href="#x1-1170009.2.1"><span
+href="#x1-1180009.2.1"><span
class="cmtt-8">ilog</span></a><span
class="cmtt-8">(</span><span
class="cmtt-8"> [floor0_number_of_books]</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> bits</span>
<br class="fancyvrb" /><a
- id="x1-93010r5"></a><span
+ id="x1-94010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> then</span><span
class="cmtt-8"> packet</span><span
class="cmtt-8"> is</span><span
-class="cmtt-8"> undecodable</span>
-<br class="fancyvrb" /><a
- id="x1-93012r6"></a><span
+class="cmtt-8"> undecodable</span><br class="fancyvrb" /><a
+ id="x1-94012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> zero;</span>
<br class="fancyvrb" /><a
- id="x1-93014r7"></a><span
+ id="x1-94014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> VQ</span><span
class="cmtt-8"> context.</span>
<br class="fancyvrb" /><a
- id="x1-93016r8"></a><span
+ id="x1-94016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> scalar</span><span
class="cmtt-8"> in</span><span
class="cmtt-8"> vector</span><span
-class="cmtt-8"> [temp_vector]</span>
-<br class="fancyvrb" /><a
- id="x1-93018r9"></a><span
+class="cmtt-8"> [temp_vector]</span><br class="fancyvrb" /><a
+ id="x1-94018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> [temp_vector]</span>
<br class="fancyvrb" /><a
- id="x1-93020r10"></a><span
+ id="x1-94020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [coefficients]</span><span
class="cmtt-8"> vector</span>
<br class="fancyvrb" /><a
- id="x1-93022r11"></a><span
+ id="x1-94022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> continue</span><span
class="cmtt-8"> at</span><span
class="cmtt-8"> step</span><span
-class="cmtt-8"> 6</span>
-<br class="fancyvrb" /><a
- id="x1-93024r12"></a><span
+class="cmtt-8"> 6</span><br class="fancyvrb" /><a
+ id="x1-94024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-93026r13"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-94026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-93028r14"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-94028r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-93030r15"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-94030r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 12)</span><span
-class="cmtt-8"> done.</span>
-<br class="fancyvrb" /><a
- id="x1-93032r16"></a><span
+class="cmtt-8"> done.</span><br class="fancyvrb" /><a
+ id="x1-94032r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
<!--l. 76--><p class="noindent" >Take note of the following properties of decode:
<ul class="itemize1">
<li class="itemize">An <span
class="cmtt-12">[amplitude] </span>value had read zero at the beginning of decode.
</li>
<li class="itemize">The book number used for decode can, in fact, be stored in the bitstream in <a
-href="#x1-1170009.2.1">ilog</a>(
-
-
-
+href="#x1-1180009.2.1">ilog</a>(
<span
class="cmtt-12">[floor0_number_of_books] </span>- 1 ) bits. Nevertheless, the above specification is correct
and values greater than the maximum possible book value are reserved.
<span
class="cmtt-12">[codebook_dimensions] </span>value of three and <span
class="cmtt-12">[floor0_order] </span>is ten, the only way to
+
+
+
fill all the needed scalars in <span
class="cmtt-12">[coefficients] </span>is to to read a total of twelve scalars
as four vectors of three scalars each. This is not an error condition, and care must
may be ignored or discarded.</li></ul>
<!--l. 104--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">6.2.3. </span> <a
- id="x1-940006.2.3"></a>curve computation</h5>
+ id="x1-950006.2.3"></a>curve computation</h5>
<!--l. 106--><p class="noindent" >Given an <span
class="cmtt-12">[amplitude] </span>integer and <span
class="cmtt-12">[coefficients] </span>vector from packet decode as well as
<center class="par-math-display" >
<img
src="Vorbis_I_spec7x.png" alt=" {
- min (floor0_bark_map_size − 1,foobar ) for i ∈ [0,n − 1 ]
-mapi = − 1 for i = n
+map = min (floor0_bark_map_size - 1,f oobar) for i ∈ [0, n - 1]
+ i - 1 for i = n
" class="par-math-display" ></center>
<!--l. 128--><p class="nopar" >
<!--l. 130--><p class="noindent" >where
<center class="par-math-display" >
<img
-src="Vorbis_I_spec8x.png" alt=" ⌊ ⌋
- (floor0_rate ⋅ i) floor0_bark_map_size
-foobar = bark -------2n------- ⋅-bark(.5 ⋅ floor0_rate-)
+src="Vorbis_I_spec8x.png" alt=" ⌊ ⌋
+ ( floor0_rate--⋅ i) floor0_bark_map_size----
+f oobar = bark 2n ⋅ bark(.5 ⋅ floor0_rate )
" class="par-math-display" ></center>
-
-
-
<!--l. 137--><p class="nopar" >
<!--l. 139--><p class="noindent" >and
<center class="par-math-display" >
2. </dt><dd
class="enumerate-enumitem"><span
class="cmtt-12">[</span><span
-class="cmmi-12">ω</span><span
+class="cmmi-12">ω</span><span
class="cmtt-12">] </span>= <span
-class="cmmi-12">π </span>* map element <span
+class="cmmi-12">π </span>* map element <span
class="cmtt-12">[i] </span>/ <span
class="cmtt-12">[floor0_bark_map_size]</span>
</dd><dt class="enumerate-enumitem">
class="cmtt-12">[q] </span>according to: <div class="eqnarray">
<center class="math-display" >
<img
-src="Vorbis_I_spec10x.png" alt=" floor0_order−3
- 2 ∏2 2
-p = (1 − cos ω) 4(cos([coefficients ]2j+1) − cosω )
- floor0_order−1 j=0
- 1 ----∏2----
-q = -- 4(cos([coefficients ]2j) − cosω )2
- 4 j=0
-
-
-
+src="Vorbis_I_spec10x.png" alt=" floor0∏_2order-3
+p = (1 - cos2ω) 4(cos([coefficients ]2j+1) - cosω )2
+ j=0
+ floor0_order-1
+ 1 ∏2 2
+q = 4- 4(cos([coefficients ]2j) - cosω )
+ j=0
" class="math-display" ></center>
</div>
</dd></dl>
<!--l. 162--><p class="noindent" >else <span
class="cmtt-12">[floor0_order] </span>is even
+
+
+
<dl class="enumerate-enumitem"><dt class="enumerate-enumitem">
- b) </dt><dd
+ a) </dt><dd
class="enumerate-enumitem">calculate <span
class="cmtt-12">[p] </span>and <span
class="cmtt-12">[q] </span>according to: <div class="eqnarray">
<center class="math-display" >
<img
-src="Vorbis_I_spec11x.png" alt=" floor0_order−2
- (1-−-cosω-) ∏2 2
-p = 2 4(cos([coefficients ]2j+1) − cosω)
- j=0
- floor0_∏o2rder−-2
-q = (1-+-cosω-) 4(cos([coefficients ]2j) − cos ω)2
+src="Vorbis_I_spec11x.png" alt=" floor0_order-2
+ (1 - cosω ) ---∏2-----
+p = ----------- 4(cos([coefficients ]2j+1) - cosω)2
2 j=0
+ floor0_order--2
+ (1-+-cosω-) ∏2 2
+q = 2 4(cos([coefficients ]2j) - cos ω)
+ j=0
" class="math-display" ></center>
</div>
</dd></dl>
<center class="math-display" >
<img
src="Vorbis_I_spec12x.png" alt=" ( ( ))
-exp .11512925 amplitude---⋅ floor0_amplitute_√offset---− floor0_amplitude_offset
- (2floor0_amplitude_bits − 1) p + q
+ amplitude---⋅ floor0_amplitute_offset---
+exp .11512925 (2floor0_amplitude_bits - 1)√p--+-q - floor0_amplitude_offset
" class="math-display" ></center>
<!--l. 177--><p class="nopar" >
</dd><dt class="enumerate-enumitem">
class="enumerate-enumitem"><span
class="cmtt-12">[iteration_condition] </span>= map element <span
class="cmtt-12">[i]</span>
-
-
-
</dd><dt class="enumerate-enumitem">
6. </dt><dd
class="enumerate-enumitem"><span
class="enumerate-enumitem">if ( map element <span
class="cmtt-12">[i] </span>is equal to <span
class="cmtt-12">[iteration_condition] </span>) continue at step
+
+
+
5
</dd><dt class="enumerate-enumitem">
9. </dt><dd
<h3 class="sectionHead"><span class="titlemark">7. </span> <a
- id="x1-950007"></a>Floor type 1 setup and decode</h3>
+ id="x1-960007"></a>Floor type 1 setup and decode</h3>
<!--l. 6--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">7.1. </span> <a
- id="x1-960007.1"></a>Overview</h4>
+ id="x1-970007.1"></a>Overview</h4>
<!--l. 8--><p class="noindent" >Vorbis floor type one uses a piecewise straight-line representation to encode a spectral envelope
curve. The representation plots this curve mechanically on a linear frequency axis and a
logarithmic (dB) amplitude axis. The integer plotting algorithm used is similar to Bresenham’s
algorithm.
<!--l. 16--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">7.2. </span> <a
- id="x1-970007.2"></a>Floor 1 format</h4>
+ id="x1-980007.2"></a>Floor 1 format</h4>
<!--l. 18--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">7.2.1. </span> <a
- id="x1-980007.2.1"></a>model</h5>
+ id="x1-990007.2.1"></a>model</h5>
<!--l. 20--><p class="noindent" >Floor type one represents a spectral curve as a series of line segments. Synthesis constructs a
floor curve using iterative prediction in a process roughly equivalent to the following simplified
description:
>
<br /> <div class="caption"
><span class="id">Figure 7: </span><span
-class="content">graph of example floor</span></div><!--tex4ht:label?: x1-980017 -->
+class="content">graph of example floor</span></div><!--tex4ht:label?: x1-990017 -->
</div>
<!--l. 64--><p class="noindent" >We now draw new logical lines to reflect the correction to new˙Y, and iterate for X positions 32
and 96:
>
<br /> <div class="caption"
><span class="id">Figure 8: </span><span
-class="content">graph of example floor</span></div><!--tex4ht:label?: x1-980028 -->
+class="content">graph of example floor</span></div><!--tex4ht:label?: x1-990028 -->
</div>
<!--l. 72--><p class="noindent" >Although the new Y value at X position 96 is unchanged, it is still used later as an endpoint for
further refinement. From here on, the pattern should be clear; we complete the floor computation
>
<br /> <div class="caption"
><span class="id">Figure 9: </span><span
-class="content">graph of example floor</span></div><!--tex4ht:label?: x1-980039 -->
+class="content">graph of example floor</span></div><!--tex4ht:label?: x1-990039 -->
</div>
<div class="center"
>
>
<br /> <div class="caption"
><span class="id">Figure 10: </span><span
-class="content">graph of example floor</span></div><!--tex4ht:label?: x1-9800410 -->
+class="content">graph of example floor</span></div><!--tex4ht:label?: x1-9900410 -->
</div>
<!--l. 86--><p class="noindent" >A more efficient algorithm with carefully defined integer rounding behavior is used for actual
decode, as described later. The actual algorithm splits Y value computation and line plotting
through integer roundoff/truncation.
<!--l. 94--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">7.2.2. </span> <a
- id="x1-990007.2.2"></a>header decode</h5>
+ id="x1-1000007.2.2"></a>header decode</h5>
<!--l. 96--><p class="noindent" >A list of floor X values is stored in the packet header in interleaved format (used in list order
during packet decode and synthesis). This list is split into partitions, and each partition is
assigned to a partition class. X positions 0 and [n] are implicit and do not belong to an explicit
<!--l. 112--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb28">
-<a
- id="x1-99002r1"></a><span
+<div class="fancyvrb" id="fancyvrb28"><a
+ id="x1-100002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-99004r2"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-100004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
- id="x1-99006r3"></a><span
+class="cmtt-8"> integer</span><br class="fancyvrb" /><a
+ id="x1-100006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2)</span><span
class="cmtt-8"> [maximum_class]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> -1</span>
-<br class="fancyvrb" /><a
- id="x1-99008r4"></a><span
+class="cmtt-8"> -1</span><br class="fancyvrb" /><a
+ id="x1-100008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmsy-8">{</span>
<br class="fancyvrb" /><a
- id="x1-99010r5"></a><span
+ id="x1-100010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-99012r6"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-100012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
- id="x1-99014r7"></a><span
+class="cmtt-8"> integer</span><br class="fancyvrb" /><a
+ id="x1-100014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-99016r8"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-100016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-99018r9"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-100018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-99020r10"></a><span
+ id="x1-100020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> value</span><span
class="cmtt-8"> in</span><span
class="cmtt-8"> vector</span><span
-class="cmtt-8"> [floor1_partition_class_list]</span>
-<br class="fancyvrb" /><a
- id="x1-99022r11"></a><span
+class="cmtt-8"> [floor1_partition_class_list]</span><br class="fancyvrb" /><a
+ id="x1-100022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmsy-8">{</span>
<br class="fancyvrb" /><a
- id="x1-99024r12"></a><span
+ id="x1-100024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-99026r13"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-100026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> add</span><span
class="cmtt-8"> 1</span>
<br class="fancyvrb" /><a
- id="x1-99028r14"></a><span
+ id="x1-100028r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  8)</span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-99030r15"></a><span
+ id="x1-100030r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> nonzero</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-99032r16"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-100032r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-99034r17"></a><span
+ id="x1-100034r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
- id="x1-99036r18"></a><span
+class="cmtt-8"> integer</span><br class="fancyvrb" /><a
+ id="x1-100036r18"></a><span
class="cmr-6">18</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-99038r19"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-100038r19"></a><span
class="cmr-6">19</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-99040r20"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-100040r20"></a><span
class="cmr-6">20</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-99042r21"></a><span
+ id="x1-100042r21"></a><span
class="cmr-6">21</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> -</span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-99044r22"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-100044r22"></a><span
class="cmr-6">22</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-99046r23"></a><span
+ id="x1-100046r23"></a><span
class="cmr-6">23</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [floor1_subclass_books]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i],[j]</span><span
-class="cmtt-8"> =</span>
-<br class="fancyvrb" /><a
- id="x1-99048r24"></a><span
+class="cmtt-8"> =</span><br class="fancyvrb" /><a
+ id="x1-100048r24"></a><span
class="cmr-6">24</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> and</span><span
class="cmtt-8"> subtract</span><span
-class="cmtt-8"> one</span>
-<br class="fancyvrb" /><a
- id="x1-99050r25"></a><span
+class="cmtt-8"> one</span><br class="fancyvrb" /><a
+ id="x1-100050r25"></a><span
class="cmr-6">25</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmsy-8">}</span>
<br class="fancyvrb" /><a
- id="x1-99052r26"></a><span
+ id="x1-100052r26"></a><span
class="cmr-6">26</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-99054r27"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-100054r27"></a><span
class="cmr-6">27</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-99056r28"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-100056r28"></a><span
class="cmr-6">28</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> and</span><span
class="cmtt-8"> add</span><span
-class="cmtt-8"> one</span>
-<br class="fancyvrb" /><a
- id="x1-99058r29"></a><span
+class="cmtt-8"> one</span><br class="fancyvrb" /><a
+ id="x1-100058r29"></a><span
class="cmr-6">29</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-99060r30"></a><span
+ id="x1-100060r30"></a><span
class="cmr-6">30</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [0]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
- id="x1-99062r31"></a><span
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
+ id="x1-100062r31"></a><span
class="cmr-6">31</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> exponent</span><span
class="cmtt-8"> [rangebits];</span>
<br class="fancyvrb" /><a
- id="x1-99064r32"></a><span
+ id="x1-100064r32"></a><span
class="cmr-6">32</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 17)</span><span
class="cmtt-8"> [floor1_values]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 2</span>
-<br class="fancyvrb" /><a
- id="x1-99066r33"></a><span
+class="cmtt-8"> 2</span><br class="fancyvrb" /><a
+ id="x1-100066r33"></a><span
class="cmr-6">33</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmsy-8">{</span>
<br class="fancyvrb" /><a
- id="x1-99068r34"></a><span
+ id="x1-100068r34"></a><span
class="cmr-6">34</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-99070r35"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-100070r35"></a><span
class="cmr-6">35</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span>
<br class="fancyvrb" /><a
- id="x1-99072r36"></a><span
+ id="x1-100072r36"></a><span
class="cmr-6">36</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmsy-8">{</span>
<br class="fancyvrb" /><a
- id="x1-99074r37"></a><span
+ id="x1-100074r37"></a><span
class="cmr-6">37</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [floor1_X_list]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> ([floor1_values])</span><span
-class="cmtt-8"> =</span>
-<br class="fancyvrb" /><a
- id="x1-99076r38"></a><span
+class="cmtt-8"> =</span><br class="fancyvrb" /><a
+ id="x1-100076r38"></a><span
class="cmr-6">38</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-99078r39"></a><span
+ id="x1-100078r39"></a><span
class="cmr-6">39</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> increment</span><span
class="cmtt-8"> [floor1_values]</span><span
class="cmtt-8"> by</span><span
-class="cmtt-8"> one</span>
-<br class="fancyvrb" /><a
- id="x1-99080r40"></a><span
+class="cmtt-8"> one</span><br class="fancyvrb" /><a
+ id="x1-100080r40"></a><span
class="cmr-6">40</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-99082r41"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-100082r41"></a><span
class="cmr-6">41</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-99084r42"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-100084r42"></a><span
class="cmr-6">42</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-99086r43"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-100086r43"></a><span
class="cmr-6">43</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 23)</span><span
-class="cmtt-8"> done</span>
-</div>
+class="cmtt-8"> done</span></div>
<!--l. 158--><p class="noindent" >An end-of-packet condition while reading any aspect of a floor 1 configuration during
setup renders a stream undecodable. In addition, a <span
class="cmtt-12">[floor1_class_masterbooks] </span>or
total elements (including elements 0 and 1 set prior to the read loop) renders the stream
undecodable. All vector [floor1_x_list] element values must be unique within the vector; a
non-unique value renders the stream undecodable.
-
-
-
<!--l. 170--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">7.2.3. </span> <a
- id="x1-1000007.2.3"></a>packet decode</h5>
+ id="x1-1010007.2.3"></a>packet decode</h5>
<!--l. 172--><p class="noindent" >Packet decode begins by checking the <span
class="cmtt-12">[nonzero] </span>flag:
<!--l. 174--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb29">
-<a
- id="x1-100002r1"></a><span
+<div class="fancyvrb" id="fancyvrb29"><a
+ id="x1-101002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1</span><span
class="cmtt-8"> bit</span><span
class="cmtt-8"> as</span><span
-class="cmtt-8"> boolean</span>
-</div>
+class="cmtt-8"> boolean</span></div>
<!--l. 178--><p class="noindent" >If <span
class="cmtt-12">[nonzero] </span>is unset, that indicates this channel contained no audio energy in this frame.
Decode immediately returns a status indicating this floor curve (and thus this channel) is unused
<!--l. 186--><p class="noindent" >Assuming <span
class="cmtt-12">[nonzero] </span>is set, decode proceeds as follows:
<!--l. 188--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb30">
-<a
- id="x1-100004r1"></a><span
+<div class="fancyvrb" id="fancyvrb30"><a
+ id="x1-101004r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmsy-8">}</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> ([floor1_multiplier]-1)</span>
+
+
+
<br class="fancyvrb" /><a
- id="x1-100006r2"></a><span
+ id="x1-101006r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> </span><a
-href="#x1-1170009.2.1"><span
+href="#x1-1180009.2.1"><span
class="cmtt-8">ilog</span></a><span
class="cmtt-8">([range]-1)</span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-100008r3"></a><span
+ id="x1-101008r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> </span><a
-href="#x1-1170009.2.1"><span
+href="#x1-1180009.2.1"><span
class="cmtt-8">ilog</span></a><span
class="cmtt-8">([range]-1)</span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-100010r4"></a><span
+ id="x1-101010r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 4)</span><span
class="cmtt-8"> [offset]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 2;</span>
-<br class="fancyvrb" /><a
- id="x1-100012r5"></a><span
+class="cmtt-8"> 2;</span><br class="fancyvrb" /><a
+ id="x1-101012r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [floor1_partitions]-1</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-100014r6"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-101014r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-100016r7"></a><span
+ id="x1-101016r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [floor1_partition_class]</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [i]</span>
-<br class="fancyvrb" /><a
- id="x1-100018r8"></a><span
+class="cmtt-8"> [i]</span><br class="fancyvrb" /><a
+ id="x1-101018r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [class]</span>
<br class="fancyvrb" /><a
- id="x1-100020r9"></a><span
+ id="x1-101020r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> [floor1_class_subclasses]</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [class]</span>
-<br class="fancyvrb" /><a
- id="x1-100022r10"></a><span
+class="cmtt-8"> [class]</span><br class="fancyvrb" /><a
+ id="x1-101022r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> (2</span><span
class="cmtt-8"> exponent</span><span
-class="cmtt-8"> [cbits])-1</span>
-<br class="fancyvrb" /><a
- id="x1-100024r11"></a><span
+class="cmtt-8"> [cbits])-1</span><br class="fancyvrb" /><a
+ id="x1-101024r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> 0</span>
<br class="fancyvrb" /><a
- id="x1-100026r12"></a><span
+ id="x1-101026r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> zero</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-100028r13"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-101028r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-100030r14"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-101030r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> number</span>
<br class="fancyvrb" /><a
- id="x1-100032r15"></a><span
+ id="x1-101032r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> scalar</span><span
class="cmtt-8"> context</span>
<br class="fancyvrb" /><a
- id="x1-100034r16"></a><span
+ id="x1-101034r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-100036r17"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-101036r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-100038r18"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-101038r18"></a><span
class="cmr-6">18</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [cdim]-1</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-100040r19"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-101040r19"></a><span
class="cmr-6">19</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-100042r20"></a><span
+ id="x1-101042r20"></a><span
class="cmr-6">20</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> AND</span><span
class="cmtt-8"> [csub])</span>
<br class="fancyvrb" /><a
- id="x1-100044r21"></a><span
+ id="x1-101044r21"></a><span
class="cmr-6">21</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> right</span><span
class="cmtt-8"> shifted</span><span
class="cmtt-8"> [cbits]</span><span
-class="cmtt-8"> bits</span>
-<br class="fancyvrb" /><a
- id="x1-100046r22"></a><span
+class="cmtt-8"> bits</span><br class="fancyvrb" /><a
+ id="x1-101046r22"></a><span
class="cmr-6">22</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  </span><span
class="cmtt-8"> zero</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-100048r23"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-101048r23"></a><span
class="cmr-6">23</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-100050r24"></a><span
+ id="x1-101050r24"></a><span
class="cmr-6">24</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  </span><span
class="cmtt-8"> from</span><span
class="cmtt-8"> packet</span><span
class="cmtt-8"> using</span><span
-class="cmtt-8"> codebook</span>
-<br class="fancyvrb" /><a
- id="x1-100052r25"></a><span
+class="cmtt-8"> codebook</span><br class="fancyvrb" /><a
+ id="x1-101052r25"></a><span
class="cmr-6">25</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> scalar</span><span
class="cmtt-8"> context</span>
<br class="fancyvrb" /><a
- id="x1-100054r26"></a><span
+ id="x1-101054r26"></a><span
class="cmr-6">26</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-100056r27"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-101056r27"></a><span
class="cmr-6">27</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> than</span><span
class="cmtt-8"> zero</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-100058r28"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-101058r28"></a><span
class="cmr-6">28</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-100060r29"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-101060r29"></a><span
class="cmr-6">29</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> 0</span>
<br class="fancyvrb" /><a
- id="x1-100062r30"></a><span
+ id="x1-101062r30"></a><span
class="cmr-6">30</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-100064r31"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-101064r31"></a><span
class="cmr-6">31</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-100066r32"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-101066r32"></a><span
class="cmr-6">32</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-100068r33"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-101068r33"></a><span
class="cmr-6">33</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-100070r34"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-101070r34"></a><span
class="cmr-6">34</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [offset]</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [cdim]</span>
-
-
-
-<br class="fancyvrb" /><a
- id="x1-100072r35"></a><span
+class="cmtt-8"> [cdim]</span><br class="fancyvrb" /><a
+ id="x1-101072r35"></a><span
class="cmr-6">35</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-100074r36"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-101074r36"></a><span
class="cmr-6">36</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-100076r37"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-101076r37"></a><span
class="cmr-6">37</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-100078r38"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-101078r38"></a><span
class="cmr-6">38</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 20)</span><span
-class="cmtt-8"> done</span>
-</div>
+class="cmtt-8"> done</span></div>
<!--l. 229--><p class="noindent" >An end-of-packet condition during curve decode should be considered a nominal occurrence; if
end-of-packet is reached during any read operation above, floor decode is to return ’unused’
status as if the <span
class="cmtt-12">[floor1_Y] </span>contains the values from packet decode needed for floor 1 synthesis.
<!--l. 240--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">7.2.4. </span> <a
- id="x1-1010007.2.4"></a>curve computation</h5>
+ id="x1-1020007.2.4"></a>curve computation</h5>
<!--l. 242--><p class="noindent" >Curve computation is split into two logical steps; the first step derives final Y amplitude values
from the encoded, wrapped difference values taken from the bitstream. The second step
plots the curve lines. Also, although zero-difference values are used in the iterative
class="cmssbx-10x-x-120">step 1: amplitude value synthesis</span> </dt><dd
class="description">
<!--l. 268--><p class="noindent" >Unwrap the always-positive-or-zero values read from the packet into +/- difference
- values, then apply to line prediction.
- <!--l. 271--><p class="noindent" >
- <div class="fancyvrb" id="fancyvrb31">
-<a
- id="x1-101002r1"></a><span
+ values, then apply to line prediction.
+ <!--l. 271--><p class="noindent" >
+ <div class="fancyvrb" id="fancyvrb31"><a
+ id="x1-102002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmsy-8">}</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> ([floor1_multiplier]-1)</span>
-<br class="fancyvrb" /><a
- id="x1-101004r2"></a><span
+class="cmtt-8"> ([floor1_multiplier]-1)</span><br class="fancyvrb" /><a
+ id="x1-102004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [0]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> set</span>
-<br class="fancyvrb" /><a
- id="x1-101006r3"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [1]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> set</span>
-<br class="fancyvrb" /><a
- id="x1-101008r4"></a><span
+class="cmtt-8"> set</span><br class="fancyvrb" /><a
+ id="x1-102008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [floor1_Y]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [0]</span>
-<br class="fancyvrb" /><a
- id="x1-101010r5"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> [floor1_Y]</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [1]</span>
-<br class="fancyvrb" /><a
- id="x1-101012r6"></a><span
+class="cmtt-8"> [1]</span><br class="fancyvrb" /><a
+ id="x1-102012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [floor1_values]-1</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101014r7"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101016r8"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [low_neighbor_offset]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> </span><a
-href="#x1-1200009.2.4"><span
+href="#x1-1210009.2.4"><span
class="cmtt-8">low_neighbor</span></a><span
-class="cmtt-8">([floor1_X_list],[i])</span>
-<br class="fancyvrb" /><a
- id="x1-101018r9"></a><span
+class="cmtt-8">([floor1_X_list],[i])</span><br class="fancyvrb" /><a
+ id="x1-102018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [high_neighbor_offset]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> </span><a
-href="#x1-1210009.2.5"><span
+href="#x1-1220009.2.5"><span
class="cmtt-8">high_neighbor</span></a><span
class="cmtt-8">([floor1_X_list],[i])</span>
-<br class="fancyvrb" /><a
- id="x1-101020r10"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101022r11"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [predicted]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> </span><a
-href="#x1-1220009.2.6"><span
+href="#x1-1230009.2.6"><span
class="cmtt-8">render_point</span></a><span
class="cmtt-8">(</span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> [floor1_X_list]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [low_neighbor_offset],</span>
-<br class="fancyvrb" /><a
- id="x1-101024r12"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  </span><span
class="cmtt-8"> [floor1_final_Y]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [low_neighbor_offset],</span>
-<br class="fancyvrb" /><a
- id="x1-101026r13"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [floor1_X_list]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [high_neighbor_offset],</span>
-<br class="fancyvrb" /><a
- id="x1-101028r14"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102028r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  </span><span
class="cmtt-8"> [floor1_final_Y]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [high_neighbor_offset],</span>
-<br class="fancyvrb" /><a
- id="x1-101030r15"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102030r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [floor1_X_list]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span><span
-class="cmtt-8"> )</span>
-<br class="fancyvrb" /><a
- id="x1-101032r16"></a><span
+class="cmtt-8"> )</span><br class="fancyvrb" /><a
+ id="x1-102032r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101034r17"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102034r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [floor1_Y]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span>
-<br class="fancyvrb" /><a
- id="x1-101036r18"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102036r18"></a><span
class="cmr-6">18</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [range]</span><span
class="cmtt-8"> -</span><span
-class="cmtt-8"> [predicted]</span>
-<br class="fancyvrb" /><a
- id="x1-101038r19"></a><span
+class="cmtt-8"> [predicted]</span><br class="fancyvrb" /><a
+ id="x1-102038r19"></a><span
class="cmr-6">19</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [predicted]</span>
-<br class="fancyvrb" /><a
- id="x1-101040r20"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102040r20"></a><span
class="cmr-6">20</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [lowroom]</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101042r21"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102042r21"></a><span
class="cmr-6">21</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101044r22"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102044r22"></a><span
class="cmr-6">22</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [highroom]</span><span
class="cmtt-8"> *</span><span
-class="cmtt-8"> 2</span>
-<br class="fancyvrb" /><a
- id="x1-101046r23"></a><span
+class="cmtt-8"> 2</span><br class="fancyvrb" /><a
+ id="x1-102046r23"></a><span
class="cmr-6">23</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101048r24"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102048r24"></a><span
class="cmr-6">24</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> than</span><span
class="cmtt-8"> [lowroom]</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101050r25"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102050r25"></a><span
class="cmr-6">25</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101052r26"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102052r26"></a><span
class="cmr-6">26</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [lowroom]</span><span
class="cmtt-8"> *</span><span
-class="cmtt-8"> 2</span>
-<br class="fancyvrb" /><a
- id="x1-101054r27"></a><span
+class="cmtt-8"> 2</span><br class="fancyvrb" /><a
+ id="x1-102054r27"></a><span
class="cmr-6">27</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101056r28"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102056r28"></a><span
class="cmr-6">28</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101058r29"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102058r29"></a><span
class="cmr-6">29</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101060r30"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102060r30"></a><span
class="cmr-6">30</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> nonzero</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101062r31"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102062r31"></a><span
class="cmr-6">31</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101064r32"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102064r32"></a><span
class="cmr-6">32</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [low_neighbor_offset]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> set</span>
-<br class="fancyvrb" /><a
- id="x1-101066r33"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102066r33"></a><span
class="cmr-6">33</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [high_neighbor_offset]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> set</span>
-<br class="fancyvrb" /><a
- id="x1-101068r34"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102068r34"></a><span
class="cmr-6">34</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> set</span>
-<br class="fancyvrb" /><a
- id="x1-101070r35"></a><span
+class="cmtt-8"> set</span><br class="fancyvrb" /><a
+ id="x1-102070r35"></a><span
class="cmr-6">35</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101072r36"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102072r36"></a><span
class="cmr-6">36</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101074r37"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102074r37"></a><span
class="cmr-6">37</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [lowroom]</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101076r38"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102076r38"></a><span
class="cmr-6">38</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101078r39"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102078r39"></a><span
class="cmr-6">39</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [lowroom]</span><span
class="cmtt-8"> +</span><span
class="cmtt-8"> [predicted]</span>
-<br class="fancyvrb" /><a
- id="x1-101080r40"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102080r40"></a><span
class="cmr-6">40</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101082r41"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102082r41"></a><span
class="cmr-6">41</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  </span><span
class="cmtt-8"> than</span><span
class="cmtt-8"> [lowroom]</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101084r42"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102084r42"></a><span
class="cmr-6">42</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101086r43"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102086r43"></a><span
class="cmr-6">43</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [highroom]</span><span
class="cmtt-8"> -</span><span
class="cmtt-8"> 1</span>
-<br class="fancyvrb" /><a
- id="x1-101088r44"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102088r44"></a><span
class="cmr-6">44</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101090r45"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102090r45"></a><span
class="cmr-6">45</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101092r46"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102092r46"></a><span
class="cmr-6">46</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101094r47"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102094r47"></a><span
class="cmr-6">47</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> than</span><span
class="cmtt-8"> [room]</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101096r48"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102096r48"></a><span
class="cmr-6">48</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101098r49"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102098r49"></a><span
class="cmr-6">49</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> odd)</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101100r50"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102100r50"></a><span
class="cmr-6">50</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101102r51"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102102r51"></a><span
class="cmr-6">51</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span><span
class="cmtt-8"> =</span>
-<br class="fancyvrb" /><a
- id="x1-101104r52"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102104r52"></a><span
class="cmr-6">52</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2</span><span
class="cmtt-8"> using</span><span
class="cmtt-8"> integer</span><span
-class="cmtt-8"> division)</span>
-<br class="fancyvrb" /><a
- id="x1-101106r53"></a><span
+class="cmtt-8"> division)</span><br class="fancyvrb" /><a
+ id="x1-102106r53"></a><span
class="cmr-6">53</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101108r54"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102108r54"></a><span
class="cmr-6">54</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> even</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101110r55"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102110r55"></a><span
class="cmr-6">55</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101112r56"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102112r56"></a><span
class="cmr-6">56</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span><span
class="cmtt-8"> =</span>
-<br class="fancyvrb" /><a
- id="x1-101114r57"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102114r57"></a><span
class="cmr-6">57</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2</span><span
class="cmtt-8"> using</span><span
class="cmtt-8"> integer</span><span
-class="cmtt-8"> division)</span>
-<br class="fancyvrb" /><a
- id="x1-101116r58"></a><span
+class="cmtt-8"> division)</span><br class="fancyvrb" /><a
+ id="x1-102116r58"></a><span
class="cmr-6">58</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101118r59"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102118r59"></a><span
class="cmr-6">59</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101120r60"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102120r60"></a><span
class="cmr-6">60</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101122r61"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102122r61"></a><span
class="cmr-6">61</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101124r62"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102124r62"></a><span
class="cmr-6">62</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101126r63"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102126r63"></a><span
class="cmr-6">63</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> zero</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101128r64"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102128r64"></a><span
class="cmr-6">64</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101130r65"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102130r65"></a><span
class="cmr-6">65</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [i]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> unset</span>
-
-
-
-<br class="fancyvrb" /><a
- id="x1-101132r66"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102132r66"></a><span
class="cmr-6">66</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [predicted]</span>
-<br class="fancyvrb" /><a
- id="x1-101134r67"></a><span
+class="cmtt-8"> [predicted]</span><br class="fancyvrb" /><a
+ id="x1-102134r67"></a><span
class="cmr-6">67</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101136r68"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102136r68"></a><span
class="cmr-6">68</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101138r69"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102138r69"></a><span
class="cmr-6">69</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101140r70"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102140r70"></a><span
class="cmr-6">70</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101142r71"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102142r71"></a><span
class="cmr-6">71</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101144r72"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102144r72"></a><span
class="cmr-6">72</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 29)</span><span
-class="cmtt-8"> done</span>
-<br class="fancyvrb" /><a
- id="x1-101146r73"></a><span
+class="cmtt-8"> done</span><br class="fancyvrb" /><a
+ id="x1-102146r73"></a><span
class="cmr-6">73</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
</dd><dt class="description">
<span
class="cmssbx-10x-x-120">step 2: curve synthesis</span> </dt><dd
still match.
<!--l. 368--><p class="noindent" >Then compute the final curve in one pass:
<!--l. 370--><p class="noindent" >
- <div class="fancyvrb" id="fancyvrb32">
-<a
- id="x1-101148r1"></a><span
+ <div class="fancyvrb" id="fancyvrb32"><a
+ id="x1-102148r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
class="cmtt-8"> [hx]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
- id="x1-101150r2"></a><span
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
+ id="x1-102150r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2)</span><span
class="cmtt-8"> [lx]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
- id="x1-101152r3"></a><span
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
+ id="x1-102152r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [0]</span><span
class="cmtt-8"> *</span><span
class="cmtt-8"> [floor1_multiplier]</span>
-<br class="fancyvrb" /><a
- id="x1-101154r4"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102154r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [floor1_values]-1</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101156r5"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102156r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101158r6"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102158r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> set</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101160r7"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102160r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101162r8"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102162r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span><span
class="cmtt-8"> *</span><span
-class="cmtt-8"> [floor1_multiplier]</span>
-<br class="fancyvrb" /><a
- id="x1-101164r9"></a><span
+class="cmtt-8"> [floor1_multiplier]</span><br class="fancyvrb" /><a
+ id="x1-102164r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [floor1_X_list]’</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span>
-<br class="fancyvrb" /><a
- id="x1-101166r10"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102166r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 8)</span><span
class="cmtt-8"> </span><a
-href="#x1-1230009.2.7"><span
+href="#x1-1240009.2.7"><span
class="cmtt-8">render_line</span></a><span
class="cmtt-8">(</span><span
class="cmtt-8"> [lx],</span><span
class="cmtt-8"> [hx],</span><span
class="cmtt-8"> [hy],</span><span
class="cmtt-8"> [floor]</span><span
-class="cmtt-8"> )</span>
-<br class="fancyvrb" /><a
- id="x1-101168r11"></a><span
+class="cmtt-8"> )</span><br class="fancyvrb" /><a
+ id="x1-102168r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 9)</span><span
class="cmtt-8"> [lx]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [hx]</span>
-<br class="fancyvrb" /><a
- id="x1-101170r12"></a><span
+class="cmtt-8"> [hx]</span><br class="fancyvrb" /><a
+ id="x1-102170r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  </span><span
class="cmtt-8"> [ly]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [hy]</span>
-<br class="fancyvrb" /><a
- id="x1-101172r13"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102172r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101174r14"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102174r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101176r15"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102176r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101178r16"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102178r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [n]</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101180r17"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102180r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101182r18"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102182r18"></a><span
class="cmr-6">18</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 12)</span><span
class="cmtt-8"> </span><a
-href="#x1-1230009.2.7"><span
+href="#x1-1240009.2.7"><span
class="cmtt-8">render_line</span></a><span
class="cmtt-8">(</span><span
class="cmtt-8"> [hx],</span><span
class="cmtt-8"> [hy],</span><span
class="cmtt-8"> [floor]</span><span
class="cmtt-8"> )</span>
-<br class="fancyvrb" /><a
- id="x1-101184r19"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102184r19"></a><span
class="cmr-6">19</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101186r20"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102186r20"></a><span
class="cmr-6">20</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101188r21"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102188r21"></a><span
class="cmr-6">21</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101190r22"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102190r22"></a><span
class="cmr-6">22</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [n]</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> </span><span
-class="cmsy-8">{</span>
-<br class="fancyvrb" /><a
- id="x1-101192r23"></a><span
+class="cmsy-8">{</span><br class="fancyvrb" /><a
+ id="x1-102192r23"></a><span
class="cmr-6">23</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101194r24"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102194r24"></a><span
class="cmr-6">24</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> to</span><span
class="cmtt-8"> [n]</span><span
class="cmtt-8"> elements</span>
-<br class="fancyvrb" /><a
- id="x1-101196r25"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-102196r25"></a><span
class="cmr-6">25</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101198r26"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102198r26"></a><span
class="cmr-6">26</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmsy-8">}</span>
-<br class="fancyvrb" /><a
- id="x1-101200r27"></a><span
+class="cmsy-8">}</span><br class="fancyvrb" /><a
+ id="x1-102200r27"></a><span
class="cmr-6">27</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-
-
-
-<br class="fancyvrb" /><a
- id="x1-101202r28"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102202r28"></a><span
class="cmr-6">28</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> lookup</span><span
class="cmtt-8"> substitution</span><span
class="cmtt-8"> using</span>
-<br class="fancyvrb" /><a
- id="x1-101204r29"></a><span
+
+
+
+ <br class="fancyvrb" /><a
+ id="x1-102204r29"></a><span
class="cmr-6">29</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> the</span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> </span><a
-href="#x1-12500010.1"><span
-class="cmtt-8">[floor1_inverse_dB_static_table]</span></a>
-<br class="fancyvrb" /><a
- id="x1-101206r30"></a><span
+href="#x1-12600010.1"><span
+class="cmtt-8">[floor1_inverse_dB_static_table]</span></a><br class="fancyvrb" /><a
+ id="x1-102206r30"></a><span
class="cmr-6">30</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-101208r31"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-102208r31"></a><span
class="cmr-6">31</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 16)</span><span
-class="cmtt-8"> done</span>
-<br class="fancyvrb" /><a
- id="x1-101210r32"></a><span
+class="cmtt-8"> done</span><br class="fancyvrb" /><a
+ id="x1-102210r32"></a><span
class="cmr-6">32</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
</dd></dl>
<h3 class="sectionHead"><span class="titlemark">8. </span> <a
- id="x1-1020008"></a>Residue setup and decode</h3>
+ id="x1-1030008"></a>Residue setup and decode</h3>
<!--l. 6--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.1. </span> <a
- id="x1-1030008.1"></a>Overview</h4>
+ id="x1-1040008.1"></a>Overview</h4>
<!--l. 8--><p class="noindent" >A residue vector represents the fine detail of the audio spectrum of one channel in an audio frame
after the encoder subtracts the floor curve and performs any channel coupling. A residue vector
may represent spectral lines, spectral magnitude, spectral phase or hybrids as mixed by channel
abstraction.
<!--l. 23--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.2. </span> <a
- id="x1-1040008.2"></a>Residue format</h4>
+ id="x1-1050008.2"></a>Residue format</h4>
<!--l. 25--><p class="noindent" >Residue format partitions each vector in the vector bundle into chunks, classifies each
chunk, encodes the chunk classifications and finally encodes the chunks themselves
using the the specific VQ arrangement defined for each selected classification. The
>
<br /> <div class="caption"
><span class="id">Figure 11: </span><span
-class="content">illustration of residue vector format</span></div><!--tex4ht:label?: x1-10400111 -->
+class="content">illustration of residue vector format</span></div><!--tex4ht:label?: x1-10500111 -->
</div>
<!--l. 77--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.3. </span> <a
- id="x1-1050008.3"></a>residue 0</h4>
+ id="x1-1060008.3"></a>residue 0</h4>
<!--l. 79--><p class="noindent" >Residue 0 and 1 differ only in the way the values within a residue partition are interleaved during
partition encoding (visually treated as a black box–or cyan box or brown box–in the above
figure).
<!--l. 89--><p class="noindent" >As an example, assume a partition vector of size eight, to be encoded by residue 0 using
codebook sizes of 8, 4, 2 and 1:
<!--l. 92--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb33">
-<a
- id="x1-105002r1"></a><span
+<div class="fancyvrb" id="fancyvrb33"><a
+ id="x1-106002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-105004r2"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-106004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 5</span><span
class="cmtt-8"> 6</span><span
class="cmtt-8"> 7</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
- id="x1-105006r3"></a><span
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
+ id="x1-106006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-105008r4"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-106008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> 5</span><span
class="cmtt-8"> 6</span><span
class="cmtt-8"> 7</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
- id="x1-105010r5"></a><span
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
+ id="x1-106010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-105012r6"></a><span
+ id="x1-106012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> 3</span><span
class="cmtt-8"> 5</span><span
class="cmtt-8"> 7</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
- id="x1-105014r7"></a><span
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
+ id="x1-106014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-105016r8"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-106016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> 7</span><span
class="cmtt-8"> ]</span>
<br class="fancyvrb" /><a
- id="x1-105018r9"></a><span
+ id="x1-106018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-105020r10"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-106020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> ],</span><span
class="cmtt-8"> [</span><span
class="cmtt-8"> 7</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
- id="x1-105022r11"></a><span
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
+ id="x1-106022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
<!--l. 106--><p class="noindent" >It is worth mentioning at this point that no configurable value in the residue coding setup is
restricted to a power of two.
<!--l. 111--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.4. </span> <a
- id="x1-1060008.4"></a>residue 1</h4>
+ id="x1-1070008.4"></a>residue 1</h4>
<!--l. 113--><p class="noindent" >Residue 1 does not interleave VQ encoding. It represents partition vector scalars in order. As
with residue 0, however, partition length must be an integer multiple of the codebook dimension,
although dimension may vary from pass to pass.
<!--l. 118--><p class="noindent" >As an example, assume a partition vector of size eight, to be encoded by residue 0 using
codebook sizes of 8, 4, 2 and 1:
<!--l. 121--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb34">
-<a
- id="x1-106002r1"></a><span
+<div class="fancyvrb" id="fancyvrb34"><a
+ id="x1-107002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-106004r2"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-107004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 5</span><span
class="cmtt-8"> 6</span><span
class="cmtt-8"> 7</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
- id="x1-106006r3"></a><span
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
+ id="x1-107006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-106008r4"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-107008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> 5</span><span
class="cmtt-8"> 6</span><span
class="cmtt-8"> 7</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
- id="x1-106010r5"></a><span
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
+ id="x1-107010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-106012r6"></a><span
+ id="x1-107012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> 5</span><span
class="cmtt-8"> 6</span><span
class="cmtt-8"> 7</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
- id="x1-106014r7"></a><span
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
+ id="x1-107014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-106016r8"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-107016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> 7</span><span
class="cmtt-8"> ]</span>
<br class="fancyvrb" /><a
- id="x1-106018r9"></a><span
+ id="x1-107018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-106020r10"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-107020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> ],</span><span
class="cmtt-8"> [</span><span
class="cmtt-8"> 7</span><span
-class="cmtt-8"> ]</span>
-<br class="fancyvrb" /><a
- id="x1-106022r11"></a><span
+class="cmtt-8"> ]</span><br class="fancyvrb" /><a
+ id="x1-107022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-
-
-
-</div>
+class="cmtt-8"> </span></div>
<!--l. 137--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.5. </span> <a
- id="x1-1070008.5"></a>residue 2</h4>
+ id="x1-1080008.5"></a>residue 2</h4>
<!--l. 139--><p class="noindent" >Residue type two can be thought of as a variant of residue type 1. Rather than encoding multiple
passed-in vectors as in residue type 1, the <span
class="cmti-12">ch </span>passed in vectors of length <span
class="cmti-12">n</span>. Encoding then proceeds as in type 1. Decoding
is as in type 1 with decode interleave reversed. If operating on a single vector to begin with,
residue type 1 and type 2 are equivalent.
+
+
+
<div class="center"
>
<!--l. 147--><p class="noindent" >
>
<br /> <div class="caption"
><span class="id">Figure 12: </span><span
-class="content">illustration of residue type 2</span></div><!--tex4ht:label?: x1-10700112 -->
+class="content">illustration of residue type 2</span></div><!--tex4ht:label?: x1-10800112 -->
</div>
<!--l. 153--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.6. </span> <a
- id="x1-1080008.6"></a>Residue decode</h4>
+ id="x1-1090008.6"></a>Residue decode</h4>
<!--l. 155--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">8.6.1. </span> <a
- id="x1-1090008.6.1"></a>header decode</h5>
+ id="x1-1100008.6.1"></a>header decode</h5>
<!--l. 157--><p class="noindent" >Header decode for all three residue types is identical.
-<div class="fancyvrb" id="fancyvrb35">
-<a
- id="x1-109002r1"></a><span
+<div class="fancyvrb" id="fancyvrb35"><a
+ id="x1-110002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
- id="x1-109004r2"></a><span
+class="cmtt-8"> integer</span><br class="fancyvrb" /><a
+ id="x1-110004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-109006r3"></a><span
+ id="x1-110006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> add</span><span
class="cmtt-8"> one</span>
<br class="fancyvrb" /><a
- id="x1-109008r4"></a><span
+ id="x1-110008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> and</span><span
class="cmtt-8"> add</span><span
-class="cmtt-8"> one</span>
-
-
-
-<br class="fancyvrb" /><a
- id="x1-109010r5"></a><span
+class="cmtt-8"> one</span><br class="fancyvrb" /><a
+ id="x1-110010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-</div>
+class="cmtt-8"> integer</span></div>
<!--l. 166--><p class="noindent" ><span
class="cmtt-12">[residue_begin] </span>and <span
class="cmtt-12">[residue_end] </span>select the specific sub-portion of each vector that is
class="cmtt-12">[residue_classbook]</span>.dimensions exceeds
<span
class="cmtt-12">[residue_classbook]</span>.entries, the bitstream should be regarded to be undecodable.
+
+
+
<!--l. 190--><p class="noindent" >Next we read a bitmap pattern that specifies which partition classes code values in which
passes.
<!--l. 193--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb36">
-<a
- id="x1-109012r1"></a><span
+<div class="fancyvrb" id="fancyvrb36"><a
+ id="x1-110012r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [residue\_classifications]-1</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-109014r2"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-110014r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-109016r3"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-110016r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> 0</span>
<br class="fancyvrb" /><a
- id="x1-109018r4"></a><span
+ id="x1-110018r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
- id="x1-109020r5"></a><span
+class="cmtt-8"> integer</span><br class="fancyvrb" /><a
+ id="x1-110020r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> boolean</span>
<br class="fancyvrb" /><a
- id="x1-109022r6"></a><span
+ id="x1-110022r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> unsigned</span><span
class="cmtt-8"> integer</span>
<br class="fancyvrb" /><a
- id="x1-109024r7"></a><span
+ id="x1-110024r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> *</span><span
class="cmtt-8"> 8</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [low\_bits]</span>
-<br class="fancyvrb" /><a
- id="x1-109026r8"></a><span
+class="cmtt-8"> [low\_bits]</span><br class="fancyvrb" /><a
+ id="x1-110026r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-109028r9"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-110028r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 7)</span><span
-class="cmtt-8"> done</span>
-</div>
+class="cmtt-8"> done</span></div>
<!--l. 205--><p class="noindent" >Finally, we read in a list of book numbers, each corresponding to specific bit set in the cascade
bitmap. We loop over the possible codebook classifications and the maximum possible number of
encoding stages (8 in Vorbis I, as constrained by the elements of the cascade bitmap being eight
bits):
<!--l. 211--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb37">
-<a
- id="x1-109030r1"></a><span
+<div class="fancyvrb" id="fancyvrb37"><a
+ id="x1-110030r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [residue\_classifications]-1</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-109032r2"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-110032r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-109034r3"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-110034r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 7</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
- id="x1-109036r4"></a><span
+ id="x1-110036r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-109038r5"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-110038r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> set</span><span
class="cmtt-8"> )</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-109040r6"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-110040r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-109042r7"></a><span
+ id="x1-110042r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> bits</span><span
class="cmtt-8"> as</span><span
class="cmtt-8"> unsigned</span><span
-class="cmtt-8"> integer</span>
-<br class="fancyvrb" /><a
- id="x1-109044r8"></a><span
+class="cmtt-8"> integer</span><br class="fancyvrb" /><a
+ id="x1-110044r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-109046r9"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-110046r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> }</span><span
class="cmtt-8"> else</span><span
-class="cmtt-8"> {</span>
-
-
-
-<br class="fancyvrb" /><a
- id="x1-109048r10"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-110048r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-109050r11"></a><span
+ id="x1-110050r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i][j]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> unused</span>
-<br class="fancyvrb" /><a
- id="x1-109052r12"></a><span
+class="cmtt-8"> unused</span><br class="fancyvrb" /><a
+ id="x1-110052r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-109054r13"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-110054r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-109056r14"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-110056r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-109058r15"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-110058r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-109060r16"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-110060r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-109062r17"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-110062r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 6)</span><span
-class="cmtt-8"> done</span>
-</div>
+class="cmtt-8"> done</span></div>
<!--l. 231--><p class="noindent" >An end-of-packet condition at any point in header decode renders the stream undecodable.
In addition, any codebook number greater than the maximum numbered codebook
set up in this stream also renders the stream undecodable. All codebooks in array
undecodable.
<!--l. 241--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">8.6.2. </span> <a
- id="x1-1100008.6.2"></a>packet decode</h5>
+ id="x1-1110008.6.2"></a>packet decode</h5>
<!--l. 243--><p class="noindent" >Format 0 and 1 packet decode is identical except for specific partition interleave. Format 2 packet
decode can be built out of the format 1 decode process. Thus we describe first the decode
infrastructure identical to all three formats.
class="cmtt-12">[residue_end]</span>, it is obvious that the
encoded portion of a residue vector may be the entire possible residue vector or some other strict
subset of the actual residue vector size with zero padding at either uncoded end. However, it is
+
+
+
also possible to set <span
class="cmtt-12">[residue_begin] </span>and <span
class="cmtt-12">[residue_end] </span>to specify a range partially or wholly
class="cmtt-12">[ch] </span>is provided by the higher level decoding
process.
<!--l. 269--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb38">
-<a
- id="x1-110002r1"></a><span
+<div class="fancyvrb" id="fancyvrb38"><a
+ id="x1-111002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [actual\_size]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> current</span><span
-class="cmtt-8"> blocksize/2;</span>
-<br class="fancyvrb" /><a
- id="x1-110004r2"></a><span
+class="cmtt-8"> blocksize/2;</span><br class="fancyvrb" /><a
+ id="x1-111004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> format</span><span
class="cmtt-8"> 2</span>
<br class="fancyvrb" /><a
- id="x1-110006r3"></a><span
+ id="x1-111006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [actual\_size]</span><span
class="cmtt-8"> *</span><span
-class="cmtt-8"> [ch];</span>
-
-
-
-<br class="fancyvrb" /><a
- id="x1-110008r4"></a><span
+class="cmtt-8"> [ch];</span><br class="fancyvrb" /><a
+ id="x1-111008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> ([residue\_begin],[actual\_size]);</span>
<br class="fancyvrb" /><a
- id="x1-110010r5"></a><span
+ id="x1-111010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> maximum</span><span
class="cmtt-8"> of</span><span
-class="cmtt-8"> ([residue\_end],[actual\_size]);</span>
-</div>
+class="cmtt-8"> ([residue\_end],[actual\_size]);</span></div>
<!--l. 277--><p class="noindent" >The following convenience values are conceptually useful to clarifying the decode process:
<!--l. 280--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb39">
-<a
- id="x1-110012r1"></a><span
+<div class="fancyvrb" id="fancyvrb39"><a
+ id="x1-111012r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> codebook</span><span
class="cmtt-8"> [residue\_classbook]</span>
<br class="fancyvrb" /><a
- id="x1-110014r2"></a><span
+ id="x1-111014r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [limit\_residue\_end]</span><span
class="cmtt-8"> -</span><span
-class="cmtt-8"> [limit\_residue\_begin]</span>
-<br class="fancyvrb" /><a
- id="x1-110016r3"></a><span
+class="cmtt-8"> [limit\_residue\_begin]</span><br class="fancyvrb" /><a
+ id="x1-111016r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [n\_to\_read]</span><span
class="cmtt-8"> /</span><span
-class="cmtt-8"> [residue\_partition\_size]</span>
-</div>
+class="cmtt-8"> [residue\_partition\_size]</span></div>
<!--l. 286--><p class="noindent" >Packet decode proceeds as follows, matching the description offered earlier in the document.
-<div class="fancyvrb" id="fancyvrb40">
-<a
- id="x1-110018r1"></a><span
+<div class="fancyvrb" id="fancyvrb40"><a
+ id="x1-111018r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> that</span><span
class="cmtt-8"> will</span><span
class="cmtt-8"> be</span><span
-class="cmtt-8"> returned.</span>
-<br class="fancyvrb" /><a
- id="x1-110020r2"></a><span
+class="cmtt-8"> returned.</span><br class="fancyvrb" /><a
+ id="x1-111020r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> to</span><span
class="cmtt-8"> decode.</span>
<br class="fancyvrb" /><a
- id="x1-110022r3"></a><span
+ id="x1-111022r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> 7</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-110024r4"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-111024r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110026r5"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111026r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 4)</span><span
class="cmtt-8"> [partition\_count]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
- id="x1-110028r6"></a><span
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
+ id="x1-111028r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-110030r7"></a><span
+ id="x1-111030r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> less</span><span
class="cmtt-8"> than</span><span
-class="cmtt-8"> [partitions\_to\_read]</span>
-<br class="fancyvrb" /><a
- id="x1-110032r8"></a><span
+class="cmtt-8"> [partitions\_to\_read]</span><br class="fancyvrb" /><a
+ id="x1-111032r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110034r9"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111034r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ([pass]</span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> zero)</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-110036r10"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-111036r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-110038r11"></a><span
+ id="x1-111038r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ..</span><span
class="cmtt-8"> [ch]-1</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-110040r12"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-111040r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110042r13"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111042r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> decode’</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
- id="x1-110044r14"></a><span
+ id="x1-111044r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110046r15"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111046r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> scalar</span><span
class="cmtt-8"> context</span>
<br class="fancyvrb" /><a
- id="x1-110048r16"></a><span
+ id="x1-111048r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
- id="x1-110050r17"></a><span
+ id="x1-111050r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110052r18"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111052r18"></a><span
class="cmr-6">18</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [j],([i]+[partition\_count])</span><span
class="cmtt-8"> =</span>
<br class="fancyvrb" /><a
- id="x1-110054r19"></a><span
+ id="x1-111054r19"></a><span
class="cmr-6">19</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> modulo</span><span
class="cmtt-8"> [residue\_classifications]</span>
<br class="fancyvrb" /><a
- id="x1-110056r20"></a><span
+ id="x1-111056r20"></a><span
class="cmr-6">20</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [residue\_classifications]</span><span
class="cmtt-8"> using</span><span
class="cmtt-8"> integer</span><span
-class="cmtt-8"> division</span>
-<br class="fancyvrb" /><a
- id="x1-110058r21"></a><span
+class="cmtt-8"> division</span><br class="fancyvrb" /><a
+ id="x1-111058r21"></a><span
class="cmr-6">21</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-110060r22"></a><span
+ id="x1-111060r22"></a><span
class="cmr-6">22</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-110062r23"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-111062r23"></a><span
class="cmr-6">23</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110064r24"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111064r24"></a><span
class="cmr-6">24</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-110066r25"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-111066r25"></a><span
class="cmr-6">25</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110068r26"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111068r26"></a><span
class="cmr-6">26</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-110070r27"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-111070r27"></a><span
class="cmr-6">27</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110072r28"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111072r28"></a><span
class="cmr-6">28</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-110074r29"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-111074r29"></a><span
class="cmr-6">29</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-110076r30"></a><span
+ id="x1-111076r30"></a><span
class="cmr-6">30</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> while</span><span
class="cmtt-8"> [partition\_count]</span>
<br class="fancyvrb" /><a
- id="x1-110078r31"></a><span
+ id="x1-111078r31"></a><span
class="cmr-6">31</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> less</span><span
class="cmtt-8"> than</span><span
class="cmtt-8"> [partitions\_to\_read]</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-110080r32"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-111080r32"></a><span
class="cmr-6">32</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110082r33"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111082r33"></a><span
class="cmr-6">33</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [ch]-1</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
- id="x1-110084r34"></a><span
+ id="x1-111084r34"></a><span
class="cmr-6">34</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110086r35"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111086r35"></a><span
class="cmr-6">35</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ’do</span><span
class="cmtt-8"> not</span><span
class="cmtt-8"> decode’</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-110088r36"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-111088r36"></a><span
class="cmr-6">36</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-110090r37"></a><span
+ id="x1-111090r37"></a><span
class="cmr-6">37</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [j],[partition\_count]</span>
<br class="fancyvrb" /><a
- id="x1-110092r38"></a><span
+ id="x1-111092r38"></a><span
class="cmr-6">38</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> array</span><span
class="cmtt-8"> [residue\_books]</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [vqclass],[pass]</span>
-<br class="fancyvrb" /><a
- id="x1-110094r39"></a><span
+class="cmtt-8"> [vqclass],[pass]</span><br class="fancyvrb" /><a
+ id="x1-111094r39"></a><span
class="cmr-6">39</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ’unused’)</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
- id="x1-110096r40"></a><span
+ id="x1-111096r40"></a><span
class="cmr-6">40</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110098r41"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111098r41"></a><span
class="cmr-6">41</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> at</span><span
class="cmtt-8"> scalar</span>
<br class="fancyvrb" /><a
- id="x1-110100r42"></a><span
+ id="x1-111100r42"></a><span
class="cmr-6">42</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [limit\_residue\_begin]+[partition\_count]*[residue\_partition\_size]</span><span
class="cmtt-8"> using</span>
<br class="fancyvrb" /><a
- id="x1-110102r43"></a><span
+ id="x1-111102r43"></a><span
class="cmr-6">43</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [vqbook]</span><span
class="cmtt-8"> in</span><span
class="cmtt-8"> VQ</span><span
-class="cmtt-8"> context</span>
-<br class="fancyvrb" /><a
- id="x1-110104r44"></a><span
+class="cmtt-8"> context</span><br class="fancyvrb" /><a
+ id="x1-111104r44"></a><span
class="cmr-6">44</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-
-
-
-<br class="fancyvrb" /><a
- id="x1-110106r45"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-111106r45"></a><span
class="cmr-6">45</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> }</span>
<br class="fancyvrb" /><a
- id="x1-110108r46"></a><span
+ id="x1-111108r46"></a><span
class="cmr-6">46</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110110r47"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111110r47"></a><span
class="cmr-6">47</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> increment</span><span
class="cmtt-8"> [partition\_count]</span><span
class="cmtt-8"> by</span><span
-class="cmtt-8"> one</span>
-<br class="fancyvrb" /><a
- id="x1-110112r48"></a><span
+class="cmtt-8"> one</span><br class="fancyvrb" /><a
+ id="x1-111112r48"></a><span
class="cmr-6">48</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110114r49"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111114r49"></a><span
class="cmr-6">49</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-110116r50"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-111116r50"></a><span
class="cmr-6">50</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-110118r51"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-111118r51"></a><span
class="cmr-6">51</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-110120r52"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-111120r52"></a><span
class="cmr-6">52</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-110122r53"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-111122r53"></a><span
class="cmr-6">53</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 21)</span><span
-class="cmtt-8"> done</span>
-<br class="fancyvrb" /><a
- id="x1-110124r54"></a><span
+class="cmtt-8"> done</span><br class="fancyvrb" /><a
+ id="x1-111124r54"></a><span
class="cmr-6">54</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-</div>
+class="cmtt-8"> </span></div>
<!--l. 344--><p class="noindent" >An end-of-packet condition during packet decode is to be considered a nominal occurrence.
Decode returns the result of vector decode up to that point.
<!--l. 350--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">8.6.3. </span> <a
- id="x1-1110008.6.3"></a>format 0 specifics</h5>
+ id="x1-1120008.6.3"></a>format 0 specifics</h5>
<!--l. 352--><p class="noindent" >Format zero decodes partitions exactly as described earlier in the ’Residue Format: residue 0’
section. The following pseudocode presents the same algorithm. Assume:
+
+
+
<ul class="itemize1">
<li class="itemize"><span
class="cmtt-12">[n] </span>is the value in <span
<li class="itemize"><span
class="cmtt-12">[offset] </span>is the beginning read offset in [v]</li></ul>
<!--l. 363--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb41">
-<a
- id="x1-111002r1"></a><span
+<div class="fancyvrb" id="fancyvrb41"><a
+ id="x1-112002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [n]</span><span
class="cmtt-8"> /</span><span
-class="cmtt-8"> [codebook\_dimensions]</span>
-<br class="fancyvrb" /><a
- id="x1-111004r2"></a><span
+class="cmtt-8"> [codebook\_dimensions]</span><br class="fancyvrb" /><a
+ id="x1-112004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [step]-1</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-111006r3"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-112006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-111008r4"></a><span
+ id="x1-112008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> VQ</span><span
class="cmtt-8"> context</span>
<br class="fancyvrb" /><a
- id="x1-111010r5"></a><span
+ id="x1-112010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [codebook\_dimensions]-1</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-111012r6"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-112012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-111014r7"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-112014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ([offset]+[i]+[j]*[step])</span><span
class="cmtt-8"> =</span>
<br class="fancyvrb" /><a
- id="x1-111016r8"></a><span
+ id="x1-112016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  </span><span
class="cmtt-8"> [v]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> ([offset]+[i]+[j]*[step])</span><span
-class="cmtt-8"> +</span>
-<br class="fancyvrb" /><a
- id="x1-111018r9"></a><span
+class="cmtt-8"> +</span><br class="fancyvrb" /><a
+ id="x1-112018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> [entry\_temp]</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [j]</span>
-<br class="fancyvrb" /><a
- id="x1-111020r10"></a><span
+class="cmtt-8"> [j]</span><br class="fancyvrb" /><a
+ id="x1-112020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-111022r11"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-112022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-111024r12"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-112024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-111026r13"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-112026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-111028r14"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-112028r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-111030r15"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-112030r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 6)</span><span
-class="cmtt-8"> done</span>
-<br class="fancyvrb" /><a
- id="x1-111032r16"></a><span
+class="cmtt-8"> done</span><br class="fancyvrb" /><a
+ id="x1-112032r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-
-
-
-</div>
+class="cmtt-8"> </span></div>
<!--l. 384--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">8.6.4. </span> <a
- id="x1-1120008.6.4"></a>format 1 specifics</h5>
+ id="x1-1130008.6.4"></a>format 1 specifics</h5>
<!--l. 386--><p class="noindent" >Format 1 decodes partitions exactly as described earlier in the ’Residue Format: residue 1’
section. The following pseudocode presents the same algorithm. Assume:
<ul class="itemize1">
<li class="itemize"><span
class="cmtt-12">[offset] </span>is the beginning read offset in [v]</li></ul>
<!--l. 398--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb42">
-<a
- id="x1-112002r1"></a><span
+<div class="fancyvrb" id="fancyvrb42"><a
+ id="x1-113002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
-class="cmtt-8"> [i]</span><span
-class="cmtt-8"> =</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
- id="x1-112004r2"></a><span
+class="cmtt-8"> [i]</span><span
+class="cmtt-8"> =</span><span
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
+ id="x1-113004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> VQ</span><span
class="cmtt-8"> context</span>
<br class="fancyvrb" /><a
- id="x1-112006r3"></a><span
+ id="x1-113006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [codebook\_dimensions]-1</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-112008r4"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-113008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-112010r5"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-113010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> ([offset]+[i])</span><span
class="cmtt-8"> =</span>
<br class="fancyvrb" /><a
- id="x1-112012r6"></a><span
+ id="x1-113012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8">  </span><span
class="cmtt-8"> [v]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> ([offset]+[i])</span><span
-class="cmtt-8"> +</span>
-<br class="fancyvrb" /><a
- id="x1-112014r7"></a><span
+class="cmtt-8"> +</span><br class="fancyvrb" /><a
+ id="x1-113014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> [entry\_temp]</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [j]</span>
-<br class="fancyvrb" /><a
- id="x1-112016r8"></a><span
+class="cmtt-8"> [j]</span><br class="fancyvrb" /><a
+ id="x1-113016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 5)</span><span
class="cmtt-8"> increment</span><span
-class="cmtt-8"> [i]</span>
-<br class="fancyvrb" /><a
- id="x1-112018r9"></a><span
+class="cmtt-8"> [i]</span><br class="fancyvrb" /><a
+ id="x1-113018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-112020r10"></a><span
+ id="x1-113020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-112022r11"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-113022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-112024r12"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-113024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> continue</span><span
class="cmtt-8"> at</span><span
class="cmtt-8"> step</span><span
-class="cmtt-8"> 2</span>
-<br class="fancyvrb" /><a
- id="x1-112026r13"></a><span
+class="cmtt-8"> 2</span><br class="fancyvrb" /><a
+ id="x1-113026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 7)</span><span
-class="cmtt-8"> done</span>
-</div>
+class="cmtt-8"> done</span></div>
<!--l. 416--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">8.6.5. </span> <a
- id="x1-1130008.6.5"></a>format 2 specifics</h5>
-<!--l. 418--><p class="noindent" >Format 2 is reducible to format 1. It may be implemented as an additional step prior to and an
-additional post-decode step after a normal format 1 decode.
+ id="x1-1140008.6.5"></a>format 2 specifics</h5>
+<!--l. 418--><p class="noindent" >Format 2 is reducible to format 1. It may be implemented as an additional step prior to and an
+additional post-decode step after a normal format 1 decode.
<!--l. 421--><p class="noindent" >Format 2 handles ’do not decode’ vectors differently than residue 0 or 1; if all vectors are marked
’do not decode’, no decode occurrs. However, if at least one vector is to be decoded, all
the vectors are decoded. We then request normal format 1 to decode a single vector
described above into <span
class="cmti-12">ch </span>independent vectors, one for each outputchannel, according
to:
- <div class="fancyvrb" id="fancyvrb43">
-<a
- id="x1-113005r1"></a><span
+ <div class="fancyvrb" id="fancyvrb43"><a
+ id="x1-114005r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [n]-1</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-113007r2"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-114007r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-113009r3"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-114009r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [ch]-1</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-113011r4"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-114011r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-113013r5"></a><span
+ <br class="fancyvrb" /><a
+ id="x1-114013r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> *</span><span
class="cmtt-8"> [ch]</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [j])</span>
-<br class="fancyvrb" /><a
- id="x1-113015r6"></a><span
+class="cmtt-8"> [j])</span><br class="fancyvrb" /><a
+ id="x1-114015r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-113017r7"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-114017r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-113019r8"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-114019r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-113021r9"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-114021r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-113023r10"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-114023r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 4)</span><span
-class="cmtt-8"> done</span>
-</div>
+class="cmtt-8"> done</span></div>
</dd></dl>
<h3 class="sectionHead"><span class="titlemark">9. </span> <a
- id="x1-1140009"></a>Helper equations</h3>
+ id="x1-1150009"></a>Helper equations</h3>
<!--l. 6--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">9.1. </span> <a
- id="x1-1150009.1"></a>Overview</h4>
+ id="x1-1160009.1"></a>Overview</h4>
<!--l. 8--><p class="noindent" >The equations below are used in multiple places by the Vorbis codec specification. Rather than
cluttering up the main specification documents, they are defined here and referenced where
appropriate.
<!--l. 13--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">9.2. </span> <a
- id="x1-1160009.2"></a>Functions</h4>
+ id="x1-1170009.2"></a>Functions</h4>
<!--l. 15--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.1. </span> <a
- id="x1-1170009.2.1"></a>ilog</h5>
+ id="x1-1180009.2.1"></a>ilog</h5>
<!--l. 17--><p class="noindent" >The ”ilog(x)” function returns the position number (1 through n) of the highest set bit in the
two’s complement integer value <span
class="cmtt-12">[x]</span>. Values of <span
class="cmtt-12">[x] </span>less than zero are defined to return
zero.
<!--l. 20--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb44">
-<a
- id="x1-117002r1"></a><span
+<div class="fancyvrb" id="fancyvrb44"><a
+ id="x1-118002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
class="cmtt-8"> [return\_value]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 0;</span>
-<br class="fancyvrb" /><a
- id="x1-117004r2"></a><span
+class="cmtt-8"> 0;</span><br class="fancyvrb" /><a
+ id="x1-118004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> than</span><span
class="cmtt-8"> zero</span><span
class="cmtt-8"> )</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-117006r3"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-118006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-117008r4"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-118008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> increment</span><span
class="cmtt-8"> [return\_value];</span>
<br class="fancyvrb" /><a
- id="x1-117010r5"></a><span
+ id="x1-118010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> the</span><span
class="cmtt-8"> MSb</span><span
class="cmtt-8"> with</span><span
-class="cmtt-8"> zero</span>
-<br class="fancyvrb" /><a
- id="x1-117012r6"></a><span
+class="cmtt-8"> zero</span><br class="fancyvrb" /><a
+ id="x1-118012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> repeat</span><span
class="cmtt-8"> at</span><span
class="cmtt-8"> step</span><span
-class="cmtt-8"> 2)</span>
-<br class="fancyvrb" /><a
- id="x1-117014r7"></a><span
+class="cmtt-8"> 2)</span><br class="fancyvrb" /><a
+ id="x1-118014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-117016r8"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-118016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-117018r9"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-118018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-117020r10"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-118020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 6)</span><span
-class="cmtt-8"> done</span>
-</div>
-
-
-
+class="cmtt-8"> done</span></div>
<!--l. 33--><p class="noindent" >Examples:
<ul class="itemize1">
<li class="itemize">ilog(0) = 0;
</li>
<li class="itemize">ilog(1) = 1;
+
+
+
</li>
<li class="itemize">ilog(2) = 2;
</li>
<li class="itemize">ilog(negative number) = 0;</li></ul>
<!--l. 48--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.2. </span> <a
- id="x1-1180009.2.2"></a>float32_unpack</h5>
+ id="x1-1190009.2.2"></a>float32_unpack</h5>
<!--l. 50--><p class="noindent" >”float32_unpack(x)” is intended to translate the packed binary representation of a Vorbis
codebook float value into the representation used by the decoder for floating point numbers. For
purposes of this example, we will unpack a Vorbis float32 into a host-native floating point
number.
<!--l. 56--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb45">
-<a
- id="x1-118002r1"></a><span
+<div class="fancyvrb" id="fancyvrb45"><a
+ id="x1-119002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> AND</span><span
class="cmtt-8"> 0x1fffff</span><span
class="cmtt-8"> (unsigned</span><span
-class="cmtt-8"> result)</span>
-<br class="fancyvrb" /><a
- id="x1-118004r2"></a><span
+class="cmtt-8"> result)</span><br class="fancyvrb" /><a
+ id="x1-119004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> (unsigned</span><span
class="cmtt-8"> result)</span>
<br class="fancyvrb" /><a
- id="x1-118006r3"></a><span
+ id="x1-119006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> (unsigned</span><span
class="cmtt-8"> result)</span>
<br class="fancyvrb" /><a
- id="x1-118008r4"></a><span
+ id="x1-119008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> then</span><span
class="cmtt-8"> negate</span><span
-class="cmtt-8"> [mantissa]</span>
-<br class="fancyvrb" /><a
- id="x1-118010r5"></a><span
+class="cmtt-8"> [mantissa]</span><br class="fancyvrb" /><a
+ id="x1-119010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> -</span><span
class="cmtt-8"> 788</span><span
class="cmtt-8"> )</span><span
-class="cmtt-8"> )</span>
-</div>
-
-
-
+class="cmtt-8"> )</span></div>
<!--l. 66--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.3. </span> <a
- id="x1-1190009.2.3"></a>lookup1_values</h5>
+ id="x1-1200009.2.3"></a>lookup1_values</h5>
<!--l. 68--><p class="noindent" >”lookup1_values(codebook_entries,codebook_dimensions)” is used to compute the
correct length of the value index for a codebook VQ lookup table of lookup type 1.
The values on this list are permuted to construct the VQ vector lookup table of size
class="cmtt-12">[codebook_dimensions] </span>is less than or equal to
<span
class="cmtt-12">[codebook_entries]</span>’.
+
+
+
<!--l. 81--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.4. </span> <a
- id="x1-1200009.2.4"></a>low_neighbor</h5>
+ id="x1-1210009.2.4"></a>low_neighbor</h5>
<!--l. 83--><p class="noindent" >”low_neighbor(v,x)” finds the position <span
class="cmtt-12">n </span>in vector <span
class="cmtt-12">[v] </span>of the greatest value scalar element for
class="cmtt-12">[x]</span>.
<!--l. 88--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.5. </span> <a
- id="x1-1210009.2.5"></a>high_neighbor</h5>
+ id="x1-1220009.2.5"></a>high_neighbor</h5>
<!--l. 90--><p class="noindent" >”high_neighbor(v,x)” finds the position <span
class="cmtt-12">n </span>in vector [v] of the lowest value scalar element for
which <span
class="cmtt-12">[x]</span>.
<!--l. 97--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.6. </span> <a
- id="x1-1220009.2.6"></a>render_point</h5>
+ id="x1-1230009.2.6"></a>render_point</h5>
<!--l. 99--><p class="noindent" >”render_point(x0,y0,x1,y1,X)” is used to find the Y value at point X along the line specified by
x0, x1, y0 and y1. This function uses an integer algorithm to solve for the point directly without
calculating intervening values along the line.
-
-
-
<!--l. 104--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb46">
-<a
- id="x1-122002r1"></a><span
+<div class="fancyvrb" id="fancyvrb46"><a
+ id="x1-123002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [y1]</span><span
class="cmtt-8"> -</span><span
-class="cmtt-8"> [y0]</span>
-<br class="fancyvrb" /><a
- id="x1-122004r2"></a><span
+class="cmtt-8"> [y0]</span><br class="fancyvrb" /><a
+ id="x1-123004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [x1]</span><span
class="cmtt-8"> -</span><span
-class="cmtt-8"> [x0]</span>
-<br class="fancyvrb" /><a
- id="x1-122006r3"></a><span
+class="cmtt-8"> [x0]</span><br class="fancyvrb" /><a
+ id="x1-123006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> absolute</span><span
class="cmtt-8"> value</span><span
class="cmtt-8"> of</span><span
-class="cmtt-8"> [dy]</span>
-<br class="fancyvrb" /><a
- id="x1-122008r4"></a><span
+class="cmtt-8"> [dy]</span><br class="fancyvrb" /><a
+ id="x1-123008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> -</span><span
class="cmtt-8"> [x0])</span>
<br class="fancyvrb" /><a
- id="x1-122010r5"></a><span
+ id="x1-123010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [adx]</span><span
class="cmtt-8"> using</span><span
class="cmtt-8"> integer</span><span
-class="cmtt-8"> division</span>
-<br class="fancyvrb" /><a
- id="x1-122012r6"></a><span
+class="cmtt-8"> division</span><br class="fancyvrb" /><a
+ id="x1-123012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> than</span><span
class="cmtt-8"> zero</span><span
class="cmtt-8"> )</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-122014r7"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-123014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-122016r8"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-123016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> -</span><span
class="cmtt-8"> [off]</span>
<br class="fancyvrb" /><a
- id="x1-122018r9"></a><span
+ id="x1-123018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-122020r10"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-123020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> }</span><span
class="cmtt-8"> else</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-122022r11"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-123022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-122024r12"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-123024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [y0]</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [off]</span>
-<br class="fancyvrb" /><a
- id="x1-122026r13"></a><span
+class="cmtt-8"> [off]</span><br class="fancyvrb" /><a
+ id="x1-123026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-122028r14"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-123028r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-122030r15"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-123030r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-122032r16"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-123032r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 9)</span><span
-class="cmtt-8"> done</span>
-</div>
+class="cmtt-8"> done</span></div>
<!--l. 125--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.7. </span> <a
- id="x1-1230009.2.7"></a>render_line</h5>
+ id="x1-1240009.2.7"></a>render_line</h5>
+
+
+
<!--l. 127--><p class="noindent" >Floor decode type one uses the integer line drawing algorithm of ”render_line(x0, y0, x1, y1, v)”
to construct an integer floor curve for contiguous piecewise line segments. Note that it has not
been relevant elsewhere, but here we must define integer division as rounding division of both
positive and negative numbers toward zero.
<!--l. 134--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb47">
-<a
- id="x1-123002r1"></a><span
+<div class="fancyvrb" id="fancyvrb47"><a
+ id="x1-124002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [y1]</span><span
class="cmtt-8"> -</span><span
-class="cmtt-8"> [y0]</span>
-<br class="fancyvrb" /><a
- id="x1-123004r2"></a><span
+class="cmtt-8"> [y0]</span><br class="fancyvrb" /><a
+ id="x1-124004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [x1]</span><span
class="cmtt-8"> -</span><span
-class="cmtt-8"> [x0]</span>
-<br class="fancyvrb" /><a
- id="x1-123006r3"></a><span
+class="cmtt-8"> [x0]</span><br class="fancyvrb" /><a
+ id="x1-124006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> absolute</span><span
class="cmtt-8"> value</span><span
class="cmtt-8"> of</span><span
-class="cmtt-8"> [dy]</span>
-<br class="fancyvrb" /><a
- id="x1-123008r4"></a><span
+class="cmtt-8"> [dy]</span><br class="fancyvrb" /><a
+ id="x1-124008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> division</span>
<br class="fancyvrb" /><a
- id="x1-123010r5"></a><span
+ id="x1-124010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [x]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [x0]</span>
-<br class="fancyvrb" /><a
- id="x1-123012r6"></a><span
+class="cmtt-8"> [x0]</span><br class="fancyvrb" /><a
+ id="x1-124012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [y]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [y0]</span>
-<br class="fancyvrb" /><a
- id="x1-123014r7"></a><span
+class="cmtt-8"> [y0]</span><br class="fancyvrb" /><a
+ id="x1-124014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [err]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> 0</span>
-<br class="fancyvrb" /><a
- id="x1-123016r8"></a><span
+class="cmtt-8"> 0</span><br class="fancyvrb" /><a
+ id="x1-124016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123018r9"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> than</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> )</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-123020r10"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-124020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123022r11"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> -</span><span
class="cmtt-8"> 1</span>
<br class="fancyvrb" /><a
- id="x1-123024r12"></a><span
+ id="x1-124024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123026r13"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> }</span><span
class="cmtt-8"> else</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-123028r14"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-124028r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123030r15"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124030r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [base]</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> 1</span>
-<br class="fancyvrb" /><a
- id="x1-123032r16"></a><span
+class="cmtt-8"> 1</span><br class="fancyvrb" /><a
+ id="x1-124032r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123034r17"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124034r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-123036r18"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-124036r18"></a><span
class="cmr-6">18</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123038r19"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124038r19"></a><span
class="cmr-6">19</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> *</span><span
class="cmtt-8"> [adx]</span>
<br class="fancyvrb" /><a
- id="x1-123040r20"></a><span
+ id="x1-124040r20"></a><span
class="cmr-6">20</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [x]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [y]</span>
-<br class="fancyvrb" /><a
- id="x1-123042r21"></a><span
+class="cmtt-8"> [y]</span><br class="fancyvrb" /><a
+ id="x1-124042r21"></a><span
class="cmr-6">21</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123044r22"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124044r22"></a><span
class="cmr-6">22</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> [x0]+1</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> [x1]-1</span><span
-class="cmtt-8"> {</span>
-
-
-
-<br class="fancyvrb" /><a
- id="x1-123046r23"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-124046r23"></a><span
class="cmr-6">23</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123048r24"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124048r24"></a><span
class="cmr-6">24</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> +</span><span
class="cmtt-8"> [ady];</span>
<br class="fancyvrb" /><a
- id="x1-123050r25"></a><span
+ id="x1-124050r25"></a><span
class="cmr-6">25</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> >=</span><span
class="cmtt-8"> [adx]</span><span
class="cmtt-8"> )</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-123052r26"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-124052r26"></a><span
class="cmr-6">26</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123054r27"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124054r27"></a><span
class="cmr-6">27</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [err]</span><span
class="cmtt-8"> -</span><span
-class="cmtt-8"> [adx]</span>
-<br class="fancyvrb" /><a
- id="x1-123056r28"></a><span
+class="cmtt-8"> [adx]</span><br class="fancyvrb" /><a
+ id="x1-124056r28"></a><span
class="cmr-6">28</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [y]</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [sy]</span>
-<br class="fancyvrb" /><a
- id="x1-123058r29"></a><span
+class="cmtt-8"> [sy]</span><br class="fancyvrb" /><a
+ id="x1-124058r29"></a><span
class="cmr-6">29</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span>
<br class="fancyvrb" /><a
- id="x1-123060r30"></a><span
+ id="x1-124060r30"></a><span
class="cmr-6">30</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> }</span><span
class="cmtt-8"> else</span><span
-class="cmtt-8"> {</span>
-<br class="fancyvrb" /><a
- id="x1-123062r31"></a><span
+class="cmtt-8"> {</span><br class="fancyvrb" /><a
+ id="x1-124062r31"></a><span
class="cmr-6">31</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123064r32"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124064r32"></a><span
class="cmr-6">32</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> [y]</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [base]</span>
-<br class="fancyvrb" /><a
- id="x1-123066r33"></a><span
+class="cmtt-8"> [base]</span><br class="fancyvrb" /><a
+ id="x1-124066r33"></a><span
class="cmr-6">33</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123068r34"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124068r34"></a><span
class="cmr-6">34</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-<br class="fancyvrb" /><a
- id="x1-123070r35"></a><span
+class="cmtt-8"> }</span><br class="fancyvrb" /><a
+ id="x1-124070r35"></a><span
class="cmr-6">35</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123072r36"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124072r36"></a><span
class="cmr-6">36</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [x]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [y]</span>
-<br class="fancyvrb" /><a
- id="x1-123074r37"></a><span
+class="cmtt-8"> [y]</span><br class="fancyvrb" /><a
+ id="x1-124074r37"></a><span
class="cmr-6">37</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> </span>
-<br class="fancyvrb" /><a
- id="x1-123076r38"></a><span
+class="cmtt-8"> </span><br class="fancyvrb" /><a
+ id="x1-124076r38"></a><span
class="cmr-6">38</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> }</span>
-</div>
+class="cmtt-8"> }</span></div>
<h3 class="sectionHead"><span class="titlemark">10. </span> <a
- id="x1-12400010"></a>Tables</h3>
+ id="x1-12500010"></a>Tables</h3>
<!--l. 6--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">10.1. </span> <a
- id="x1-12500010.1"></a>floor1_inverse_dB_table</h4>
+ id="x1-12600010.1"></a>floor1_inverse_dB_table</h4>
<!--l. 8--><p class="noindent" >The vector <span
-class="cmtt-12">[floor1_inverse_dB_table] </span>is a 256 element static lookup table consiting of the
+class="cmtt-12">[floor1_inverse_dB_table] </span>is a 256 element static lookup table consisting of the
following values (read left to right then top to bottom):
<!--l. 12--><p class="noindent" >
-<div class="fancyvrb" id="fancyvrb48">
-<a
- id="x1-125002r1"></a><span
+<div class="fancyvrb" id="fancyvrb48"><a
+ id="x1-126002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1.0649863e-07,</span><span
class="cmtt-8"> 1.1341951e-07,</span><span
class="cmtt-8"> 1.2079015e-07,</span><span
-class="cmtt-8"> 1.2863978e-07,</span>
-<br class="fancyvrb" /><a
- id="x1-125004r2"></a><span
+class="cmtt-8"> 1.2863978e-07,</span><br class="fancyvrb" /><a
+ id="x1-126004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1.5538408e-07,</span><span
class="cmtt-8"> 1.6548181e-07,</span>
<br class="fancyvrb" /><a
- id="x1-125006r3"></a><span
+ id="x1-126006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1.7623575e-07,</span><span
class="cmtt-8"> 1.8768855e-07,</span><span
class="cmtt-8"> 1.9988561e-07,</span><span
-class="cmtt-8"> 2.1287530e-07,</span>
-<br class="fancyvrb" /><a
- id="x1-125008r4"></a><span
+class="cmtt-8"> 2.1287530e-07,</span><br class="fancyvrb" /><a
+ id="x1-126008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2.5713223e-07,</span><span
class="cmtt-8"> 2.7384213e-07,</span>
<br class="fancyvrb" /><a
- id="x1-125010r5"></a><span
+ id="x1-126010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2.9163793e-07,</span><span
class="cmtt-8"> 3.1059021e-07,</span><span
class="cmtt-8"> 3.3077411e-07,</span><span
-class="cmtt-8"> 3.5226968e-07,</span>
-<br class="fancyvrb" /><a
- id="x1-125012r6"></a><span
+class="cmtt-8"> 3.5226968e-07,</span><br class="fancyvrb" /><a
+ id="x1-126012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 4.2550680e-07,</span><span
class="cmtt-8"> 4.5315863e-07,</span>
<br class="fancyvrb" /><a
- id="x1-125014r7"></a><span
+ id="x1-126014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 4.8260743e-07,</span><span
class="cmtt-8"> 5.1396998e-07,</span><span
class="cmtt-8"> 5.4737065e-07,</span><span
-class="cmtt-8"> 5.8294187e-07,</span>
-<br class="fancyvrb" /><a
- id="x1-125016r8"></a><span
+class="cmtt-8"> 5.8294187e-07,</span><br class="fancyvrb" /><a
+ id="x1-126016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 7.0413592e-07,</span><span
class="cmtt-8"> 7.4989464e-07,</span>
<br class="fancyvrb" /><a
- id="x1-125018r9"></a><span
+ id="x1-126018r9"></a><span
class="cmr-6">9</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 7.9862701e-07,</span><span
class="cmtt-8"> 8.5052630e-07,</span><span
class="cmtt-8"> 9.0579828e-07,</span><span
-class="cmtt-8"> 9.6466216e-07,</span>
-<br class="fancyvrb" /><a
- id="x1-125020r10"></a><span
+class="cmtt-8"> 9.6466216e-07,</span><br class="fancyvrb" /><a
+ id="x1-126020r10"></a><span
class="cmr-6">10</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1.1652161e-06,</span><span
class="cmtt-8"> 1.2409384e-06,</span>
<br class="fancyvrb" /><a
- id="x1-125022r11"></a><span
+ id="x1-126022r11"></a><span
class="cmr-6">11</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1.3215816e-06,</span><span
class="cmtt-8"> 1.4074654e-06,</span><span
class="cmtt-8"> 1.4989305e-06,</span><span
-class="cmtt-8"> 1.5963394e-06,</span>
-<br class="fancyvrb" /><a
- id="x1-125024r12"></a><span
+class="cmtt-8"> 1.5963394e-06,</span><br class="fancyvrb" /><a
+ id="x1-126024r12"></a><span
class="cmr-6">12</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1.9282195e-06,</span><span
class="cmtt-8"> 2.0535261e-06,</span>
<br class="fancyvrb" /><a
- id="x1-125026r13"></a><span
+ id="x1-126026r13"></a><span
class="cmr-6">13</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2.1869758e-06,</span><span
class="cmtt-8"> 2.3290978e-06,</span><span
class="cmtt-8"> 2.4804557e-06,</span><span
-class="cmtt-8"> 2.6416497e-06,</span>
-<br class="fancyvrb" /><a
- id="x1-125028r14"></a><span
+class="cmtt-8"> 2.6416497e-06,</span><br class="fancyvrb" /><a
+ id="x1-126028r14"></a><span
class="cmr-6">14</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3.1908506e-06,</span><span
class="cmtt-8"> 3.3982101e-06,</span>
<br class="fancyvrb" /><a
- id="x1-125030r15"></a><span
+ id="x1-126030r15"></a><span
class="cmr-6">15</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3.6190449e-06,</span><span
class="cmtt-8"> 3.8542308e-06,</span><span
class="cmtt-8"> 4.1047004e-06,</span><span
-class="cmtt-8"> 4.3714470e-06,</span>
-<br class="fancyvrb" /><a
- id="x1-125032r16"></a><span
+class="cmtt-8"> 4.3714470e-06,</span><br class="fancyvrb" /><a
+ id="x1-126032r16"></a><span
class="cmr-6">16</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 5.2802740e-06,</span><span
class="cmtt-8"> 5.6234160e-06,</span>
<br class="fancyvrb" /><a
- id="x1-125034r17"></a><span
+ id="x1-126034r17"></a><span
class="cmr-6">17</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 5.9888572e-06,</span><span
class="cmtt-8"> 6.3780469e-06,</span><span
class="cmtt-8"> 6.7925283e-06,</span><span
-class="cmtt-8"> 7.2339451e-06,</span>
-<br class="fancyvrb" /><a
- id="x1-125036r18"></a><span
+class="cmtt-8"> 7.2339451e-06,</span><br class="fancyvrb" /><a
+ id="x1-126036r18"></a><span
class="cmr-6">18</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 8.7378876e-06,</span><span
class="cmtt-8"> 9.3057248e-06,</span>
<br class="fancyvrb" /><a
- id="x1-125038r19"></a><span
+ id="x1-126038r19"></a><span
class="cmr-6">19</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 9.9104632e-06,</span><span
class="cmtt-8"> 1.0554501e-05,</span><span
class="cmtt-8"> 1.1240392e-05,</span><span
-class="cmtt-8"> 1.1970856e-05,</span>
-<br class="fancyvrb" /><a
- id="x1-125040r20"></a><span
+class="cmtt-8"> 1.1970856e-05,</span><br class="fancyvrb" /><a
+ id="x1-126040r20"></a><span
class="cmr-6">20</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1.4459606e-05,</span><span
class="cmtt-8"> 1.5399272e-05,</span>
<br class="fancyvrb" /><a
- id="x1-125042r21"></a><span
+ id="x1-126042r21"></a><span
class="cmr-6">21</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1.6400004e-05,</span><span
class="cmtt-8"> 1.7465768e-05,</span><span
class="cmtt-8"> 1.8600792e-05,</span><span
-class="cmtt-8"> 1.9809576e-05,</span>
-<br class="fancyvrb" /><a
- id="x1-125044r22"></a><span
+class="cmtt-8"> 1.9809576e-05,</span><br class="fancyvrb" /><a
+ id="x1-126044r22"></a><span
class="cmr-6">22</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2.3928002e-05,</span><span
class="cmtt-8"> 2.5482978e-05,</span>
<br class="fancyvrb" /><a
- id="x1-125046r23"></a><span
+ id="x1-126046r23"></a><span
class="cmr-6">23</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2.7139006e-05,</span><span
class="cmtt-8"> 2.8902651e-05,</span><span
class="cmtt-8"> 3.0780908e-05,</span><span
-class="cmtt-8"> 3.2781225e-05,</span>
-<br class="fancyvrb" /><a
- id="x1-125048r24"></a><span
+class="cmtt-8"> 3.2781225e-05,</span><br class="fancyvrb" /><a
+ id="x1-126048r24"></a><span
class="cmr-6">24</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3.9596466e-05,</span><span
class="cmtt-8"> 4.2169667e-05,</span>
<br class="fancyvrb" /><a
- id="x1-125050r25"></a><span
+ id="x1-126050r25"></a><span
class="cmr-6">25</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 4.4910090e-05,</span><span
class="cmtt-8"> 4.7828601e-05,</span><span
class="cmtt-8"> 5.0936773e-05,</span><span
-class="cmtt-8"> 5.4246931e-05,</span>
-<br class="fancyvrb" /><a
- id="x1-125052r26"></a><span
+class="cmtt-8"> 5.4246931e-05,</span><br class="fancyvrb" /><a
+ id="x1-126052r26"></a><span
class="cmr-6">26</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 6.5524908e-05,</span><span
class="cmtt-8"> 6.9783085e-05,</span>
<br class="fancyvrb" /><a
- id="x1-125054r27"></a><span
+ id="x1-126054r27"></a><span
class="cmr-6">27</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 7.4317983e-05,</span><span
class="cmtt-8"> 7.9147585e-05,</span><span
class="cmtt-8"> 8.4291040e-05,</span><span
-class="cmtt-8"> 8.9768747e-05,</span>
-<br class="fancyvrb" /><a
- id="x1-125056r28"></a><span
+class="cmtt-8"> 8.9768747e-05,</span><br class="fancyvrb" /><a
+ id="x1-126056r28"></a><span
class="cmr-6">28</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00010843174,</span><span
class="cmtt-8"> 0.00011547824,</span>
<br class="fancyvrb" /><a
- id="x1-125058r29"></a><span
+ id="x1-126058r29"></a><span
class="cmr-6">29</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00012298267,</span><span
class="cmtt-8"> 0.00013097477,</span><span
class="cmtt-8"> 0.00013948625,</span><span
-class="cmtt-8"> 0.00014855085,</span>
-<br class="fancyvrb" /><a
- id="x1-125060r30"></a><span
+class="cmtt-8"> 0.00014855085,</span><br class="fancyvrb" /><a
+ id="x1-126060r30"></a><span
class="cmr-6">30</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00017943469,</span><span
class="cmtt-8"> 0.00019109536,</span>
<br class="fancyvrb" /><a
- id="x1-125062r31"></a><span
+ id="x1-126062r31"></a><span
class="cmr-6">31</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00020351382,</span><span
class="cmtt-8"> 0.00021673929,</span><span
class="cmtt-8"> 0.00023082423,</span><span
-class="cmtt-8"> 0.00024582449,</span>
-<br class="fancyvrb" /><a
- id="x1-125064r32"></a><span
+class="cmtt-8"> 0.00024582449,</span><br class="fancyvrb" /><a
+ id="x1-126064r32"></a><span
class="cmr-6">32</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00029693158,</span><span
class="cmtt-8"> 0.00031622787,</span>
<br class="fancyvrb" /><a
- id="x1-125066r33"></a><span
+ id="x1-126066r33"></a><span
class="cmr-6">33</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00033677814,</span><span
class="cmtt-8"> 0.00035866388,</span><span
class="cmtt-8"> 0.00038197188,</span><span
-class="cmtt-8"> 0.00040679456,</span>
-<br class="fancyvrb" /><a
- id="x1-125068r34"></a><span
+class="cmtt-8"> 0.00040679456,</span><br class="fancyvrb" /><a
+ id="x1-126068r34"></a><span
class="cmr-6">34</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00049136745,</span><span
class="cmtt-8"> 0.00052329927,</span>
<br class="fancyvrb" /><a
- id="x1-125070r35"></a><span
+ id="x1-126070r35"></a><span
class="cmr-6">35</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00055730621,</span><span
class="cmtt-8"> 0.00059352311,</span><span
class="cmtt-8"> 0.00063209358,</span><span
-class="cmtt-8"> 0.00067317058,</span>
-<br class="fancyvrb" /><a
- id="x1-125072r36"></a><span
+class="cmtt-8"> 0.00067317058,</span><br class="fancyvrb" /><a
+ id="x1-126072r36"></a><span
class="cmr-6">36</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00081312324,</span><span
class="cmtt-8"> 0.00086596457,</span>
<br class="fancyvrb" /><a
- id="x1-125074r37"></a><span
+ id="x1-126074r37"></a><span
class="cmr-6">37</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.00098217216,</span><span
class="cmtt-8"> 0.0010459992,</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.0011139742,</span>
-<br class="fancyvrb" /><a
- id="x1-125076r38"></a><span
+class="cmtt-8"> 0.0011139742,</span><br class="fancyvrb" /><a
+ id="x1-126076r38"></a><span
class="cmr-6">38</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.0014330129,</span>
<br class="fancyvrb" /><a
- id="x1-125078r39"></a><span
+ id="x1-126078r39"></a><span
class="cmr-6">39</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.0017309374,</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.0018434235,</span>
-<br class="fancyvrb" /><a
- id="x1-125080r40"></a><span
+class="cmtt-8"> 0.0018434235,</span><br class="fancyvrb" /><a
+ id="x1-126080r40"></a><span
class="cmr-6">40</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.0023713743,</span>
<br class="fancyvrb" /><a
- id="x1-125082r41"></a><span
+ id="x1-126082r41"></a><span
class="cmr-6">41</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.0028643847,</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.0030505286,</span>
-<br class="fancyvrb" /><a
- id="x1-125084r42"></a><span
+class="cmtt-8"> 0.0030505286,</span><br class="fancyvrb" /><a
+ id="x1-126084r42"></a><span
class="cmr-6">42</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.0036847358,</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.0039241906,</span>
-
-
-
<br class="fancyvrb" /><a
- id="x1-125086r43"></a><span
+ id="x1-126086r43"></a><span
class="cmr-6">43</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.0047400328,</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.0050480668,</span>
-<br class="fancyvrb" /><a
- id="x1-125088r44"></a><span
+class="cmtt-8"> 0.0050480668,</span><br class="fancyvrb" /><a
+ id="x1-126088r44"></a><span
class="cmr-6">44</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.0064938176,</span>
<br class="fancyvrb" /><a
- id="x1-125090r45"></a><span
+ id="x1-126090r45"></a><span
class="cmr-6">45</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.0078438871,</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.0083536271,</span>
-<br class="fancyvrb" /><a
- id="x1-125092r46"></a><span
+class="cmtt-8"> 0.0083536271,</span><br class="fancyvrb" /><a
+ id="x1-126092r46"></a><span
class="cmr-6">46</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.010746080,</span>
<br class="fancyvrb" /><a
- id="x1-125094r47"></a><span
+ id="x1-126094r47"></a><span
class="cmr-6">47</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.012980198,</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.013823725,</span>
-<br class="fancyvrb" /><a
- id="x1-125096r48"></a><span
+class="cmtt-8"> 0.013823725,</span><br class="fancyvrb" /><a
+ id="x1-126096r48"></a><span
class="cmr-6">48</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.017782797,</span>
<br class="fancyvrb" /><a
- id="x1-125098r49"></a><span
+ id="x1-126098r49"></a><span
class="cmr-6">49</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.021479854,</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.022875735,</span>
-<br class="fancyvrb" /><a
- id="x1-125100r50"></a><span
+class="cmtt-8"> 0.022875735,</span><br class="fancyvrb" /><a
+ id="x1-126100r50"></a><span
class="cmr-6">50</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.029427276,</span>
<br class="fancyvrb" /><a
- id="x1-125102r51"></a><span
+ id="x1-126102r51"></a><span
class="cmr-6">51</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.035545228,</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.037855157,</span>
-<br class="fancyvrb" /><a
- id="x1-125104r52"></a><span
+class="cmtt-8"> 0.037855157,</span><br class="fancyvrb" /><a
+ id="x1-126104r52"></a><span
class="cmr-6">52</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.048696758,</span>
<br class="fancyvrb" /><a
- id="x1-125106r53"></a><span
+ id="x1-126106r53"></a><span
class="cmr-6">53</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.058820850,</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.062643361,</span>
-<br class="fancyvrb" /><a
- id="x1-125108r54"></a><span
+class="cmtt-8"> 0.062643361,</span><br class="fancyvrb" /><a
+ id="x1-126108r54"></a><span
class="cmr-6">54</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.080584227,</span>
<br class="fancyvrb" /><a
- id="x1-125110r55"></a><span
+ id="x1-126110r55"></a><span
class="cmr-6">55</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.097337747,</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.10366330,</span>
-<br class="fancyvrb" /><a
- id="x1-125112r56"></a><span
+class="cmtt-8"> 0.10366330,</span><br class="fancyvrb" /><a
+ id="x1-126112r56"></a><span
class="cmr-6">56</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.13335215,</span>
<br class="fancyvrb" /><a
- id="x1-125114r57"></a><span
+ id="x1-126114r57"></a><span
class="cmr-6">57</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.17154380,</span>
-<br class="fancyvrb" /><a
- id="x1-125116r58"></a><span
+class="cmtt-8"> 0.17154380,</span><br class="fancyvrb" /><a
+ id="x1-126116r58"></a><span
class="cmr-6">58</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.22067342,</span>
<br class="fancyvrb" /><a
- id="x1-125118r59"></a><span
+ id="x1-126118r59"></a><span
class="cmr-6">59</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.28387361,</span>
-<br class="fancyvrb" /><a
- id="x1-125120r60"></a><span
+class="cmtt-8"> 0.28387361,</span><br class="fancyvrb" /><a
+ id="x1-126120r60"></a><span
class="cmr-6">60</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.36517414,</span>
<br class="fancyvrb" /><a
- id="x1-125122r61"></a><span
+ id="x1-126122r61"></a><span
class="cmr-6">61</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.46975890,</span>
-<br class="fancyvrb" /><a
- id="x1-125124r62"></a><span
+class="cmtt-8"> 0.46975890,</span><br class="fancyvrb" /><a
+ id="x1-126124r62"></a><span
class="cmr-6">62</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 0.60429640,</span>
<br class="fancyvrb" /><a
- id="x1-125126r63"></a><span
+ id="x1-126126r63"></a><span
class="cmr-6">63</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 0.77736504,</span>
-<br class="fancyvrb" /><a
- id="x1-125128r64"></a><span
+class="cmtt-8"> 0.77736504,</span><br class="fancyvrb" /><a
+ id="x1-126128r64"></a><span
class="cmr-6">64</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> 1.</span>
-</div>
+class="cmtt-8"> 1.</span></div>
<h3 class="sectionHead"><span class="titlemark">A. </span> <a
- id="x1-126000A"></a>Embedding Vorbis into an Ogg stream</h3>
+ id="x1-127000A"></a>Embedding Vorbis into an Ogg stream</h3>
<!--l. 6--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">A.1. </span> <a
- id="x1-127000A.1"></a>Overview</h4>
+ id="x1-128000A.1"></a>Overview</h4>
<!--l. 8--><p class="noindent" >This document describes using Ogg logical and physical transport streams to encapsulate Vorbis
compressed audio packet data into file form.
<!--l. 12--><p class="noindent" >The <a
-href="#x1-20001">Section 1</a>, “<a
-href="#x1-20001">Introduction and Description<!--tex4ht:ref: vorbis:spec:intro --></a>” provides an overview of the construction of
-Vorbis audio packets.
+href="#x1-20001">section 1</a>, “<a
+href="#x1-20001">Introduction and Description<!--tex4ht:ref: vorbis:spec:intro --></a>” provides an overview of the construction of Vorbis
+audio packets.
<!--l. 15--><p class="noindent" >The <a
href="oggstream.html" >Ogg bitstream overview</a> and <a
href="framing.html" >Ogg logical bitstream and framing spec</a> provide detailed
first.
<!--l. 22--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">A.1.1. </span> <a
- id="x1-128000A.1.1"></a>Restrictions</h5>
+ id="x1-129000A.1.1"></a>Restrictions</h5>
<!--l. 24--><p class="noindent" >The Ogg/Vorbis I specification currently dictates that Ogg/Vorbis streams use Ogg transport
streams in degenerate, unmultiplexed form only. That is:
<ul class="itemize1">
handling).
<!--l. 55--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">A.1.2. </span> <a
- id="x1-129000A.1.2"></a>MIME type</h5>
+ id="x1-130000A.1.2"></a>MIME type</h5>
<!--l. 57--><p class="noindent" >The MIME type of Ogg files depend on the context. Specifically, complex multimedia and
applications should use <span
class="cmtt-12">application/ogg</span>, while visual media should use <span
class="cmtt-12">audio/vorbis-config</span>.
<!--l. 65--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">A.2. </span> <a
- id="x1-130000A.2"></a>Encapsulation</h4>
+ id="x1-131000A.2"></a>Encapsulation</h4>
<!--l. 67--><p class="noindent" >Ogg encapsulation of a Vorbis packet stream is straightforward.
<ul class="itemize1">
<li class="itemize">The first Vorbis packet (the identification header), which uniquely identifies a stream
synthesis, resulting in correct positioning information without any aditional seeking
logic.
<!--l. 170--><p class="noindent" ><span class="likesubparagraphHead"><a
- id="x1-131000A.2"></a><span
+ id="x1-132000A.2"></a><span
class="cmbx-12">Note:</span></span> Failure to do so should, at worst, cause a decoder implementation to return
incorrect positioning information for seeking operations at the very beginning of the
stream.
<h3 class="sectionHead"><span class="titlemark">B. </span> <a
- id="x1-132000B"></a>Vorbis encapsulation in RTP</h3>
+ id="x1-133000B"></a>Vorbis encapsulation in RTP</h3>
<!--l. 8--><p class="noindent" >Please consult RFC 5215 <span
class="cmti-12">“RTP Payload Format for Vorbis Encoded Audio” </span>for description of
how to embed Vorbis audio in an RTP stream.
<h3 class="likesectionHead"><a
- id="x1-133000B"></a>Colophon</h3>
+ id="x1-134000B"></a>Colophon</h3>
<!--l. 6--><p class="noindent" ><img
-src="Vorbis_I_spec13x.png" alt="PIC" class="graphics"><!--tex4ht:graphics
-name="Vorbis_I_spec13x.png" src="xifish.pdf"
--->
-<!--l. 10--><p class="noindent" >Ogg is a <a
+src="fish_xiph_org.png" alt="PIC"
+>
+<!--l. 9--><p class="noindent" >Ogg is a <a
href="http://www.xiph.org/" >Xiph.Org Foundation</a> effort to protect essential tenets of Internet multimedia from
corporate hostage-taking; Open Source is the net’s greatest tool to keep everyone honest. See
<a
href="http://www.xiph.org/about.html" >About the Xiph.Org Foundation</a> for details.
-<!--l. 17--><p class="noindent" >Ogg Vorbis is the first Ogg audio CODEC. Anyone may freely use and distribute the Ogg and
+<!--l. 16--><p class="noindent" >Ogg Vorbis is the first Ogg audio CODEC. Anyone may freely use and distribute the Ogg and
Vorbis specification, whether in a private, public or corporate capacity. However, the Xiph.Org
Foundation and the Ogg project (xiph.org) reserve the right to set the Ogg Vorbis specification
and certify specification compliance.
-<!--l. 23--><p class="noindent" >Xiph.Org’s Vorbis software CODEC implementation is distributed under a BSD-like license. This
+<!--l. 22--><p class="noindent" >Xiph.Org’s Vorbis software CODEC implementation is distributed under a BSD-like license. This
does not restrict third parties from distributing independent implementations of Vorbis software
under other licenses.
-<!--l. 28--><p class="noindent" >Ogg, Vorbis, Xiph.Org Foundation and their logos are trademarks (tm) of the <a
+<!--l. 27--><p class="noindent" >Ogg, Vorbis, Xiph.Org Foundation and their logos are trademarks (tm) of the <a
href="http://www.xiph.org/" >Xiph.Org
Foundation</a>. These pages are copyright (C) 1994-2007 Xiph.Org Foundation. All rights
reserved.
-<!--l. 33--><p class="noindent" >This document is set using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span
+<!--l. 32--><p class="noindent" >This document is set using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span
class="E">E</span>X</span></span>.
<h3 class="likesectionHead"><a
- id="x1-134000B"></a>References</h3>
-<!--l. 125--><p class="noindent" >
+ id="x1-135000B"></a>References</h3>
+<!--l. 133--><p class="noindent" >
<div class="thebibliography">
<p class="bibitem" ><span class="biblabel">
[1]<span class="bibsp">   </span></span><a