Lines Matching full:class
14 <div class="maketitle">
22 <h2 class="titleHead">Vorbis I specification</h2>
23 <div class="author" ><span
24 class="cmr-17">Xiph.org Foundation</span></div>
26 <div class="date" ><span
27 class="cmr-17">February 3, 2010</span></div>
29 <h3 class="likesectionHead"><a
31 <div class="tableofcontents">
32  <span class="sectionToc" >1 <a
34 <br />  <span class="subsectionToc" >1.1 <a
36 <br />   <span class="subsubsectionToc" >1.1.1 <a
38 <br />   <span class="subsubsectionToc" >1.1.2 <a
40 <br />   <span class="subsubsectionToc" >1.1.3 <a
42 <br />   <span class="subsubsectionToc" >1.1.4 <a
44 <br />   <span class="subsubsectionToc" >1.1.5 <a
46 <br />   <span class="subsubsectionToc" >1.1.6 <a
48 <br />  <span class="subsectionToc" >1.2 <a
50 <br />   <span class="subsubsectionToc" >1.2.1 <a
52 <br />   <span class="subsubsectionToc" >1.2.2 <a
57 <br />   <span class="subsubsectionToc" >1.2.3 <a
59 <br />   <span class="subsubsectionToc" >1.2.4 <a
61 <br />   <span class="subsubsectionToc" >1.2.5 <a
63 <br />   <span class="subsubsectionToc" >1.2.6 <a
65 <br />  <span class="subsectionToc" >1.3 <a
67 <br />   <span class="subsubsectionToc" >1.3.1 <a
69 <br />   <span class="subsubsectionToc" >1.3.2 <a
71 <br /> <span class="sectionToc" >2 <a
73 <br />  <span class="subsectionToc" >2.1 <a
75 <br />   <span class="subsubsectionToc" >2.1.1 <a
77 <br />   <span class="subsubsectionToc" >2.1.2 <a
79 <br />   <span class="subsubsectionToc" >2.1.3 <a
81 <br />   <span class="subsubsectionToc" >2.1.4 <a
83 <br />   <span class="subsubsectionToc" >2.1.5 <a
85 <br />   <span class="subsubsectionToc" >2.1.6 <a
87 <br />   <span class="subsubsectionToc" >2.1.7 <a
89 <br />   <span class="subsubsectionToc" >2.1.8 <a
91 <br />   <span class="subsubsectionToc" >2.1.9 <a
93 <br /> <span class="sectionToc" >3 <a
95 <br />  <span class="subsectionToc" >3.1 <a
97 <br />   <span class="subsubsectionToc" >3.1.1 <a
99 <br />  <span class="subsectionToc" >3.2 <a
101 <br />   <span class="subsubsectionToc" >3.2.1 <a
103 <br />  <span class="subsectionToc" >3.3 <a
105 <br /> <span class="sectionToc" >4 <a
107 <br />  <span class="subsectionToc" >4.1 <a
109 <br />  <span class="subsectionToc" >4.2 <a
111 <br />   <span class="subsubsectionToc" >4.2.1 <a
113 <br />   <span class="subsubsectionToc" >4.2.2 <a
118 <br />   <span class="subsubsectionToc" >4.2.3 <a
120 <br />   <span class="subsubsectionToc" >4.2.4 <a
122 <br />  <span class="subsectionToc" >4.3 <a
124 <br />   <span class="subsubsectionToc" >4.3.1 <a
126 <br />   <span class="subsubsectionToc" >4.3.2 <a
128 <br />   <span class="subsubsectionToc" >4.3.3 <a
130 <br />   <span class="subsubsectionToc" >4.3.4 <a
132 <br />   <span class="subsubsectionToc" >4.3.5 <a
134 <br />   <span class="subsubsectionToc" >4.3.6 <a
136 <br />   <span class="subsubsectionToc" >4.3.7 <a
138 <br />   <span class="subsubsectionToc" >4.3.8 <a
140 <br />   <span class="subsubsectionToc" >4.3.9 <a
142 <br /> <span class="sectionToc" >5 <a
144 <br />  <span class="subsectionToc" >5.1 <a
146 <br />  <span class="subsectionToc" >5.2 <a
148 <br />   <span class="subsubsectionToc" >5.2.1 <a
150 <br />   <span class="subsubsectionToc" >5.2.2 <a
152 <br />   <span class="subsubsectionToc" >5.2.3 <a
154 <br /> <span class="sectionToc" >6 <a
156 <br />  <span class="subsectionToc" >6.1 <a
158 <br />  <span class="subsectionToc" >6.2 <a
160 <br />   <span class="subsubsectionToc" >6.2.1 <a
162 <br />   <span class="subsubsectionToc" >6.2.2 <a
164 <br />   <span class="subsubsectionToc" >6.2.3 <a
166 <br /> <span class="sectionToc" >7 <a
168 <br />  <span class="subsectionToc" >7.1 <a
170 <br />  <span class="subsectionToc" >7.2 <a
172 <br />   <span class="subsubsectionToc" >7.2.1 <a
174 <br />   <span class="subsubsectionToc" >7.2.2 <a
179 <br /> <span class="sectionToc" >8 <a
181 <br />  <span class="subsectionToc" >8.1 <a
183 <br />  <span class="subsectionToc" >8.2 <a
185 <br />  <span class="subsectionToc" >8.3 <a
187 <br />  <span class="subsectionToc" >8.4 <a
189 <br />  <span class="subsectionToc" >8.5 <a
191 <br />  <span class="subsectionToc" >8.6 <a
193 <br />   <span class="subsubsectionToc" >8.6.1 <a
195 <br />   <span class="subsubsectionToc" >8.6.2 <a
197 <br />   <span class="subsubsectionToc" >8.6.3 <a
199 <br />   <span class="subsubsectionToc" >8.6.4 <a
201 <br />   <span class="subsubsectionToc" >8.6.5 <a
203 <br /> <span class="sectionToc" >9 <a
205 <br />  <span class="subsectionToc" >9.1 <a
207 <br />  <span class="subsectionToc" >9.2 <a
209 <br />   <span class="subsubsectionToc" >9.2.1 <a
211 <br />   <span class="subsubsectionToc" >9.2.2 <a
213 <br />   <span class="subsubsectionToc" >9.2.3 <a
215 <br />   <span class="subsubsectionToc" >9.2.4 <a
217 <br />   <span class="subsubsectionToc" >9.2.5 <a
219 <br />   <span class="subsubsectionToc" >9.2.6 <a
221 <br />   <span class="subsubsectionToc" >9.2.7 <a
223 <br /> <span class="sectionToc" >10 <a
225 <br />  <span class="subsectionToc" >10.1 <a
227 <br /> <span class="sectionToc" >A <a
229 <br />  <span class="subsectionToc" >A.1 <a
231 <br />   <span class="subsubsectionToc" >A.1.1 <a
233 <br />   <span class="subsubsectionToc" >A.1.2 <a
235 <br />  <span class="subsectionToc" >A.2 <a
240 <br /> <span class="sectionToc" >B <a
246 <h3 class="sectionHead"><span class="titlemark">1 </span> <a
248 <!--l. 6--><p class="noindent" >
249 <h4 class="subsectionHead"><span class="titlemark">1.1 </span> <a
251 <!--l. 8--><p class="noindent" >This document provides a high level description of the Vorbis codec…
257 <!--l. 15--><p class="noindent" >
258 <h5 class="subsubsectionHead"><span class="titlemark">1.1.1 </span> <a
260 <!--l. 16--><p class="noindent" >Vorbis is a general purpose perceptual audio CODEC intended to all…
268 <!--l. 29--><p class="noindent" >
269 <h5 class="subsubsectionHead"><span class="titlemark">1.1.2 </span> <a
271 <!--l. 30--><p class="noindent" >Vorbis I is a forward-adaptive monolithic transform CODEC based on…
278 <!--l. 37--><p class="noindent" >
279 <h5 class="subsubsectionHead"><span class="titlemark">1.1.3 </span> <a
281 <!--l. 39--><p class="noindent" >The Vorbis CODEC design assumes a complex, psychoacoustically-awar…
288 <!--l. 50--><p class="noindent" >Vorbis provides none of its own framing, synchronization or protec…
299 <!--l. 64--><p class="noindent" >Vorbis packets are thus intended to be used with a transport mecha…
305 <!--l. 72--><p class="noindent" >The specification for embedding Vorbis into an Ogg transport strea…
309 <!--l. 77--><p class="noindent" >
310 <h5 class="subsubsectionHead"><span class="titlemark">1.1.4 </span> <a
312 <!--l. 79--><p class="noindent" >Vorbis’ heritage is as a research CODEC and its current desi…
319 <!--l. 85--><p class="noindent" >The single most controversial design decision in Vorbis (and the m…
326 <!--l. 95--><p class="noindent" ><span class="likesubparagraphHead"><a
328 class="cmbx-12">Note:</span></span> Vorbis <span
329 class="cmti-12">can </span>initiate decode at any arbitrary packet within a bitstream so long as th…
331 <!--l. 101--><p class="noindent" >Thus, Vorbis headers are both required for decode to begin and re…
334 <!--l. 106--><p class="noindent" >Our own design work indicates the primary liability of the requir…
339 <!--l. 115--><p class="noindent" >
340 <h5 class="subsubsectionHead"><span class="titlemark">1.1.5 </span> <a
342 <!--l. 116--><p class="noindent" >The Vorbis format is well-defined by its decode specification; an…
347 <!--l. 123--><p class="noindent" >
348 <h5 class="subsubsectionHead"><span class="titlemark">1.1.6 </span> <a
353 <!--l. 124--><p class="noindent" >Although Vorbis decode is computationally simple, it may still ru…
357 <!--l. 131--><p class="noindent" >
358 <h4 class="subsectionHead"><span class="titlemark">1.2 </span> <a
360 <!--l. 133--><p class="noindent" >Decoder setup consists of configuration of multiple, self-contain…
365 <div class="center"
367 <!--l. 141--><p class="noindent" >
369 <!--l. 142--><p class="noindent" ><img
372 <br /> <div class="caption"
373 ><span class="id">Figure 1: </span><span
374 class="content">decoder pipeline configuration</span></div><!--tex4ht:label?: x1-110011 -->
376 <!--l. 146--><p class="noindent" >
377 <h5 class="subsubsectionHead"><span class="titlemark">1.2.1 </span> <a
379 <!--l. 147--><p class="noindent" >Global codec configuration consists of a few audio related fields…
382 <!--l. 152--><p class="noindent" >
383 <h5 class="subsubsectionHead"><span class="titlemark">1.2.2 </span> <a
388 <!--l. 154--><p class="noindent" >Each Vorbis frame is coded according to a master ’mode̵…
390 <!--l. 157--><p class="noindent" >The mode mechanism is used to encode a frame according to one of …
395 <!--l. 164--><p class="noindent" >A ’mode’ configuration consists of a frame size setti…
399 <!--l. 171--><p class="noindent" >
400 <h5 class="subsubsectionHead"><span class="titlemark">1.2.3 </span> <a
402 <!--l. 173--><p class="noindent" >A mapping contains a channel coupling description and a list of &…
406 <!--l. 178--><p class="noindent" >A ’submap’ is a configuration/grouping that applies t…
412 <!--l. 186--><p class="noindent" >As an example:
413 <!--l. 188--><p class="noindent" >Assume a Vorbis stream that contains six channels in the standard…
423 <!--l. 199--><p class="noindent" >
424 <h5 class="subsubsectionHead"><span class="titlemark">1.2.4 </span> <a
426 <!--l. 201--><p class="noindent" >Vorbis encodes a spectral ’floor’ vector for each PCM…
430 <!--l. 208--><p class="noindent" >A floor encoding may be of two types. Floor 0 uses a packed LSP r…
437 <!--l. 218--><p class="noindent" >Floor 0 is not to be considered deprecated, but it is of limited …
439 <!--l. 222--><p class="noindent" >The values coded/decoded by a floor are both compactly formatted …
444 <!--l. 230--><p class="noindent" >
445 <h5 class="subsubsectionHead"><span class="titlemark">1.2.5 </span> <a
447 <!--l. 231--><p class="noindent" >The spectral residue is the fine structure of the audio spectrum …
454 <!--l. 241--><p class="noindent" >
458 <h5 class="subsubsectionHead"><span class="titlemark">1.2.6 </span> <a
460 <!--l. 243--><p class="noindent" >Codebooks are a self-contained abstraction that perform entropy d…
463 <!--l. 248--><p class="noindent" >The entropy coding in a Vorbis I codebook is provided by a standa…
466 <!--l. 253--><p class="noindent" >The codebook vector index is similarly packed according to index …
469 <!--l. 260--><p class="noindent" >
470 <h4 class="subsectionHead"><span class="titlemark">1.3 </span> <a
472 <!--l. 262--><p class="noindent" >
473 <h5 class="subsubsectionHead"><span class="titlemark">1.3.1 </span> <a
475 <!--l. 264--><p class="noindent" >Before decoding can begin, a decoder must initialize using the bi…
480 <!--l. 271--><p class="noindent" >The header packets are, in order, the identification header, the …
482 <!--l. 274--><p class="noindent" ><span class="paragraphHead"><a
484 class="cmbx-12">Identification Header</span></span>
490 <!--l. 279--><p class="noindent" ><span class="paragraphHead"><a
492 class="cmbx-12">Comment Header</span></span>
498 <!--l. 284--><p class="noindent" ><span class="paragraphHead"><a
500 class="cmbx-12">Setup Header</span></span>
503 <!--l. 289--><p class="noindent" >
504 <h5 class="subsubsectionHead"><span class="titlemark">1.3.2 </span> <a
506 <!--l. 291--><p class="noindent" >The decoding and synthesis procedure for all audio packets is fun…
507 <ol class="enumerate1" >
509 class="enumerate" id="x1-23002x1">decode packet type flag
512 class="enumerate" id="x1-23004x2">decode mode number
515 class="enumerate" id="x1-23006x3">decode window shape (long windows only)
518 class="enumerate" id="x1-23008x4">decode floor
521 class="enumerate" id="x1-23010x5">decode residue into residue vectors
524 class="enumerate" id="x1-23012x6">inverse channel coupling of residue vectors
527 class="enumerate" id="x1-23014x7">generate floor curve from decoded floor data
530 …class="enumerate" id="x1-23016x8">compute dot product of floor and residue, producing audio spectr…
533 …class="enumerate" id="x1-23018x9">inverse monolithic transform of audio spectrum vector, always an…
540 …class="enumerate" id="x1-23020x10">overlap/add left-hand output of transform with right-hand outpu…
543 …class="enumerate" id="x1-23022x11">store right hand-data from transform of current frame for futur…
546 …class="enumerate" id="x1-23024x12">if not first frame, return results of overlap/add as audio resu…
547 <!--l. 308--><p class="noindent" >Note that clever rearrangement of the synthesis arithmetic is pos…
552 class="cmti-12">entirely mathematically equivalent </span>to the
554 <!--l. 317--><p class="noindent" ><span class="paragraphHead"><a
556 class="cmbx-12">Packet type decode</span></span>
560 <!--l. 324--><p class="noindent" >Following the three header packets, all packets in a Vorbis I str…
562 class="cmti-12">a non-audio packet when audio is</span>
564 class="cmti-12">expected indicates stream corruption or a non-compliant stream. The decoder must ig…
566 class="cmti-12">packet and not attempt decoding it to audio</span>.
567 <!--l. 334--><p class="noindent" ><span class="paragraphHead"><a
569 class="cmbx-12">Mode decode</span></span>
573 <!--l. 341--><p class="noindent" ><span class="paragraphHead"><a
575 class="cmbx-12">Window shape decode (long windows only)</span></span>
583 <!--l. 348--><p class="noindent" >Vorbis uses an overlapping transform, namely the MDCT, to blend o…
587 <!--l. 354--><p class="noindent" >This is easy to visualize in the case of equal sized-windows:
588 <div class="center"
590 <!--l. 356--><p class="noindent" >
592 <!--l. 357--><p class="noindent" ><img
595 <br /> <div class="caption"
596 ><span class="id">Figure 2: </span><span
597 class="content">overlap of two equal-sized windows</span></div><!--tex4ht:label?: x1-260012 -->
599 <!--l. 361--><p class="noindent" >And slightly more complex in the case of overlapping unequal size…
600 <div class="center"
602 <!--l. 364--><p class="noindent" >
604 <!--l. 365--><p class="noindent" ><img
607 <br /> <div class="caption"
608 ><span class="id">Figure 3: </span><span
609 class="content">overlap of a long and a short window</span></div><!--tex4ht:label?: x1-260023 -->
611 <!--l. 369--><p class="noindent" >In the unequal-sized window case, the window shape of the long wi…
620 <!--l. 382--><p class="noindent" >A description of valid window functions for use with an inverse M…
623 <center class="math-display" >
629 " class="math-display" ></center>
630 <!--l. 385--><p class="nopar" >
631 <!--l. 389--><p class="noindent" ><span class="paragraphHead"><a
633 class="cmbx-12">floor decode</span></span>
637 <!--l. 395--><p class="noindent" ><span class="paragraphHead"><a
639 class="cmbx-12">residue decode</span></span>
645 <!--l. 404--><p class="noindent" >Vorbis codes residue vectors in groups by submap; the coding is d…
648 <!--l. 411--><p class="noindent" ><span class="paragraphHead"><a
650 class="cmbx-12">inverse channel coupling</span></span>
656 <!--l. 419--><p class="noindent" >Vorbis coupling applies to pairs of residue vectors at a time; de…
661 <!--l. 426--><p class="noindent" >After decoupling, in order, each pair of vectors on the coupling …
666 <!--l. 432--><p class="noindent" ><span class="paragraphHead"><a
668 class="cmbx-12">generate floor curve</span></span>
674 <!--l. 441--><p class="noindent" >Both floor 0 and floor 1 generate a linear-range, linear-domain o…
676 <!--l. 447--><p class="noindent" ><span class="paragraphHead"><a
678 class="cmbx-12">compute floor/residue dot product</span></span>
682 <!--l. 455--><p class="noindent" >One point is worth mentioning about this dot product; a common mi…
687 <!--l. 462--><p class="noindent" >However, floor vector values can span <span
688 class="cmsy-10x-x-120">∼</span>140dB (<span
689 class="cmsy-10x-x-120">∼</span>24 bits unsigned), and the audio spectrum
691 class="cmsy-10x-x-120">∼</span>21 bits with sign), even when output is to a 16
694 class="cmsy-10x-x-120">−</span>140dB, it must be able to span 0 to +140dB. For the residue ve…
696 class="cmsy-10x-x-120">−</span>140dB to +0dB.
698 class="cmsy-10x-x-120">−</span>140dB to
704 <!--l. 479--><p class="noindent" ><span class="paragraphHead"><a
706 class="cmbx-12">inverse monolithic transform (MDCT)</span></span>
709 <span class="cite">[<a
711 <!--l. 485--><p class="noindent" >Note that the PCM produced directly from the MDCT is not yet fini…
717 <!--l. 492--><p class="noindent" ><span class="paragraphHead"><a
719 class="cmbx-12">overlap/add data</span></span>
725 <!--l. 501--><p class="noindent" ><span class="paragraphHead"><a
727 class="cmbx-12">cache right hand data</span></span>
730 <!--l. 507--><p class="noindent" ><span class="paragraphHead"><a
732 class="cmbx-12">return finished audio data</span></span>
741 <!--l. 519--><p class="noindent" >
742 <div class="fancyvrb" id="fancyvrb1">
745 class="cmr-6">1</span><span
746 class="cmtt-8"> </span><span
747 class="cmtt-8"> window_blocksize(previous_window)/4+window_blocksize(current_window)/4</span>
749 <!--l. 523--><p class="noindent" >from the center of the previous window to the center of the curre…
750 <!--l. 526--><p class="noindent" >Data is not returned from the first frame; it must be used to …
759 <h3 class="sectionHead"><span class="titlemark">2 </span> <a
761 <!--l. 6--><p class="noindent" >
762 <h4 class="subsectionHead"><span class="titlemark">2.1 </span> <a
764 <!--l. 8--><p class="noindent" >The Vorbis codec uses relatively unstructured raw packets containin…
771 <!--l. 19--><p class="noindent" >
772 <h5 class="subsubsectionHead"><span class="titlemark">2.1.1 </span> <a
774 <!--l. 21--><p class="noindent" >In most contemporary architectures, a ’byte’ is synony…
782 <!--l. 32--><p class="noindent" >The most ubiquitous architectures today consider a ’byteR…
787 <!--l. 39--><p class="noindent" >
791 <h5 class="subsubsectionHead"><span class="titlemark">2.1.2 </span> <a
793 <!--l. 41--><p class="noindent" >A byte has a well-defined ’least significant’ bit (LSb…
796 class="cmmi-12">n </span>(<span
797 class="cmmi-12">n </span>= 7 in an
799 <!--l. 50--><p class="noindent" >
800 <h5 class="subsubsectionHead"><span class="titlemark">2.1.3 </span> <a
802 <!--l. 52--><p class="noindent" >Words are native groupings of multiple bytes. Several byte orderin…
807 <!--l. 59--><p class="noindent" >The Vorbis bitpacking convention specifies storage and bitstream m…
812 class="cmmi-12">n</span>.
813 <!--l. 68--><p class="noindent" >
814 <h5 class="subsubsectionHead"><span class="titlemark">2.1.4 </span> <a
816 <!--l. 70--><p class="noindent" >The Vorbis codec has need to code arbitrary bit-width integers, fr…
820 <!--l. 75--><p class="noindent" >The encoder logically packs integers by writing the LSb of a binar…
833 <!--l. 90--><p class="noindent" >
834 <h5 class="subsubsectionHead"><span class="titlemark">2.1.5 </span> <a
836 <!--l. 92--><p class="noindent" >The signedness of a specific number resulting from decode is to be…
841 <!--l. 101--><p class="noindent" >
842 <h5 class="subsubsectionHead"><span class="titlemark">2.1.6 </span> <a
844 <!--l. 103--><p class="noindent" >Code the 4 bit integer value ’12’ [b1100] into an emp…
845 <!--l. 106--><p class="noindent" >
846 <div class="fancyvrb" id="fancyvrb2">
849 class="cmr-6">1</span><span
850 class="cmtt-8"> </span><span
851 class="cmtt-8"> </span><span
852 class="cmtt-8"> </span><span
853 class="cmtt-8"> </span><span
854 class="cmtt-8"> </span><span
855 class="cmtt-8"> </span><span
856 class="cmtt-8"> </span><span
857 class="cmtt-8"> </span><span
858 class="cmtt-8"> </span><span
859 class="cmtt-8"> </span><span
860 class="cmtt-8"> </span><span
861 class="cmtt-8"> </span><span
862 class="cmtt-8"> </span><span
863 class="cmtt-8"> </span><span
864 class="cmtt-8"> </span><span
865 class="cmtt-8"> |</span>
866 <br class="fancyvrb" /><a
868 class="cmr-6">2</span><span
869 class="cmtt-8"> </span><span
870 class="cmtt-8"> </span><span
871 class="cmtt-8"> </span><span
872 class="cmtt-8"> </span><span
873 class="cmtt-8"> </span><span
874 class="cmtt-8"> </span><span
875 class="cmtt-8"> </span><span
876 class="cmtt-8"> </span><span
877 class="cmtt-8"> </span><span
878 class="cmtt-8"> </span><span
879 class="cmtt-8"> </span><span
880 class="cmtt-8"> </span><span
881 class="cmtt-8"> </span><span
882 class="cmtt-8"> </span><span
883 class="cmtt-8"> </span><span
884 class="cmtt-8"> V</span>
885 <br class="fancyvrb" /><a
887 class="cmr-6">3</span><span
888 class="cmtt-8"> </span><span
889 class="cmtt-8"> </span>
890 <br class="fancyvrb" /><a
892 class="cmr-6">4</span><span
893 class="cmtt-8"> </span><span
894 class="cmtt-8"> </span><span
895 class="cmtt-8"> </span><span
896 class="cmtt-8"> </span><span
897 class="cmtt-8"> </span><span
898 class="cmtt-8"> </span><span
899 class="cmtt-8"> </span><span
900 class="cmtt-8"> </span><span
901 class="cmtt-8"> </span><span
902 class="cmtt-8"> 7</span><span
903 class="cmtt-8"> 6</span><span
904 class="cmtt-8"> 5</span><span
905 class="cmtt-8"> 4</span><span
906 class="cmtt-8"> 3</span><span
907 class="cmtt-8"> 2</span><span
908 class="cmtt-8"> 1</span><span
909 class="cmtt-8"> 0</span>
910 <br class="fancyvrb" /><a
912 class="cmr-6">5</span><span
913 class="cmtt-8"> </span><span
914 class="cmtt-8"> byte</span><span
915 class="cmtt-8"> 0</span><span
916 class="cmtt-8"> [0</span><span
917 class="cmtt-8"> 0</span><span
918 class="cmtt-8"> 0</span><span
919 class="cmtt-8"> 0</span><span
920 class="cmtt-8"> 1</span><span
921 class="cmtt-8"> 1</span><span
922 class="cmtt-8"> 0</span><span
923 class="cmtt-8"> 0]</span><span
924 class="cmtt-8"> </span><span
925 class="cmtt-8"> <-</span>
926 <br class="fancyvrb" /><a
928 class="cmr-6">6</span><span
929 class="cmtt-8"> </span><span
930 class="cmtt-8"> byte</span><span
931 class="cmtt-8"> 1</span><span
932 class="cmtt-8"> [</span><span
933 class="cmtt-8"> </span><span
934 class="cmtt-8"> </span><span
935 class="cmtt-8"> </span><span
936 class="cmtt-8"> </span><span
937 class="cmtt-8"> </span><span
938 class="cmtt-8"> </span><span
939 class="cmtt-8"> </span><span
940 class="cmtt-8"> </span><span
941 class="cmtt-8"> </span><span
942 class="cmtt-8"> </span><span
943 class="cmtt-8"> </span><span
944 class="cmtt-8"> </span><span
945 class="cmtt-8"> </span><span
946 class="cmtt-8"> </span><span
947 class="cmtt-8"> ]</span>
948 <br class="fancyvrb" /><a
950 class="cmr-6">7</span><span
951 class="cmtt-8"> </span><span
952 class="cmtt-8"> byte</span><span
953 class="cmtt-8"> 2</span><span
954 class="cmtt-8"> [</span><span
955 class="cmtt-8"> </span><span
956 class="cmtt-8"> </span><span
957 class="cmtt-8"> </span><span
958 class="cmtt-8"> </span><span
959 class="cmtt-8"> </span><span
960 class="cmtt-8"> </span><span
961 class="cmtt-8"> </span><span
962 class="cmtt-8"> </span><span
963 class="cmtt-8"> </span><span
964 class="cmtt-8"> </span><span
965 class="cmtt-8"> </span><span
966 class="cmtt-8"> </span><span
967 class="cmtt-8"> </span><span
968 class="cmtt-8"> </span><span
969 class="cmtt-8"> ]</span>
970 <br class="fancyvrb" /><a
972 class="cmr-6">8</span><span
973 class="cmtt-8"> </span><span
974 class="cmtt-8"> byte</span><span
975 class="cmtt-8"> 3</span><span
976 class="cmtt-8"> [</span><span
977 class="cmtt-8"> </span><span
978 class="cmtt-8"> </span><span
979 class="cmtt-8"> </span><span
980 class="cmtt-8"> </span><span
981 class="cmtt-8"> </span><span
982 class="cmtt-8"> </span><span
983 class="cmtt-8"> </span><span
984 class="cmtt-8"> </span><span
985 class="cmtt-8"> </span><span
986 class="cmtt-8"> </span><span
987 class="cmtt-8"> </span><span
988 class="cmtt-8"> </span><span
989 class="cmtt-8"> </span><span
990 class="cmtt-8"> </span><span
991 class="cmtt-8"> ]</span>
992 <br class="fancyvrb" /><a
994 class="cmr-6">9</span><span
995 class="cmtt-8"> </span><span
996 class="cmtt-8"> </span><span
997 class="cmtt-8"> </span><span
998 class="cmtt-8"> </span><span
999 class="cmtt-8"> </span><span
1000 class="cmtt-8"> </span><span
1001 class="cmtt-8"> </span><span
1002 class="cmtt-8"> </span><span
1003 class="cmtt-8"> </span><span
1004 class="cmtt-8"> </span><span
1005 class="cmtt-8"> </span><span
1006 class="cmtt-8"> </span><span
1007 class="cmtt-8"> </span><span
1008 class="cmtt-8"> </span><span
1009 class="cmtt-8"> ...</span>
1010 <br class="fancyvrb" /><a
1012 class="cmr-6">10</span><span
1013 class="cmtt-8"> </span><span
1014 class="cmtt-8"> byte</span><span
1015 class="cmtt-8"> n</span><span
1016 class="cmtt-8"> [</span><span
1017 class="cmtt-8"> </span><span
1018 class="cmtt-8"> </span><span
1019 class="cmtt-8"> </span><span
1020 class="cmtt-8"> </span><span
1021 class="cmtt-8"> </span><span
1022 class="cmtt-8"> </span><span
1023 class="cmtt-8"> </span><span
1024 class="cmtt-8"> </span><span
1025 class="cmtt-8"> </span><span
1026 class="cmtt-8"> </span><span
1027 class="cmtt-8"> </span><span
1028 class="cmtt-8"> </span><span
1029 class="cmtt-8"> </span><span
1030 class="cmtt-8"> </span><span
1031 class="cmtt-8"> ]</span><span
1032 class="cmtt-8"> </span><span
1033 class="cmtt-8"> bytestream</span><span
1034 class="cmtt-8"> length</span><span
1035 class="cmtt-8"> ==</span><span
1036 class="cmtt-8"> 1</span><span
1037 class="cmtt-8"> byte</span>
1038 <br class="fancyvrb" /><a
1040 class="cmr-6">11</span><span
1041 class="cmtt-8"> </span><span
1042 class="cmtt-8"> </span>
1044 <!--l. 121--><p class="noindent" >Continue by coding the 3 bit integer value ’-1’ [b111…
1045 <!--l. 123--><p class="noindent" >
1046 <div class="fancyvrb" id="fancyvrb3">
1049 class="cmr-6">1</span><span
1050 class="cmtt-8"> </span><span
1051 class="cmtt-8"> </span><span
1052 class="cmtt-8"> </span><span
1053 class="cmtt-8"> </span><span
1054 class="cmtt-8"> </span><span
1055 class="cmtt-8"> </span><span
1056 class="cmtt-8"> </span><span
1057 class="cmtt-8"> </span><span
1058 class="cmtt-8"> </span><span
1059 class="cmtt-8"> |</span>
1060 <br class="fancyvrb" /><a
1062 class="cmr-6">2</span><span
1063 class="cmtt-8"> </span><span
1064 class="cmtt-8"> </span><span
1065 class="cmtt-8"> </span><span
1066 class="cmtt-8"> </span><span
1067 class="cmtt-8"> </span><span
1068 class="cmtt-8"> </span><span
1069 class="cmtt-8"> </span><span
1070 class="cmtt-8"> </span><span
1071 class="cmtt-8"> </span><span
1072 class="cmtt-8"> V</span>
1073 <br class="fancyvrb" /><a
1075 class="cmr-6">3</span><span
1076 class="cmtt-8"> </span><span
1077 class="cmtt-8"> </span>
1078 <br class="fancyvrb" /><a
1080 class="cmr-6">4</span><span
1081 class="cmtt-8"> </span><span
1082 class="cmtt-8"> </span><span
1083 class="cmtt-8"> </span><span
1084 class="cmtt-8"> </span><span
1085 class="cmtt-8"> </span><span
1086 class="cmtt-8"> </span><span
1087 class="cmtt-8"> </span><span
1088 class="cmtt-8"> </span><span
1089 class="cmtt-8"> </span><span
1090 class="cmtt-8"> 7</span><span
1091 class="cmtt-8"> 6</span><span
1092 class="cmtt-8"> 5</span><span
1093 class="cmtt-8"> 4</span><span
1094 class="cmtt-8"> 3</span><span
1095 class="cmtt-8"> 2</span><span
1096 class="cmtt-8"> 1</span><span
1097 class="cmtt-8"> 0</span>
1098 <br class="fancyvrb" /><a
1100 class="cmr-6">5</span><span
1101 class="cmtt-8"> </span><span
1102 class="cmtt-8"> byte</span><span
1103 class="cmtt-8"> 0</span><span
1104 class="cmtt-8"> [0</span><span
1105 class="cmtt-8"> 1</span><span
1106 class="cmtt-8"> 1</span><span
1107 class="cmtt-8"> 1</span><span
1108 class="cmtt-8"> 1</span><span
1109 class="cmtt-8"> 1</span><span
1110 class="cmtt-8"> 0</span><span
1111 class="cmtt-8"> 0]</span><span
1112 class="cmtt-8"> </span><span
1113 class="cmtt-8"> <-</span>
1114 <br class="fancyvrb" /><a
1116 class="cmr-6">6</span><span
1117 class="cmtt-8"> </span><span
1118 class="cmtt-8"> byte</span><span
1119 class="cmtt-8"> 1</span><span
1120 class="cmtt-8"> [</span><span
1121 class="cmtt-8"> </span><span
1122 class="cmtt-8"> </span><span
1123 class="cmtt-8"> </span><span
1124 class="cmtt-8"> </span><span
1125 class="cmtt-8"> </span><span
1126 class="cmtt-8"> </span><span
1127 class="cmtt-8"> </span><span
1128 class="cmtt-8"> </span><span
1129 class="cmtt-8"> </span><span
1130 class="cmtt-8"> </span><span
1131 class="cmtt-8"> </span><span
1132 class="cmtt-8"> </span><span
1133 class="cmtt-8"> </span><span
1134 class="cmtt-8"> </span><span
1135 class="cmtt-8"> ]</span>
1139 <br class="fancyvrb" /><a
1141 class="cmr-6">7</span><span
1142 class="cmtt-8"> </span><span
1143 class="cmtt-8"> byte</span><span
1144 class="cmtt-8"> 2</span><span
1145 class="cmtt-8"> [</span><span
1146 class="cmtt-8"> </span><span
1147 class="cmtt-8"> </span><span
1148 class="cmtt-8"> </span><span
1149 class="cmtt-8"> </span><span
1150 class="cmtt-8"> </span><span
1151 class="cmtt-8"> </span><span
1152 class="cmtt-8"> </span><span
1153 class="cmtt-8"> </span><span
1154 class="cmtt-8"> </span><span
1155 class="cmtt-8"> </span><span
1156 class="cmtt-8"> </span><span
1157 class="cmtt-8"> </span><span
1158 class="cmtt-8"> </span><span
1159 class="cmtt-8"> </span><span
1160 class="cmtt-8"> ]</span>
1161 <br class="fancyvrb" /><a
1163 class="cmr-6">8</span><span
1164 class="cmtt-8"> </span><span
1165 class="cmtt-8"> byte</span><span
1166 class="cmtt-8"> 3</span><span
1167 class="cmtt-8"> [</span><span
1168 class="cmtt-8"> </span><span
1169 class="cmtt-8"> </span><span
1170 class="cmtt-8"> </span><span
1171 class="cmtt-8"> </span><span
1172 class="cmtt-8"> </span><span
1173 class="cmtt-8"> </span><span
1174 class="cmtt-8"> </span><span
1175 class="cmtt-8"> </span><span
1176 class="cmtt-8"> </span><span
1177 class="cmtt-8"> </span><span
1178 class="cmtt-8"> </span><span
1179 class="cmtt-8"> </span><span
1180 class="cmtt-8"> </span><span
1181 class="cmtt-8"> </span><span
1182 class="cmtt-8"> ]</span>
1183 <br class="fancyvrb" /><a
1185 class="cmr-6">9</span><span
1186 class="cmtt-8"> </span><span
1187 class="cmtt-8"> </span><span
1188 class="cmtt-8"> </span><span
1189 class="cmtt-8"> </span><span
1190 class="cmtt-8"> </span><span
1191 class="cmtt-8"> </span><span
1192 class="cmtt-8"> </span><span
1193 class="cmtt-8"> </span><span
1194 class="cmtt-8"> </span><span
1195 class="cmtt-8"> </span><span
1196 class="cmtt-8"> </span><span
1197 class="cmtt-8"> </span><span
1198 class="cmtt-8"> </span><span
1199 class="cmtt-8"> </span><span
1200 class="cmtt-8"> ...</span>
1201 <br class="fancyvrb" /><a
1203 class="cmr-6">10</span><span
1204 class="cmtt-8"> </span><span
1205 class="cmtt-8"> byte</span><span
1206 class="cmtt-8"> n</span><span
1207 class="cmtt-8"> [</span><span
1208 class="cmtt-8"> </span><span
1209 class="cmtt-8"> </span><span
1210 class="cmtt-8"> </span><span
1211 class="cmtt-8"> </span><span
1212 class="cmtt-8"> </span><span
1213 class="cmtt-8"> </span><span
1214 class="cmtt-8"> </span><span
1215 class="cmtt-8"> </span><span
1216 class="cmtt-8"> </span><span
1217 class="cmtt-8"> </span><span
1218 class="cmtt-8"> </span><span
1219 class="cmtt-8"> </span><span
1220 class="cmtt-8"> </span><span
1221 class="cmtt-8"> </span><span
1222 class="cmtt-8"> ]</span><span
1223 class="cmtt-8"> </span><span
1224 class="cmtt-8"> bytestream</span><span
1225 class="cmtt-8"> length</span><span
1226 class="cmtt-8"> ==</span><span
1227 class="cmtt-8"> 1</span><span
1228 class="cmtt-8"> byte</span>
1230 <!--l. 137--><p class="noindent" >Continue by coding the 7 bit integer value ’17’ [b001…
1231 <!--l. 139--><p class="noindent" >
1232 <div class="fancyvrb" id="fancyvrb4">
1235 class="cmr-6">1</span><span
1236 class="cmtt-8"> </span><span
1237 class="cmtt-8"> </span><span
1238 class="cmtt-8"> </span><span
1239 class="cmtt-8"> </span><span
1240 class="cmtt-8"> </span><span
1241 class="cmtt-8"> </span><span
1242 class="cmtt-8"> </span><span
1243 class="cmtt-8"> </span><span
1244 class="cmtt-8"> </span><span
1245 class="cmtt-8"> </span><span
1246 class="cmtt-8"> </span><span
1247 class="cmtt-8"> |</span>
1248 <br class="fancyvrb" /><a
1250 class="cmr-6">2</span><span
1251 class="cmtt-8"> </span><span
1252 class="cmtt-8"> </span><span
1253 class="cmtt-8"> </span><span
1254 class="cmtt-8"> </span><span
1255 class="cmtt-8"> </span><span
1256 class="cmtt-8"> </span><span
1257 class="cmtt-8"> </span><span
1258 class="cmtt-8"> </span><span
1259 class="cmtt-8"> </span><span
1260 class="cmtt-8"> </span><span
1261 class="cmtt-8"> </span><span
1262 class="cmtt-8"> V</span>
1263 <br class="fancyvrb" /><a
1265 class="cmr-6">3</span><span
1266 class="cmtt-8"> </span><span
1267 class="cmtt-8"> </span>
1268 <br class="fancyvrb" /><a
1270 class="cmr-6">4</span><span
1271 class="cmtt-8"> </span><span
1272 class="cmtt-8"> </span><span
1273 class="cmtt-8"> </span><span
1274 class="cmtt-8"> </span><span
1275 class="cmtt-8"> </span><span
1276 class="cmtt-8"> </span><span
1277 class="cmtt-8"> </span><span
1278 class="cmtt-8"> </span><span
1279 class="cmtt-8"> </span><span
1280 class="cmtt-8"> 7</span><span
1281 class="cmtt-8"> 6</span><span
1282 class="cmtt-8"> 5</span><span
1283 class="cmtt-8"> 4</span><span
1284 class="cmtt-8"> 3</span><span
1285 class="cmtt-8"> 2</span><span
1286 class="cmtt-8"> 1</span><span
1287 class="cmtt-8"> 0</span>
1288 <br class="fancyvrb" /><a
1290 class="cmr-6">5</span><span
1291 class="cmtt-8"> </span><span
1292 class="cmtt-8"> byte</span><span
1293 class="cmtt-8"> 0</span><span
1294 class="cmtt-8"> [1</span><span
1295 class="cmtt-8"> 1</span><span
1296 class="cmtt-8"> 1</span><span
1297 class="cmtt-8"> 1</span><span
1298 class="cmtt-8"> 1</span><span
1299 class="cmtt-8"> 1</span><span
1300 class="cmtt-8"> 0</span><span
1301 class="cmtt-8"> 0]</span>
1302 <br class="fancyvrb" /><a
1304 class="cmr-6">6</span><span
1305 class="cmtt-8"> </span><span
1306 class="cmtt-8"> byte</span><span
1307 class="cmtt-8"> 1</span><span
1308 class="cmtt-8"> [0</span><span
1309 class="cmtt-8"> 0</span><span
1310 class="cmtt-8"> 0</span><span
1311 class="cmtt-8"> 0</span><span
1312 class="cmtt-8"> 1</span><span
1313 class="cmtt-8"> 0</span><span
1314 class="cmtt-8"> 0</span><span
1315 class="cmtt-8"> 0]</span><span
1316 class="cmtt-8"> </span><span
1317 class="cmtt-8"> <-</span>
1318 <br class="fancyvrb" /><a
1320 class="cmr-6">7</span><span
1321 class="cmtt-8"> </span><span
1322 class="cmtt-8"> byte</span><span
1323 class="cmtt-8"> 2</span><span
1324 class="cmtt-8"> [</span><span
1325 class="cmtt-8"> </span><span
1326 class="cmtt-8"> </span><span
1327 class="cmtt-8"> </span><span
1328 class="cmtt-8"> </span><span
1329 class="cmtt-8"> </span><span
1330 class="cmtt-8"> </span><span
1331 class="cmtt-8"> </span><span
1332 class="cmtt-8"> </span><span
1333 class="cmtt-8"> </span><span
1334 class="cmtt-8"> </span><span
1335 class="cmtt-8"> </span><span
1336 class="cmtt-8"> </span><span
1337 class="cmtt-8"> </span><span
1338 class="cmtt-8"> </span><span
1339 class="cmtt-8"> ]</span>
1340 <br class="fancyvrb" /><a
1342 class="cmr-6">8</span><span
1343 class="cmtt-8"> </span><span
1344 class="cmtt-8"> byte</span><span
1345 class="cmtt-8"> 3</span><span
1346 class="cmtt-8"> [</span><span
1347 class="cmtt-8"> </span><span
1348 class="cmtt-8"> </span><span
1349 class="cmtt-8"> </span><span
1350 class="cmtt-8"> </span><span
1351 class="cmtt-8"> </span><span
1352 class="cmtt-8"> </span><span
1353 class="cmtt-8"> </span><span
1354 class="cmtt-8"> </span><span
1355 class="cmtt-8"> </span><span
1356 class="cmtt-8"> </span><span
1357 class="cmtt-8"> </span><span
1358 class="cmtt-8"> </span><span
1359 class="cmtt-8"> </span><span
1360 class="cmtt-8"> </span><span
1361 class="cmtt-8"> ]</span>
1362 <br class="fancyvrb" /><a
1364 class="cmr-6">9</span><span
1365 class="cmtt-8"> </span><span
1366 class="cmtt-8"> </span><span
1367 class="cmtt-8"> </span><span
1368 class="cmtt-8"> </span><span
1369 class="cmtt-8"> </span><span
1370 class="cmtt-8"> </span><span
1371 class="cmtt-8"> </span><span
1372 class="cmtt-8"> </span><span
1373 class="cmtt-8"> </span><span
1374 class="cmtt-8"> </span><span
1375 class="cmtt-8"> </span><span
1376 class="cmtt-8"> </span><span
1377 class="cmtt-8"> </span><span
1378 class="cmtt-8"> </span><span
1379 class="cmtt-8"> ...</span>
1380 <br class="fancyvrb" /><a
1382 class="cmr-6">10</span><span
1383 class="cmtt-8"> </span><span
1384 class="cmtt-8"> byte</span><span
1385 class="cmtt-8"> n</span><span
1386 class="cmtt-8"> [</span><span
1387 class="cmtt-8"> </span><span
1388 class="cmtt-8"> </span><span
1389 class="cmtt-8"> </span><span
1390 class="cmtt-8"> </span><span
1391 class="cmtt-8"> </span><span
1392 class="cmtt-8"> </span><span
1393 class="cmtt-8"> </span><span
1394 class="cmtt-8"> </span><span
1395 class="cmtt-8"> </span><span
1396 class="cmtt-8"> </span><span
1397 class="cmtt-8"> </span><span
1398 class="cmtt-8"> </span><span
1399 class="cmtt-8"> </span><span
1400 class="cmtt-8"> </span><span
1401 class="cmtt-8"> ]</span><span
1402 class="cmtt-8"> </span><span
1403 class="cmtt-8"> bytestream</span><span
1404 class="cmtt-8"> length</span><span
1405 class="cmtt-8"> ==</span><span
1406 class="cmtt-8"> 2</span><span
1407 class="cmtt-8"> bytes</span>
1408 <br class="fancyvrb" /><a
1410 class="cmr-6">11</span><span
1411 class="cmtt-8"> </span><span
1412 class="cmtt-8"> </span><span
1413 class="cmtt-8"> </span><span
1414 class="cmtt-8"> </span><span
1415 class="cmtt-8"> </span><span
1416 class="cmtt-8"> </span><span
1417 class="cmtt-8"> </span><span
1418 class="cmtt-8"> </span><span
1419 class="cmtt-8"> </span><span
1420 class="cmtt-8"> </span><span
1421 class="cmtt-8"> </span><span
1422 class="cmtt-8"> </span><span
1423 class="cmtt-8"> </span><span
1424 class="cmtt-8"> </span><span
1425 class="cmtt-8"> </span><span
1426 class="cmtt-8"> </span><span
1427 class="cmtt-8"> </span><span
1428 class="cmtt-8"> </span><span
1429 class="cmtt-8"> </span><span
1430 class="cmtt-8"> </span><span
1431 class="cmtt-8"> </span><span
1432 class="cmtt-8"> </span><span
1433 class="cmtt-8"> </span><span
1434 class="cmtt-8"> </span><span
1435 class="cmtt-8"> </span><span
1436 class="cmtt-8"> </span><span
1437 class="cmtt-8"> </span><span
1438 class="cmtt-8"> bit</span><span
1439 class="cmtt-8"> cursor</span><span
1440 class="cmtt-8"> ==</span><span
1441 class="cmtt-8"> 6</span>
1443 <!--l. 154--><p class="noindent" >Continue by coding the 13 bit integer value ’6969’ [b…
1444 <!--l. 156--><p class="noindent" >
1445 <div class="fancyvrb" id="fancyvrb5">
1448 class="cmr-6">1</span><span
1449 class="cmtt-8"> </span><span
1450 class="cmtt-8"> </span><span
1451 class="cmtt-8"> </span><span
1452 class="cmtt-8"> </span><span
1453 class="cmtt-8"> </span><span
1454 class="cmtt-8"> </span><span
1455 class="cmtt-8"> </span><span
1456 class="cmtt-8"> </span><span
1457 class="cmtt-8"> </span><span
1458 class="cmtt-8"> </span><span
1459 class="cmtt-8"> </span><span
1460 class="cmtt-8"> </span><span
1461 class="cmtt-8"> </span><span
1462 class="cmtt-8"> </span><span
1463 class="cmtt-8"> </span><span
1464 class="cmtt-8"> </span><span
1465 class="cmtt-8"> </span><span
1466 class="cmtt-8"> |</span>
1467 <br class="fancyvrb" /><a
1469 class="cmr-6">2</span><span
1470 class="cmtt-8"> </span><span
1471 class="cmtt-8"> </span><span
1472 class="cmtt-8"> </span><span
1473 class="cmtt-8"> </span><span
1474 class="cmtt-8"> </span><span
1475 class="cmtt-8"> </span><span
1476 class="cmtt-8"> </span><span
1477 class="cmtt-8"> </span><span
1478 class="cmtt-8"> </span><span
1479 class="cmtt-8"> </span><span
1480 class="cmtt-8"> </span><span
1481 class="cmtt-8"> </span><span
1482 class="cmtt-8"> </span><span
1483 class="cmtt-8"> </span><span
1484 class="cmtt-8"> </span><span
1485 class="cmtt-8"> </span><span
1486 class="cmtt-8"> </span><span
1487 class="cmtt-8"> V</span>
1488 <br class="fancyvrb" /><a
1490 class="cmr-6">3</span><span
1491 class="cmtt-8"> </span><span
1492 class="cmtt-8"> </span>
1493 <br class="fancyvrb" /><a
1495 class="cmr-6">4</span><span
1496 class="cmtt-8"> </span><span
1497 class="cmtt-8"> </span><span
1498 class="cmtt-8"> </span><span
1499 class="cmtt-8"> </span><span
1500 class="cmtt-8"> </span><span
1501 class="cmtt-8"> </span><span
1502 class="cmtt-8"> </span><span
1503 class="cmtt-8"> </span><span
1504 class="cmtt-8"> </span><span
1505 class="cmtt-8"> 7</span><span
1506 class="cmtt-8"> 6</span><span
1507 class="cmtt-8"> 5</span><span
1508 class="cmtt-8"> 4</span><span
1509 class="cmtt-8"> 3</span><span
1510 class="cmtt-8"> 2</span><span
1511 class="cmtt-8"> 1</span><span
1512 class="cmtt-8"> 0</span>
1513 <br class="fancyvrb" /><a
1515 class="cmr-6">5</span><span
1516 class="cmtt-8"> </span><span
1517 class="cmtt-8"> byte</span><span
1518 class="cmtt-8"> 0</span><span
1519 class="cmtt-8"> [1</span><span
1520 class="cmtt-8"> 1</span><span
1521 class="cmtt-8"> 1</span><span
1522 class="cmtt-8"> 1</span><span
1523 class="cmtt-8"> 1</span><span
1524 class="cmtt-8"> 1</span><span
1525 class="cmtt-8"> 0</span><span
1526 class="cmtt-8"> 0]</span>
1527 <br class="fancyvrb" /><a
1529 class="cmr-6">6</span><span
1530 class="cmtt-8"> </span><span
1531 class="cmtt-8"> byte</span><span
1532 class="cmtt-8"> 1</span><span
1533 class="cmtt-8"> [0</span><span
1534 class="cmtt-8"> 1</span><span
1535 class="cmtt-8"> 0</span><span
1536 class="cmtt-8"> 0</span><span
1537 class="cmtt-8"> 1</span><span
1538 class="cmtt-8"> 0</span><span
1539 class="cmtt-8"> 0</span><span
1540 class="cmtt-8"> 0]</span>
1541 <br class="fancyvrb" /><a
1543 class="cmr-6">7</span><span
1544 class="cmtt-8"> </span><span
1545 class="cmtt-8"> byte</span><span
1546 class="cmtt-8"> 2</span><span
1547 class="cmtt-8"> [1</span><span
1548 class="cmtt-8"> 1</span><span
1549 class="cmtt-8"> 0</span><span
1550 class="cmtt-8"> 0</span><span
1551 class="cmtt-8"> 1</span><span
1552 class="cmtt-8"> 1</span><span
1553 class="cmtt-8"> 1</span><span
1554 class="cmtt-8"> 0]</span>
1555 <br class="fancyvrb" /><a
1557 class="cmr-6">8</span><span
1558 class="cmtt-8"> </span><span
1559 class="cmtt-8"> byte</span><span
1560 class="cmtt-8"> 3</span><span
1561 class="cmtt-8"> [0</span><span
1562 class="cmtt-8"> 0</span><span
1563 class="cmtt-8"> 0</span><span
1564 class="cmtt-8"> 0</span><span
1565 class="cmtt-8"> 0</span><span
1566 class="cmtt-8"> 1</span><span
1567 class="cmtt-8"> 1</span><span
1568 class="cmtt-8"> 0]</span><span
1569 class="cmtt-8"> </span><span
1570 class="cmtt-8"> <-</span>
1571 <br class="fancyvrb" /><a
1573 class="cmr-6">9</span><span
1574 class="cmtt-8"> </span><span
1575 class="cmtt-8"> </span><span
1576 class="cmtt-8"> </span><span
1577 class="cmtt-8"> </span><span
1578 class="cmtt-8"> </span><span
1579 class="cmtt-8"> </span><span
1580 class="cmtt-8"> </span><span
1581 class="cmtt-8"> </span><span
1582 class="cmtt-8"> </span><span
1583 class="cmtt-8"> </span><span
1584 class="cmtt-8"> </span><span
1585 class="cmtt-8"> </span><span
1586 class="cmtt-8"> </span><span
1587 class="cmtt-8"> </span><span
1588 class="cmtt-8"> ...</span>
1589 <br class="fancyvrb" /><a
1591 class="cmr-6">10</span><span
1592 class="cmtt-8"> </span><span
1593 class="cmtt-8"> byte</span><span
1594 class="cmtt-8"> n</span><span
1595 class="cmtt-8"> [</span><span
1596 class="cmtt-8"> </span><span
1597 class="cmtt-8"> </span><span
1598 class="cmtt-8"> </span><span
1599 class="cmtt-8"> </span><span
1600 class="cmtt-8"> </span><span
1601 class="cmtt-8"> </span><span
1602 class="cmtt-8"> </span><span
1603 class="cmtt-8"> </span><span
1604 class="cmtt-8"> </span><span
1605 class="cmtt-8"> </span><span
1606 class="cmtt-8"> </span><span
1607 class="cmtt-8"> </span><span
1608 class="cmtt-8"> </span><span
1609 class="cmtt-8"> </span><span
1610 class="cmtt-8"> ]</span><span
1611 class="cmtt-8"> </span><span
1612 class="cmtt-8"> bytestream</span><span
1613 class="cmtt-8"> length</span><span
1614 class="cmtt-8"> ==</span><span
1615 class="cmtt-8"> 4</span><span
1616 class="cmtt-8"> bytes</span>
1617 <br class="fancyvrb" /><a
1619 class="cmr-6">11</span><span
1620 class="cmtt-8"> </span><span
1621 class="cmtt-8"> </span>
1623 <!--l. 173--><p class="noindent" >
1624 <h5 class="subsubsectionHead"><span class="titlemark">2.1.7 </span> <a
1626 <!--l. 175--><p class="noindent" >Reading from the beginning of the bytestream encoded in the above…
1627 <!--l. 177--><p class="noindent" >
1628 <div class="fancyvrb" id="fancyvrb6">
1634 class="cmr-6">1</span><span
1635 class="cmtt-8"> </span><span
1636 class="cmtt-8"> </span><span
1637 class="cmtt-8"> </span><span
1638 class="cmtt-8"> </span><span
1639 class="cmtt-8"> </span><span
1640 class="cmtt-8"> </span><span
1641 class="cmtt-8"> </span><span
1642 class="cmtt-8"> </span><span
1643 class="cmtt-8"> </span><span
1644 class="cmtt-8"> </span><span
1645 class="cmtt-8"> </span><span
1646 class="cmtt-8"> </span><span
1647 class="cmtt-8"> </span><span
1648 class="cmtt-8"> </span><span
1649 class="cmtt-8"> </span><span
1650 class="cmtt-8"> </span><span
1651 class="cmtt-8"> </span><span
1652 class="cmtt-8"> </span><span
1653 class="cmtt-8"> </span><span
1654 class="cmtt-8"> </span><span
1655 class="cmtt-8"> </span><span
1656 class="cmtt-8"> </span><span
1657 class="cmtt-8"> </span><span
1658 class="cmtt-8"> |</span>
1659 <br class="fancyvrb" /><a
1661 class="cmr-6">2</span><span
1662 class="cmtt-8"> </span><span
1663 class="cmtt-8"> </span><span
1664 class="cmtt-8"> </span><span
1665 class="cmtt-8"> </span><span
1666 class="cmtt-8"> </span><span
1667 class="cmtt-8"> </span><span
1668 class="cmtt-8"> </span><span
1669 class="cmtt-8"> </span><span
1670 class="cmtt-8"> </span><span
1671 class="cmtt-8"> </span><span
1672 class="cmtt-8"> </span><span
1673 class="cmtt-8"> </span><span
1674 class="cmtt-8"> </span><span
1675 class="cmtt-8"> </span><span
1676 class="cmtt-8"> </span><span
1677 class="cmtt-8"> </span><span
1678 class="cmtt-8"> </span><span
1679 class="cmtt-8"> </span><span
1680 class="cmtt-8"> </span><span
1681 class="cmtt-8"> </span><span
1682 class="cmtt-8"> </span><span
1683 class="cmtt-8"> </span><span
1684 class="cmtt-8"> </span><span
1685 class="cmtt-8"> V</span>
1686 <br class="fancyvrb" /><a
1688 class="cmr-6">3</span><span
1689 class="cmtt-8"> </span><span
1690 class="cmtt-8"> </span>
1691 <br class="fancyvrb" /><a
1693 class="cmr-6">4</span><span
1694 class="cmtt-8"> </span><span
1695 class="cmtt-8"> </span><span
1696 class="cmtt-8"> </span><span
1697 class="cmtt-8"> </span><span
1698 class="cmtt-8"> </span><span
1699 class="cmtt-8"> </span><span
1700 class="cmtt-8"> </span><span
1701 class="cmtt-8"> </span><span
1702 class="cmtt-8"> </span><span
1703 class="cmtt-8"> 7</span><span
1704 class="cmtt-8"> 6</span><span
1705 class="cmtt-8"> 5</span><span
1706 class="cmtt-8"> 4</span><span
1707 class="cmtt-8"> 3</span><span
1708 class="cmtt-8"> 2</span><span
1709 class="cmtt-8"> 1</span><span
1710 class="cmtt-8"> 0</span>
1711 <br class="fancyvrb" /><a
1713 class="cmr-6">5</span><span
1714 class="cmtt-8"> </span><span
1715 class="cmtt-8"> byte</span><span
1716 class="cmtt-8"> 0</span><span
1717 class="cmtt-8"> [1</span><span
1718 class="cmtt-8"> 1</span><span
1719 class="cmtt-8"> 1</span><span
1720 class="cmtt-8"> 1</span><span
1721 class="cmtt-8"> 1</span><span
1722 class="cmtt-8"> 1</span><span
1723 class="cmtt-8"> 0</span><span
1724 class="cmtt-8"> 0]</span><span
1725 class="cmtt-8"> </span><span
1726 class="cmtt-8"> <-</span>
1727 <br class="fancyvrb" /><a
1729 class="cmr-6">6</span><span
1730 class="cmtt-8"> </span><span
1731 class="cmtt-8"> byte</span><span
1732 class="cmtt-8"> 1</span><span
1733 class="cmtt-8"> [0</span><span
1734 class="cmtt-8"> 1</span><span
1735 class="cmtt-8"> 0</span><span
1736 class="cmtt-8"> 0</span><span
1737 class="cmtt-8"> 1</span><span
1738 class="cmtt-8"> 0</span><span
1739 class="cmtt-8"> 0</span><span
1740 class="cmtt-8"> 0]</span>
1741 <br class="fancyvrb" /><a
1743 class="cmr-6">7</span><span
1744 class="cmtt-8"> </span><span
1745 class="cmtt-8"> byte</span><span
1746 class="cmtt-8"> 2</span><span
1747 class="cmtt-8"> [1</span><span
1748 class="cmtt-8"> 1</span><span
1749 class="cmtt-8"> 0</span><span
1750 class="cmtt-8"> 0</span><span
1751 class="cmtt-8"> 1</span><span
1752 class="cmtt-8"> 1</span><span
1753 class="cmtt-8"> 1</span><span
1754 class="cmtt-8"> 0]</span>
1755 <br class="fancyvrb" /><a
1757 class="cmr-6">8</span><span
1758 class="cmtt-8"> </span><span
1759 class="cmtt-8"> byte</span><span
1760 class="cmtt-8"> 3</span><span
1761 class="cmtt-8"> [0</span><span
1762 class="cmtt-8"> 0</span><span
1763 class="cmtt-8"> 0</span><span
1764 class="cmtt-8"> 0</span><span
1765 class="cmtt-8"> 0</span><span
1766 class="cmtt-8"> 1</span><span
1767 class="cmtt-8"> 1</span><span
1768 class="cmtt-8"> 0]</span><span
1769 class="cmtt-8"> </span><span
1770 class="cmtt-8"> bytestream</span><span
1771 class="cmtt-8"> length</span><span
1772 class="cmtt-8"> ==</span><span
1773 class="cmtt-8"> 4</span><span
1774 class="cmtt-8"> bytes</span>
1775 <br class="fancyvrb" /><a
1777 class="cmr-6">9</span><span
1778 class="cmtt-8"> </span><span
1779 class="cmtt-8"> </span>
1781 <!--l. 190--><p class="noindent" >We read two, two-bit integer fields, resulting in the returned nu…
1783 <ul class="itemize1">
1784 …<li class="itemize">Although these four bits were originally written as a single four-bit integer,…
1788 …<li class="itemize">The second value is the two-bit-wide integer ’b11’. This value may…
1791 <!--l. 208--><p class="noindent" >
1792 <h5 class="subsubsectionHead"><span class="titlemark">2.1.8 </span> <a
1794 <!--l. 210--><p class="noindent" >The typical use of bitpacking is to produce many independent byte…
1799 <!--l. 218--><p class="noindent" >Unused space in the last byte of a bytestream is always zeroed du…
1801 <!--l. 222--><p class="noindent" >Attempting to read past the end of an encoded packet results in a…
1810 <!--l. 233--><p class="noindent" >
1811 <h5 class="subsubsectionHead"><span class="titlemark">2.1.9 </span> <a
1813 <!--l. 235--><p class="noindent" >Reading a zero-bit-wide integer returns the value ’0’…
1824 <h3 class="sectionHead"><span class="titlemark">3 </span> <a
1826 <!--l. 6--><p class="noindent" >
1827 <h4 class="subsectionHead"><span class="titlemark">3.1 </span> <a
1829 <!--l. 8--><p class="noindent" >Unlike practically every other mainstream audio codec, Vorbis has n…
1836 <!--l. 18--><p class="noindent" >
1837 <h5 class="subsubsectionHead"><span class="titlemark">3.1.1 </span> <a
1839 <!--l. 19--><p class="noindent" >The codebook mechanism is built on top of the vorbis bitpacker. Bo…
1844 <!--l. 27--><p class="noindent" >
1845 <h4 class="subsectionHead"><span class="titlemark">3.2 </span> <a
1847 <!--l. 29--><p class="noindent" >For purposes of the examples below, we assume that the storage sys…
1855 <!--l. 34--><p class="noindent" >
1856 <h5 class="subsubsectionHead"><span class="titlemark">3.2.1 </span> <a
1858 <!--l. 36--><p class="noindent" >A codebook begins with a 24 bit sync pattern, 0x564342:
1859 <!--l. 38--><p class="noindent" >
1860 <div class="fancyvrb" id="fancyvrb7">
1863 class="cmr-6">1</span><span
1864 class="cmtt-8"> </span><span
1865 class="cmtt-8"> byte</span><span
1866 class="cmtt-8"> 0:</span><span
1867 class="cmtt-8"> [</span><span
1868 class="cmtt-8"> 0</span><span
1869 class="cmtt-8"> 1</span><span
1870 class="cmtt-8"> 0</span><span
1871 class="cmtt-8"> 0</span><span
1872 class="cmtt-8"> 0</span><span
1873 class="cmtt-8"> 0</span><span
1874 class="cmtt-8"> 1</span><span
1875 class="cmtt-8"> 0</span><span
1876 class="cmtt-8"> ]</span><span
1877 class="cmtt-8"> (0x42)</span>
1878 <br class="fancyvrb" /><a
1880 class="cmr-6">2</span><span
1881 class="cmtt-8"> </span><span
1882 class="cmtt-8"> byte</span><span
1883 class="cmtt-8"> 1:</span><span
1884 class="cmtt-8"> [</span><span
1885 class="cmtt-8"> 0</span><span
1886 class="cmtt-8"> 1</span><span
1887 class="cmtt-8"> 0</span><span
1888 class="cmtt-8"> 0</span><span
1889 class="cmtt-8"> 0</span><span
1890 class="cmtt-8"> 0</span><span
1891 class="cmtt-8"> 1</span><span
1892 class="cmtt-8"> 1</span><span
1893 class="cmtt-8"> ]</span><span
1894 class="cmtt-8"> (0x43)</span>
1895 <br class="fancyvrb" /><a
1897 class="cmr-6">3</span><span
1898 class="cmtt-8"> </span><span
1899 class="cmtt-8"> byte</span><span
1900 class="cmtt-8"> 2:</span><span
1901 class="cmtt-8"> [</span><span
1902 class="cmtt-8"> 0</span><span
1903 class="cmtt-8"> 1</span><span
1904 class="cmtt-8"> 0</span><span
1905 class="cmtt-8"> 1</span><span
1906 class="cmtt-8"> 0</span><span
1907 class="cmtt-8"> 1</span><span
1908 class="cmtt-8"> 1</span><span
1909 class="cmtt-8"> 0</span><span
1910 class="cmtt-8"> ]</span><span
1911 class="cmtt-8"> (0x56)</span>
1913 <!--l. 44--><p class="noindent" >16 bit <span
1914 class="cmtt-12">[codebook_dimensions] </span>and 24 bit <span
1915 class="cmtt-12">[codebook_entries] </span>fields:
1916 <!--l. 46--><p class="noindent" >
1917 <div class="fancyvrb" id="fancyvrb8">
1920 class="cmr-6">1</span><span
1921 class="cmtt-8"> </span><span
1922 class="cmtt-8"> </span>
1923 <br class="fancyvrb" /><a
1925 class="cmr-6">2</span><span
1926 class="cmtt-8"> </span><span
1927 class="cmtt-8"> byte</span><span
1928 class="cmtt-8"> 3:</span><span
1929 class="cmtt-8"> [</span><span
1930 class="cmtt-8"> X</span><span
1931 class="cmtt-8"> X</span><span
1932 class="cmtt-8"> X</span><span
1933 class="cmtt-8"> X</span><span
1934 class="cmtt-8"> X</span><span
1935 class="cmtt-8"> X</span><span
1936 class="cmtt-8"> X</span><span
1937 class="cmtt-8"> X</span><span
1938 class="cmtt-8"> ]</span>
1939 <br class="fancyvrb" /><a
1941 class="cmr-6">3</span><span
1942 class="cmtt-8"> </span><span
1943 class="cmtt-8"> byte</span><span
1944 class="cmtt-8"> 4:</span><span
1945 class="cmtt-8"> [</span><span
1946 class="cmtt-8"> X</span><span
1947 class="cmtt-8"> X</span><span
1948 class="cmtt-8"> X</span><span
1949 class="cmtt-8"> X</span><span
1950 class="cmtt-8"> X</span><span
1951 class="cmtt-8"> X</span><span
1952 class="cmtt-8"> X</span><span
1953 class="cmtt-8"> X</span><span
1954 class="cmtt-8"> ]</span><span
1955 class="cmtt-8"> [codebook_dimensions]</span><span
1956 class="cmtt-8"> (16</span><span
1957 class="cmtt-8"> bit</span><span
1958 class="cmtt-8"> unsigned)</span>
1959 <br class="fancyvrb" /><a
1961 class="cmr-6">4</span><span
1962 class="cmtt-8"> </span><span
1963 class="cmtt-8"> </span>
1964 <br class="fancyvrb" /><a
1966 class="cmr-6">5</span><span
1967 class="cmtt-8"> </span><span
1968 class="cmtt-8"> byte</span><span
1969 class="cmtt-8"> 5:</span><span
1970 class="cmtt-8"> [</span><span
1971 class="cmtt-8"> X</span><span
1972 class="cmtt-8"> X</span><span
1973 class="cmtt-8"> X</span><span
1974 class="cmtt-8"> X</span><span
1975 class="cmtt-8"> X</span><span
1976 class="cmtt-8"> X</span><span
1977 class="cmtt-8"> X</span><span
1978 class="cmtt-8"> X</span><span
1979 class="cmtt-8"> ]</span>
1980 <br class="fancyvrb" /><a
1982 class="cmr-6">6</span><span
1983 class="cmtt-8"> </span><span
1984 class="cmtt-8"> byte</span><span
1985 class="cmtt-8"> 6:</span><span
1986 class="cmtt-8"> [</span><span
1987 class="cmtt-8"> X</span><span
1988 class="cmtt-8"> X</span><span
1989 class="cmtt-8"> X</span><span
1990 class="cmtt-8"> X</span><span
1991 class="cmtt-8"> X</span><span
1992 class="cmtt-8"> X</span><span
1993 class="cmtt-8"> X</span><span
1994 class="cmtt-8"> X</span><span
1995 class="cmtt-8"> ]</span>
1996 <br class="fancyvrb" /><a
1998 class="cmr-6">7</span><span
1999 class="cmtt-8"> </span><span
2000 class="cmtt-8"> byte</span><span
2001 class="cmtt-8"> 7:</span><span
2002 class="cmtt-8"> [</span><span
2003 class="cmtt-8"> X</span><span
2004 class="cmtt-8"> X</span><span
2005 class="cmtt-8"> X</span><span
2006 class="cmtt-8"> X</span><span
2007 class="cmtt-8"> X</span><span
2008 class="cmtt-8"> X</span><span
2009 class="cmtt-8"> X</span><span
2010 class="cmtt-8"> X</span><span
2011 class="cmtt-8"> ]</span><span
2012 class="cmtt-8"> [codebook_entries]</span><span
2013 class="cmtt-8"> (24</span><span
2014 class="cmtt-8"> bit</span><span
2015 class="cmtt-8"> unsigned)</span>
2016 <br class="fancyvrb" /><a
2018 class="cmr-6">8</span><span
2019 class="cmtt-8"> </span><span
2020 class="cmtt-8"> </span>
2022 <!--l. 57--><p class="noindent" >Next is the <span
2023 class="cmtt-12">[ordered] </span>bit flag:
2024 <!--l. 59--><p class="noindent" >
2025 <div class="fancyvrb" id="fancyvrb9">
2028 class="cmr-6">1</span><span
2029 class="cmtt-8"> </span><span
2030 class="cmtt-8"> </span>
2031 <br class="fancyvrb" /><a
2033 class="cmr-6">2</span><span
2034 class="cmtt-8"> </span><span
2035 class="cmtt-8"> byte</span><span
2036 class="cmtt-8"> 8:</span><span
2037 class="cmtt-8"> [</span><span
2038 class="cmtt-8"> </span><span
2039 class="cmtt-8"> </span><span
2040 class="cmtt-8"> </span><span
2041 class="cmtt-8"> </span><span
2042 class="cmtt-8"> </span><span
2043 class="cmtt-8"> </span><span
2044 class="cmtt-8"> </span><span
2045 class="cmtt-8"> </span><span
2046 class="cmtt-8"> </span><span
2047 class="cmtt-8"> </span><span
2048 class="cmtt-8"> </span><span
2049 class="cmtt-8"> </span><span
2050 class="cmtt-8"> </span><span
2051 class="cmtt-8"> </span><span
2052 class="cmtt-8"> X</span><span
2053 class="cmtt-8"> ]</span><span
2054 class="cmtt-8"> [ordered]</span><span
2055 class="cmtt-8"> (1</span><span
2056 class="cmtt-8"> bit)</span>
2057 <br class="fancyvrb" /><a
2059 class="cmr-6">3</span><span
2060 class="cmtt-8"> </span><span
2061 class="cmtt-8"> </span>
2063 <!--l. 65--><p class="noindent" >Each entry, numbering a total of <span
2064 class="cmtt-12">[codebook_entries]</span>, is assigned a codeword length.
2067 class="cmtt-12">[codebook_codeword_lengths]</span>. Decode of lengths is according to whether the <…
2068 class="cmtt-12">[ordered] </span>flag
2070 <ul class="itemize1">
2071 <li class="itemize">If the <span
2072 class="cmtt-12">[ordered] </span>flag is unset, the codeword list is not length ordered and the dec…
2074 <!--l. 77--><p class="noindent" >The decoder first reads one additional bit flag, the <span
2075 class="cmtt-12">[sparse] </span>flag. This flag determines
2081 <!--l. 82--><p class="noindent" >
2082 <div class="fancyvrb" id="fancyvrb10">
2085 class="cmr-6">1</span><span
2086 class="cmtt-8"> </span><span
2087 class="cmtt-8"> byte</span><span
2088 class="cmtt-8"> 8:</span><span
2089 class="cmtt-8"> [</span><span
2090 class="cmtt-8"> </span><span
2091 class="cmtt-8"> </span><span
2092 class="cmtt-8"> </span><span
2093 class="cmtt-8"> </span><span
2094 class="cmtt-8"> </span><span
2095 class="cmtt-8"> </span><span
2096 class="cmtt-8"> </span><span
2097 class="cmtt-8"> </span><span
2098 class="cmtt-8"> </span><span
2099 class="cmtt-8"> </span><span
2100 class="cmtt-8"> </span><span
2101 class="cmtt-8"> </span><span
2102 class="cmtt-8"> X</span><span
2103 class="cmtt-8"> 1</span><span
2104 class="cmtt-8"> ]</span><span
2105 class="cmtt-8"> [sparse]</span><span
2106 class="cmtt-8"> flag</span><span
2107 class="cmtt-8"> (1</span><span
2108 class="cmtt-8"> bit)</span>
2110 <!--l. 86--><p class="noindent" >The decoder now performs for each of the <span
2111 class="cmtt-12">[codebook_entries] </span>codebook entries:
2112 <!--l. 89--><p class="noindent" >
2113 <div class="fancyvrb" id="fancyvrb11">
2116 class="cmr-6">1</span><span
2117 class="cmtt-8"> </span><span
2118 class="cmtt-8"> </span>
2119 <br class="fancyvrb" /><a
2121 class="cmr-6">2</span><span
2122 class="cmtt-8"> </span><span
2123 class="cmtt-8"> </span><span
2124 class="cmtt-8"> </span><span
2125 class="cmtt-8"> 1)</span><span
2126 class="cmtt-8"> if([sparse]</span><span
2127 class="cmtt-8"> is</span><span
2128 class="cmtt-8"> set)</span><span
2129 class="cmtt-8"> </span><span
2130 class="cmsy-8">{</span>
2131 <br class="fancyvrb" /><a
2133 class="cmr-6">3</span><span
2134 class="cmtt-8"> </span><span
2135 class="cmtt-8"> </span>
2136 <br class="fancyvrb" /><a
2138 class="cmr-6">4</span><span
2139 class="cmtt-8"> </span><span
2140 class="cmtt-8"> </span><span
2141 class="cmtt-8"> </span><span
2142 class="cmtt-8"> </span><span
2143 class="cmtt-8"> </span><span
2144 class="cmtt-8"> </span><span
2145 class="cmtt-8"> </span><span
2146 class="cmtt-8"> </span><span
2147 class="cmtt-8"> </span><span
2148 class="cmtt-8"> </span><span
2149 class="cmtt-8"> 2)</span><span
2150 class="cmtt-8"> [flag]</span><span
2151 class="cmtt-8"> =</span><span
2152 class="cmtt-8"> read</span><span
2153 class="cmtt-8"> one</span><span
2154 class="cmtt-8"> bit;</span>
2155 <br class="fancyvrb" /><a
2157 class="cmr-6">5</span><span
2158 class="cmtt-8"> </span><span
2159 class="cmtt-8"> </span><span
2160 class="cmtt-8"> </span><span
2161 class="cmtt-8"> </span><span
2162 class="cmtt-8"> </span><span
2163 class="cmtt-8"> </span><span
2164 class="cmtt-8"> </span><span
2165 class="cmtt-8"> </span><span
2166 class="cmtt-8"> </span><span
2167 class="cmtt-8"> </span><span
2168 class="cmtt-8"> 3)</span><span
2169 class="cmtt-8"> if([flag]</span><span
2170 class="cmtt-8"> is</span><span
2171 class="cmtt-8"> set)</span><span
2172 class="cmtt-8"> </span><span
2173 class="cmsy-8">{</span>
2174 <br class="fancyvrb" /><a
2176 class="cmr-6">6</span><span
2177 class="cmtt-8"> </span><span
2178 class="cmtt-8"> </span>
2179 <br class="fancyvrb" /><a
2181 class="cmr-6">7</span><span
2182 class="cmtt-8"> </span><span
2183 class="cmtt-8"> </span><span
2184 class="cmtt-8"> </span><span
2185 class="cmtt-8"> </span><span
2186 class="cmtt-8"> </span><span
2187 class="cmtt-8"> </span><span
2188 class="cmtt-8"> </span><span
2189 class="cmtt-8"> </span><span
2190 class="cmtt-8"> </span><span
2191 class="cmtt-8"> </span><span
2192 class="cmtt-8"> </span><span
2193 class="cmtt-8"> </span><span
2194 class="cmtt-8"> </span><span
2195 class="cmtt-8"> </span><span
2196 class="cmtt-8"> </span><span
2197 class="cmtt-8"> 4)</span><span
2198 class="cmtt-8"> [length]</span><span
2199 class="cmtt-8"> =</span><span
2200 class="cmtt-8"> read</span><span
2201 class="cmtt-8"> a</span><span
2202 class="cmtt-8"> five</span><span
2203 class="cmtt-8"> bit</span><span
2204 class="cmtt-8"> unsigned</span><span
2205 class="cmtt-8"> integer;</span>
2206 <br class="fancyvrb" /><a
2208 class="cmr-6">8</span><span
2209 class="cmtt-8"> </span><span
2210 class="cmtt-8"> </span><span
2211 class="cmtt-8"> </span><span
2212 class="cmtt-8"> </span><span
2213 class="cmtt-8"> </span><span
2214 class="cmtt-8"> </span><span
2215 class="cmtt-8"> </span><span
2216 class="cmtt-8"> </span><span
2217 class="cmtt-8"> </span><span
2218 class="cmtt-8"> </span><span
2219 class="cmtt-8"> </span><span
2220 class="cmtt-8"> </span><span
2221 class="cmtt-8"> </span><span
2222 class="cmtt-8"> </span><span
2223 class="cmtt-8"> </span><span
2224 class="cmtt-8"> 5)</span><span
2225 class="cmtt-8"> codeword</span><span
2226 class="cmtt-8"> length</span><span
2227 class="cmtt-8"> for</span><span
2228 class="cmtt-8"> this</span><span
2229 class="cmtt-8"> entry</span><span
2230 class="cmtt-8"> is</span><span
2231 class="cmtt-8"> [length]+1;</span>
2232 <br class="fancyvrb" /><a
2234 class="cmr-6">9</span><span
2235 class="cmtt-8"> </span><span
2236 class="cmtt-8"> </span>
2237 <br class="fancyvrb" /><a
2239 class="cmr-6">10</span><span
2240 class="cmtt-8"> </span><span
2241 class="cmtt-8"> </span><span
2242 class="cmtt-8"> </span><span
2243 class="cmtt-8"> </span><span
2244 class="cmtt-8"> </span><span
2245 class="cmtt-8"> </span><span
2246 class="cmtt-8"> </span><span
2247 class="cmtt-8"> </span><span
2248 class="cmtt-8"> </span><span
2249 class="cmtt-8"> </span><span
2250 class="cmtt-8"> </span><span
2251 class="cmtt-8"> </span><span
2252 class="cmtt-8"> </span><span
2253 class="cmtt-8"> </span><span
2254 class="cmsy-8">}</span><span
2255 class="cmtt-8"> else</span><span
2256 class="cmtt-8"> </span><span
2257 class="cmsy-8">{</span>
2258 <br class="fancyvrb" /><a
2260 class="cmr-6">11</span><span
2261 class="cmtt-8"> </span><span
2262 class="cmtt-8"> </span>
2263 <br class="fancyvrb" /><a
2265 class="cmr-6">12</span><span
2266 class="cmtt-8"> </span><span
2267 class="cmtt-8"> </span><span
2268 class="cmtt-8"> </span><span
2269 class="cmtt-8"> </span><span
2270 class="cmtt-8"> </span><span
2271 class="cmtt-8"> </span><span
2272 class="cmtt-8"> </span><span
2273 class="cmtt-8"> </span><span
2274 class="cmtt-8"> </span><span
2275 class="cmtt-8"> </span><span
2276 class="cmtt-8"> </span><span
2277 class="cmtt-8"> </span><span
2278 class="cmtt-8"> </span><span
2279 class="cmtt-8"> </span><span
2280 class="cmtt-8"> </span><span
2281 class="cmtt-8"> 6)</span><span
2282 class="cmtt-8"> this</span><span
2283 class="cmtt-8"> entry</span><span
2284 class="cmtt-8"> is</span><span
2285 class="cmtt-8"> unused.</span><span
2286 class="cmtt-8"> </span><span
2287 class="cmtt-8"> mark</span><span
2288 class="cmtt-8"> it</span><span
2289 class="cmtt-8"> as</span><span
2290 class="cmtt-8"> such.</span>
2291 <br class="fancyvrb" /><a
2293 class="cmr-6">13</span><span
2294 class="cmtt-8"> </span><span
2295 class="cmtt-8"> </span>
2296 <br class="fancyvrb" /><a
2298 class="cmr-6">14</span><span
2299 class="cmtt-8"> </span><span
2300 class="cmtt-8"> </span><span
2301 class="cmtt-8"> </span><span
2302 class="cmtt-8"> </span><span
2303 class="cmtt-8"> </span><span
2304 class="cmtt-8"> </span><span
2305 class="cmtt-8"> </span><span
2306 class="cmtt-8"> </span><span
2307 class="cmtt-8"> </span><span
2308 class="cmtt-8"> </span><span
2309 class="cmtt-8"> </span><span
2310 class="cmtt-8"> </span><span
2311 class="cmtt-8"> </span><span
2312 class="cmtt-8"> </span><span
2313 class="cmsy-8">}</span>
2314 <br class="fancyvrb" /><a
2316 class="cmr-6">15</span><span
2317 class="cmtt-8"> </span><span
2318 class="cmtt-8"> </span>
2319 <br class="fancyvrb" /><a
2321 class="cmr-6">16</span><span
2322 class="cmtt-8"> </span><span
2323 class="cmtt-8"> </span><span
2324 class="cmtt-8"> </span><span
2325 class="cmtt-8"> </span><span
2326 class="cmtt-8"> </span><span
2327 class="cmtt-8"> </span><span
2328 class="cmtt-8"> </span><span
2329 class="cmsy-8">}</span><span
2330 class="cmtt-8"> else</span><span
2331 class="cmtt-8"> the</span><span
2332 class="cmtt-8"> sparse</span><span
2333 class="cmtt-8"> flag</span><span
2334 class="cmtt-8"> is</span><span
2335 class="cmtt-8"> not</span><span
2336 class="cmtt-8"> set</span><span
2337 class="cmtt-8"> </span><span
2338 class="cmsy-8">{</span>
2339 <br class="fancyvrb" /><a
2341 class="cmr-6">17</span><span
2342 class="cmtt-8"> </span><span
2343 class="cmtt-8"> </span>
2344 <br class="fancyvrb" /><a
2346 class="cmr-6">18</span><span
2347 class="cmtt-8"> </span><span
2348 class="cmtt-8"> </span><span
2349 class="cmtt-8"> </span><span
2350 class="cmtt-8"> </span><span
2351 class="cmtt-8"> </span><span
2352 class="cmtt-8"> </span><span
2353 class="cmtt-8"> </span><span
2354 class="cmtt-8"> </span><span
2355 class="cmtt-8"> </span><span
2356 class="cmtt-8"> 7)</span><span
2357 class="cmtt-8"> [length]</span><span
2358 class="cmtt-8"> =</span><span
2359 class="cmtt-8"> read</span><span
2360 class="cmtt-8"> a</span><span
2361 class="cmtt-8"> five</span><span
2362 class="cmtt-8"> bit</span><span
2363 class="cmtt-8"> unsigned</span><span
2364 class="cmtt-8"> integer;</span>
2365 <br class="fancyvrb" /><a
2367 class="cmr-6">19</span><span
2368 class="cmtt-8"> </span><span
2369 class="cmtt-8"> </span><span
2370 class="cmtt-8"> </span><span
2371 class="cmtt-8"> </span><span
2372 class="cmtt-8"> </span><span
2373 class="cmtt-8"> </span><span
2374 class="cmtt-8"> </span><span
2375 class="cmtt-8"> </span><span
2376 class="cmtt-8"> </span><span
2377 class="cmtt-8"> 8)</span><span
2378 class="cmtt-8"> the</span><span
2379 class="cmtt-8"> codeword</span><span
2380 class="cmtt-8"> length</span><span
2381 class="cmtt-8"> for</span><span
2382 class="cmtt-8"> this</span><span
2383 class="cmtt-8"> entry</span><span
2384 class="cmtt-8"> is</span><span
2385 class="cmtt-8"> [length]+1;</span>
2386 <br class="fancyvrb" /><a
2388 class="cmr-6">20</span><span
2389 class="cmtt-8"> </span><span
2390 class="cmtt-8"> </span>
2391 <br class="fancyvrb" /><a
2393 class="cmr-6">21</span><span
2394 class="cmtt-8"> </span><span
2395 class="cmtt-8"> </span><span
2396 class="cmtt-8"> </span><span
2397 class="cmtt-8"> </span><span
2398 class="cmtt-8"> </span><span
2399 class="cmtt-8"> </span><span
2400 class="cmtt-8"> </span><span
2401 class="cmsy-8">}</span>
2402 <br class="fancyvrb" /><a
2404 class="cmr-6">22</span><span
2405 class="cmtt-8"> </span><span
2406 class="cmtt-8"> </span>
2409 <li class="itemize">If the <span
2410 class="cmtt-12">[ordered] </span>flag is set, the codeword list for this codebook is encoded in
2414 <!--l. 120--><p class="noindent" >
2415 <div class="fancyvrb" id="fancyvrb12">
2418 class="cmr-6">1</span><span
2419 class="cmtt-8"> </span><span
2420 class="cmtt-8"> </span><span
2421 class="cmtt-8"> </span><span
2422 class="cmtt-8"> 1)</span><span
2423 class="cmtt-8"> [current_entry]</span><span
2424 class="cmtt-8"> =</span><span
2425 class="cmtt-8"> 0;</span>
2426 <br class="fancyvrb" /><a
2428 class="cmr-6">2</span><span
2429 class="cmtt-8"> </span><span
2430 class="cmtt-8"> </span><span
2431 class="cmtt-8"> </span><span
2432 class="cmtt-8"> 2)</span><span
2433 class="cmtt-8"> [current_length]</span><span
2434 class="cmtt-8"> =</span><span
2435 class="cmtt-8"> read</span><span
2436 class="cmtt-8"> a</span><span
2437 class="cmtt-8"> five</span><span
2438 class="cmtt-8"> bit</span><span
2439 class="cmtt-8"> unsigned</span><span
2440 class="cmtt-8"> integer</span><span
2441 class="cmtt-8"> and</span><span
2442 class="cmtt-8"> add</span><span
2443 class="cmtt-8"> 1;</span>
2444 <br class="fancyvrb" /><a
2446 class="cmr-6">3</span><span
2447 class="cmtt-8"> </span><span
2448 class="cmtt-8"> </span><span
2449 class="cmtt-8"> </span><span
2450 class="cmtt-8"> 3)</span><span
2451 class="cmtt-8"> [number]</span><span
2452 class="cmtt-8"> =</span><span
2453 class="cmtt-8"> read</span><span
2454 class="cmtt-8"> </span><a
2456 class="cmtt-8">ilog</span></a><span
2457 class="cmtt-8">([codebook_entries]</span><span
2458 class="cmtt-8"> -</span><span
2459 class="cmtt-8"> [current_entry])</span><span
2460 class="cmtt-8"> bits</span><span
2461 class="cmtt-8"> as</span><span
2462 class="cmtt-8"> an</span><span
2463 class="cmtt-8"> unsigned</span><span
2464 class="cmtt-8"> integer</span>
2465 <br class="fancyvrb" /><a
2467 class="cmr-6">4</span><span
2468 class="cmtt-8"> </span><span
2469 class="cmtt-8"> </span><span
2470 class="cmtt-8"> </span><span
2471 class="cmtt-8"> 4)</span><span
2472 class="cmtt-8"> set</span><span
2473 class="cmtt-8"> the</span><span
2474 class="cmtt-8"> entries</span><span
2475 class="cmtt-8"> [current_entry]</span><span
2476 class="cmtt-8"> through</span><span
2477 class="cmtt-8"> [current_entry]+[number]-1,</span><span
2478 class="cmtt-8"> inclusive,</span>
2479 <br class="fancyvrb" /><a
2481 class="cmr-6">5</span><span
2482 class="cmtt-8"> </span><span
2483 class="cmtt-8"> </span><span
2484 class="cmtt-8"> </span><span
2485 class="cmtt-8"> </span><span
2486 class="cmtt-8"> </span><span
2487 class="cmtt-8"> of</span><span
2488 class="cmtt-8"> the</span><span
2489 class="cmtt-8"> [codebook_codeword_lengths]</span><span
2490 class="cmtt-8"> array</span><span
2491 class="cmtt-8"> to</span><span
2492 class="cmtt-8"> [current_length]</span>
2493 <br class="fancyvrb" /><a
2495 class="cmr-6">6</span><span
2496 class="cmtt-8"> </span><span
2497 class="cmtt-8"> </span><span
2498 class="cmtt-8"> </span><span
2499 class="cmtt-8"> 5)</span><span
2500 class="cmtt-8"> set</span><span
2501 class="cmtt-8"> [current_entry]</span><span
2502 class="cmtt-8"> to</span><span
2503 class="cmtt-8"> [number]</span><span
2504 class="cmtt-8"> +</span><span
2505 class="cmtt-8"> [current_entry]</span>
2506 <br class="fancyvrb" /><a
2508 class="cmr-6">7</span><span
2509 class="cmtt-8"> </span><span
2510 class="cmtt-8"> </span><span
2511 class="cmtt-8"> </span><span
2512 class="cmtt-8"> 6)</span><span
2513 class="cmtt-8"> increment</span><span
2514 class="cmtt-8"> [current_length]</span><span
2515 class="cmtt-8"> by</span><span
2516 class="cmtt-8"> 1</span>
2517 <br class="fancyvrb" /><a
2519 class="cmr-6">8</span><span
2520 class="cmtt-8"> </span><span
2521 class="cmtt-8"> </span><span
2522 class="cmtt-8"> </span><span
2523 class="cmtt-8"> 7)</span><span
2524 class="cmtt-8"> if</span><span
2525 class="cmtt-8"> [current_entry]</span><span
2526 class="cmtt-8"> is</span><span
2527 class="cmtt-8"> greater</span><span
2528 class="cmtt-8"> than</span><span
2529 class="cmtt-8"> [codebook_entries]</span><span
2530 class="cmtt-8"> ERROR</span><span
2531 class="cmtt-8"> CONDITION;</span>
2532 <br class="fancyvrb" /><a
2534 class="cmr-6">9</span><span
2535 class="cmtt-8"> </span><span
2536 class="cmtt-8"> </span><span
2537 class="cmtt-8"> </span><span
2538 class="cmtt-8"> </span><span
2539 class="cmtt-8"> </span><span
2540 class="cmtt-8"> the</span><span
2541 class="cmtt-8"> decoder</span><span
2542 class="cmtt-8"> will</span><span
2543 class="cmtt-8"> not</span><span
2544 class="cmtt-8"> be</span><span
2545 class="cmtt-8"> able</span><span
2546 class="cmtt-8"> to</span><span
2547 class="cmtt-8"> read</span><span
2548 class="cmtt-8"> this</span><span
2549 class="cmtt-8"> stream.</span>
2550 <br class="fancyvrb" /><a
2552 class="cmr-6">10</span><span
2553 class="cmtt-8"> </span><span
2554 class="cmtt-8"> </span><span
2555 class="cmtt-8"> </span><span
2556 class="cmtt-8"> 8)</span><span
2557 class="cmtt-8"> if</span><span
2558 class="cmtt-8"> [current_entry]</span><span
2559 class="cmtt-8"> is</span><span
2560 class="cmtt-8"> less</span><span
2561 class="cmtt-8"> than</span><span
2562 class="cmtt-8"> [codebook_entries],</span><span
2563 class="cmtt-8"> repeat</span><span
2564 class="cmtt-8"> process</span><span
2565 class="cmtt-8"> starting</span><span
2566 class="cmtt-8"> at</span><span
2567 class="cmtt-8"> 3)</span>
2568 <br class="fancyvrb" /><a
2570 class="cmr-6">11</span><span
2571 class="cmtt-8"> </span><span
2572 class="cmtt-8"> </span><span
2573 class="cmtt-8"> </span><span
2574 class="cmtt-8"> 9)</span><span
2575 class="cmtt-8"> done.</span>
2581 <!--l. 136--><p class="noindent" >After all codeword lengths have been decoded, the decoder reads t…
2583 <ol class="enumerate1" >
2585 class="enumerate" id="x1-51098x1">No lookup
2588 class="enumerate" id="x1-51100x2">Implicitly populated value mapping (lattice VQ)
2591 …class="enumerate" id="x1-51102x3">Explicitly populated value mapping (tessellated or ’foam&#…
2592 <!--l. 149--><p class="noindent" >The lookup table type is read as a four bit unsigned integer:
2593 <div class="fancyvrb" id="fancyvrb13">
2596 class="cmr-6">1</span><span
2597 class="cmtt-8"> </span><span
2598 class="cmtt-8"> </span><span
2599 class="cmtt-8"> </span><span
2600 class="cmtt-8"> 1)</span><span
2601 class="cmtt-8"> [codebook_lookup_type]</span><span
2602 class="cmtt-8"> =</span><span
2603 class="cmtt-8"> read</span><span
2604 class="cmtt-8"> four</span><span
2605 class="cmtt-8"> bits</span><span
2606 class="cmtt-8"> as</span><span
2607 class="cmtt-8"> an</span><span
2608 class="cmtt-8"> unsigned</span><span
2609 class="cmtt-8"> integer</span>
2611 <!--l. 154--><p class="noindent" >Codebook decode precedes according to <span
2612 class="cmtt-12">[codebook_lookup_type]</span>:
2613 <ul class="itemize1">
2614 … <li class="itemize">Lookup type zero indicates no lookup to be read. Proceed past lookup decode.
2616 …<li class="itemize">Lookup types one and two are similar, differing only in the number of lookup v…
2619 class="cmtt-12">[codebook_dimensions] </span>scalars. Lookup
2623 <!--l. 168--><p class="noindent" >
2624 <div class="fancyvrb" id="fancyvrb14">
2627 class="cmr-6">1</span><span
2628 class="cmtt-8"> </span><span
2629 class="cmtt-8"> </span><span
2630 class="cmtt-8"> </span><span
2631 class="cmtt-8"> 1)</span><span
2632 class="cmtt-8"> [codebook_minimum_value]</span><span
2633 class="cmtt-8"> =</span><span
2634 class="cmtt-8"> </span><a
2636 class="cmtt-8">float32_unpack</span></a><span
2637 class="cmtt-8">(</span><span
2638 class="cmtt-8"> read</span><span
2639 class="cmtt-8"> 32</span><span
2640 class="cmtt-8"> bits</span><span
2641 class="cmtt-8"> as</span><span
2642 class="cmtt-8"> an</span><span
2643 class="cmtt-8"> unsigned</span><span
2644 class="cmtt-8"> integer)</span>
2645 <br class="fancyvrb" /><a
2647 class="cmr-6">2</span><span
2648 class="cmtt-8"> </span><span
2649 class="cmtt-8"> </span><span
2650 class="cmtt-8"> </span><span
2651 class="cmtt-8"> 2)</span><span
2652 class="cmtt-8"> [codebook_delta_value]</span><span
2653 class="cmtt-8"> =</span><span
2654 class="cmtt-8"> </span><a
2656 class="cmtt-8">float32_unpack</span></a><span
2657 class="cmtt-8">(</span><span
2658 class="cmtt-8"> read</span><span
2659 class="cmtt-8"> 32</span><span
2660 class="cmtt-8"> bits</span><span
2661 class="cmtt-8"> as</span><span
2662 class="cmtt-8"> an</span><span
2663 class="cmtt-8"> unsigned</span><span
2664 class="cmtt-8"> integer)</span>
2665 <br class="fancyvrb" /><a
2667 class="cmr-6">3</span><span
2668 class="cmtt-8"> </span><span
2669 class="cmtt-8"> </span><span
2670 class="cmtt-8"> </span><span
2671 class="cmtt-8"> 3)</span><span
2672 class="cmtt-8"> [codebook_value_bits]</span><span
2673 class="cmtt-8"> =</span><span
2674 class="cmtt-8"> read</span><span
2675 class="cmtt-8"> 4</span><span
2676 class="cmtt-8"> bits</span><span
2677 class="cmtt-8"> as</span><span
2678 class="cmtt-8"> an</span><span
2679 class="cmtt-8"> unsigned</span><span
2680 class="cmtt-8"> integer</span><span
2681 class="cmtt-8"> and</span><span
2682 class="cmtt-8"> add</span><span
2683 class="cmtt-8"> 1</span>
2684 <br class="fancyvrb" /><a
2686 class="cmr-6">4</span><span
2687 class="cmtt-8"> </span><span
2688 class="cmtt-8"> </span><span
2689 class="cmtt-8"> </span><span
2690 class="cmtt-8"> 4)</span><span
2691 class="cmtt-8"> [codebook_sequence_p]</span><span
2692 class="cmtt-8"> =</span><span
2693 class="cmtt-8"> read</span><span
2694 class="cmtt-8"> 1</span><span
2695 class="cmtt-8"> bit</span><span
2696 class="cmtt-8"> as</span><span
2697 class="cmtt-8"> a</span><span
2698 class="cmtt-8"> boolean</span><span
2699 class="cmtt-8"> flag</span>
2700 <br class="fancyvrb" /><a
2702 class="cmr-6">5</span><span
2703 class="cmtt-8"> </span><span
2704 class="cmtt-8"> </span>
2705 <br class="fancyvrb" /><a
2707 class="cmr-6">6</span><span
2708 class="cmtt-8"> </span><span
2709 class="cmtt-8"> </span><span
2710 class="cmtt-8"> </span><span
2711 class="cmtt-8"> if</span><span
2712 class="cmtt-8"> (</span><span
2713 class="cmtt-8"> [codebook_lookup_type]</span><span
2714 class="cmtt-8"> is</span><span
2715 class="cmtt-8"> 1</span><span
2716 class="cmtt-8"> )</span><span
2717 class="cmtt-8"> </span><span
2718 class="cmsy-8">{</span>
2719 <br class="fancyvrb" /><a
2721 class="cmr-6">7</span><span
2722 class="cmtt-8"> </span><span
2723 class="cmtt-8"> </span>
2724 <br class="fancyvrb" /><a
2726 class="cmr-6">8</span><span
2727 class="cmtt-8"> </span><span
2728 class="cmtt-8"> </span><span
2729 class="cmtt-8"> </span><span
2730 class="cmtt-8"> </span><span
2731 class="cmtt-8"> </span><span
2732 class="cmtt-8"> </span><span
2733 class="cmtt-8"> 5)</span><span
2734 class="cmtt-8"> [codebook_lookup_values]</span><span
2735 class="cmtt-8"> =</span><span
2736 class="cmtt-8"> </span><a
2738 class="cmtt-8">lookup1_values</span></a><span
2739 class="cmtt-8">([codebook_entries],</span><span
2740 class="cmtt-8"> [codebook_dimensions]</span><span
2741 class="cmtt-8"> )</span>
2742 <br class="fancyvrb" /><a
2744 class="cmr-6">9</span><span
2745 class="cmtt-8"> </span><span
2746 class="cmtt-8"> </span>
2747 <br class="fancyvrb" /><a
2749 class="cmr-6">10</span><span
2750 class="cmtt-8"> </span><span
2751 class="cmtt-8"> </span><span
2752 class="cmtt-8"> </span><span
2753 class="cmtt-8"> </span><span
2754 class="cmsy-8">}</span><span
2755 class="cmtt-8"> else</span><span
2756 class="cmtt-8"> </span><span
2757 class="cmsy-8">{</span>
2758 <br class="fancyvrb" /><a
2760 class="cmr-6">11</span><span
2761 class="cmtt-8"> </span><span
2762 class="cmtt-8"> </span>
2763 <br class="fancyvrb" /><a
2765 class="cmr-6">12</span><span
2766 class="cmtt-8"> </span><span
2767 class="cmtt-8"> </span><span
2768 class="cmtt-8"> </span><span
2769 class="cmtt-8"> </span><span
2770 class="cmtt-8"> </span><span
2771 class="cmtt-8"> </span><span
2772 class="cmtt-8"> 6)</span><span
2773 class="cmtt-8"> [codebook_lookup_values]</span><span
2774 class="cmtt-8"> =</span><span
2775 class="cmtt-8"> [codebook_entries]</span><span
2776 class="cmtt-8"> *</span><span
2777 class="cmtt-8"> [codebook_dimensions]</span>
2778 <br class="fancyvrb" /><a
2780 class="cmr-6">13</span><span
2781 class="cmtt-8"> </span><span
2782 class="cmtt-8"> </span>
2783 <br class="fancyvrb" /><a
2785 class="cmr-6">14</span><span
2786 class="cmtt-8"> </span><span
2787 class="cmtt-8"> </span><span
2788 class="cmtt-8"> </span><span
2789 class="cmtt-8"> </span><span
2790 class="cmsy-8">}</span>
2791 <br class="fancyvrb" /><a
2793 class="cmr-6">15</span><span
2794 class="cmtt-8"> </span><span
2795 class="cmtt-8"> </span>
2796 <br class="fancyvrb" /><a
2798 class="cmr-6">16</span><span
2799 class="cmtt-8"> </span><span
2800 class="cmtt-8"> </span><span
2801 class="cmtt-8"> </span><span
2802 class="cmtt-8"> 7)</span><span
2803 class="cmtt-8"> read</span><span
2804 class="cmtt-8"> a</span><span
2805 class="cmtt-8"> total</span><span
2806 class="cmtt-8"> of</span><span
2807 class="cmtt-8"> [codebook_lookup_values]</span><span
2808 class="cmtt-8"> unsigned</span><span
2809 class="cmtt-8"> integers</span><span
2810 class="cmtt-8"> of</span><span
2811 class="cmtt-8"> [codebook_value_bits]</span><span
2812 class="cmtt-8"> each;</span>
2816 <br class="fancyvrb" /><a
2818 class="cmr-6">17</span><span
2819 class="cmtt-8"> </span><span
2820 class="cmtt-8"> </span><span
2821 class="cmtt-8"> </span><span
2822 class="cmtt-8"> </span><span
2823 class="cmtt-8"> </span><span
2824 class="cmtt-8"> </span><span
2825 class="cmtt-8"> store</span><span
2826 class="cmtt-8"> these</span><span
2827 class="cmtt-8"> in</span><span
2828 class="cmtt-8"> order</span><span
2829 class="cmtt-8"> in</span><span
2830 class="cmtt-8"> the</span><span
2831 class="cmtt-8"> array</span><span
2832 class="cmtt-8"> [codebook_multiplicands]</span>
2835 <li class="itemize">A <span
2836 class="cmtt-12">[codebook_lookup_type] </span>of greater than two is reserved and indicates a strea…
2839 <!--l. 195--><p class="noindent" >An ’end of packet’ during any read operation in the a…
2841 <!--l. 198--><p class="noindent" ><span class="paragraphHead"><a
2843 class="cmbx-12">Huffman decision tree representation</span></span>
2845 class="cmtt-12">[codebook_codeword_lengths] </span>array and <span
2846 class="cmtt-12">[codebook_entries] </span>value uniquely define the
2848 <!--l. 204--><p class="noindent" >Briefly, each used codebook entry (recall that length-unordered c…
2851 <!--l. 209--><p class="noindent" >
2852 <div class="fancyvrb" id="fancyvrb15">
2855 class="cmr-6">1</span><span
2856 class="cmtt-8"> </span><span
2857 class="cmtt-8"> entry</span><span
2858 class="cmtt-8"> 0:</span><span
2859 class="cmtt-8"> length</span><span
2860 class="cmtt-8"> 2</span>
2861 <br class="fancyvrb" /><a
2863 class="cmr-6">2</span><span
2864 class="cmtt-8"> </span><span
2865 class="cmtt-8"> entry</span><span
2866 class="cmtt-8"> 1:</span><span
2867 class="cmtt-8"> length</span><span
2868 class="cmtt-8"> 4</span>
2869 <br class="fancyvrb" /><a
2871 class="cmr-6">3</span><span
2872 class="cmtt-8"> </span><span
2873 class="cmtt-8"> entry</span><span
2874 class="cmtt-8"> 2:</span><span
2875 class="cmtt-8"> length</span><span
2876 class="cmtt-8"> 4</span>
2877 <br class="fancyvrb" /><a
2879 class="cmr-6">4</span><span
2880 class="cmtt-8"> </span><span
2881 class="cmtt-8"> entry</span><span
2882 class="cmtt-8"> 3:</span><span
2883 class="cmtt-8"> length</span><span
2884 class="cmtt-8"> 4</span>
2885 <br class="fancyvrb" /><a
2887 class="cmr-6">5</span><span
2888 class="cmtt-8"> </span><span
2889 class="cmtt-8"> entry</span><span
2890 class="cmtt-8"> 4:</span><span
2891 class="cmtt-8"> length</span><span
2892 class="cmtt-8"> 4</span>
2893 <br class="fancyvrb" /><a
2895 class="cmr-6">6</span><span
2896 class="cmtt-8"> </span><span
2897 class="cmtt-8"> entry</span><span
2898 class="cmtt-8"> 5:</span><span
2899 class="cmtt-8"> length</span><span
2900 class="cmtt-8"> 2</span>
2901 <br class="fancyvrb" /><a
2903 class="cmr-6">7</span><span
2904 class="cmtt-8"> </span><span
2905 class="cmtt-8"> entry</span><span
2906 class="cmtt-8"> 6:</span><span
2907 class="cmtt-8"> length</span><span
2908 class="cmtt-8"> 3</span>
2909 <br class="fancyvrb" /><a
2911 class="cmr-6">8</span><span
2912 class="cmtt-8"> </span><span
2913 class="cmtt-8"> entry</span><span
2914 class="cmtt-8"> 7:</span><span
2915 class="cmtt-8"> length</span><span
2916 class="cmtt-8"> 3</span>
2918 <!--l. 220--><p class="noindent" >Assigning codewords in order (lowest possible value of the approp…
2920 <!--l. 223--><p class="noindent" >
2921 <div class="fancyvrb" id="fancyvrb16">
2924 class="cmr-6">1</span><span
2925 class="cmtt-8"> </span><span
2926 class="cmtt-8"> entry</span><span
2927 class="cmtt-8"> 0:</span><span
2928 class="cmtt-8"> length</span><span
2929 class="cmtt-8"> 2</span><span
2930 class="cmtt-8"> codeword</span><span
2931 class="cmtt-8"> 00</span>
2932 <br class="fancyvrb" /><a
2934 class="cmr-6">2</span><span
2935 class="cmtt-8"> </span><span
2936 class="cmtt-8"> entry</span><span
2937 class="cmtt-8"> 1:</span><span
2938 class="cmtt-8"> length</span><span
2939 class="cmtt-8"> 4</span><span
2940 class="cmtt-8"> codeword</span><span
2941 class="cmtt-8"> 0100</span>
2942 <br class="fancyvrb" /><a
2944 class="cmr-6">3</span><span
2945 class="cmtt-8"> </span><span
2946 class="cmtt-8"> entry</span><span
2947 class="cmtt-8"> 2:</span><span
2948 class="cmtt-8"> length</span><span
2949 class="cmtt-8"> 4</span><span
2950 class="cmtt-8"> codeword</span><span
2951 class="cmtt-8"> 0101</span>
2952 <br class="fancyvrb" /><a
2954 class="cmr-6">4</span><span
2955 class="cmtt-8"> </span><span
2956 class="cmtt-8"> entry</span><span
2957 class="cmtt-8"> 3:</span><span
2958 class="cmtt-8"> length</span><span
2959 class="cmtt-8"> 4</span><span
2960 class="cmtt-8"> codeword</span><span
2961 class="cmtt-8"> 0110</span>
2962 <br class="fancyvrb" /><a
2964 class="cmr-6">5</span><span
2965 class="cmtt-8"> </span><span
2966 class="cmtt-8"> entry</span><span
2967 class="cmtt-8"> 4:</span><span
2968 class="cmtt-8"> length</span><span
2969 class="cmtt-8"> 4</span><span
2970 class="cmtt-8"> codeword</span><span
2971 class="cmtt-8"> 0111</span>
2972 <br class="fancyvrb" /><a
2974 class="cmr-6">6</span><span
2975 class="cmtt-8"> </span><span
2976 class="cmtt-8"> entry</span><span
2977 class="cmtt-8"> 5:</span><span
2978 class="cmtt-8"> length</span><span
2979 class="cmtt-8"> 2</span><span
2980 class="cmtt-8"> codeword</span><span
2981 class="cmtt-8"> 10</span>
2982 <br class="fancyvrb" /><a
2984 class="cmr-6">7</span><span
2985 class="cmtt-8"> </span><span
2986 class="cmtt-8"> entry</span><span
2987 class="cmtt-8"> 6:</span><span
2988 class="cmtt-8"> length</span><span
2989 class="cmtt-8"> 3</span><span
2990 class="cmtt-8"> codeword</span><span
2991 class="cmtt-8"> 110</span>
2992 <br class="fancyvrb" /><a
2994 class="cmr-6">8</span><span
2995 class="cmtt-8"> </span><span
2996 class="cmtt-8"> entry</span><span
2997 class="cmtt-8"> 7:</span><span
2998 class="cmtt-8"> length</span><span
2999 class="cmtt-8"> 3</span><span
3000 class="cmtt-8"> codeword</span><span
3001 class="cmtt-8"> 111</span>
3006 <!--l. 235--><p class="noindent" ><span class="likesubparagraphHead"><a
3008 class="cmbx-12">Note:</span></span> Unlike most binary numerical values in this document, we intend…
3012 <!--l. 243--><p class="noindent" >It is clear that the codeword length list represents a Huffman de…
3014 <div class="center"
3016 <!--l. 247--><p class="noindent" >
3018 <!--l. 248--><p class="noindent" ><img
3021 <br /> <div class="caption"
3022 ><span class="id">Figure 4: </span><span
3023 class="content">huffman tree illustration</span></div><!--tex4ht:label?: x1-530014 -->
3025 <!--l. 253--><p class="noindent" >As we assign codewords in order, we see that each choice construc…
3027 <!--l. 256--><p class="noindent" >Note that it’s possible to underspecify or overspecify a Hu…
3030 <div class="center"
3032 <!--l. 260--><p class="noindent" >
3034 <!--l. 261--><p class="noindent" ><img
3037 <br /> <div class="caption"
3038 ><span class="id">Figure 5: </span><span
3039 class="content">underspecified huffman tree illustration</span></div><!--tex4ht:label?: x1-530025 -…
3041 <!--l. 266--><p class="noindent" >Similarly, in the original codebook, it’s clear that the tr…
3047 <!--l. 274--><p class="noindent" >Codebook entries marked ’unused’ are simply skipped i…
3053 <!--l. 281--><p class="noindent" ><span class="paragraphHead"><a
3055 class="cmbx-12">VQ lookup table vector representation</span></span>
3057 <div class="fancyvrb" id="fancyvrb17">
3060 class="cmr-6">1</span><span
3061 class="cmtt-8"> </span><span
3062 class="cmtt-8"> the</span><span
3063 class="cmtt-8"> [codebook_multiplicands]</span><span
3064 class="cmtt-8"> array</span>
3065 <br class="fancyvrb" /><a
3067 class="cmr-6">2</span><span
3068 class="cmtt-8"> </span><span
3069 class="cmtt-8"> [codebook_minimum_value]</span>
3070 <br class="fancyvrb" /><a
3072 class="cmr-6">3</span><span
3073 class="cmtt-8"> </span><span
3074 class="cmtt-8"> [codebook_delta_value]</span>
3075 <br class="fancyvrb" /><a
3077 class="cmr-6">4</span><span
3078 class="cmtt-8"> </span><span
3079 class="cmtt-8"> [codebook_sequence_p]</span>
3080 <br class="fancyvrb" /><a
3082 class="cmr-6">5</span><span
3083 class="cmtt-8"> </span><span
3084 class="cmtt-8"> [codebook_lookup_type]</span>
3085 <br class="fancyvrb" /><a
3087 class="cmr-6">6</span><span
3088 class="cmtt-8"> </span><span
3089 class="cmtt-8"> [codebook_entries]</span>
3090 <br class="fancyvrb" /><a
3092 class="cmr-6">7</span><span
3093 class="cmtt-8"> </span><span
3094 class="cmtt-8"> [codebook_dimensions]</span>
3095 <br class="fancyvrb" /><a
3097 class="cmr-6">8</span><span
3098 class="cmtt-8"> </span><span
3099 class="cmtt-8"> [codebook_lookup_values]</span>
3101 <!--l. 297--><p class="noindent" >Decoding (unpacking) a specific vector in the vector lookup table…
3103 class="cmtt-12">[codebook_lookup_type]</span>. The unpacked vector values are what a codebook would…
3105 <!--l. 302--><p class="noindent" ><span class="paragraphHead"><a
3107 class="cmbx-12">Vector value decode: Lookup type 1</span></span>
3111 class="cmtt-12">[codebook_multiplicands] </span>as follows (<span
3112 class="cmtt-12">[value_vector] </span>is the output
3114 class="cmtt-12">[lookup_offset] </span>in this
3116 <!--l. 311--><p class="noindent" >
3117 <div class="fancyvrb" id="fancyvrb18">
3120 class="cmr-6">1</span><span
3121 class="cmtt-8"> </span><span
3122 class="cmtt-8"> </span><span
3123 class="cmtt-8"> </span><span
3124 class="cmtt-8"> 1)</span><span
3125 class="cmtt-8"> [last]</span><span
3126 class="cmtt-8"> =</span><span
3127 class="cmtt-8"> 0;</span>
3128 <br class="fancyvrb" /><a
3130 class="cmr-6">2</span><span
3131 class="cmtt-8"> </span><span
3132 class="cmtt-8"> </span><span
3133 class="cmtt-8"> </span><span
3134 class="cmtt-8"> 2)</span><span
3135 class="cmtt-8"> [index_divisor]</span><span
3136 class="cmtt-8"> =</span><span
3137 class="cmtt-8"> 1;</span>
3138 <br class="fancyvrb" /><a
3140 class="cmr-6">3</span><span
3141 class="cmtt-8"> </span><span
3142 class="cmtt-8"> </span><span
3143 class="cmtt-8"> </span><span
3144 class="cmtt-8"> 3)</span><span
3145 class="cmtt-8"> iterate</span><span
3146 class="cmtt-8"> [i]</span><span
3147 class="cmtt-8"> over</span><span
3148 class="cmtt-8"> the</span><span
3149 class="cmtt-8"> range</span><span
3150 class="cmtt-8"> 0</span><span
3151 class="cmtt-8"> ...</span><span
3152 class="cmtt-8"> [codebook_dimensions]-1</span><span
3153 class="cmtt-8"> (once</span><span
3154 class="cmtt-8"> for</span><span
3155 class="cmtt-8"> each</span><span
3156 class="cmtt-8"> scalar</span><span
3157 class="cmtt-8"> value</span><span
3158 class="cmtt-8"> in</span><span
3159 class="cmtt-8"> the</span><span
3160 class="cmtt-8"> value</span><span
3161 class="cmtt-8"> vector)</span><span
3162 class="cmtt-8"> </span><span
3163 class="cmsy-8">{</span>
3164 <br class="fancyvrb" /><a
3166 class="cmr-6">4</span><span
3167 class="cmtt-8"> </span><span
3168 class="cmtt-8"> </span>
3169 <br class="fancyvrb" /><a
3171 class="cmr-6">5</span><span
3172 class="cmtt-8"> </span><span
3173 class="cmtt-8"> </span><span
3174 class="cmtt-8"> </span><span
3175 class="cmtt-8"> </span><span
3176 class="cmtt-8"> </span><span
3177 class="cmtt-8"> </span><span
3178 class="cmtt-8"> </span><span
3179 class="cmtt-8"> </span><span
3180 class="cmtt-8"> 4)</span><span
3181 class="cmtt-8"> [multiplicand_offset]</span><span
3182 class="cmtt-8"> =</span><span
3183 class="cmtt-8"> (</span><span
3184 class="cmtt-8"> [lookup_offset]</span><span
3185 class="cmtt-8"> divided</span><span
3186 class="cmtt-8"> by</span><span
3187 class="cmtt-8"> [index_divisor]</span><span
3188 class="cmtt-8"> using</span><span
3189 class="cmtt-8"> integer</span>
3190 <br class="fancyvrb" /><a
3192 class="cmr-6">6</span><span
3193 class="cmtt-8"> </span><span
3194 class="cmtt-8"> </span><span
3195 class="cmtt-8"> </span><span
3196 class="cmtt-8"> </span><span
3197 class="cmtt-8"> </span><span
3198 class="cmtt-8"> </span><span
3199 class="cmtt-8"> </span><span
3200 class="cmtt-8"> </span><span
3201 class="cmtt-8"> </span><span
3202 class="cmtt-8"> </span><span
3203 class="cmtt-8"> </span><span
3204 class="cmtt-8"> division</span><span
3205 class="cmtt-8"> )</span><span
3206 class="cmtt-8"> integer</span><span
3207 class="cmtt-8"> modulo</span><span
3208 class="cmtt-8"> [codebook_lookup_values]</span>
3209 <br class="fancyvrb" /><a
3211 class="cmr-6">7</span><span
3212 class="cmtt-8"> </span><span
3213 class="cmtt-8"> </span>
3214 <br class="fancyvrb" /><a
3216 class="cmr-6">8</span><span
3217 class="cmtt-8"> </span><span
3218 class="cmtt-8"> </span><span
3219 class="cmtt-8"> </span><span
3220 class="cmtt-8"> </span><span
3221 class="cmtt-8"> </span><span
3222 class="cmtt-8"> </span><span
3223 class="cmtt-8"> </span><span
3224 class="cmtt-8"> </span><span
3225 class="cmtt-8"> 5)</span><span
3226 class="cmtt-8"> vector</span><span
3227 class="cmtt-8"> [value_vector]</span><span
3228 class="cmtt-8"> element</span><span
3229 class="cmtt-8"> [i]</span><span
3230 class="cmtt-8"> =</span>
3231 <br class="fancyvrb" /><a
3233 class="cmr-6">9</span><span
3234 class="cmtt-8"> </span><span
3235 class="cmtt-8"> </span><span
3236 class="cmtt-8"> </span><span
3237 class="cmtt-8"> </span><span
3238 class="cmtt-8"> </span><span
3239 class="cmtt-8"> </span><span
3240 class="cmtt-8"> </span><span
3241 class="cmtt-8"> </span><span
3242 class="cmtt-8"> </span><span
3243 class="cmtt-8"> </span><span
3244 class="cmtt-8"> </span><span
3245 class="cmtt-8"> </span><span
3246 class="cmtt-8"> </span><span
3247 class="cmtt-8"> (</span><span
3248 class="cmtt-8"> [codebook_multiplicands]</span><span
3249 class="cmtt-8"> array</span><span
3250 class="cmtt-8"> element</span><span
3251 class="cmtt-8"> number</span><span
3252 class="cmtt-8"> [multiplicand_offset]</span><span
3253 class="cmtt-8"> )</span><span
3254 class="cmtt-8"> *</span>
3255 <br class="fancyvrb" /><a
3257 class="cmr-6">10</span><span
3258 class="cmtt-8"> </span><span
3259 class="cmtt-8"> </span><span
3260 class="cmtt-8"> </span><span
3261 class="cmtt-8"> </span><span
3262 class="cmtt-8"> </span><span
3263 class="cmtt-8"> </span><span
3264 class="cmtt-8"> </span><span
3265 class="cmtt-8"> </span><span
3266 class="cmtt-8"> </span><span
3267 class="cmtt-8"> </span><span
3268 class="cmtt-8"> </span><span
3269 class="cmtt-8"> </span><span
3270 class="cmtt-8"> </span><span
3271 class="cmtt-8"> [codebook_delta_value]</span><span
3272 class="cmtt-8"> +</span><span
3273 class="cmtt-8"> [codebook_minimum_value]</span><span
3274 class="cmtt-8"> +</span><span
3275 class="cmtt-8"> [last];</span>
3276 <br class="fancyvrb" /><a
3278 class="cmr-6">11</span><span
3279 class="cmtt-8"> </span><span
3280 class="cmtt-8"> </span>
3281 <br class="fancyvrb" /><a
3283 class="cmr-6">12</span><span
3284 class="cmtt-8"> </span><span
3285 class="cmtt-8"> </span><span
3286 class="cmtt-8"> </span><span
3287 class="cmtt-8"> </span><span
3288 class="cmtt-8"> </span><span
3289 class="cmtt-8"> </span><span
3290 class="cmtt-8"> </span><span
3291 class="cmtt-8"> </span><span
3292 class="cmtt-8"> 6)</span><span
3293 class="cmtt-8"> if</span><span
3294 class="cmtt-8"> (</span><span
3295 class="cmtt-8"> [codebook_sequence_p]</span><span
3296 class="cmtt-8"> is</span><span
3297 class="cmtt-8"> set</span><span
3298 class="cmtt-8"> )</span><span
3299 class="cmtt-8"> then</span><span
3300 class="cmtt-8"> set</span><span
3301 class="cmtt-8"> [last]</span><span
3302 class="cmtt-8"> =</span><span
3303 class="cmtt-8"> vector</span><span
3304 class="cmtt-8"> [value_vector]</span><span
3305 class="cmtt-8"> element</span><span
3306 class="cmtt-8"> [i]</span>
3307 <br class="fancyvrb" /><a
3309 class="cmr-6">13</span><span
3310 class="cmtt-8"> </span><span
3311 class="cmtt-8"> </span>
3312 <br class="fancyvrb" /><a
3314 class="cmr-6">14</span><span
3315 class="cmtt-8"> </span><span
3316 class="cmtt-8"> </span><span
3317 class="cmtt-8"> </span><span
3318 class="cmtt-8"> </span><span
3319 class="cmtt-8"> </span><span
3320 class="cmtt-8"> </span><span
3321 class="cmtt-8"> </span><span
3322 class="cmtt-8"> </span><span
3323 class="cmtt-8"> 7)</span><span
3324 class="cmtt-8"> [index_divisor]</span><span
3325 class="cmtt-8"> =</span><span
3326 class="cmtt-8"> [index_divisor]</span><span
3327 class="cmtt-8"> *</span><span
3328 class="cmtt-8"> [codebook_lookup_values]</span>
3329 <br class="fancyvrb" /><a
3331 class="cmr-6">15</span><span
3332 class="cmtt-8"> </span><span
3333 class="cmtt-8"> </span>
3334 <br class="fancyvrb" /><a
3336 class="cmr-6">16</span><span
3337 class="cmtt-8"> </span><span
3338 class="cmtt-8"> </span><span
3339 class="cmtt-8"> </span><span
3340 class="cmtt-8"> </span><span
3341 class="cmtt-8"> </span><span
3342 class="cmtt-8"> </span><span
3343 class="cmtt-8"> </span><span
3344 class="cmsy-8">}</span>
3345 <br class="fancyvrb" /><a
3347 class="cmr-6">17</span><span
3348 class="cmtt-8"> </span><span
3349 class="cmtt-8"> </span>
3350 <br class="fancyvrb" /><a
3352 class="cmr-6">18</span><span
3353 class="cmtt-8"> </span><span
3354 class="cmtt-8"> </span><span
3355 class="cmtt-8"> </span><span
3356 class="cmtt-8"> 8)</span><span
3357 class="cmtt-8"> vector</span><span
3358 class="cmtt-8"> calculation</span><span
3359 class="cmtt-8"> completed.</span>
3364 <!--l. 334--><p class="noindent" ><span class="paragraphHead"><a
3366 class="cmbx-12">Vector value decode: Lookup type 2</span></span>
3369 class="cmtt-12">[codebook_multiplicands] </span>array in a one-to-one mapping. Calculate [unpack] t…
3371 class="cmtt-12">[codebook_multiplicands] </span>as follows
3373 class="cmtt-12">[value_vector] </span>is the output vector representing the vector of values for en…
3375 class="cmtt-12">[lookup_offset] </span>in this codebook):
3376 <!--l. 344--><p class="noindent" >
3377 <div class="fancyvrb" id="fancyvrb19">
3380 class="cmr-6">1</span><span
3381 class="cmtt-8"> </span><span
3382 class="cmtt-8"> </span><span
3383 class="cmtt-8"> </span><span
3384 class="cmtt-8"> 1)</span><span
3385 class="cmtt-8"> [last]</span><span
3386 class="cmtt-8"> =</span><span
3387 class="cmtt-8"> 0;</span>
3388 <br class="fancyvrb" /><a
3390 class="cmr-6">2</span><span
3391 class="cmtt-8"> </span><span
3392 class="cmtt-8"> </span><span
3393 class="cmtt-8"> </span><span
3394 class="cmtt-8"> 2)</span><span
3395 class="cmtt-8"> [multiplicand_offset]</span><span
3396 class="cmtt-8"> =</span><span
3397 class="cmtt-8"> [lookup_offset]</span><span
3398 class="cmtt-8"> *</span><span
3399 class="cmtt-8"> [codebook_dimensions]</span>
3400 <br class="fancyvrb" /><a
3402 class="cmr-6">3</span><span
3403 class="cmtt-8"> </span><span
3404 class="cmtt-8"> </span><span
3405 class="cmtt-8"> </span><span
3406 class="cmtt-8"> 3)</span><span
3407 class="cmtt-8"> iterate</span><span
3408 class="cmtt-8"> [i]</span><span
3409 class="cmtt-8"> over</span><span
3410 class="cmtt-8"> the</span><span
3411 class="cmtt-8"> range</span><span
3412 class="cmtt-8"> 0</span><span
3413 class="cmtt-8"> ...</span><span
3414 class="cmtt-8"> [codebook_dimensions]-1</span><span
3415 class="cmtt-8"> (once</span><span
3416 class="cmtt-8"> for</span><span
3417 class="cmtt-8"> each</span><span
3418 class="cmtt-8"> scalar</span><span
3419 class="cmtt-8"> value</span><span
3420 class="cmtt-8"> in</span><span
3421 class="cmtt-8"> the</span><span
3422 class="cmtt-8"> value</span><span
3423 class="cmtt-8"> vector)</span><span
3424 class="cmtt-8"> </span><span
3425 class="cmsy-8">{</span>
3426 <br class="fancyvrb" /><a
3428 class="cmr-6">4</span><span
3429 class="cmtt-8"> </span><span
3430 class="cmtt-8"> </span>
3431 <br class="fancyvrb" /><a
3433 class="cmr-6">5</span><span
3434 class="cmtt-8"> </span><span
3435 class="cmtt-8"> </span><span
3436 class="cmtt-8"> </span><span
3437 class="cmtt-8"> </span><span
3438 class="cmtt-8"> </span><span
3439 class="cmtt-8"> </span><span
3440 class="cmtt-8"> </span><span
3441 class="cmtt-8"> </span><span
3442 class="cmtt-8"> 4)</span><span
3443 class="cmtt-8"> vector</span><span
3444 class="cmtt-8"> [value_vector]</span><span
3445 class="cmtt-8"> element</span><span
3446 class="cmtt-8"> [i]</span><span
3447 class="cmtt-8"> =</span>
3448 <br class="fancyvrb" /><a
3450 class="cmr-6">6</span><span
3451 class="cmtt-8"> </span><span
3452 class="cmtt-8"> </span><span
3453 class="cmtt-8"> </span><span
3454 class="cmtt-8"> </span><span
3455 class="cmtt-8"> </span><span
3456 class="cmtt-8"> </span><span
3457 class="cmtt-8"> </span><span
3458 class="cmtt-8"> </span><span
3459 class="cmtt-8"> </span><span
3460 class="cmtt-8"> </span><span
3461 class="cmtt-8"> </span><span
3462 class="cmtt-8"> </span><span
3463 class="cmtt-8"> </span><span
3464 class="cmtt-8"> (</span><span
3465 class="cmtt-8"> [codebook_multiplicands]</span><span
3466 class="cmtt-8"> array</span><span
3467 class="cmtt-8"> element</span><span
3468 class="cmtt-8"> number</span><span
3469 class="cmtt-8"> [multiplicand_offset]</span><span
3470 class="cmtt-8"> )</span><span
3471 class="cmtt-8"> *</span>
3472 <br class="fancyvrb" /><a
3474 class="cmr-6">7</span><span
3475 class="cmtt-8"> </span><span
3476 class="cmtt-8"> </span><span
3477 class="cmtt-8"> </span><span
3478 class="cmtt-8"> </span><span
3479 class="cmtt-8"> </span><span
3480 class="cmtt-8"> </span><span
3481 class="cmtt-8"> </span><span
3482 class="cmtt-8"> </span><span
3483 class="cmtt-8"> </span><span
3484 class="cmtt-8"> </span><span
3485 class="cmtt-8"> </span><span
3486 class="cmtt-8"> </span><span
3487 class="cmtt-8"> </span><span
3488 class="cmtt-8"> [codebook_delta_value]</span><span
3489 class="cmtt-8"> +</span><span
3490 class="cmtt-8"> [codebook_minimum_value]</span><span
3491 class="cmtt-8"> +</span><span
3492 class="cmtt-8"> [last];</span>
3493 <br class="fancyvrb" /><a
3495 class="cmr-6">8</span><span
3496 class="cmtt-8"> </span><span
3497 class="cmtt-8"> </span>
3498 <br class="fancyvrb" /><a
3500 class="cmr-6">9</span><span
3501 class="cmtt-8"> </span><span
3502 class="cmtt-8"> </span><span
3503 class="cmtt-8"> </span><span
3504 class="cmtt-8"> </span><span
3505 class="cmtt-8"> </span><span
3506 class="cmtt-8"> </span><span
3507 class="cmtt-8"> </span><span
3508 class="cmtt-8"> </span><span
3509 class="cmtt-8"> 5)</span><span
3510 class="cmtt-8"> if</span><span
3511 class="cmtt-8"> (</span><span
3512 class="cmtt-8"> [codebook_sequence_p]</span><span
3513 class="cmtt-8"> is</span><span
3514 class="cmtt-8"> set</span><span
3515 class="cmtt-8"> )</span><span
3516 class="cmtt-8"> then</span><span
3517 class="cmtt-8"> set</span><span
3518 class="cmtt-8"> [last]</span><span
3519 class="cmtt-8"> =</span><span
3520 class="cmtt-8"> vector</span><span
3521 class="cmtt-8"> [value_vector]</span><span
3522 class="cmtt-8"> element</span><span
3523 class="cmtt-8"> [i]</span>
3524 <br class="fancyvrb" /><a
3526 class="cmr-6">10</span><span
3527 class="cmtt-8"> </span><span
3528 class="cmtt-8"> </span>
3529 <br class="fancyvrb" /><a
3531 class="cmr-6">11</span><span
3532 class="cmtt-8"> </span><span
3533 class="cmtt-8"> </span><span
3534 class="cmtt-8"> </span><span
3535 class="cmtt-8"> </span><span
3536 class="cmtt-8"> </span><span
3537 class="cmtt-8"> </span><span
3538 class="cmtt-8"> </span><span
3539 class="cmtt-8"> </span><span
3540 class="cmtt-8"> 6)</span><span
3541 class="cmtt-8"> increment</span><span
3542 class="cmtt-8"> [multiplicand_offset]</span>
3543 <br class="fancyvrb" /><a
3545 class="cmr-6">12</span><span
3546 class="cmtt-8"> </span><span
3547 class="cmtt-8"> </span>
3548 <br class="fancyvrb" /><a
3550 class="cmr-6">13</span><span
3551 class="cmtt-8"> </span><span
3552 class="cmtt-8"> </span><span
3553 class="cmtt-8"> </span><span
3554 class="cmtt-8"> </span><span
3555 class="cmtt-8"> </span><span
3556 class="cmtt-8"> </span><span
3557 class="cmtt-8"> </span><span
3558 class="cmsy-8">}</span>
3559 <br class="fancyvrb" /><a
3561 class="cmr-6">14</span><span
3562 class="cmtt-8"> </span><span
3563 class="cmtt-8"> </span>
3564 <br class="fancyvrb" /><a
3566 class="cmr-6">15</span><span
3567 class="cmtt-8"> </span><span
3568 class="cmtt-8"> </span><span
3569 class="cmtt-8"> </span><span
3570 class="cmtt-8"> 7)</span><span
3571 class="cmtt-8"> vector</span><span
3572 class="cmtt-8"> calculation</span><span
3573 class="cmtt-8"> completed.</span>
3575 <!--l. 370--><p class="noindent" >
3576 <h4 class="subsectionHead"><span class="titlemark">3.3 </span> <a
3578 <!--l. 372--><p class="noindent" >The decoder uses the codebook abstraction much as it does the bit…
3585 <!--l. 382--><p class="noindent" >Note that VQ lookup type zero indicates that there is no lookup t…
3593 <!--l. 389--><p class="noindent" >Using a codebook to read from the packet bitstream consists first…
3602 <!--l. 401--><p class="noindent" >When used in a scalar context, the resulting codeword entry is th…
3604 <!--l. 404--><p class="noindent" >When used in a VQ context, the codeword entry number is used as a…
3613 <h3 class="sectionHead"><span class="titlemark">4 </span> <a
3615 <!--l. 7--><p class="noindent" >
3616 <h4 class="subsectionHead"><span class="titlemark">4.1 </span> <a
3618 <!--l. 9--><p class="noindent" >This document serves as the top-level reference document for the bi…
3627 <!--l. 17--><p class="noindent" >
3628 <h4 class="subsectionHead"><span class="titlemark">4.2 </span> <a
3630 <!--l. 19--><p class="noindent" >A Vorbis bitstream begins with three header packets. The header pa…
3635 <!--l. 26--><p class="noindent" >
3636 <h5 class="subsubsectionHead"><span class="titlemark">4.2.1 </span> <a
3638 <!--l. 28--><p class="noindent" >Each header packet begins with the same header fields.
3639 <!--l. 31--><p class="noindent" >
3640 <div class="fancyvrb" id="fancyvrb20">
3643 class="cmr-6">1</span><span
3644 class="cmtt-8"> </span><span
3645 class="cmtt-8"> </span><span
3646 class="cmtt-8"> </span><span
3647 class="cmtt-8"> 1)</span><span
3648 class="cmtt-8"> [packet_type]</span><span
3649 class="cmtt-8"> :</span><span
3650 class="cmtt-8"> 8</span><span
3651 class="cmtt-8"> bit</span><span
3652 class="cmtt-8"> value</span>
3653 <br class="fancyvrb" /><a
3655 class="cmr-6">2</span><span
3656 class="cmtt-8"> </span><span
3657 class="cmtt-8"> </span><span
3658 class="cmtt-8"> </span><span
3659 class="cmtt-8"> 2)</span><span
3660 class="cmtt-8"> 0x76,</span><span
3661 class="cmtt-8"> 0x6f,</span><span
3662 class="cmtt-8"> 0x72,</span><span
3663 class="cmtt-8"> 0x62,</span><span
3664 class="cmtt-8"> 0x69,</span><span
3665 class="cmtt-8"> 0x73:</span><span
3666 class="cmtt-8"> the</span><span
3667 class="cmtt-8"> characters</span><span
3668 class="cmtt-8"> ’v’,’o’,’r’,’b’,’iR…
3669 class="cmtt-8"> as</span><span
3670 class="cmtt-8"> six</span><span
3671 class="cmtt-8"> octets</span>
3676 <!--l. 36--><p class="noindent" >Decode continues according to packet type; the identification head…
3680 <!--l. 44--><p class="noindent" >
3681 <h5 class="subsubsectionHead"><span class="titlemark">4.2.2 </span> <a
3683 <!--l. 46--><p class="noindent" >The identification header is a short header of only a few fields u…
3686 <!--l. 51--><p class="noindent" >
3687 <div class="fancyvrb" id="fancyvrb21">
3690 class="cmr-6">1</span><span
3691 class="cmtt-8"> </span><span
3692 class="cmtt-8"> </span><span
3693 class="cmtt-8"> 1)</span><span
3694 class="cmtt-8"> [vorbis_version]</span><span
3695 class="cmtt-8"> =</span><span
3696 class="cmtt-8"> read</span><span
3697 class="cmtt-8"> 32</span><span
3698 class="cmtt-8"> bits</span><span
3699 class="cmtt-8"> as</span><span
3700 class="cmtt-8"> unsigned</span><span
3701 class="cmtt-8"> integer</span>
3702 <br class="fancyvrb" /><a
3704 class="cmr-6">2</span><span
3705 class="cmtt-8"> </span><span
3706 class="cmtt-8"> </span><span
3707 class="cmtt-8"> 2)</span><span
3708 class="cmtt-8"> [audio_channels]</span><span
3709 class="cmtt-8"> =</span><span
3710 class="cmtt-8"> read</span><span
3711 class="cmtt-8"> 8</span><span
3712 class="cmtt-8"> bit</span><span
3713 class="cmtt-8"> integer</span><span
3714 class="cmtt-8"> as</span><span
3715 class="cmtt-8"> unsigned</span>
3716 <br class="fancyvrb" /><a
3718 class="cmr-6">3</span><span
3719 class="cmtt-8"> </span><span
3720 class="cmtt-8"> </span><span
3721 class="cmtt-8"> 3)</span><span
3722 class="cmtt-8"> [audio_sample_rate]</span><span
3723 class="cmtt-8"> =</span><span
3724 class="cmtt-8"> read</span><span
3725 class="cmtt-8"> 32</span><span
3726 class="cmtt-8"> bits</span><span
3727 class="cmtt-8"> as</span><span
3728 class="cmtt-8"> unsigned</span><span
3729 class="cmtt-8"> integer</span>
3730 <br class="fancyvrb" /><a
3732 class="cmr-6">4</span><span
3733 class="cmtt-8"> </span><span
3734 class="cmtt-8"> </span><span
3735 class="cmtt-8"> 4)</span><span
3736 class="cmtt-8"> [bitrate_maximum]</span><span
3737 class="cmtt-8"> =</span><span
3738 class="cmtt-8"> read</span><span
3739 class="cmtt-8"> 32</span><span
3740 class="cmtt-8"> bits</span><span
3741 class="cmtt-8"> as</span><span
3742 class="cmtt-8"> signed</span><span
3743 class="cmtt-8"> integer</span>
3744 <br class="fancyvrb" /><a
3746 class="cmr-6">5</span><span
3747 class="cmtt-8"> </span><span
3748 class="cmtt-8"> </span><span
3749 class="cmtt-8"> 5)</span><span
3750 class="cmtt-8"> [bitrate_nominal]</span><span
3751 class="cmtt-8"> =</span><span
3752 class="cmtt-8"> read</span><span
3753 class="cmtt-8"> 32</span><span
3754 class="cmtt-8"> bits</span><span
3755 class="cmtt-8"> as</span><span
3756 class="cmtt-8"> signed</span><span
3757 class="cmtt-8"> integer</span>
3758 <br class="fancyvrb" /><a
3760 class="cmr-6">6</span><span
3761 class="cmtt-8"> </span><span
3762 class="cmtt-8"> </span><span
3763 class="cmtt-8"> 6)</span><span
3764 class="cmtt-8"> [bitrate_minimum]</span><span
3765 class="cmtt-8"> =</span><span
3766 class="cmtt-8"> read</span><span
3767 class="cmtt-8"> 32</span><span
3768 class="cmtt-8"> bits</span><span
3769 class="cmtt-8"> as</span><span
3770 class="cmtt-8"> signed</span><span
3771 class="cmtt-8"> integer</span>
3772 <br class="fancyvrb" /><a
3774 class="cmr-6">7</span><span
3775 class="cmtt-8"> </span><span
3776 class="cmtt-8"> </span><span
3777 class="cmtt-8"> 7)</span><span
3778 class="cmtt-8"> [blocksize_0]</span><span
3779 class="cmtt-8"> =</span><span
3780 class="cmtt-8"> 2</span><span
3781 class="cmtt-8"> exponent</span><span
3782 class="cmtt-8"> (read</span><span
3783 class="cmtt-8"> 4</span><span
3784 class="cmtt-8"> bits</span><span
3785 class="cmtt-8"> as</span><span
3786 class="cmtt-8"> unsigned</span><span
3787 class="cmtt-8"> integer)</span>
3788 <br class="fancyvrb" /><a
3790 class="cmr-6">8</span><span
3791 class="cmtt-8"> </span><span
3792 class="cmtt-8"> </span><span
3793 class="cmtt-8"> 8)</span><span
3794 class="cmtt-8"> [blocksize_1]</span><span
3795 class="cmtt-8"> =</span><span
3796 class="cmtt-8"> 2</span><span
3797 class="cmtt-8"> exponent</span><span
3798 class="cmtt-8"> (read</span><span
3799 class="cmtt-8"> 4</span><span
3800 class="cmtt-8"> bits</span><span
3801 class="cmtt-8"> as</span><span
3802 class="cmtt-8"> unsigned</span><span
3803 class="cmtt-8"> integer)</span>
3804 <br class="fancyvrb" /><a
3806 class="cmr-6">9</span><span
3807 class="cmtt-8"> </span><span
3808 class="cmtt-8"> </span><span
3809 class="cmtt-8"> 9)</span><span
3810 class="cmtt-8"> [framing_flag]</span><span
3811 class="cmtt-8"> =</span><span
3812 class="cmtt-8"> read</span><span
3813 class="cmtt-8"> one</span><span
3814 class="cmtt-8"> bit</span>
3816 <!--l. 63--><p class="noindent" ><span
3817 class="cmtt-12">[vorbis_version] </span>is to read ’0’ in order to be compatible with t…
3819 class="cmtt-12">[audio_channels] </span>and <span
3820 class="cmtt-12">[audio_sample_rate] </span>must read greater than zero. Allowed final
3822 class="cmtt-12">[blocksize_0]</span>
3824 class="cmtt-12">[blocksize_1]</span>. The framing bit must be nonzero. Failure to meet
3826 <!--l. 71--><p class="noindent" >The bitrate fields above are used only as hints. The nominal bitra…
3829 <ul class="itemize1">
3830 …<li class="itemize">All three fields set to the same value implies a fixed rate, or tightly bounde…
3833 … <li class="itemize">Only nominal set implies a VBR or ABR stream that averages the nominal bitrate
3838 …<li class="itemize">Maximum and or minimum set implies a VBR bitstream that obeys the bitrate limi…
3840 <li class="itemize">None set indicates the encoder does not care to speculate.</li></ul>
3841 <!--l. 85--><p class="noindent" >
3842 <h5 class="subsubsectionHead"><span class="titlemark">4.2.3 </span> <a
3844 <!--l. 86--><p class="noindent" >Comment header decode and data specification is covered in <a
3848 <!--l. 90--><p class="noindent" >
3849 <h5 class="subsubsectionHead"><span class="titlemark">4.2.4 </span> <a
3851 <!--l. 92--><p class="noindent" >Vorbis codec setup is configurable to an extreme degree:
3852 <div class="center"
3854 <!--l. 94--><p class="noindent" >
3856 <!--l. 95--><p class="noindent" ><img
3859 <br /> <div class="caption"
3860 ><span class="id">Figure 6: </span><span
3861 class="content">decoder pipeline configuration</span></div><!--tex4ht:label?: x1-640016 -->
3863 <!--l. 100--><p class="noindent" >The setup header contains the bulk of the codec setup information…
3868 <!--l. 108--><p class="noindent" ><span class="paragraphHead"><a
3870 class="cmbx-12">Codebooks</span></span>
3874 <ol class="enumerate1" >
3876 class="enumerate" id="x1-65002x1"><span
3877 class="cmtt-12">[vorbis_codebook_count] </span>= read eight bits as unsigned integer and add one
3880 class="enumerate" id="x1-65004x2">Decode <span
3881 class="cmtt-12">[vorbis_codebook_count] </span>codebooks in order as defined in <a
3886 class="cmtt-12">[vorbis_codebook_configurations]</span>.</li></ol>
3887 <!--l. 120--><p class="noindent" ><span class="paragraphHead"><a
3889 class="cmbx-12">Time domain transforms</span></span>
3892 <!--l. 126--><p class="noindent" >
3893 <ol class="enumerate1" >
3895 class="enumerate" id="x1-66002x1"><span
3896 class="cmtt-12">[vorbis_time_count] </span>= read 6 bits as unsigned integer and add one
3899 class="enumerate" id="x1-66004x2">read <span
3900 class="cmtt-12">[vorbis_time_count] </span>16 bit values; each value should be zero. If any value is
3902 <!--l. 133--><p class="noindent" ><span class="paragraphHead"><a
3904 class="cmbx-12">Floors</span></span>
3907 <!--l. 138--><p class="noindent" >
3908 <ol class="enumerate1" >
3910 class="enumerate" id="x1-67002x1"><span
3911 class="cmtt-12">[vorbis_floor_count] </span>= read 6 bits as unsigned integer and add one
3914 class="enumerate" id="x1-67004x2">For each <span
3915 class="cmtt-12">[i] </span>of <span
3916 class="cmtt-12">[vorbis_floor_count] </span>floor numbers:
3917 <ol class="enumerate2" >
3919 class="enumerate" id="x1-67006x1">read the floor type: vector <span
3920 class="cmtt-12">[vorbis_floor_types] </span>element <span
3921 class="cmtt-12">[i] </span>= read 16 bits
3925 …class="enumerate" id="x1-67008x2">If the floor type is zero, decode the floor configuration as def…
3929 class="cmtt-12">[i] </span>of the floor
3931 class="cmtt-12">[vorbis_floor_configurations]</span>.
3937 …class="enumerate" id="x1-67010x3">If the floor type is one, decode the floor configuration as defi…
3941 class="cmtt-12">[i] </span>of the floor
3943 class="cmtt-12">[vorbis_floor_configurations]</span>.
3946 …class="enumerate" id="x1-67012x4">If the the floor type is greater than one, this stream is undeco…
3949 <!--l. 157--><p class="noindent" ><span class="paragraphHead"><a
3951 class="cmbx-12">Residues</span></span>
3953 <!--l. 162--><p class="noindent" >
3954 <ol class="enumerate1" >
3956 class="enumerate" id="x1-68002x1"><span
3957 class="cmtt-12">[vorbis_residue_count] </span>= read 6 bits as unsigned integer and add one
3960 class="enumerate" id="x1-68004x2">For each of <span
3961 class="cmtt-12">[vorbis_residue_count] </span>residue numbers:
3962 <ol class="enumerate2" >
3964 class="enumerate" id="x1-68006x1">read the residue type; vector <span
3965 class="cmtt-12">[vorbis_residue_types] </span>element <span
3966 class="cmtt-12">[i] </span>= read 16
3970 …class="enumerate" id="x1-68008x2">If the residue type is zero, one or two, decode the residue conf…
3974 class="cmtt-12">[i] </span>of
3976 class="cmtt-12">[vorbis_residue_configurations]</span>.
3979 …class="enumerate" id="x1-68010x3">If the the residue type is greater than two, this stream is unde…
3982 <!--l. 177--><p class="noindent" ><span class="paragraphHead"><a
3984 class="cmbx-12">Mappings</span></span>
3991 <!--l. 187--><p class="noindent" >
3992 <ol class="enumerate1" >
3994 class="enumerate" id="x1-69002x1"><span
3995 class="cmtt-12">[vorbis_mapping_count] </span>= read 6 bits as unsigned integer and add one
3998 class="enumerate" id="x1-69004x2">For each <span
3999 class="cmtt-12">[i] </span>of <span
4000 class="cmtt-12">[vorbis_mapping_count] </span>mapping numbers:
4001 <ol class="enumerate2" >
4003 …class="enumerate" id="x1-69006x1">read the mapping type: 16 bits as unsigned integer. There’…
4007 class="enumerate" id="x1-69008x2">If the mapping type is nonzero, the stream is undecodable
4010 class="enumerate" id="x1-69010x3">If the mapping type is zero:
4011 <ol class="enumerate3" >
4013 class="enumerate" id="x1-69012x1">read 1 bit as a boolean flag
4014 <ol class="enumerate4" >
4016 class="enumerate" id="x1-69014x1">if set, <span
4017 class="cmtt-12">[vorbis_mapping_submaps] </span>= read 4 bits as unsigned integer
4021 class="enumerate" id="x1-69016x2">if unset, <span
4022 class="cmtt-12">[vorbis_mapping_submaps] </span>= 1</li></ol>
4025 class="enumerate" id="x1-69018x2">read 1 bit as a boolean flag
4026 <ol class="enumerate4" >
4028 class="enumerate" id="x1-69020x1">if set, square polar channel mapping is in use:
4029 <ul class="itemize1">
4030 <li class="itemize"><span
4031 class="cmtt-12">[vorbis_mapping_coupling_steps] </span>= read 8 bits as unsigned
4034 <li class="itemize">for <span
4035 class="cmtt-12">[j] </span>each of <span
4036 class="cmtt-12">[vorbis_mapping_coupling_steps] </span>steps:
4037 <ul class="itemize2">
4038 <li class="itemize">vector <span
4039 class="cmtt-12">[vorbis_mapping_magnitude] </span>element <span
4040 class="cmtt-12">[j]</span>= read
4043 class="cmtt-12">[audio_channels] </span>- 1) bits as unsigned integer
4045 <li class="itemize">vector <span
4046 class="cmtt-12">[vorbis_mapping_angle] </span>element <span
4047 class="cmtt-12">[j]</span>= read
4050 class="cmtt-12">[audio_channels] </span>- 1) bits as unsigned integer
4055 … <li class="itemize">the numbers read in the above two steps are channel numbers
4060 class="cmtt-12">[audio_channels]</span>-1, or
4062 class="cmtt-12">[audio_channels]</span>-1, the stream
4067 class="enumerate" id="x1-69022x2">if unset, <span
4068 class="cmtt-12">[vorbis_mapping_coupling_steps] </span>= 0</li></ol>
4071 …class="enumerate" id="x1-69024x3">read 2 bits (reserved field); if the value is nonzero, the strea…
4074 class="enumerate" id="x1-69026x4">if <span
4075 class="cmtt-12">[vorbis_mapping_submaps] </span>is greater than one, we read channel multiplex
4077 class="cmtt-12">[j] </span>of <span
4078 class="cmtt-12">[audio_channels] </span>channels:
4079 <ol class="enumerate4" >
4081 class="enumerate" id="x1-69028x1">vector <span
4082 class="cmtt-12">[vorbis_mapping_mux] </span>element <span
4083 class="cmtt-12">[j] </span>= read 4 bits as unsigned
4087 …class="enumerate" id="x1-69030x2">if the value is greater than the highest numbere…
4089 class="cmtt-12">[vorbis_mapping_submaps] </span>- 1), this in an error condition rendering
4093 class="enumerate" id="x1-69032x5">for each submap <span
4094 class="cmtt-12">[j] </span>of <span
4095 class="cmtt-12">[vorbis_mapping_submaps] </span>submaps, read the floor and
4097 <ol class="enumerate4" >
4099 …class="enumerate" id="x1-69034x1">read and discard 8 bits (the unused time configuration placehold…
4102 …class="enumerate" id="x1-69036x2">read 8 bits as unsigned integer for the floor number; save in ve…
4104 class="cmtt-12">[vorbis_mapping_submap_floor] </span>element <span
4105 class="cmtt-12">[j]</span>
4108 …class="enumerate" id="x1-69038x3">verify the floor number is not greater than the highest number f…
4112 …class="enumerate" id="x1-69040x4">read 8 bits as unsigned integer for the residue number; save in …
4114 class="cmtt-12">[vorbis_mapping_submap_residue] </span>element <span
4115 class="cmtt-12">[j]</span>
4121 …class="enumerate" id="x1-69042x5">verify the residue number is not greater than the highest number…
4125 class="enumerate" id="x1-69044x6">save this mapping configuration in slot <span
4126 class="cmtt-12">[i] </span>of the mapping configuration array
4128 class="cmtt-12">[vorbis_mapping_configurations]</span>.</li></ol>
4131 <!--l. 247--><p class="noindent" ><span class="paragraphHead"><a
4133 class="cmbx-12">Modes</span></span>
4134 <ol class="enumerate1" >
4136 class="enumerate" id="x1-70002x1"><span
4137 class="cmtt-12">[vorbis_mode_count] </span>= read 6 bits as unsigned integer and add one
4140 class="enumerate" id="x1-70004x2">For each of <span
4141 class="cmtt-12">[vorbis_mode_count] </span>mode numbers:
4142 <ol class="enumerate2" >
4144 class="enumerate" id="x1-70006x1"><span
4145 class="cmtt-12">[vorbis_mode_blockflag] </span>= read 1 bit
4148 class="enumerate" id="x1-70008x2"><span
4149 class="cmtt-12">[vorbis_mode_windowtype] </span>= read 16 bits as unsigned integer
4152 class="enumerate" id="x1-70010x3"><span
4153 class="cmtt-12">[vorbis_mode_transformtype] </span>= read 16 bits as unsigned integer
4156 class="enumerate" id="x1-70012x4"><span
4157 class="cmtt-12">[vorbis_mode_mapping] </span>= read 8 bits as unsigned integer
4160 …class="enumerate" id="x1-70014x5">verify ranges; zero is the only …
4162 class="cmtt-12">[vorbis_mode_windowtype] </span>and <span
4163 class="cmtt-12">[vorbis_mode_transformtype]</span>.
4165 class="cmtt-12">[vorbis_mode_mapping] </span>must not be greater than the highest number mapping
4169 class="enumerate" id="x1-70016x6">save this mode configuration in slot <span
4170 class="cmtt-12">[i] </span>of the mode configuration array
4172 class="cmtt-12">[vorbis_mode_configurations]</span>.</li></ol>
4175 …class="enumerate" id="x1-70018x3">read 1 bit as a framing flag. If unset, a framing error occurred…
4180 <!--l. 268--><p class="noindent" >After reading mode descriptions, setup header decode is complete.
4181 <!--l. 277--><p class="noindent" >
4182 <h4 class="subsectionHead"><span class="titlemark">4.3 </span> <a
4184 <!--l. 279--><p class="noindent" >Following the three header packets, all packets in a Vorbis I str…
4186 class="cmti-12">A non-audio packet when audio is</span>
4188 class="cmti-12">expected indicates stream corruption or a non-compliant stream. The decoder must ig…
4190 class="cmti-12">packet and not attempt decoding it to audio</span>.
4191 <!--l. 286--><p class="noindent" >
4192 <h5 class="subsubsectionHead"><span class="titlemark">4.3.1 </span> <a
4194 <!--l. 288--><p class="noindent" >
4195 <ol class="enumerate1" >
4197 class="enumerate" id="x1-72002x1">read 1 bit <span
4198 class="cmtt-12">[packet_type]</span>; check that packet type is 0 (audio)
4201 class="enumerate" id="x1-72004x2">read <a
4203 class="cmtt-12">[mode_number]</span>
4206 class="enumerate" id="x1-72006x3">decode blocksize <span
4207 class="cmtt-12">[n] </span>is equal to <span
4208 class="cmtt-12">[blocksize_0] </span>if <span
4209 class="cmtt-12">[vorbis_mode_blockflag] </span>is 0,
4211 class="cmtt-12">[n] </span>is equal to <span
4212 class="cmtt-12">[blocksize_1]</span>.
4215 …class="enumerate" id="x1-72008x4">perform window selection and setup; this window is used later by…
4217 <ol class="enumerate2" >
4219 class="enumerate" id="x1-72010x1">if this is a long window (the <span
4220 class="cmtt-12">[vorbis_mode_blockflag] </span>flag of this mode is
4222 <ol class="enumerate3" >
4224 class="enumerate" id="x1-72012x1">read 1 bit for <span
4225 class="cmtt-12">[previous_window_flag]</span>
4228 class="enumerate" id="x1-72014x2">read 1 bit for <span
4229 class="cmtt-12">[next_window_flag]</span>
4235 class="enumerate" id="x1-72016x3">if <span
4236 class="cmtt-12">[previous_window_flag] </span>is not set, the left half of the window will
4246 class="enumerate" id="x1-72018x4">if <span
4247 class="cmtt-12">[next_window_flag] </span>is not set, the right half of the window will be
4256 …class="enumerate" id="x1-72020x2">if this is a short window, the window is always the same short-w…
4259 <!--l. 321--><p class="noindent" >Vorbis windows all use the slope function <span
4260 class="cmmi-12">y </span>= sin(<img
4261 src="Vorbis_I_spec1x.png" alt="π2" class="frac" align="middle"> <span
4262 class="cmsy-10x-x-120">∗</span> sin <sup><span
4263 class="cmr-8">2</span></sup>((<span
4264 class="cmmi-12">x </span>+ 0<span
4265 class="cmmi-12">.</span>5)<span
4266 class="cmmi-12">∕n </span><span
4267 class="cmsy-10x-x-120">∗ </span><span
4268 class="cmmi-12">π</span>)), where <span
4269 class="cmmi-12">n </span>is window
4271 class="cmmi-12">x </span>ranges 0<span
4272 class="cmmi-12">…</span><span
4273 class="cmmi-12">n</span><span
4274 class="cmsy-10x-x-120">− </span>1, but dissimilar lapping requirements can affect overall sha…
4276 <!--l. 326--><p class="noindent" >
4277 <ol class="enumerate1" >
4279 class="enumerate" id="x1-72022x1"><span
4280 class="cmtt-12">[window_center] </span>= <span
4281 class="cmtt-12">[n] </span>/ 2
4284 class="enumerate" id="x1-72024x2">if (<span
4285 class="cmtt-12">[vorbis_mode_blockflag] </span>is set and <span
4286 class="cmtt-12">[previous_window_flag] </span>is not set)
4288 <ol class="enumerate2" >
4290 class="enumerate" id="x1-72026x1"><span
4291 class="cmtt-12">[left_window_start] </span>= <span
4292 class="cmtt-12">[n]</span>/4 - <span
4293 class="cmtt-12">[blocksize_0]</span>/4
4296 class="enumerate" id="x1-72028x2"><span
4297 class="cmtt-12">[left_window_end] </span>= <span
4298 class="cmtt-12">[n]</span>/4 + <span
4299 class="cmtt-12">[blocksize_0]</span>/4
4302 class="enumerate" id="x1-72030x3"><span
4303 class="cmtt-12">[left_n] </span>= <span
4304 class="cmtt-12">[blocksize_0]</span>/2</li></ol>
4305 <!--l. 336--><p class="noindent" >else
4306 <ol class="enumerate2" >
4308 class="enumerate" id="x1-72032x1"><span
4309 class="cmtt-12">[left_window_start] </span>= 0
4312 class="enumerate" id="x1-72034x2"><span
4313 class="cmtt-12">[left_window_end] </span>= <span
4314 class="cmtt-12">[window_center]</span>
4320 class="enumerate" id="x1-72036x3"><span
4321 class="cmtt-12">[left_n] </span>= <span
4322 class="cmtt-12">[n]</span>/2</li></ol>
4325 class="enumerate" id="x1-72038x3">if (<span
4326 class="cmtt-12">[vorbis_mode_blockflag] </span>is set and <span
4327 class="cmtt-12">[next_window_flag] </span>is not set) then
4328 <ol class="enumerate2" >
4330 class="enumerate" id="x1-72040x1"><span
4331 class="cmtt-12">[right_window_start] </span>= <span
4332 class="cmtt-12">[n]*3</span>/4 - <span
4333 class="cmtt-12">[blocksize_0]</span>/4
4336 class="enumerate" id="x1-72042x2"><span
4337 class="cmtt-12">[right_window_end] </span>= <span
4338 class="cmtt-12">[n]*3</span>/4 + <span
4339 class="cmtt-12">[blocksize_0]</span>/4
4342 class="enumerate" id="x1-72044x3"><span
4343 class="cmtt-12">[right_n] </span>= <span
4344 class="cmtt-12">[blocksize_0]</span>/2</li></ol>
4345 <!--l. 352--><p class="noindent" >else
4346 <ol class="enumerate2" >
4348 class="enumerate" id="x1-72046x1"><span
4349 class="cmtt-12">[right_window_start] </span>= <span
4350 class="cmtt-12">[window_center]</span>
4353 class="enumerate" id="x1-72048x2"><span
4354 class="cmtt-12">[right_window_end] </span>= <span
4355 class="cmtt-12">[n]</span>
4358 class="enumerate" id="x1-72050x3"><span
4359 class="cmtt-12">[right_n] </span>= <span
4360 class="cmtt-12">[n]</span>/2</li></ol>
4363 class="enumerate" id="x1-72052x4">window from range 0 ... <span
4364 class="cmtt-12">[left_window_start]</span>-1 inclusive is zero
4367 class="enumerate" id="x1-72054x5">for <span
4368 class="cmtt-12">[i] </span>in range <span
4369 class="cmtt-12">[left_window_start] </span>... <span
4370 class="cmtt-12">[left_window_end]</span>-1, window(<span
4371 class="cmtt-12">[i]</span>) =
4374 2" class="frac" align="middle"> <span
4375 class="cmsy-10x-x-120">∗</span> sin <sup><span
4376 class="cmr-8">2</span></sup>( (<span
4377 class="cmtt-12">[i]</span>-<span
4378 class="cmtt-12">[left_window_start]</span>+0.5) / <span
4379 class="cmtt-12">[left_n] </span><span
4380 class="cmsy-10x-x-120">∗</span><img
4382 2" class="frac" align="middle">) )
4385 class="enumerate" id="x1-72056x6">window from range <span
4386 class="cmtt-12">[left_window_end] </span>... <span
4387 class="cmtt-12">[right_window_start]</span>-1 inclusive is
4391 class="enumerate" id="x1-72058x7">for <span
4392 class="cmtt-12">[i] </span>in range <span
4393 class="cmtt-12">[right_window_start] </span>... <span
4394 class="cmtt-12">[right_window_end]</span>-1, window(<span
4395 class="cmtt-12">[i]</span>) =
4398 2" class="frac" align="middle"> <span
4399 class="cmsy-10x-x-120">∗</span> sin <sup><span
4400 class="cmr-8">2</span></sup>( (<span
4401 class="cmtt-12">[i]</span>-<span
4402 class="cmtt-12">[right_window_start]</span>+0.5) / <span
4403 class="cmtt-12">[right_n] </span><span
4404 class="cmsy-10x-x-120">∗</span><img
4406 2" class="frac" align="middle"> + <img
4408 2" class="frac" align="middle">) )
4411 class="enumerate" id="x1-72060x8">window from range <span
4412 class="cmtt-12">[right_window_start] </span>... <span
4413 class="cmtt-12">[n]</span>-1 is zero</li></ol>
4414 <!--l. 368--><p class="noindent" >An end-of-packet condition up to this point should be considered …
4420 <!--l. 375--><p class="noindent" >
4421 <h5 class="subsubsectionHead"><span class="titlemark">4.3.2 </span> <a
4423 <!--l. 377--><p class="noindent" >From this point on, we assume out decode context is using mode nu…
4424 class="cmtt-12">[mode_number]</span>
4426 class="cmtt-12">[vorbis_mode_configurations] </span>and the map number
4428 class="cmtt-12">[vorbis_mode_mapping] </span>(specified by the current mode) taken from the mapping…
4430 class="cmtt-12">[vorbis_mapping_configurations]</span>.
4431 <!--l. 384--><p class="noindent" >Floor curves are decoded one-by-one in channel order.
4432 <!--l. 386--><p class="noindent" >For each floor <span
4433 class="cmtt-12">[i] </span>of <span
4434 class="cmtt-12">[audio_channels]</span>
4435 <ol class="enumerate1" >
4437 class="enumerate" id="x1-73002x1"><span
4438 class="cmtt-12">[submap_number] </span>= element <span
4439 class="cmtt-12">[i] </span>of vector [vorbis˙mapping˙mux]
4442 class="enumerate" id="x1-73004x2"><span
4443 class="cmtt-12">[floor_number] </span>= element <span
4444 class="cmtt-12">[submap_number] </span>of vector [vorbis˙submap˙floor]
4447 …class="enumerate" id="x1-73006x3">if the floor type of …
4449 class="cmtt-12">[vorbis_floor_types] </span>element <span
4450 class="cmtt-12">[floor_number]</span>) is zero then decode the floor for
4452 class="cmtt-12">[i] </span>according to the <a
4457 …class="enumerate" id="x1-73008x4">if the type of this floor is one then decode the floor for chann…
4458 class="cmtt-12">[i] </span>according to the
4464 …class="enumerate" id="x1-73010x5">save the needed decoded floor information for channel for later …
4467 …class="enumerate" id="x1-73012x6">if the decoded floor returned ’unused’, set vector <…
4468 class="cmtt-12">[no_residue] </span>element <span
4469 class="cmtt-12">[i] </span>to true,
4471 class="cmtt-12">[no_residue] </span>element <span
4472 class="cmtt-12">[i] </span>to false</li></ol>
4473 <!--l. 406--><p class="noindent" >An end-of-packet condition during floor decode shall result in pa…
4475 <!--l. 412--><p class="noindent" >
4476 <h5 class="subsubsectionHead"><span class="titlemark">4.3.3 </span> <a
4478 <!--l. 414--><p class="noindent" >A possible result of floor decode is that a specific vector is ma…
4486 <!--l. 421--><p class="noindent" >for each <span
4487 class="cmtt-12">[i] </span>from 0 ... <span
4488 class="cmtt-12">[vorbis_mapping_coupling_steps]</span>-1
4489 <!--l. 423--><p class="noindent" >
4490 <ol class="enumerate1" >
4492 class="enumerate" id="x1-74002x1">if either <span
4493 class="cmtt-12">[no_residue] </span>entry for channel (<span
4494 class="cmtt-12">[vorbis_mapping_magnitude] </span>element
4496 class="cmtt-12">[i]</span>) or channel (<span
4497 class="cmtt-12">[vorbis_mapping_angle] </span>element <span
4498 class="cmtt-12">[i]</span>) are set to false, then both
4501 <!--l. 436--><p class="noindent" >
4502 <h5 class="subsubsectionHead"><span class="titlemark">4.3.4 </span> <a
4504 <!--l. 438--><p class="noindent" >Unlike floors, which are decoded in channel order, the residue ve…
4506 <!--l. 441--><p class="noindent" >for each submap <span
4507 class="cmtt-12">[i] </span>in order from 0 ... <span
4508 class="cmtt-12">[vorbis_mapping_submaps]</span>-1
4509 <!--l. 443--><p class="noindent" >
4510 <ol class="enumerate1" >
4512 class="enumerate" id="x1-75002x1"><span
4513 class="cmtt-12">[ch] </span>= 0
4516 class="enumerate" id="x1-75004x2">for each channel <span
4517 class="cmtt-12">[j] </span>in order from 0 ... <span
4518 class="cmtt-12">[audio_channels] </span>- 1
4519 <ol class="enumerate2" >
4521 class="enumerate" id="x1-75006x1">if channel <span
4522 class="cmtt-12">[j] </span>in submap <span
4523 class="cmtt-12">[i] </span>(vector <span
4524 class="cmtt-12">[vorbis_mapping_mux] </span>element <span
4525 class="cmtt-12">[j] </span>is equal to
4527 class="cmtt-12">[i]</span>)
4528 <ol class="enumerate3" >
4530 class="enumerate" id="x1-75008x1">if vector <span
4531 class="cmtt-12">[no_residue] </span>element <span
4532 class="cmtt-12">[j] </span>is true
4533 <ol class="enumerate4" >
4535 class="enumerate" id="x1-75010x1">vector <span
4536 class="cmtt-12">[do_not_decode_flag] </span>element <span
4537 class="cmtt-12">[ch] </span>is set</li></ol>
4538 <!--l. 453--><p class="noindent" >else
4539 <ol class="enumerate4" >
4541 class="enumerate" id="x1-75012x1">vector <span
4542 class="cmtt-12">[do_not_decode_flag] </span>element <span
4543 class="cmtt-12">[ch] </span>is unset</li></ol>
4546 class="enumerate" id="x1-75014x2">increment <span
4547 class="cmtt-12">[ch]</span></li></ol>
4554 class="enumerate" id="x1-75016x3"><span
4555 class="cmtt-12">[residue_number] </span>= vector <span
4556 class="cmtt-12">[vorbis_mapping_submap_residue] </span>element <span
4557 class="cmtt-12">[i]</span>
4560 class="enumerate" id="x1-75018x4"><span
4561 class="cmtt-12">[residue_type] </span>= vector <span
4562 class="cmtt-12">[vorbis_residue_types] </span>element <span
4563 class="cmtt-12">[residue_number]</span>
4566 class="enumerate" id="x1-75020x5">decode <span
4567 class="cmtt-12">[ch] </span>vectors using residue <span
4568 class="cmtt-12">[residue_number]</span>, according to type <span
4569 class="cmtt-12">[residue_type]</span>,
4571 class="cmtt-12">[do_not_decode_flag] </span>to indicate which vectors in the bundle should
4573 class="cmtt-12">[n]</span>/2.
4576 class="enumerate" id="x1-75022x6"><span
4577 class="cmtt-12">[ch] </span>= 0
4580 class="enumerate" id="x1-75024x7">for each channel <span
4581 class="cmtt-12">[j] </span>in order from 0 ... <span
4582 class="cmtt-12">[audio_channels]</span>
4583 <ol class="enumerate2" >
4585 class="enumerate" id="x1-75026x1">if channel <span
4586 class="cmtt-12">[j] </span>is in submap <span
4587 class="cmtt-12">[i] </span>(vector <span
4588 class="cmtt-12">[vorbis_mapping_mux] </span>element <span
4589 class="cmtt-12">[j] </span>is equal
4591 class="cmtt-12">[i]</span>)
4592 <ol class="enumerate3" >
4594 class="enumerate" id="x1-75028x1">residue vector for channel <span
4595 class="cmtt-12">[j] </span>is set to decoded residue vector <span
4596 class="cmtt-12">[ch]</span>
4599 class="enumerate" id="x1-75030x2">increment <span
4600 class="cmtt-12">[ch]</span></li></ol>
4603 <!--l. 480--><p class="noindent" >
4604 <h5 class="subsubsectionHead"><span class="titlemark">4.3.5 </span> <a
4606 <!--l. 482--><p class="noindent" >for each <span
4607 class="cmtt-12">[i] </span>from <span
4608 class="cmtt-12">[vorbis_mapping_coupling_steps]</span>-1 descending to 0
4609 <!--l. 484--><p class="noindent" >
4610 <ol class="enumerate1" >
4612 class="enumerate" id="x1-76002x1"><span
4613 class="cmtt-12">[magnitude_vector] </span>= the residue vector for channel …
4615 class="cmtt-12">[vorbis_mapping_magnitude] </span>element <span
4616 class="cmtt-12">[i]</span>)
4619 class="enumerate" id="x1-76004x2"><span
4620 class="cmtt-12">[angle_vector] </span>= the residue vector for channel (vector <span
4621 class="cmtt-12">[vorbis_mapping_angle]</span>
4626 class="cmtt-12">[i]</span>)
4629 class="enumerate" id="x1-76006x3">for each scalar value <span
4630 class="cmtt-12">[M] </span>in vector <span
4631 class="cmtt-12">[magnitude_vector] </span>and the corresponding scalar value
4633 class="cmtt-12">[A] </span>in vector <span
4634 class="cmtt-12">[angle_vector]</span>:
4635 <ol class="enumerate2" >
4637 class="enumerate" id="x1-76008x1">if (<span
4638 class="cmtt-12">[M] </span>is greater than zero)
4639 <ol class="enumerate3" >
4641 class="enumerate" id="x1-76010x1">if (<span
4642 class="cmtt-12">[A] </span>is greater than zero)
4643 <ol class="enumerate4" >
4645 class="enumerate" id="x1-76012x1"><span
4646 class="cmtt-12">[new_M] </span>= <span
4647 class="cmtt-12">[M]</span>
4650 class="enumerate" id="x1-76014x2"><span
4651 class="cmtt-12">[new_A] </span>= <span
4652 class="cmtt-12">[M]</span>-<span
4653 class="cmtt-12">[A]</span></li></ol>
4654 <!--l. 498--><p class="noindent" >else
4655 <ol class="enumerate4" >
4657 class="enumerate" id="x1-76016x1"><span
4658 class="cmtt-12">[new_A] </span>= <span
4659 class="cmtt-12">[M]</span>
4662 class="enumerate" id="x1-76018x2"><span
4663 class="cmtt-12">[new_M] </span>= <span
4664 class="cmtt-12">[M]</span>+<span
4665 class="cmtt-12">[A]</span></li></ol>
4667 <!--l. 505--><p class="noindent" >else
4668 <ol class="enumerate3" >
4670 class="enumerate" id="x1-76020x1">if (<span
4671 class="cmtt-12">[A] </span>is greater than zero)
4672 <ol class="enumerate4" >
4674 class="enumerate" id="x1-76022x1"><span
4675 class="cmtt-12">[new_M] </span>= <span
4676 class="cmtt-12">[M]</span>
4679 class="enumerate" id="x1-76024x2"><span
4680 class="cmtt-12">[new_A] </span>= <span
4681 class="cmtt-12">[M]</span>+<span
4682 class="cmtt-12">[A]</span></li></ol>
4683 <!--l. 512--><p class="noindent" >else
4684 <ol class="enumerate4" >
4686 class="enumerate" id="x1-76026x1"><span
4687 class="cmtt-12">[new_A] </span>= <span
4688 class="cmtt-12">[M]</span>
4691 class="enumerate" id="x1-76028x2"><span
4692 class="cmtt-12">[new_M] </span>= <span
4693 class="cmtt-12">[M]</span>-<span
4694 class="cmtt-12">[A]</span></li></ol>
4698 class="enumerate" id="x1-76030x2">set scalar value <span
4699 class="cmtt-12">[M] </span>in vector <span
4700 class="cmtt-12">[magnitude_vector] </span>to <span
4701 class="cmtt-12">[new_M]</span>
4707 class="enumerate" id="x1-76032x3">set scalar value <span
4708 class="cmtt-12">[A] </span>in vector <span
4709 class="cmtt-12">[angle_vector] </span>to <span
4710 class="cmtt-12">[new_A]</span></li></ol>
4712 <!--l. 529--><p class="noindent" >
4713 <h5 class="subsubsectionHead"><span class="titlemark">4.3.6 </span> <a
4715 <!--l. 531--><p class="noindent" >For each channel, synthesize the floor curve from the decoded flo…
4717 class="cmtt-12">[n]</span>/2.
4718 <!--l. 535--><p class="noindent" >For each channel, multiply each element of the floor curve by eac…
4721 class="cmtt-12">[n]</span>/2 audio spectrum for each
4723 <!--l. 543--><p class="noindent" >One point is worth mentioning about this dot product; a common mi…
4728 <!--l. 550--><p class="noindent" >However, floor vector values can span <span
4729 class="cmsy-10x-x-120">∼</span>140dB (<span
4730 class="cmsy-10x-x-120">∼</span>24 bits unsigned), and the audio spectrum
4732 class="cmsy-10x-x-120">∼</span>21 bits with sign), even when output is to a 16
4735 class="cmsy-10x-x-120">−</span>140dB, it must be able to span 0 to +140dB. For the residue ve…
4737 class="cmsy-10x-x-120">−</span>140dB to +0dB.
4739 class="cmsy-10x-x-120">−</span>140dB to
4745 <!--l. 567--><p class="noindent" >
4746 <h5 class="subsubsectionHead"><span class="titlemark">4.3.7 </span> <a
4748 <!--l. 569--><p class="noindent" >Convert the audio spectrum vector of each channel back into time …
4753 available in <span class="cite">[<a
4756 <!--l. 576--><p class="noindent" >
4757 <h5 class="subsubsectionHead"><span class="titlemark">4.3.8 </span> <a
4759 <!--l. 578--><p class="noindent" >Windowed MDCT output is overlapped and added with the right hand …
4772 <!--l. 592--><p class="noindent" >
4773 <div class="fancyvrb" id="fancyvrb22">
4776 class="cmr-6">1</span><span
4777 class="cmtt-8"> </span><span
4778 class="cmtt-8"> window_blocksize(previous_window)/4+window_blocksize(current_window)/4</span>
4780 <!--l. 596--><p class="noindent" >from the center (element windowsize/2) of the previous window to …
4782 <!--l. 599--><p class="noindent" >Data is not returned from the first frame; it must be used to …
4785 <!--l. 606--><p class="noindent" >
4786 <h5 class="subsubsectionHead"><span class="titlemark">4.3.9 </span> <a
4788 <!--l. 608--><p class="noindent" >Vorbis I specifies only a channel mapping type 0. In mapping type…
4795 <!--l. 614--><p class="noindent" >These channel orderings refer to order within the encoded stream.…
4798 <!--l. 619--><p class="noindent" >
4799 <dl class="description"><dt class="description">
4801 class="cmssbx-10x-x-120">one channel</span> </dt><dd
4802 class="description">the stream is monophonic
4803 </dd><dt class="description">
4805 class="cmssbx-10x-x-120">two channels</span> </dt><dd
4806 class="description">the stream is stereo. channel order: left, right
4807 </dd><dt class="description">
4809 class="cmssbx-10x-x-120">three channels</span> </dt><dd
4810 class="description">the stream is a 1d-surround encoding. channel order: left, center, right
4811 </dd><dt class="description">
4813 class="cmssbx-10x-x-120">four channels</span> </dt><dd
4814 class="description">the stream is quadraphonic surround. channel order: front left, front right,
4816 </dd><dt class="description">
4818 class="cmssbx-10x-x-120">five channels</span> </dt><dd
4819 class="description">the stream is five-channel surround. channel order: front left, center, front
4821 </dd><dt class="description">
4823 class="cmssbx-10x-x-120">six channels</span> </dt><dd
4824 class="description">the stream is 5.1 surround. channel order: front left, center, front right, rear
4826 </dd><dt class="description">
4828 class="cmssbx-10x-x-120">seven channels</span> </dt><dd
4829 class="description">the stream is 6.1 surround. channel order: front left, center, front right,
4831 </dd><dt class="description">
4833 class="cmssbx-10x-x-120">eight channels</span> </dt><dd
4834 class="description">the stream is 7.1 surround. channel order: front left, center, front right,
4836 </dd><dt class="description">
4838 class="cmssbx-10x-x-120">greater than eight channels</span> </dt><dd
4839 class="description">channel use and order is defined by the application
4841 <!--l. 656--><p class="noindent" >Applications using Vorbis for dedicated purposes may define chann…
4851 <h3 class="sectionHead"><span class="titlemark">5 </span> <a
4853 <!--l. 6--><p class="noindent" >
4854 <h4 class="subsectionHead"><span class="titlemark">5.1 </span> <a
4856 <!--l. 8--><p class="noindent" >The Vorbis text comment header is the second (of three) header pack…
4860 <!--l. 14--><p class="noindent" >The comment field is meant to be used much like someone jotting a …
4865 <!--l. 21--><p class="noindent" >
4866 <div class="quote">
4867 <!--l. 22--><p class="noindent" >Honest Bob and the Factory-to-Dealer-Incentives, <span
4868 class="cmti-12">“I’m Still Around”</span>, opening
4870 <!--l. 29--><p class="noindent" >
4871 <h4 class="subsectionHead"><span class="titlemark">5.2 </span> <a
4873 <!--l. 31--><p class="noindent" >
4874 <h5 class="subsubsectionHead"><span class="titlemark">5.2.1 </span> <a
4876 <!--l. 33--><p class="noindent" >The comment header is logically a list of eight-bit-clean vectors;…
4878 class="cmr-8">32</span></sup> <span
4879 class="cmsy-10x-x-120">− </span>1 and the length of each vector is limited to 2<sup><span
4880 class="cmr-8">32</span></sup> <span
4881 class="cmsy-10x-x-120">− </span>1 bytes. The vector length is
4889 <!--l. 41--><p class="noindent" >The vector lengths and number of vectors are stored lsb first, acc…
4893 <!--l. 46--><p class="noindent" >The comment header is decoded as follows:
4894 <!--l. 48--><p class="noindent" >
4895 <div class="fancyvrb" id="fancyvrb23">
4898 class="cmr-6">1</span><span
4899 class="cmtt-8"> </span><span
4900 class="cmtt-8"> </span><span
4901 class="cmtt-8"> </span><span
4902 class="cmtt-8"> 1)</span><span
4903 class="cmtt-8"> [vendor_length]</span><span
4904 class="cmtt-8"> =</span><span
4905 class="cmtt-8"> read</span><span
4906 class="cmtt-8"> an</span><span
4907 class="cmtt-8"> unsigned</span><span
4908 class="cmtt-8"> integer</span><span
4909 class="cmtt-8"> of</span><span
4910 class="cmtt-8"> 32</span><span
4911 class="cmtt-8"> bits</span>
4912 <br class="fancyvrb" /><a
4914 class="cmr-6">2</span><span
4915 class="cmtt-8"> </span><span
4916 class="cmtt-8"> </span><span
4917 class="cmtt-8"> </span><span
4918 class="cmtt-8"> 2)</span><span
4919 class="cmtt-8"> [vendor_string]</span><span
4920 class="cmtt-8"> =</span><span
4921 class="cmtt-8"> read</span><span
4922 class="cmtt-8"> a</span><span
4923 class="cmtt-8"> UTF-8</span><span
4924 class="cmtt-8"> vector</span><span
4925 class="cmtt-8"> as</span><span
4926 class="cmtt-8"> [vendor_length]</span><span
4927 class="cmtt-8"> octets</span>
4928 <br class="fancyvrb" /><a
4930 class="cmr-6">3</span><span
4931 class="cmtt-8"> </span><span
4932 class="cmtt-8"> </span><span
4933 class="cmtt-8"> </span><span
4934 class="cmtt-8"> 3)</span><span
4935 class="cmtt-8"> [user_comment_list_length]</span><span
4936 class="cmtt-8"> =</span><span
4937 class="cmtt-8"> read</span><span
4938 class="cmtt-8"> an</span><span
4939 class="cmtt-8"> unsigned</span><span
4940 class="cmtt-8"> integer</span><span
4941 class="cmtt-8"> of</span><span
4942 class="cmtt-8"> 32</span><span
4943 class="cmtt-8"> bits</span>
4944 <br class="fancyvrb" /><a
4946 class="cmr-6">4</span><span
4947 class="cmtt-8"> </span><span
4948 class="cmtt-8"> </span><span
4949 class="cmtt-8"> </span><span
4950 class="cmtt-8"> 4)</span><span
4951 class="cmtt-8"> iterate</span><span
4952 class="cmtt-8"> [user_comment_list_length]</span><span
4953 class="cmtt-8"> times</span><span
4954 class="cmtt-8"> {</span>
4955 <br class="fancyvrb" /><a
4957 class="cmr-6">5</span><span
4958 class="cmtt-8"> </span><span
4959 class="cmtt-8"> </span><span
4960 class="cmtt-8"> </span><span
4961 class="cmtt-8"> </span><span
4962 class="cmtt-8"> </span><span
4963 class="cmtt-8"> </span><span
4964 class="cmtt-8"> </span><span
4965 class="cmtt-8"> </span><span
4966 class="cmtt-8"> 5)</span><span
4967 class="cmtt-8"> [length]</span><span
4968 class="cmtt-8"> =</span><span
4969 class="cmtt-8"> read</span><span
4970 class="cmtt-8"> an</span><span
4971 class="cmtt-8"> unsigned</span><span
4972 class="cmtt-8"> integer</span><span
4973 class="cmtt-8"> of</span><span
4974 class="cmtt-8"> 32</span><span
4975 class="cmtt-8"> bits</span>
4976 <br class="fancyvrb" /><a
4978 class="cmr-6">6</span><span
4979 class="cmtt-8"> </span><span
4980 class="cmtt-8"> </span><span
4981 class="cmtt-8"> </span><span
4982 class="cmtt-8"> </span><span
4983 class="cmtt-8"> </span><span
4984 class="cmtt-8"> </span><span
4985 class="cmtt-8"> </span><span
4986 class="cmtt-8"> </span><span
4987 class="cmtt-8"> 6)</span><span
4988 class="cmtt-8"> this</span><span
4989 class="cmtt-8"> iteration’s</span><span
4990 class="cmtt-8"> user</span><span
4991 class="cmtt-8"> comment</span><span
4992 class="cmtt-8"> =</span><span
4993 class="cmtt-8"> read</span><span
4994 class="cmtt-8"> a</span><span
4995 class="cmtt-8"> UTF-8</span><span
4996 class="cmtt-8"> vector</span><span
4997 class="cmtt-8"> as</span><span
4998 class="cmtt-8"> [length]</span><span
4999 class="cmtt-8"> octets</span>
5000 <br class="fancyvrb" /><a
5002 class="cmr-6">7</span><span
5003 class="cmtt-8"> </span><span
5004 class="cmtt-8"> </span><span
5005 class="cmtt-8"> </span><span
5006 class="cmtt-8"> </span><span
5007 class="cmtt-8"> </span><span
5008 class="cmtt-8"> </span><span
5009 class="cmtt-8"> }</span>
5010 <br class="fancyvrb" /><a
5012 class="cmr-6">8</span><span
5013 class="cmtt-8"> </span><span
5014 class="cmtt-8"> </span><span
5015 class="cmtt-8"> </span><span
5016 class="cmtt-8"> 7)</span><span
5017 class="cmtt-8"> [framing_bit]</span><span
5018 class="cmtt-8"> =</span><span
5019 class="cmtt-8"> read</span><span
5020 class="cmtt-8"> a</span><span
5021 class="cmtt-8"> single</span><span
5022 class="cmtt-8"> bit</span><span
5023 class="cmtt-8"> as</span><span
5024 class="cmtt-8"> boolean</span>
5025 <br class="fancyvrb" /><a
5027 class="cmr-6">9</span><span
5028 class="cmtt-8"> </span><span
5029 class="cmtt-8"> </span><span
5030 class="cmtt-8"> </span><span
5031 class="cmtt-8"> 8)</span><span
5032 class="cmtt-8"> if</span><span
5033 class="cmtt-8"> (</span><span
5034 class="cmtt-8"> [framing_bit]</span><span
5035 class="cmtt-8"> unset</span><span
5036 class="cmtt-8"> or</span><span
5037 class="cmtt-8"> end-of-packet</span><span
5038 class="cmtt-8"> )</span><span
5039 class="cmtt-8"> then</span><span
5040 class="cmtt-8"> ERROR</span>
5041 <br class="fancyvrb" /><a
5043 class="cmr-6">10</span><span
5044 class="cmtt-8"> </span><span
5045 class="cmtt-8"> </span><span
5046 class="cmtt-8"> </span><span
5047 class="cmtt-8"> 9)</span><span
5048 class="cmtt-8"> done.</span>
5050 <!--l. 64--><p class="noindent" >
5051 <h5 class="subsubsectionHead"><span class="titlemark">5.2.2 </span> <a
5053 <!--l. 66--><p class="noindent" >The comment vectors are structured similarly to a UNIX environment…
5055 <!--l. 70--><p class="noindent" >
5056 <div class="quote">
5057 <!--l. 71--><p class="noindent" >
5058 <div class="fancyvrb" id="fancyvrb24">
5061 class="cmr-6">1</span><span
5062 class="cmtt-8"> </span><span
5063 class="cmtt-8"> comment[0]="ARTIST=me";</span>
5064 <br class="fancyvrb" /><a
5066 class="cmr-6">2</span><span
5067 class="cmtt-8"> </span><span
5068 class="cmtt-8"> comment[1]="TITLE=the</span><span
5069 class="cmtt-8"> sound</span><span
5070 class="cmtt-8"> of</span><span
5071 class="cmtt-8"> Vorbis";</span>
5077 <!--l. 77--><p class="noindent" >The field name is case-insensitive and may consist of ASCII 0x20 t…
5080 <!--l. 83--><p class="noindent" >The field name is immediately followed by ASCII 0x3D (’=R…
5082 <!--l. 87--><p class="noindent" >0x3D is followed by 8 bit clean UTF-8 encoded value of the field c…
5084 <!--l. 91--><p class="noindent" ><span class="paragraphHead"><a
5086 class="cmbx-12">Field names</span></span>
5090 <!--l. 98--><p class="noindent" >
5091 <dl class="description"><dt class="description">
5093 class="cmssbx-10x-x-120">TITLE</span> </dt><dd
5094 class="description">Track/Work name
5095 </dd><dt class="description">
5097 class="cmssbx-10x-x-120">VERSION</span> </dt><dd
5098 class="description">The version field may be used to differentiate multiple versions of the same
5100 </dd><dt class="description">
5102 class="cmssbx-10x-x-120">ALBUM</span> </dt><dd
5103 class="description">The collection name to which this track belongs
5104 </dd><dt class="description">
5106 class="cmssbx-10x-x-120">TRACKNUMBER</span> </dt><dd
5107 class="description">The track number of this piece if part of a specific larger collection or
5109 </dd><dt class="description">
5111 class="cmssbx-10x-x-120">ARTIST</span> </dt><dd
5112 class="description">The artist generally considered responsible for the work. In popular music this…
5115 </dd><dt class="description">
5117 class="cmssbx-10x-x-120">PERFORMER</span> </dt><dd
5118 class="description">The artist(s) who performed the work. In classical music this would be the
5121 </dd><dt class="description">
5123 class="cmssbx-10x-x-120">COPYRIGHT</span> </dt><dd
5124 class="description">Copyright attribution, e.g., ’2001 Nobody’s Band’ or ’1…
5125 </dd><dt class="description">
5130 class="cmssbx-10x-x-120">LICENSE</span> </dt><dd
5131 class="description">License information, eg, ’All Rights Reserved’, ’Any Use Perm…
5136 </dd><dt class="description">
5138 class="cmssbx-10x-x-120">ORGANIZATION</span> </dt><dd
5139 class="description">Name of the organization producing the track (i.e. the ’record label̵…
5140 </dd><dt class="description">
5142 class="cmssbx-10x-x-120">DESCRIPTION</span> </dt><dd
5143 class="description">A short text description of the contents
5144 </dd><dt class="description">
5146 class="cmssbx-10x-x-120">GENRE</span> </dt><dd
5147 class="description">A short text indication of music genre
5148 </dd><dt class="description">
5150 class="cmssbx-10x-x-120">DATE</span> </dt><dd
5151 class="description">Date the track was recorded
5152 </dd><dt class="description">
5154 class="cmssbx-10x-x-120">LOCATION</span> </dt><dd
5155 class="description">Location where track was recorded
5156 </dd><dt class="description">
5158 class="cmssbx-10x-x-120">CONTACT</span> </dt><dd
5159 class="description">Contact information for the creators or distributors of the track. This could
5161 </dd><dt class="description">
5163 class="cmssbx-10x-x-120">ISRC</span> </dt><dd
5164 class="description">International Standard Recording Code for the track; see <a
5168 <!--l. 158--><p class="noindent" ><span class="paragraphHead"><a
5170 class="cmbx-12">Implications</span></span>
5174 class="cmti-12">contents</span>, however, use the UTF-8 character encoding to allow easy representa…
5176 <!--l. 166--><p class="noindent" >We have the length of the entirety of the field and restrictions …
5179 <!--l. 170--><p class="noindent" >Individual ’vendors’ may use non-standard field names…
5185 <!--l. 174--><p class="noindent" >There is no vendor-specific prefix to ’nonstandard’ f…
5188 <!--l. 179--><p class="noindent" >Field names are not required to be unique (occur once) within a c…
5191 <!--l. 183--><p class="noindent" >
5192 <div class="quote">
5193 <!--l. 184--><p class="noindent" >
5194 <div class="fancyvrb" id="fancyvrb25">
5197 class="cmr-6">1</span><span
5198 class="cmtt-8"> </span><span
5199 class="cmtt-8"> ARTIST=Dizzy</span><span
5200 class="cmtt-8"> Gillespie</span>
5201 <br class="fancyvrb" /><a
5203 class="cmr-6">2</span><span
5204 class="cmtt-8"> </span><span
5205 class="cmtt-8"> ARTIST=Sonny</span><span
5206 class="cmtt-8"> Rollins</span>
5207 <br class="fancyvrb" /><a
5209 class="cmr-6">3</span><span
5210 class="cmtt-8"> </span><span
5211 class="cmtt-8"> ARTIST=Sonny</span><span
5212 class="cmtt-8"> Stitt</span>
5215 <!--l. 197--><p class="noindent" >
5216 <h5 class="subsubsectionHead"><span class="titlemark">5.2.3 </span> <a
5218 <!--l. 199--><p class="noindent" >The comment header comprises the entirety of the second bitstream…
5223 <!--l. 207--><p class="noindent" >The comment header is encoded as follows (as per Ogg’s stan…
5226 <!--l. 212--><p class="noindent" >
5227 <ol class="enumerate1" >
5229 …class="enumerate" id="x1-88002x1">Vendor string length (32 bit unsigned quantity specifying number…
5232 …class="enumerate" id="x1-88004x2">Vendor string ([vendor string length] octets coded from beginnin…
5239 …class="enumerate" id="x1-88006x3">Number of comment fields (32 bit unsigned quantity specifying nu…
5242 class="enumerate" id="x1-88008x4">Comment field 0 length (if [Number of comment fields] <span
5243 class="cmmi-12">> </span>0; 32 bit unsigned quantity
5247 …class="enumerate" id="x1-88010x5">Comment field 0 ([Comment field 0 length] octets coded from begi…
5251 class="enumerate" id="x1-88012x6">Comment field 1 length (if [Number of comment fields] <span
5252 class="cmmi-12">> </span>1...)...
5254 <!--l. 234--><p class="noindent" >This is actually somewhat easier to describe in code; implementat…
5256 class="cmtt-12">vorbis/lib/info.c</span>, <span
5257 class="cmtt-12">_vorbis_pack_comment() </span>and <span
5258 class="cmtt-12">_vorbis_unpack_comment()</span>.
5265 <h3 class="sectionHead"><span class="titlemark">6 </span> <a
5267 <!--l. 6--><p class="noindent" >
5268 <h4 class="subsectionHead"><span class="titlemark">6.1 </span> <a
5270 <!--l. 8--><p class="noindent" >Vorbis floor type zero uses Line Spectral Pair (LSP, also alternate…
5275 <!--l. 18--><p class="noindent" >
5276 <h4 class="subsectionHead"><span class="titlemark">6.2 </span> <a
5278 <!--l. 20--><p class="noindent" >Floor zero configuration consists of six integer fields and a list…
5280 <!--l. 24--><p class="noindent" >
5281 <h5 class="subsubsectionHead"><span class="titlemark">6.2.1 </span> <a
5283 <!--l. 26--><p class="noindent" >Configuration information for instances of floor zero decodes from…
5285 <!--l. 30--><p class="noindent" >
5286 <div class="fancyvrb" id="fancyvrb26">
5289 class="cmr-6">1</span><span
5290 class="cmtt-8"> </span><span
5291 class="cmtt-8"> </span><span
5292 class="cmtt-8"> </span><span
5293 class="cmtt-8"> 1)</span><span
5294 class="cmtt-8"> [floor0_order]</span><span
5295 class="cmtt-8"> =</span><span
5296 class="cmtt-8"> read</span><span
5297 class="cmtt-8"> an</span><span
5298 class="cmtt-8"> unsigned</span><span
5299 class="cmtt-8"> integer</span><span
5300 class="cmtt-8"> of</span><span
5301 class="cmtt-8"> 8</span><span
5302 class="cmtt-8"> bits</span>
5303 <br class="fancyvrb" /><a
5305 class="cmr-6">2</span><span
5306 class="cmtt-8"> </span><span
5307 class="cmtt-8"> </span><span
5308 class="cmtt-8"> </span><span
5309 class="cmtt-8"> 2)</span><span
5310 class="cmtt-8"> [floor0_rate]</span><span
5311 class="cmtt-8"> =</span><span
5312 class="cmtt-8"> read</span><span
5313 class="cmtt-8"> an</span><span
5314 class="cmtt-8"> unsigned</span><span
5315 class="cmtt-8"> integer</span><span
5316 class="cmtt-8"> of</span><span
5317 class="cmtt-8"> 16</span><span
5318 class="cmtt-8"> bits</span>
5319 <br class="fancyvrb" /><a
5321 class="cmr-6">3</span><span
5322 class="cmtt-8"> </span><span
5323 class="cmtt-8"> </span><span
5324 class="cmtt-8"> </span><span
5325 class="cmtt-8"> 3)</span><span
5326 class="cmtt-8"> [floor0_bark_map_size]</span><span
5327 class="cmtt-8"> =</span><span
5328 class="cmtt-8"> read</span><span
5329 class="cmtt-8"> an</span><span
5330 class="cmtt-8"> unsigned</span><span
5331 class="cmtt-8"> integer</span><span
5332 class="cmtt-8"> of</span><span
5333 class="cmtt-8"> 16</span><span
5334 class="cmtt-8"> bits</span>
5335 <br class="fancyvrb" /><a
5337 class="cmr-6">4</span><span
5338 class="cmtt-8"> </span><span
5339 class="cmtt-8"> </span><span
5340 class="cmtt-8"> </span><span
5341 class="cmtt-8"> 4)</span><span
5342 class="cmtt-8"> [floor0_amplitude_bits]</span><span
5343 class="cmtt-8"> =</span><span
5344 class="cmtt-8"> read</span><span
5345 class="cmtt-8"> an</span><span
5346 class="cmtt-8"> unsigned</span><span
5347 class="cmtt-8"> integer</span><span
5348 class="cmtt-8"> of</span><span
5349 class="cmtt-8"> six</span><span
5350 class="cmtt-8"> bits</span>
5351 <br class="fancyvrb" /><a
5353 class="cmr-6">5</span><span
5354 class="cmtt-8"> </span><span
5355 class="cmtt-8"> </span><span
5356 class="cmtt-8"> </span><span
5357 class="cmtt-8"> 5)</span><span
5358 class="cmtt-8"> [floor0_amplitude_offset]</span><span
5359 class="cmtt-8"> =</span><span
5360 class="cmtt-8"> read</span><span
5361 class="cmtt-8"> an</span><span
5362 class="cmtt-8"> unsigned</span><span
5363 class="cmtt-8"> integer</span><span
5364 class="cmtt-8"> of</span><span
5365 class="cmtt-8"> eight</span><span
5366 class="cmtt-8"> bits</span>
5367 <br class="fancyvrb" /><a
5369 class="cmr-6">6</span><span
5370 class="cmtt-8"> </span><span
5371 class="cmtt-8"> </span><span
5372 class="cmtt-8"> </span><span
5373 class="cmtt-8"> 6)</span><span
5374 class="cmtt-8"> [floor0_number_of_books]</span><span
5375 class="cmtt-8"> =</span><span
5376 class="cmtt-8"> read</span><span
5377 class="cmtt-8"> an</span><span
5378 class="cmtt-8"> unsigned</span><span
5379 class="cmtt-8"> integer</span><span
5380 class="cmtt-8"> of</span><span
5381 class="cmtt-8"> four</span><span
5382 class="cmtt-8"> bits</span><span
5383 class="cmtt-8"> and</span><span
5384 class="cmtt-8"> add</span><span
5385 class="cmtt-8"> 1</span>
5386 <br class="fancyvrb" /><a
5388 class="cmr-6">7</span><span
5389 class="cmtt-8"> </span><span
5390 class="cmtt-8"> </span><span
5391 class="cmtt-8"> </span><span
5392 class="cmtt-8"> 7)</span><span
5393 class="cmtt-8"> array</span><span
5394 class="cmtt-8"> [floor0_book_list]</span><span
5395 class="cmtt-8"> =</span><span
5396 class="cmtt-8"> read</span><span
5397 class="cmtt-8"> a</span><span
5398 class="cmtt-8"> list</span><span
5399 class="cmtt-8"> of</span><span
5400 class="cmtt-8"> [floor0_number_of_books]</span><span
5401 class="cmtt-8"> unsigned</span><span
5402 class="cmtt-8"> integers</span><span
5403 class="cmtt-8"> of</span><span
5404 class="cmtt-8"> eight</span><span
5405 class="cmtt-8"> bits</span><span
5406 class="cmtt-8"> each;</span>
5411 <!--l. 40--><p class="noindent" >An end-of-packet condition during any of these bitstream reads ren…
5413 class="cmtt-12">[floor0_book_list] </span>that is greater than the maximum
5416 <!--l. 48--><p class="noindent" >
5417 <h5 class="subsubsectionHead"><span class="titlemark">6.2.2 </span> <a
5419 <!--l. 50--><p class="noindent" >Extracting a floor0 curve from an audio packet consists of first d…
5421 class="cmtt-12">[floor0_order] </span>LSP coefficient values from the bitstream, and then
5424 <!--l. 56--><p class="noindent" >Packet decode proceeds as follows:
5425 <div class="fancyvrb" id="fancyvrb27">
5428 class="cmr-6">1</span><span
5429 class="cmtt-8"> </span><span
5430 class="cmtt-8"> </span><span
5431 class="cmtt-8"> </span><span
5432 class="cmtt-8"> 1)</span><span
5433 class="cmtt-8"> [amplitude]</span><span
5434 class="cmtt-8"> =</span><span
5435 class="cmtt-8"> read</span><span
5436 class="cmtt-8"> an</span><span
5437 class="cmtt-8"> unsigned</span><span
5438 class="cmtt-8"> integer</span><span
5439 class="cmtt-8"> of</span><span
5440 class="cmtt-8"> [floor0_amplitude_bits]</span><span
5441 class="cmtt-8"> bits</span>
5442 <br class="fancyvrb" /><a
5444 class="cmr-6">2</span><span
5445 class="cmtt-8"> </span><span
5446 class="cmtt-8"> </span><span
5447 class="cmtt-8"> </span><span
5448 class="cmtt-8"> 2)</span><span
5449 class="cmtt-8"> if</span><span
5450 class="cmtt-8"> (</span><span
5451 class="cmtt-8"> [amplitude]</span><span
5452 class="cmtt-8"> is</span><span
5453 class="cmtt-8"> greater</span><span
5454 class="cmtt-8"> than</span><span
5455 class="cmtt-8"> zero</span><span
5456 class="cmtt-8"> )</span><span
5457 class="cmtt-8"> </span><span
5458 class="cmsy-8">{</span>
5459 <br class="fancyvrb" /><a
5461 class="cmr-6">3</span><span
5462 class="cmtt-8"> </span><span
5463 class="cmtt-8"> </span><span
5464 class="cmtt-8"> </span><span
5465 class="cmtt-8"> </span><span
5466 class="cmtt-8"> </span><span
5467 class="cmtt-8"> </span><span
5468 class="cmtt-8"> </span><span
5469 class="cmtt-8"> </span><span
5470 class="cmtt-8"> 3)</span><span
5471 class="cmtt-8"> [coefficients]</span><span
5472 class="cmtt-8"> is</span><span
5473 class="cmtt-8"> an</span><span
5474 class="cmtt-8"> empty,</span><span
5475 class="cmtt-8"> zero</span><span
5476 class="cmtt-8"> length</span><span
5477 class="cmtt-8"> vector</span>
5478 <br class="fancyvrb" /><a
5480 class="cmr-6">4</span><span
5481 class="cmtt-8"> </span><span
5482 class="cmtt-8"> </span><span
5483 class="cmtt-8"> </span><span
5484 class="cmtt-8"> </span><span
5485 class="cmtt-8"> </span><span
5486 class="cmtt-8"> </span><span
5487 class="cmtt-8"> </span><span
5488 class="cmtt-8"> </span><span
5489 class="cmtt-8"> 4)</span><span
5490 class="cmtt-8"> [booknumber]</span><span
5491 class="cmtt-8"> =</span><span
5492 class="cmtt-8"> read</span><span
5493 class="cmtt-8"> an</span><span
5494 class="cmtt-8"> unsigned</span><span
5495 class="cmtt-8"> integer</span><span
5496 class="cmtt-8"> of</span><span
5497 class="cmtt-8"> </span><a
5499 class="cmtt-8">ilog</span></a><span
5500 class="cmtt-8">(</span><span
5501 class="cmtt-8"> [floor0_number_of_books]</span><span
5502 class="cmtt-8"> )</span><span
5503 class="cmtt-8"> bits</span>
5504 <br class="fancyvrb" /><a
5506 class="cmr-6">5</span><span
5507 class="cmtt-8"> </span><span
5508 class="cmtt-8"> </span><span
5509 class="cmtt-8"> </span><span
5510 class="cmtt-8"> </span><span
5511 class="cmtt-8"> </span><span
5512 class="cmtt-8"> </span><span
5513 class="cmtt-8"> </span><span
5514 class="cmtt-8"> </span><span
5515 class="cmtt-8"> 5)</span><span
5516 class="cmtt-8"> if</span><span
5517 class="cmtt-8"> (</span><span
5518 class="cmtt-8"> [booknumber]</span><span
5519 class="cmtt-8"> is</span><span
5520 class="cmtt-8"> greater</span><span
5521 class="cmtt-8"> than</span><span
5522 class="cmtt-8"> the</span><span
5523 class="cmtt-8"> highest</span><span
5524 class="cmtt-8"> number</span><span
5525 class="cmtt-8"> decode</span><span
5526 class="cmtt-8"> codebook</span><span
5527 class="cmtt-8"> )</span><span
5528 class="cmtt-8"> then</span><span
5529 class="cmtt-8"> packet</span><span
5530 class="cmtt-8"> is</span><span
5531 class="cmtt-8"> undecodable</span>
5532 <br class="fancyvrb" /><a
5534 class="cmr-6">6</span><span
5535 class="cmtt-8"> </span><span
5536 class="cmtt-8"> </span><span
5537 class="cmtt-8"> </span><span
5538 class="cmtt-8"> </span><span
5539 class="cmtt-8"> </span><span
5540 class="cmtt-8"> </span><span
5541 class="cmtt-8"> </span><span
5542 class="cmtt-8"> </span><span
5543 class="cmtt-8"> 6)</span><span
5544 class="cmtt-8"> [last]</span><span
5545 class="cmtt-8"> =</span><span
5546 class="cmtt-8"> zero;</span>
5547 <br class="fancyvrb" /><a
5549 class="cmr-6">7</span><span
5550 class="cmtt-8"> </span><span
5551 class="cmtt-8"> </span><span
5552 class="cmtt-8"> </span><span
5553 class="cmtt-8"> </span><span
5554 class="cmtt-8"> </span><span
5555 class="cmtt-8"> </span><span
5556 class="cmtt-8"> </span><span
5557 class="cmtt-8"> </span><span
5558 class="cmtt-8"> 7)</span><span
5559 class="cmtt-8"> vector</span><span
5560 class="cmtt-8"> [temp_vector]</span><span
5561 class="cmtt-8"> =</span><span
5562 class="cmtt-8"> read</span><span
5563 class="cmtt-8"> vector</span><span
5564 class="cmtt-8"> from</span><span
5565 class="cmtt-8"> bitstream</span><span
5566 class="cmtt-8"> using</span><span
5567 class="cmtt-8"> codebook</span><span
5568 class="cmtt-8"> number</span><span
5569 class="cmtt-8"> [floor0_book_list]</span><span
5570 class="cmtt-8"> element</span><span
5571 class="cmtt-8"> [booknumber]</span><span
5572 class="cmtt-8"> in</span><span
5573 class="cmtt-8"> VQ</span><span
5574 class="cmtt-8"> context.</span>
5575 <br class="fancyvrb" /><a
5577 class="cmr-6">8</span><span
5578 class="cmtt-8"> </span><span
5579 class="cmtt-8"> </span><span
5580 class="cmtt-8"> </span><span
5581 class="cmtt-8"> </span><span
5582 class="cmtt-8"> </span><span
5583 class="cmtt-8"> </span><span
5584 class="cmtt-8"> </span><span
5585 class="cmtt-8"> </span><span
5586 class="cmtt-8"> 8)</span><span
5587 class="cmtt-8"> add</span><span
5588 class="cmtt-8"> the</span><span
5589 class="cmtt-8"> scalar</span><span
5590 class="cmtt-8"> value</span><span
5591 class="cmtt-8"> [last]</span><span
5592 class="cmtt-8"> to</span><span
5593 class="cmtt-8"> each</span><span
5594 class="cmtt-8"> scalar</span><span
5595 class="cmtt-8"> in</span><span
5596 class="cmtt-8"> vector</span><span
5597 class="cmtt-8"> [temp_vector]</span>
5598 <br class="fancyvrb" /><a
5600 class="cmr-6">9</span><span
5601 class="cmtt-8"> </span><span
5602 class="cmtt-8"> </span><span
5603 class="cmtt-8"> </span><span
5604 class="cmtt-8"> </span><span
5605 class="cmtt-8"> </span><span
5606 class="cmtt-8"> </span><span
5607 class="cmtt-8"> </span><span
5608 class="cmtt-8"> </span><span
5609 class="cmtt-8"> 9)</span><span
5610 class="cmtt-8"> [last]</span><span
5611 class="cmtt-8"> =</span><span
5612 class="cmtt-8"> the</span><span
5613 class="cmtt-8"> value</span><span
5614 class="cmtt-8"> of</span><span
5615 class="cmtt-8"> the</span><span
5616 class="cmtt-8"> last</span><span
5617 class="cmtt-8"> scalar</span><span
5618 class="cmtt-8"> in</span><span
5619 class="cmtt-8"> vector</span><span
5620 class="cmtt-8"> [temp_vector]</span>
5621 <br class="fancyvrb" /><a
5623 class="cmr-6">10</span><span
5624 class="cmtt-8"> </span><span
5625 class="cmtt-8"> </span><span
5626 class="cmtt-8"> </span><span
5627 class="cmtt-8"> </span><span
5628 class="cmtt-8"> </span><span
5629 class="cmtt-8"> </span><span
5630 class="cmtt-8"> </span><span
5631 class="cmtt-8"> 10)</span><span
5632 class="cmtt-8"> concatenate</span><span
5633 class="cmtt-8"> [temp_vector]</span><span
5634 class="cmtt-8"> onto</span><span
5635 class="cmtt-8"> the</span><span
5636 class="cmtt-8"> end</span><span
5637 class="cmtt-8"> of</span><span
5638 class="cmtt-8"> the</span><span
5639 class="cmtt-8"> [coefficients]</span><span
5640 class="cmtt-8"> vector</span>
5641 <br class="fancyvrb" /><a
5643 class="cmr-6">11</span><span
5644 class="cmtt-8"> </span><span
5645 class="cmtt-8"> </span><span
5646 class="cmtt-8"> </span><span
5647 class="cmtt-8"> </span><span
5648 class="cmtt-8"> </span><span
5649 class="cmtt-8"> </span><span
5650 class="cmtt-8"> </span><span
5651 class="cmtt-8"> 11)</span><span
5652 class="cmtt-8"> if</span><span
5653 class="cmtt-8"> (length</span><span
5654 class="cmtt-8"> of</span><span
5655 class="cmtt-8"> vector</span><span
5656 class="cmtt-8"> [coefficients]</span><span
5657 class="cmtt-8"> is</span><span
5658 class="cmtt-8"> less</span><span
5659 class="cmtt-8"> than</span><span
5660 class="cmtt-8"> [floor0_order],</span><span
5661 class="cmtt-8"> continue</span><span
5662 class="cmtt-8"> at</span><span
5663 class="cmtt-8"> step</span><span
5664 class="cmtt-8"> 6</span>
5665 <br class="fancyvrb" /><a
5667 class="cmr-6">12</span><span
5668 class="cmtt-8"> </span><span
5669 class="cmtt-8"> </span>
5670 <br class="fancyvrb" /><a
5672 class="cmr-6">13</span><span
5673 class="cmtt-8"> </span><span
5674 class="cmtt-8"> </span><span
5675 class="cmtt-8"> </span><span
5676 class="cmtt-8"> </span><span
5677 class="cmtt-8"> </span><span
5678 class="cmtt-8"> </span><span
5679 class="cmtt-8"> </span><span
5680 class="cmsy-8">}</span>
5681 <br class="fancyvrb" /><a
5683 class="cmr-6">14</span><span
5684 class="cmtt-8"> </span><span
5685 class="cmtt-8"> </span>
5686 <br class="fancyvrb" /><a
5688 class="cmr-6">15</span><span
5689 class="cmtt-8"> </span><span
5690 class="cmtt-8"> </span><span
5691 class="cmtt-8"> 12)</span><span
5692 class="cmtt-8"> done.</span>
5693 <br class="fancyvrb" /><a
5695 class="cmr-6">16</span><span
5696 class="cmtt-8"> </span><span
5697 class="cmtt-8"> </span>
5699 <!--l. 76--><p class="noindent" >Take note of the following properties of decode:
5700 <ul class="itemize1">
5701 <li class="itemize">An <span
5702 class="cmtt-12">[amplitude] </span>value of zero must result in a return code that indicates this c…
5706 …<li class="itemize">An end-of-packet condition during decode should be considered a nominal occrue…
5709 class="cmtt-12">[amplitude] </span>value had read zero at the beginning of decode.
5711 …<li class="itemize">The book number used for decode can, in fact, be stored in the bitstream in <a
5717 class="cmtt-12">[floor0_number_of_books] </span>- 1 ) bits. Nevertheless, the above specification i…
5720 <li class="itemize">The number of scalars read into the vector <span
5721 class="cmtt-12">[coefficients] </span>may be greater
5723 class="cmtt-12">[floor0_order]</span>, the number actually required for curve computation. …
5726 class="cmtt-12">[codebook_dimensions] </span>value of three and <span
5727 class="cmtt-12">[floor0_order] </span>is ten, the only way to
5729 class="cmtt-12">[coefficients] </span>is to to read a total of twelve scalars
5733 <!--l. 104--><p class="noindent" >
5734 <h5 class="subsubsectionHead"><span class="titlemark">6.2.3 </span> <a
5736 <!--l. 106--><p class="noindent" >Given an <span
5737 class="cmtt-12">[amplitude] </span>integer and <span
5738 class="cmtt-12">[coefficients] </span>vector from packet decode as well
5741 class="cmtt-12">[n] </span>specified by the
5743 <!--l. 113--><p class="noindent" >If the value <span
5744 class="cmtt-12">[amplitude] </span>is zero, the return value is a length <span
5745 class="cmtt-12">[n] </span>vector with all-zero
5748 <center class="par-math-display" >
5753 " class="par-math-display" ></center>
5754 <!--l. 128--><p class="nopar" >
5755 <!--l. 130--><p class="noindent" >where
5756 <center class="par-math-display" >
5761 " class="par-math-display" ></center>
5765 <!--l. 137--><p class="nopar" >
5766 <!--l. 139--><p class="noindent" >and
5767 <center class="par-math-display" >
5771 " class="par-math-display" ></center>
5772 <!--l. 143--><p class="nopar" >
5773 <!--l. 145--><p class="noindent" >The above is used to synthesize the LSP curve on a Bark-scale fre…
5776 class="cmtt-12">[output] </span>on a log (dB) amplitude scale, mapping it to linear amplitude in th…
5778 <!--l. 150--><p class="noindent" >
5779 <ol class="enumerate1" >
5781 class="enumerate" id="x1-94002x1"><span
5782 class="cmtt-12">[i] </span>= 0
5785 class="enumerate" id="x1-94004x2"><span
5786 class="cmtt-12">[</span><span
5787 class="cmmi-12">ω</span><span
5788 class="cmtt-12">] </span>= <span
5789 class="cmmi-12">π </span>* map element <span
5790 class="cmtt-12">[i] </span>/ <span
5791 class="cmtt-12">[floor0_bark_map_size]</span>
5794 class="enumerate" id="x1-94006x3">if ( <span
5795 class="cmtt-12">[floor0_order] </span>is odd )
5796 <ol class="enumerate2" >
5798 class="enumerate" id="x1-94008x1">calculate <span
5799 class="cmtt-12">[p] </span>and <span
5800 class="cmtt-12">[q] </span>according to: <div class="eqnarray">
5801 <center class="math-display" >
5813 " class="math-display" ></center>
5816 <!--l. 162--><p class="noindent" >else <span
5817 class="cmtt-12">[floor0_order] </span>is even
5818 <ol class="enumerate2" >
5820 class="enumerate" id="x1-94011x1">calculate <span
5821 class="cmtt-12">[p] </span>and <span
5822 class="cmtt-12">[q] </span>according to: <div class="eqnarray">
5823 <center class="math-display" >
5832 " class="math-display" ></center>
5837 class="enumerate" id="x1-94014x4">calculate <span
5838 class="cmtt-12">[linear_floor_value] </span>according to:
5839 <center class="math-display" >
5844 " class="math-display" ></center>
5845 <!--l. 177--><p class="nopar" >
5848 class="enumerate" id="x1-94016x5"><span
5849 class="cmtt-12">[iteration_condition] </span>= map element <span
5850 class="cmtt-12">[i]</span>
5856 class="enumerate" id="x1-94018x6"><span
5857 class="cmtt-12">[output] </span>element <span
5858 class="cmtt-12">[i] </span>= <span
5859 class="cmtt-12">[linear_floor_value]</span>
5862 class="enumerate" id="x1-94020x7">increment <span
5863 class="cmtt-12">[i]</span>
5866 class="enumerate" id="x1-94022x8">if ( map element <span
5867 class="cmtt-12">[i] </span>is equal to <span
5868 class="cmtt-12">[iteration_condition] </span>) continue at step
5872 class="enumerate" id="x1-94024x9">if ( <span
5873 class="cmtt-12">[i] </span>is less than <span
5874 class="cmtt-12">[n] </span>) continue at step 2
5877 class="enumerate" id="x1-94026x10">done</li></ol>
5884 <h3 class="sectionHead"><span class="titlemark">7 </span> <a
5886 <!--l. 6--><p class="noindent" >
5887 <h4 class="subsectionHead"><span class="titlemark">7.1 </span> <a
5889 <!--l. 8--><p class="noindent" >Vorbis floor type one uses a piecewise straight-line representation…
5893 <!--l. 16--><p class="noindent" >
5894 <h4 class="subsectionHead"><span class="titlemark">7.2 </span> <a
5896 <!--l. 18--><p class="noindent" >
5897 <h5 class="subsubsectionHead"><span class="titlemark">7.2.1 </span> <a
5899 <!--l. 20--><p class="noindent" >Floor type one represents a spectral curve as a series of line seg…
5902 <ul class="itemize1">
5903 …<li class="itemize">the first line segment (base case) is a logical line spanning from x˙0,…
5907 …<li class="itemize">the induction step chooses a point x˙new within an existing logical lin…
5915 …<li class="itemize">floor computation produces two new line segments, one running from x…
5920 …<li class="itemize">the induction step repeats, using a list of x values specified in the codec se…
5923 <!--l. 48--><p class="noindent" >Consider the following example, with values chosen for ease of und…
5925 <!--l. 51--><p class="noindent" >For the below example, we assume a floor setup with an [n] of 128.…
5930 <div class="center"
5932 <!--l. 59--><p class="noindent" >
5934 <!--l. 60--><p class="noindent" ><img
5937 <br /> <div class="caption"
5938 ><span class="id">Figure 7: </span><span
5939 class="content">graph of example floor</span></div><!--tex4ht:label?: x1-980017 -->
5941 <!--l. 64--><p class="noindent" >We now draw new logical lines to reflect the correction to new�…
5943 <div class="center"
5945 <!--l. 67--><p class="noindent" >
5947 <!--l. 68--><p class="noindent" ><img
5950 <br /> <div class="caption"
5951 ><span class="id">Figure 8: </span><span
5952 class="content">graph of example floor</span></div><!--tex4ht:label?: x1-980028 -->
5954 <!--l. 72--><p class="noindent" >Although the new Y value at X position 96 is unchanged, it is stil…
5960 <div class="center"
5962 <!--l. 76--><p class="noindent" >
5964 <!--l. 77--><p class="noindent" ><img
5967 <br /> <div class="caption"
5968 ><span class="id">Figure 9: </span><span
5969 class="content">graph of example floor</span></div><!--tex4ht:label?: x1-980039 -->
5971 <div class="center"
5973 <!--l. 81--><p class="noindent" >
5975 <!--l. 82--><p class="noindent" ><img
5978 <br /> <div class="caption"
5979 ><span class="id">Figure 10: </span><span
5980 class="content">graph of example floor</span></div><!--tex4ht:label?: x1-9800410 -->
5982 <!--l. 86--><p class="noindent" >A more efficient algorithm with carefully defined integer rounding…
5986 <!--l. 94--><p class="noindent" >
5987 <h5 class="subsubsectionHead"><span class="titlemark">7.2.2 </span> <a
5989 <!--l. 96--><p class="noindent" >A list of floor X values is stored in the packet header in interle…
5991 assigned to a partition class. X positions 0 and [n] are implicit and do not belong to an explicit
5992 partition or partition class.
5993 <!--l. 102--><p class="noindent" >A partition class consists of a representation vector width (the …
5994 the partition class encodes at once), a ’subclass’ value representing the number of
5995 alternate entropy books the partition class may use in representing Y values, the list of
6003 <!--l. 112--><p class="noindent" >
6004 <div class="fancyvrb" id="fancyvrb28">
6007 class="cmr-6">1</span><span
6008 class="cmtt-8"> </span><span
6009 class="cmtt-8"> </span>
6010 <br class="fancyvrb" /><a
6012 class="cmr-6">2</span><span
6013 class="cmtt-8"> </span><span
6014 class="cmtt-8"> </span><span
6015 class="cmtt-8"> </span><span
6016 class="cmtt-8"> 1)</span><span
6017 class="cmtt-8"> [floor1_partitions]</span><span
6018 class="cmtt-8"> =</span><span
6019 class="cmtt-8"> read</span><span
6020 class="cmtt-8"> 5</span><span
6021 class="cmtt-8"> bits</span><span
6022 class="cmtt-8"> as</span><span
6023 class="cmtt-8"> unsigned</span><span
6024 class="cmtt-8"> integer</span>
6025 <br class="fancyvrb" /><a
6027 class="cmr-6">3</span><span
6028 class="cmtt-8"> </span><span
6029 class="cmtt-8"> </span><span
6030 class="cmtt-8"> </span><span
6031 class="cmtt-8"> 2)</span><span
6032 class="cmtt-8"> [maximum_class]</span><span
6033 class="cmtt-8"> =</span><span
6034 class="cmtt-8"> -1</span>
6035 <br class="fancyvrb" /><a
6037 class="cmr-6">4</span><span
6038 class="cmtt-8"> </span><span
6039 class="cmtt-8"> </span><span
6040 class="cmtt-8"> </span><span
6041 class="cmtt-8"> 3)</span><span
6042 class="cmtt-8"> iterate</span><span
6043 class="cmtt-8"> [i]</span><span
6044 class="cmtt-8"> over</span><span
6045 class="cmtt-8"> the</span><span
6046 class="cmtt-8"> range</span><span
6047 class="cmtt-8"> 0</span><span
6048 class="cmtt-8"> ...</span><span
6049 class="cmtt-8"> [floor1_partitions]-1</span><span
6050 class="cmtt-8"> </span><span
6051 class="cmsy-8">{</span>
6052 <br class="fancyvrb" /><a
6054 class="cmr-6">5</span><span
6055 class="cmtt-8"> </span><span
6056 class="cmtt-8"> </span>
6057 <br class="fancyvrb" /><a
6059 class="cmr-6">6</span><span
6060 class="cmtt-8"> </span><span
6061 class="cmtt-8"> </span><span
6062 class="cmtt-8"> </span><span
6063 class="cmtt-8"> </span><span
6064 class="cmtt-8"> </span><span
6065 class="cmtt-8"> </span><span
6066 class="cmtt-8"> </span><span
6067 class="cmtt-8"> </span><span
6068 class="cmtt-8"> </span><span
6069 class="cmtt-8"> 4)</span><span
6070 class="cmtt-8"> vector</span><span
6071 class="cmtt-8"> [floor1_partition_class_list]</span><span
6072 class="cmtt-8"> element</span><span
6073 class="cmtt-8"> [i]</span><span
6074 class="cmtt-8"> =</span><span
6075 class="cmtt-8"> read</span><span
6076 class="cmtt-8"> 4</span><span
6077 class="cmtt-8"> bits</span><span
6078 class="cmtt-8"> as</span><span
6079 class="cmtt-8"> unsigned</span><span
6080 class="cmtt-8"> integer</span>
6081 <br class="fancyvrb" /><a
6083 class="cmr-6">7</span><span
6084 class="cmtt-8"> </span><span
6085 class="cmtt-8"> </span>
6086 <br class="fancyvrb" /><a
6088 class="cmr-6">8</span><span
6089 class="cmtt-8"> </span><span
6090 class="cmtt-8"> </span><span
6091 class="cmtt-8"> </span><span
6092 class="cmtt-8"> </span><span
6093 class="cmtt-8"> </span><span
6094 class="cmtt-8"> </span><span
6095 class="cmtt-8"> </span><span
6096 class="cmsy-8">}</span>
6097 <br class="fancyvrb" /><a
6099 class="cmr-6">9</span><span
6100 class="cmtt-8"> </span><span
6101 class="cmtt-8"> </span>
6102 <br class="fancyvrb" /><a
6104 class="cmr-6">10</span><span
6105 class="cmtt-8"> </span><span
6106 class="cmtt-8"> </span><span
6107 class="cmtt-8"> </span><span
6108 class="cmtt-8"> 5)</span><span
6109 class="cmtt-8"> [maximum_class]</span><span
6110 class="cmtt-8"> =</span><span
6111 class="cmtt-8"> largest</span><span
6112 class="cmtt-8"> integer</span><span
6113 class="cmtt-8"> scalar</span><span
6114 class="cmtt-8"> value</span><span
6115 class="cmtt-8"> in</span><span
6116 class="cmtt-8"> vector</span><span
6117 class="cmtt-8"> [floor1_partition_class_list]</span>
6118 <br class="fancyvrb" /><a
6120 class="cmr-6">11</span><span
6121 class="cmtt-8"> </span><span
6122 class="cmtt-8"> </span><span
6123 class="cmtt-8"> </span><span
6124 class="cmtt-8"> 6)</span><span
6125 class="cmtt-8"> iterate</span><span
6126 class="cmtt-8"> [i]</span><span
6127 class="cmtt-8"> over</span><span
6128 class="cmtt-8"> the</span><span
6129 class="cmtt-8"> range</span><span
6130 class="cmtt-8"> 0</span><span
6131 class="cmtt-8"> ...</span><span
6132 class="cmtt-8"> [maximum_class]</span><span
6133 class="cmtt-8"> </span><span
6134 class="cmsy-8">{</span>
6135 <br class="fancyvrb" /><a
6137 class="cmr-6">12</span><span
6138 class="cmtt-8"> </span><span
6139 class="cmtt-8"> </span>
6140 <br class="fancyvrb" /><a
6142 class="cmr-6">13</span><span
6143 class="cmtt-8"> </span><span
6144 class="cmtt-8"> </span><span
6145 class="cmtt-8"> </span><span
6146 class="cmtt-8"> </span><span
6147 class="cmtt-8"> </span><span
6148 class="cmtt-8"> </span><span
6149 class="cmtt-8"> </span><span
6150 class="cmtt-8"> </span><span
6151 class="cmtt-8"> </span><span
6152 class="cmtt-8"> 7)</span><span
6153 class="cmtt-8"> vector</span><span
6154 class="cmtt-8"> [floor1_class_dimensions]</span><span
6155 class="cmtt-8"> element</span><span
6156 class="cmtt-8"> [i]</span><span
6157 class="cmtt-8"> =</span><span
6158 class="cmtt-8"> read</span><span
6159 class="cmtt-8"> 3</span><span
6160 class="cmtt-8"> bits</span><span
6161 class="cmtt-8"> as</span><span
6162 class="cmtt-8"> unsigned</span><span
6163 class="cmtt-8"> integer</span><span
6164 class="cmtt-8"> and</span><span
6165 class="cmtt-8"> add</span><span
6166 class="cmtt-8"> 1</span>
6167 <br class="fancyvrb" /><a
6169 class="cmr-6">14</span><span
6170 class="cmtt-8"> </span><span
6171 class="cmtt-8">  8)</span><span
6172 class="cmtt-8"> vector</span><span
6173 class="cmtt-8"> [floor1_class_subclasses]</span><span
6174 class="cmtt-8"> element</span><span
6175 class="cmtt-8"> [i]</span><span
6176 class="cmtt-8"> =</span><span
6177 class="cmtt-8"> read</span><span
6178 class="cmtt-8"> 2</span><span
6179 class="cmtt-8"> bits</span><span
6180 class="cmtt-8"> as</span><span
6181 class="cmtt-8"> unsigned</span><span
6182 class="cmtt-8"> integer</span>
6183 <br class="fancyvrb" /><a
6185 class="cmr-6">15</span><span
6186 class="cmtt-8"> </span><span
6187 class="cmtt-8"> </span><span
6188 class="cmtt-8"> </span><span
6189 class="cmtt-8"> </span><span
6190 class="cmtt-8"> </span><span
6191 class="cmtt-8"> </span><span
6192 class="cmtt-8"> </span><span
6193 class="cmtt-8"> </span><span
6194 class="cmtt-8"> </span><span
6195 class="cmtt-8"> 9)</span><span
6196 class="cmtt-8"> if</span><span
6197 class="cmtt-8"> (</span><span
6198 class="cmtt-8"> vector</span><span
6199 class="cmtt-8"> [floor1_class_subclasses]</span><span
6200 class="cmtt-8"> element</span><span
6201 class="cmtt-8"> [i]</span><span
6202 class="cmtt-8"> is</span><span
6203 class="cmtt-8"> nonzero</span><span
6204 class="cmtt-8"> )</span><span
6205 class="cmtt-8"> </span><span
6206 class="cmsy-8">{</span>
6207 <br class="fancyvrb" /><a
6209 class="cmr-6">16</span><span
6210 class="cmtt-8"> </span><span
6211 class="cmtt-8"> </span>
6212 <br class="fancyvrb" /><a
6214 class="cmr-6">17</span><span
6215 class="cmtt-8"> </span><span
6216 class="cmtt-8"> </span><span
6217 class="cmtt-8"> </span><span
6218 class="cmtt-8"> </span><span
6219 class="cmtt-8"> </span><span
6220 class="cmtt-8"> </span><span
6221 class="cmtt-8"> </span><span
6222 class="cmtt-8"> </span><span
6223 class="cmtt-8"> </span><span
6224 class="cmtt-8"> </span><span
6225 class="cmtt-8"> </span><span
6226 class="cmtt-8"> </span><span
6227 class="cmtt-8"> </span><span
6228 class="cmtt-8"> </span><span
6229 class="cmtt-8"> 10)</span><span
6230 class="cmtt-8"> vector</span><span
6231 class="cmtt-8"> [floor1_class_masterbooks]</span><span
6232 class="cmtt-8"> element</span><span
6233 class="cmtt-8"> [i]</span><span
6234 class="cmtt-8"> =</span><span
6235 class="cmtt-8"> read</span><span
6236 class="cmtt-8"> 8</span><span
6237 class="cmtt-8"> bits</span><span
6238 class="cmtt-8"> as</span><span
6239 class="cmtt-8"> unsigned</span><span
6240 class="cmtt-8"> integer</span>
6241 <br class="fancyvrb" /><a
6243 class="cmr-6">18</span><span
6244 class="cmtt-8"> </span><span
6245 class="cmtt-8"> </span>
6246 <br class="fancyvrb" /><a
6248 class="cmr-6">19</span><span
6249 class="cmtt-8"> </span><span
6250 class="cmtt-8"> </span><span
6251 class="cmtt-8"> </span><span
6252 class="cmtt-8"> </span><span
6253 class="cmtt-8"> </span><span
6254 class="cmtt-8"> </span><span
6255 class="cmtt-8"> </span><span
6256 class="cmtt-8"> </span><span
6257 class="cmtt-8"> </span><span
6258 class="cmtt-8"> </span><span
6259 class="cmtt-8"> </span><span
6260 class="cmtt-8"> </span><span
6261 class="cmtt-8"> </span><span
6262 class="cmsy-8">}</span>
6263 <br class="fancyvrb" /><a
6265 class="cmr-6">20</span><span
6266 class="cmtt-8"> </span><span
6267 class="cmtt-8"> </span>
6268 <br class="fancyvrb" /><a
6270 class="cmr-6">21</span><span
6271 class="cmtt-8"> </span><span
6272 class="cmtt-8"> </span><span
6273 class="cmtt-8"> </span><span
6274 class="cmtt-8"> </span><span
6275 class="cmtt-8"> </span><span
6276 class="cmtt-8"> </span><span
6277 class="cmtt-8"> </span><span
6278 class="cmtt-8"> </span><span
6279 class="cmtt-8"> 11)</span><span
6280 class="cmtt-8"> iterate</span><span
6281 class="cmtt-8"> [j]</span><span
6282 class="cmtt-8"> over</span><span
6283 class="cmtt-8"> the</span><span
6284 class="cmtt-8"> range</span><span
6285 class="cmtt-8"> 0</span><span
6286 class="cmtt-8"> ...</span><span
6287 class="cmtt-8"> (2</span><span
6288 class="cmtt-8"> exponent</span><span
6289 class="cmtt-8"> [floor1_class_subclasses]</span><span
6290 class="cmtt-8"> element</span><span
6291 class="cmtt-8"> [i])</span><span
6292 class="cmtt-8"> -</span><span
6293 class="cmtt-8"> 1</span><span
6294 class="cmtt-8"> </span><span
6295 class="cmsy-8">{</span>
6296 <br class="fancyvrb" /><a
6298 class="cmr-6">22</span><span
6299 class="cmtt-8"> </span><span
6300 class="cmtt-8"> </span>
6301 <br class="fancyvrb" /><a
6303 class="cmr-6">23</span><span
6304 class="cmtt-8"> </span><span
6305 class="cmtt-8"> </span><span
6306 class="cmtt-8"> </span><span
6307 class="cmtt-8"> </span><span
6308 class="cmtt-8"> </span><span
6309 class="cmtt-8"> </span><span
6310 class="cmtt-8"> </span><span
6311 class="cmtt-8"> </span><span
6312 class="cmtt-8"> </span><span
6313 class="cmtt-8"> </span><span
6314 class="cmtt-8"> </span><span
6315 class="cmtt-8"> </span><span
6316 class="cmtt-8"> </span><span
6317 class="cmtt-8"> </span><span
6318 class="cmtt-8"> 12)</span><span
6319 class="cmtt-8"> array</span><span
6320 class="cmtt-8"> [floor1_subclass_books]</span><span
6321 class="cmtt-8"> element</span><span
6322 class="cmtt-8"> [i],[j]</span><span
6323 class="cmtt-8"> =</span>
6324 <br class="fancyvrb" /><a
6326 class="cmr-6">24</span><span
6327 class="cmtt-8"> </span><span
6328 class="cmtt-8"> </span><span
6329 class="cmtt-8"> </span><span
6330 class="cmtt-8"> </span><span
6331 class="cmtt-8"> </span><span
6332 class="cmtt-8"> </span><span
6333 class="cmtt-8"> </span><span
6334 class="cmtt-8"> </span><span
6335 class="cmtt-8"> </span><span
6336 class="cmtt-8"> </span><span
6337 class="cmtt-8"> </span><span
6338 class="cmtt-8"> </span><span
6339 class="cmtt-8"> </span><span
6340 class="cmtt-8"> </span><span
6341 class="cmtt-8"> </span><span
6342 class="cmtt-8"> </span><span
6343 class="cmtt-8"> </span><span
6344 class="cmtt-8"> </span><span
6345 class="cmtt-8"> read</span><span
6346 class="cmtt-8"> 8</span><span
6347 class="cmtt-8"> bits</span><span
6348 class="cmtt-8"> as</span><span
6349 class="cmtt-8"> unsigned</span><span
6350 class="cmtt-8"> integer</span><span
6351 class="cmtt-8"> and</span><span
6352 class="cmtt-8"> subtract</span><span
6353 class="cmtt-8"> one</span>
6354 <br class="fancyvrb" /><a
6356 class="cmr-6">25</span><span
6357 class="cmtt-8"> </span><span
6358 class="cmtt-8"> </span><span
6359 class="cmtt-8"> </span><span
6360 class="cmtt-8"> </span><span
6361 class="cmtt-8"> </span><span
6362 class="cmtt-8"> </span><span
6363 class="cmtt-8"> </span><span
6364 class="cmtt-8"> </span><span
6365 class="cmtt-8"> </span><span
6366 class="cmtt-8"> </span><span
6367 class="cmtt-8"> </span><span
6368 class="cmtt-8"> </span><span
6369 class="cmtt-8"> </span><span
6370 class="cmsy-8">}</span>
6371 <br class="fancyvrb" /><a
6373 class="cmr-6">26</span><span
6374 class="cmtt-8"> </span><span
6375 class="cmtt-8"> </span><span
6376 class="cmtt-8"> </span><span
6377 class="cmtt-8"> </span><span
6378 class="cmtt-8"> </span><span
6379 class="cmtt-8"> </span><span
6380 class="cmtt-8"> </span><span
6381 class="cmtt-8"> </span><span
6382 class="cmsy-8">}</span>
6383 <br class="fancyvrb" /><a
6385 class="cmr-6">27</span><span
6386 class="cmtt-8"> </span><span
6387 class="cmtt-8"> </span>
6388 <br class="fancyvrb" /><a
6390 class="cmr-6">28</span><span
6391 class="cmtt-8"> </span><span
6392 class="cmtt-8"> </span><span
6393 class="cmtt-8"> 13)</span><span
6394 class="cmtt-8"> [floor1_multiplier]</span><span
6395 class="cmtt-8"> =</span><span
6396 class="cmtt-8"> read</span><span
6397 class="cmtt-8"> 2</span><span
6398 class="cmtt-8"> bits</span><span
6399 class="cmtt-8"> as</span><span
6400 class="cmtt-8"> unsigned</span><span
6401 class="cmtt-8"> integer</span><span
6402 class="cmtt-8"> and</span><span
6403 class="cmtt-8"> add</span><span
6404 class="cmtt-8"> one</span>
6405 <br class="fancyvrb" /><a
6407 class="cmr-6">29</span><span
6408 class="cmtt-8"> </span><span
6409 class="cmtt-8"> </span><span
6410 class="cmtt-8"> 14)</span><span
6411 class="cmtt-8"> [rangebits]</span><span
6412 class="cmtt-8"> =</span><span
6413 class="cmtt-8"> read</span><span
6414 class="cmtt-8"> 4</span><span
6415 class="cmtt-8"> bits</span><span
6416 class="cmtt-8"> as</span><span
6417 class="cmtt-8"> unsigned</span><span
6418 class="cmtt-8"> integer</span>
6419 <br class="fancyvrb" /><a
6421 class="cmr-6">30</span><span
6422 class="cmtt-8"> </span><span
6423 class="cmtt-8"> </span><span
6424 class="cmtt-8"> 15)</span><span
6425 class="cmtt-8"> vector</span><span
6426 class="cmtt-8"> [floor1_X_list]</span><span
6427 class="cmtt-8"> element</span><span
6428 class="cmtt-8"> [0]</span><span
6429 class="cmtt-8"> =</span><span
6430 class="cmtt-8"> 0</span>
6431 <br class="fancyvrb" /><a
6433 class="cmr-6">31</span><span
6434 class="cmtt-8"> </span><span
6435 class="cmtt-8"> </span><span
6436 class="cmtt-8"> 16)</span><span
6437 class="cmtt-8"> vector</span><span
6438 class="cmtt-8"> [floor1_X_list]</span><span
6439 class="cmtt-8"> element</span><span
6440 class="cmtt-8"> [1]</span><span
6441 class="cmtt-8"> =</span><span
6442 class="cmtt-8"> 2</span><span
6443 class="cmtt-8"> exponent</span><span
6444 class="cmtt-8"> [rangebits];</span>
6445 <br class="fancyvrb" /><a
6447 class="cmr-6">32</span><span
6448 class="cmtt-8"> </span><span
6449 class="cmtt-8"> </span><span
6450 class="cmtt-8"> 17)</span><span
6451 class="cmtt-8"> [floor1_values]</span><span
6452 class="cmtt-8"> =</span><span
6453 class="cmtt-8"> 2</span>
6454 <br class="fancyvrb" /><a
6456 class="cmr-6">33</span><span
6457 class="cmtt-8"> </span><span
6458 class="cmtt-8"> </span><span
6459 class="cmtt-8"> 18)</span><span
6460 class="cmtt-8"> iterate</span><span
6461 class="cmtt-8"> [i]</span><span
6462 class="cmtt-8"> over</span><span
6463 class="cmtt-8"> the</span><span
6464 class="cmtt-8"> range</span><span
6465 class="cmtt-8"> 0</span><span
6466 class="cmtt-8"> ...</span><span
6467 class="cmtt-8"> [floor1_partitions]-1</span><span
6468 class="cmtt-8"> </span><span
6469 class="cmsy-8">{</span>
6470 <br class="fancyvrb" /><a
6472 class="cmr-6">34</span><span
6473 class="cmtt-8"> </span><span
6474 class="cmtt-8"> </span>
6475 <br class="fancyvrb" /><a
6477 class="cmr-6">35</span><span
6478 class="cmtt-8"> </span><span
6479 class="cmtt-8"> </span><span
6480 class="cmtt-8"> </span><span
6481 class="cmtt-8"> </span><span
6482 class="cmtt-8"> </span><span
6483 class="cmtt-8"> </span><span
6484 class="cmtt-8"> </span><span
6485 class="cmtt-8"> </span><span
6486 class="cmtt-8"> 19)</span><span
6487 class="cmtt-8"> [current_class_number]</span><span
6488 class="cmtt-8"> =</span><span
6489 class="cmtt-8"> vector</span><span
6490 class="cmtt-8"> [floor1_partition_class_list]</span><span
6491 class="cmtt-8"> element</span><span
6492 class="cmtt-8"> [i]</span>
6493 <br class="fancyvrb" /><a
6495 class="cmr-6">36</span><span
6496 class="cmtt-8"> </span><span
6497 class="cmtt-8"> </span><span
6498 class="cmtt-8"> </span><span
6499 class="cmtt-8"> </span><span
6500 class="cmtt-8"> </span><span
6501 class="cmtt-8"> </span><span
6502 class="cmtt-8"> </span><span
6503 class="cmtt-8"> </span><span
6504 class="cmtt-8"> 20)</span><span
6505 class="cmtt-8"> iterate</span><span
6506 class="cmtt-8"> [j]</span><span
6507 class="cmtt-8"> over</span><span
6508 class="cmtt-8"> the</span><span
6509 class="cmtt-8"> range</span><span
6510 class="cmtt-8"> 0</span><span
6511 class="cmtt-8"> ...</span><span
6512 class="cmtt-8"> ([floor1_class_dimensions]</span><span
6513 class="cmtt-8"> element</span><span
6514 class="cmtt-8"> [current_class_number])-1</span><span
6515 class="cmtt-8"> </span><span
6516 class="cmsy-8">{</span>
6517 <br class="fancyvrb" /><a
6519 class="cmr-6">37</span><span
6520 class="cmtt-8"> </span><span
6521 class="cmtt-8"> </span><span
6522 class="cmtt-8"> </span><span
6523 class="cmtt-8"> </span><span
6524 class="cmtt-8"> </span><span
6525 class="cmtt-8"> </span><span
6526 class="cmtt-8"> </span><span
6527 class="cmtt-8"> </span><span
6528 class="cmtt-8"> </span><span
6529 class="cmtt-8"> </span><span
6530 class="cmtt-8"> </span><span
6531 class="cmtt-8"> </span><span
6532 class="cmtt-8"> </span><span
6533 class="cmtt-8"> </span><span
6534 class="cmtt-8"> 21)</span><span
6535 class="cmtt-8"> vector</span><span
6536 class="cmtt-8"> [floor1_X_list]</span><span
6537 class="cmtt-8"> element</span><span
6538 class="cmtt-8"> ([floor1_values])</span><span
6539 class="cmtt-8"> =</span>
6540 <br class="fancyvrb" /><a
6542 class="cmr-6">38</span><span
6543 class="cmtt-8"> </span><span
6544 class="cmtt-8"> </span><span
6545 class="cmtt-8"> </span><span
6546 class="cmtt-8"> </span><span
6547 class="cmtt-8"> </span><span
6548 class="cmtt-8"> </span><span
6549 class="cmtt-8"> </span><span
6550 class="cmtt-8"> </span><span
6551 class="cmtt-8"> </span><span
6552 class="cmtt-8"> </span><span
6553 class="cmtt-8"> </span><span
6554 class="cmtt-8"> </span><span
6555 class="cmtt-8"> </span><span
6556 class="cmtt-8"> </span><span
6557 class="cmtt-8"> </span><span
6558 class="cmtt-8"> </span><span
6559 class="cmtt-8"> </span><span
6560 class="cmtt-8"> </span><span
6561 class="cmtt-8"> read</span><span
6562 class="cmtt-8"> [rangebits]</span><span
6563 class="cmtt-8"> bits</span><span
6564 class="cmtt-8"> as</span><span
6565 class="cmtt-8"> unsigned</span><span
6566 class="cmtt-8"> integer</span>
6567 <br class="fancyvrb" /><a
6569 class="cmr-6">39</span><span
6570 class="cmtt-8"> </span><span
6571 class="cmtt-8"> </span><span
6572 class="cmtt-8"> </span><span
6573 class="cmtt-8"> </span><span
6574 class="cmtt-8"> </span><span
6575 class="cmtt-8"> </span><span
6576 class="cmtt-8"> </span><span
6577 class="cmtt-8"> </span><span
6578 class="cmtt-8"> </span><span
6579 class="cmtt-8"> </span><span
6580 class="cmtt-8"> </span><span
6581 class="cmtt-8"> </span><span
6582 class="cmtt-8"> </span><span
6583 class="cmtt-8"> </span><span
6584 class="cmtt-8"> 22)</span><span
6585 class="cmtt-8"> increment</span><span
6586 class="cmtt-8"> [floor1_values]</span><span
6587 class="cmtt-8"> by</span><span
6588 class="cmtt-8"> one</span>
6589 <br class="fancyvrb" /><a
6591 class="cmr-6">40</span><span
6592 class="cmtt-8"> </span><span
6593 class="cmtt-8"> </span><span
6594 class="cmtt-8"> </span><span
6595 class="cmtt-8"> </span><span
6596 class="cmtt-8"> </span><span
6597 class="cmtt-8"> </span><span
6598 class="cmtt-8"> </span><span
6599 class="cmtt-8"> </span><span
6600 class="cmtt-8"> </span><span
6601 class="cmtt-8"> </span><span
6602 class="cmtt-8"> </span><span
6603 class="cmtt-8"> </span><span
6604 class="cmtt-8"> </span><span
6605 class="cmsy-8">}</span>
6606 <br class="fancyvrb" /><a
6608 class="cmr-6">41</span><span
6609 class="cmtt-8"> </span><span
6610 class="cmtt-8"> </span><span
6611 class="cmtt-8"> </span><span
6612 class="cmtt-8"> </span><span
6613 class="cmtt-8"> </span><span
6614 class="cmtt-8"> </span><span
6615 class="cmtt-8"> </span><span
6616 class="cmsy-8">}</span>
6617 <br class="fancyvrb" /><a
6619 class="cmr-6">42</span><span
6620 class="cmtt-8"> </span><span
6621 class="cmtt-8"> </span>
6622 <br class="fancyvrb" /><a
6624 class="cmr-6">43</span><span
6625 class="cmtt-8"> </span><span
6626 class="cmtt-8"> </span><span
6627 class="cmtt-8"> 23)</span><span
6628 class="cmtt-8"> done</span>
6630 <!--l. 158--><p class="noindent" >An end-of-packet condition while reading any aspect of a floor 1 …
6632 class="cmtt-12">[floor1_class_masterbooks] </span>or
6634 class="cmtt-12">[floor1_subclass_books] </span>scalar element greater than the highest numbered cod…
6638 <!--l. 167--><p class="noindent" ><span class="paragraphHead"><a
6640 class="cmbx-12">packet decode</span></span>
6645 class="cmtt-12">[nonzero] </span>flag:
6646 <!--l. 171--><p class="noindent" >
6647 <div class="fancyvrb" id="fancyvrb29">
6650 class="cmr-6">1</span><span
6651 class="cmtt-8"> </span><span
6652 class="cmtt-8"> </span><span
6653 class="cmtt-8"> </span><span
6654 class="cmtt-8"> 1)</span><span
6655 class="cmtt-8"> [nonzero]</span><span
6656 class="cmtt-8"> =</span><span
6657 class="cmtt-8"> read</span><span
6658 class="cmtt-8"> 1</span><span
6659 class="cmtt-8"> bit</span><span
6660 class="cmtt-8"> as</span><span
6661 class="cmtt-8"> boolean</span>
6663 <!--l. 175--><p class="noindent" >If <span
6664 class="cmtt-12">[nonzero] </span>is unset, that indicates this channel contained no audio energy in…
6669 <!--l. 183--><p class="noindent" >Assuming <span
6670 class="cmtt-12">[nonzero] </span>is set, decode proceeds as follows:
6671 <!--l. 185--><p class="noindent" >
6672 <div class="fancyvrb" id="fancyvrb30">
6675 class="cmr-6">1</span><span
6676 class="cmtt-8"> </span><span
6677 class="cmtt-8"> </span><span
6678 class="cmtt-8"> </span><span
6679 class="cmtt-8"> 1)</span><span
6680 class="cmtt-8"> [range]</span><span
6681 class="cmtt-8"> =</span><span
6682 class="cmtt-8"> vector</span><span
6683 class="cmtt-8"> </span><span
6684 class="cmsy-8">{</span><span
6685 class="cmtt-8"> 256,</span><span
6686 class="cmtt-8"> 128,</span><span
6687 class="cmtt-8"> 86,</span><span
6688 class="cmtt-8"> 64</span><span
6689 class="cmtt-8"> </span><span
6690 class="cmsy-8">}</span><span
6691 class="cmtt-8"> element</span><span
6692 class="cmtt-8"> ([floor1_multiplier]-1)</span>
6693 <br class="fancyvrb" /><a
6695 class="cmr-6">2</span><span
6696 class="cmtt-8"> </span><span
6697 class="cmtt-8"> </span><span
6698 class="cmtt-8"> </span><span
6699 class="cmtt-8"> 2)</span><span
6700 class="cmtt-8"> vector</span><span
6701 class="cmtt-8"> [floor1_Y]</span><span
6702 class="cmtt-8"> element</span><span
6703 class="cmtt-8"> [0]</span><span
6704 class="cmtt-8"> =</span><span
6705 class="cmtt-8"> read</span><span
6706 class="cmtt-8"> </span><a
6708 class="cmtt-8">ilog</span></a><span
6709 class="cmtt-8">([range]-1)</span><span
6710 class="cmtt-8"> bits</span><span
6711 class="cmtt-8"> as</span><span
6712 class="cmtt-8"> unsigned</span><span
6713 class="cmtt-8"> integer</span>
6714 <br class="fancyvrb" /><a
6716 class="cmr-6">3</span><span
6717 class="cmtt-8"> </span><span
6718 class="cmtt-8"> </span><span
6719 class="cmtt-8"> </span><span
6720 class="cmtt-8"> 3)</span><span
6721 class="cmtt-8"> vector</span><span
6722 class="cmtt-8"> [floor1_Y]</span><span
6723 class="cmtt-8"> element</span><span
6724 class="cmtt-8"> [1]</span><span
6725 class="cmtt-8"> =</span><span
6726 class="cmtt-8"> read</span><span
6727 class="cmtt-8"> </span><a
6729 class="cmtt-8">ilog</span></a><span
6730 class="cmtt-8">([range]-1)</span><span
6731 class="cmtt-8"> bits</span><span
6732 class="cmtt-8"> as</span><span
6733 class="cmtt-8"> unsigned</span><span
6734 class="cmtt-8"> integer</span>
6735 <br class="fancyvrb" /><a
6737 class="cmr-6">4</span><span
6738 class="cmtt-8"> </span><span
6739 class="cmtt-8"> </span><span
6740 class="cmtt-8"> </span><span
6741 class="cmtt-8"> 4)</span><span
6742 class="cmtt-8"> [offset]</span><span
6743 class="cmtt-8"> =</span><span
6744 class="cmtt-8"> 2;</span>
6745 <br class="fancyvrb" /><a
6747 class="cmr-6">5</span><span
6748 class="cmtt-8"> </span><span
6749 class="cmtt-8"> </span><span
6750 class="cmtt-8"> </span><span
6751 class="cmtt-8"> 5)</span><span
6752 class="cmtt-8"> iterate</span><span
6753 class="cmtt-8"> [i]</span><span
6754 class="cmtt-8"> over</span><span
6755 class="cmtt-8"> the</span><span
6756 class="cmtt-8"> range</span><span
6757 class="cmtt-8"> 0</span><span
6758 class="cmtt-8"> ...</span><span
6759 class="cmtt-8"> [floor1_partitions]-1</span><span
6760 class="cmtt-8"> </span><span
6761 class="cmsy-8">{</span>
6762 <br class="fancyvrb" /><a
6764 class="cmr-6">6</span><span
6765 class="cmtt-8"> </span><span
6766 class="cmtt-8"> </span>
6767 <br class="fancyvrb" /><a
6769 class="cmr-6">7</span><span
6770 class="cmtt-8"> </span><span
6771 class="cmtt-8"> </span><span
6772 class="cmtt-8"> </span><span
6773 class="cmtt-8"> </span><span
6774 class="cmtt-8"> </span><span
6775 class="cmtt-8"> </span><span
6776 class="cmtt-8"> </span><span
6777 class="cmtt-8"> </span><span
6778 class="cmtt-8"> 6)</span><span
6779 class="cmtt-8"> [class]</span><span
6780 class="cmtt-8"> =</span><span
6781 class="cmtt-8"> vector</span><span
6782 class="cmtt-8"> [floor1_partition_class]</span><span
6783 class="cmtt-8"> </span><span
6784 class="cmtt-8"> element</span><span
6785 class="cmtt-8"> [i]</span>
6786 <br class="fancyvrb" /><a
6788 class="cmr-6">8</span><span
6789 class="cmtt-8"> </span><span
6790 class="cmtt-8"> </span><span
6791 class="cmtt-8"> </span><span
6792 class="cmtt-8"> </span><span
6793 class="cmtt-8"> </span><span
6794 class="cmtt-8"> </span><span
6795 class="cmtt-8"> </span><span
6796 class="cmtt-8"> </span><span
6797 class="cmtt-8"> 7)</span><span
6798 class="cmtt-8"> [cdim]</span><span
6799 class="cmtt-8"> </span><span
6800 class="cmtt-8"> =</span><span
6801 class="cmtt-8"> vector</span><span
6802 class="cmtt-8"> [floor1_class_dimensions]</span><span
6803 class="cmtt-8"> element</span><span
6804 class="cmtt-8"> [class]</span>
6805 <br class="fancyvrb" /><a
6807 class="cmr-6">9</span><span
6808 class="cmtt-8"> </span><span
6809 class="cmtt-8"> </span><span
6810 class="cmtt-8"> </span><span
6811 class="cmtt-8"> </span><span
6812 class="cmtt-8"> </span><span
6813 class="cmtt-8"> </span><span
6814 class="cmtt-8"> </span><span
6815 class="cmtt-8"> </span><span
6816 class="cmtt-8"> 8)</span><span
6817 class="cmtt-8"> [cbits]</span><span
6818 class="cmtt-8"> =</span><span
6819 class="cmtt-8"> vector</span><span
6820 class="cmtt-8"> [floor1_class_subclasses]</span><span
6821 class="cmtt-8"> element</span><span
6822 class="cmtt-8"> [class]</span>
6823 <br class="fancyvrb" /><a
6825 class="cmr-6">10</span><span
6826 class="cmtt-8"> </span><span
6827 class="cmtt-8"> </span><span
6828 class="cmtt-8"> </span><span
6829 class="cmtt-8"> </span><span
6830 class="cmtt-8"> </span><span
6831 class="cmtt-8"> </span><span
6832 class="cmtt-8"> </span><span
6833 class="cmtt-8"> </span><span
6834 class="cmtt-8"> 9)</span><span
6835 class="cmtt-8"> [csub]</span><span
6836 class="cmtt-8"> </span><span
6837 class="cmtt-8"> =</span><span
6838 class="cmtt-8"> (2</span><span
6839 class="cmtt-8"> exponent</span><span
6840 class="cmtt-8"> [cbits])-1</span>
6841 <br class="fancyvrb" /><a
6843 class="cmr-6">11</span><span
6844 class="cmtt-8"> </span><span
6845 class="cmtt-8"> </span><span
6846 class="cmtt-8"> </span><span
6847 class="cmtt-8"> </span><span
6848 class="cmtt-8"> </span><span
6849 class="cmtt-8"> </span><span
6850 class="cmtt-8"> </span><span
6851 class="cmtt-8"> 10)</span><span
6852 class="cmtt-8"> [cval]</span><span
6853 class="cmtt-8"> </span><span
6854 class="cmtt-8"> =</span><span
6855 class="cmtt-8"> 0</span>
6856 <br class="fancyvrb" /><a
6858 class="cmr-6">12</span><span
6859 class="cmtt-8"> </span><span
6860 class="cmtt-8"> </span><span
6861 class="cmtt-8"> </span><span
6862 class="cmtt-8"> </span><span
6863 class="cmtt-8"> </span><span
6864 class="cmtt-8"> </span><span
6865 class="cmtt-8"> </span><span
6866 class="cmtt-8"> 11)</span><span
6867 class="cmtt-8"> if</span><span
6868 class="cmtt-8"> (</span><span
6869 class="cmtt-8"> [cbits]</span><span
6870 class="cmtt-8"> is</span><span
6871 class="cmtt-8"> greater</span><span
6872 class="cmtt-8"> than</span><span
6873 class="cmtt-8"> zero</span><span
6874 class="cmtt-8"> )</span><span
6875 class="cmtt-8"> </span><span
6876 class="cmsy-8">{</span>
6877 <br class="fancyvrb" /><a
6879 class="cmr-6">13</span><span
6880 class="cmtt-8"> </span><span
6881 class="cmtt-8"> </span>
6882 <br class="fancyvrb" /><a
6884 class="cmr-6">14</span><span
6885 class="cmtt-8"> </span><span
6886 class="cmtt-8"> </span><span
6887 class="cmtt-8"> </span><span
6888 class="cmtt-8"> </span><span
6889 class="cmtt-8"> </span><span
6890 class="cmtt-8"> </span><span
6891 class="cmtt-8"> </span><span
6892 class="cmtt-8"> </span><span
6893 class="cmtt-8"> </span><span
6894 class="cmtt-8"> </span><span
6895 class="cmtt-8"> </span><span
6896 class="cmtt-8"> </span><span
6897 class="cmtt-8"> </span><span
6898 class="cmtt-8"> </span><span
6899 class="cmtt-8"> 12)</span><span
6900 class="cmtt-8"> [cval]</span><span
6901 class="cmtt-8"> =</span><span
6902 class="cmtt-8"> read</span><span
6903 class="cmtt-8"> from</span><span
6904 class="cmtt-8"> packet</span><span
6905 class="cmtt-8"> using</span><span
6906 class="cmtt-8"> codebook</span><span
6907 class="cmtt-8"> number</span>
6908 <br class="fancyvrb" /><a
6910 class="cmr-6">15</span><span
6911 class="cmtt-8"> </span><span
6912 class="cmtt-8"> </span><span
6913 class="cmtt-8"> </span><span
6914 class="cmtt-8"> </span><span
6915 class="cmtt-8"> </span><span
6916 class="cmtt-8"> </span><span
6917 class="cmtt-8"> </span><span
6918 class="cmtt-8"> </span><span
6919 class="cmtt-8"> </span><span
6920 class="cmtt-8"> </span><span
6921 class="cmtt-8"> </span><span
6922 class="cmtt-8"> </span><span
6923 class="cmtt-8"> </span><span
6924 class="cmtt-8"> </span><span
6925 class="cmtt-8"> </span><span
6926 class="cmtt-8"> </span><span
6927 class="cmtt-8"> </span><span
6928 class="cmtt-8"> </span><span
6929 class="cmtt-8"> (vector</span><span
6930 class="cmtt-8"> [floor1_class_masterbooks]</span><span
6931 class="cmtt-8"> element</span><span
6932 class="cmtt-8"> [class])</span><span
6933 class="cmtt-8"> in</span><span
6934 class="cmtt-8"> scalar</span><span
6935 class="cmtt-8"> context</span>
6936 <br class="fancyvrb" /><a
6938 class="cmr-6">16</span><span
6939 class="cmtt-8"> </span><span
6940 class="cmtt-8"> </span><span
6941 class="cmtt-8"> </span><span
6942 class="cmtt-8"> </span><span
6943 class="cmtt-8"> </span><span
6944 class="cmtt-8"> </span><span
6945 class="cmtt-8"> </span><span
6946 class="cmtt-8"> </span><span
6947 class="cmtt-8"> </span><span
6948 class="cmtt-8"> </span><span
6949 class="cmtt-8"> </span><span
6950 class="cmtt-8"> </span><span
6951 class="cmsy-8">}</span>
6952 <br class="fancyvrb" /><a
6954 class="cmr-6">17</span><span
6955 class="cmtt-8"> </span><span
6956 class="cmtt-8"> </span>
6957 <br class="fancyvrb" /><a
6959 class="cmr-6">18</span><span
6960 class="cmtt-8"> </span><span
6961 class="cmtt-8"> </span><span
6962 class="cmtt-8"> </span><span
6963 class="cmtt-8"> </span><span
6964 class="cmtt-8"> </span><span
6965 class="cmtt-8"> </span><span
6966 class="cmtt-8"> </span><span
6967 class="cmtt-8"> 13)</span><span
6968 class="cmtt-8"> iterate</span><span
6969 class="cmtt-8"> [j]</span><span
6970 class="cmtt-8"> over</span><span
6971 class="cmtt-8"> the</span><span
6972 class="cmtt-8"> range</span><span
6973 class="cmtt-8"> 0</span><span
6974 class="cmtt-8"> ...</span><span
6975 class="cmtt-8"> [cdim]-1</span><span
6976 class="cmtt-8"> </span><span
6977 class="cmsy-8">{</span>
6978 <br class="fancyvrb" /><a
6980 class="cmr-6">19</span><span
6981 class="cmtt-8"> </span><span
6982 class="cmtt-8"> </span>
6983 <br class="fancyvrb" /><a
6985 class="cmr-6">20</span><span
6986 class="cmtt-8"> </span><span
6987 class="cmtt-8"> </span><span
6988 class="cmtt-8"> </span><span
6989 class="cmtt-8"> </span><span
6990 class="cmtt-8"> </span><span
6991 class="cmtt-8"> </span><span
6992 class="cmtt-8"> </span><span
6993 class="cmtt-8"> </span><span
6994 class="cmtt-8"> </span><span
6995 class="cmtt-8"> </span><span
6996 class="cmtt-8"> </span><span
6997 class="cmtt-8"> </span><span
6998 class="cmtt-8"> </span><span
6999 class="cmtt-8"> </span><span
7000 class="cmtt-8"> 14)</span><span
7001 class="cmtt-8"> [book]</span><span
7002 class="cmtt-8"> =</span><span
7003 class="cmtt-8"> array</span><span
7004 class="cmtt-8"> [floor1_subclass_books]</span><span
7005 class="cmtt-8"> element</span><span
7006 class="cmtt-8"> [class],([cval]</span><span
7007 class="cmtt-8"> bitwise</span><span
7008 class="cmtt-8"> AND</span><span
7009 class="cmtt-8"> [csub])</span>
7010 <br class="fancyvrb" /><a
7012 class="cmr-6">21</span><span
7013 class="cmtt-8"> </span><span
7014 class="cmtt-8"> </span><span
7015 class="cmtt-8"> </span><span
7016 class="cmtt-8"> </span><span
7017 class="cmtt-8"> </span><span
7018 class="cmtt-8"> </span><span
7019 class="cmtt-8"> </span><span
7020 class="cmtt-8"> </span><span
7021 class="cmtt-8"> </span><span
7022 class="cmtt-8"> </span><span
7023 class="cmtt-8"> </span><span
7024 class="cmtt-8"> </span><span
7025 class="cmtt-8"> </span><span
7026 class="cmtt-8"> </span><span
7027 class="cmtt-8"> 15)</span><span
7028 class="cmtt-8"> [cval]</span><span
7029 class="cmtt-8"> =</span><span
7030 class="cmtt-8"> [cval]</span><span
7031 class="cmtt-8"> right</span><span
7032 class="cmtt-8"> shifted</span><span
7033 class="cmtt-8"> [cbits]</span><span
7034 class="cmtt-8"> bits</span>
7035 <br class="fancyvrb" /><a
7037 class="cmr-6">22</span><span
7038 class="cmtt-8"> </span><span
7039 class="cmtt-8">  </span><span
7040 class="cmtt-8"> </span><span
7041 class="cmtt-8"> </span><span
7042 class="cmtt-8"> </span><span
7043 class="cmtt-8"> </span><span
7044 class="cmtt-8"> 16)</span><span
7045 class="cmtt-8"> if</span><span
7046 class="cmtt-8"> (</span><span
7047 class="cmtt-8"> [book]</span><span
7048 class="cmtt-8"> is</span><span
7049 class="cmtt-8"> not</span><span
7050 class="cmtt-8"> less</span><span
7051 class="cmtt-8"> than</span><span
7052 class="cmtt-8"> zero</span><span
7053 class="cmtt-8"> )</span><span
7054 class="cmtt-8"> </span><span
7055 class="cmsy-8">{</span>
7056 <br class="fancyvrb" /><a
7058 class="cmr-6">23</span><span
7059 class="cmtt-8"> </span><span
7060 class="cmtt-8"> </span>
7061 <br class="fancyvrb" /><a
7063 class="cmr-6">24</span><span
7064 class="cmtt-8"> </span><span
7065 class="cmtt-8">  </span><span
7066 class="cmtt-8"> </span><span
7067 class="cmtt-8"> </span><span
7068 class="cmtt-8"> </span><span
7069 class="cmtt-8"> </span><span
7070 class="cmtt-8"> </span><span
7071 class="cmtt-8"> </span><span
7072 class="cmtt-8"> </span><span
7073 class="cmtt-8"> </span><span
7074 class="cmtt-8"> </span><span
7075 class="cmtt-8"> </span><span
7076 class="cmtt-8"> 17)</span><span
7077 class="cmtt-8"> vector</span><span
7078 class="cmtt-8"> [floor1_Y]</span><span
7079 class="cmtt-8"> element</span><span
7080 class="cmtt-8"> ([j]+[offset])</span><span
7081 class="cmtt-8"> =</span><span
7082 class="cmtt-8"> read</span><span
7083 class="cmtt-8"> from</span><span
7084 class="cmtt-8"> packet</span><span
7085 class="cmtt-8"> using</span><span
7086 class="cmtt-8"> codebook</span>
7087 <br class="fancyvrb" /><a
7089 class="cmr-6">25</span><span
7090 class="cmtt-8"> </span><span
7091 class="cmtt-8"> </span><span
7092 class="cmtt-8"> </span><span
7093 class="cmtt-8"> </span><span
7094 class="cmtt-8"> </span><span
7095 class="cmtt-8"> </span><span
7096 class="cmtt-8"> </span><span
7097 class="cmtt-8"> </span><span
7098 class="cmtt-8"> </span><span
7099 class="cmtt-8"> </span><span
7100 class="cmtt-8"> </span><span
7101 class="cmtt-8"> </span><span
7102 class="cmtt-8"> </span><span
7103 class="cmtt-8"> </span><span
7104 class="cmtt-8"> </span><span
7105 class="cmtt-8"> </span><span
7106 class="cmtt-8"> </span><span
7107 class="cmtt-8"> </span><span
7108 class="cmtt-8"> </span><span
7109 class="cmtt-8"> </span><span
7110 class="cmtt-8"> </span><span
7111 class="cmtt-8"> </span><span
7112 class="cmtt-8"> </span><span
7113 class="cmtt-8"> </span><span
7114 class="cmtt-8"> [book]</span><span
7115 class="cmtt-8"> in</span><span
7116 class="cmtt-8"> scalar</span><span
7117 class="cmtt-8"> context</span>
7118 <br class="fancyvrb" /><a
7120 class="cmr-6">26</span><span
7121 class="cmtt-8"> </span><span
7122 class="cmtt-8"> </span>
7123 <br class="fancyvrb" /><a
7125 class="cmr-6">27</span><span
7126 class="cmtt-8"> </span><span
7127 class="cmtt-8"> </span><span
7128 class="cmtt-8"> </span><span
7129 class="cmtt-8"> </span><span
7130 class="cmtt-8"> </span><span
7131 class="cmtt-8"> </span><span
7132 class="cmtt-8"> </span><span
7133 class="cmtt-8"> </span><span
7134 class="cmtt-8"> </span><span
7135 class="cmtt-8"> </span><span
7136 class="cmtt-8"> </span><span
7137 class="cmtt-8"> </span><span
7138 class="cmtt-8"> </span><span
7139 class="cmtt-8"> </span><span
7140 class="cmtt-8"> </span><span
7141 class="cmtt-8"> </span><span
7142 class="cmtt-8"> </span><span
7143 class="cmtt-8"> </span><span
7144 class="cmtt-8"> </span><span
7145 class="cmsy-8">}</span><span
7146 class="cmtt-8"> else</span><span
7147 class="cmtt-8"> [book]</span><span
7148 class="cmtt-8"> is</span><span
7149 class="cmtt-8"> less</span><span
7150 class="cmtt-8"> than</span><span
7151 class="cmtt-8"> zero</span><span
7152 class="cmtt-8"> </span><span
7153 class="cmsy-8">{</span>
7154 <br class="fancyvrb" /><a
7156 class="cmr-6">28</span><span
7157 class="cmtt-8"> </span><span
7158 class="cmtt-8"> </span>
7159 <br class="fancyvrb" /><a
7161 class="cmr-6">29</span><span
7162 class="cmtt-8"> </span><span
7163 class="cmtt-8">  </span><span
7164 class="cmtt-8"> </span><span
7165 class="cmtt-8"> </span><span
7166 class="cmtt-8"> </span><span
7167 class="cmtt-8"> </span><span
7168 class="cmtt-8"> </span><span
7169 class="cmtt-8"> </span><span
7170 class="cmtt-8"> </span><span
7171 class="cmtt-8"> </span><span
7172 class="cmtt-8"> </span><span
7173 class="cmtt-8"> </span><span
7174 class="cmtt-8"> 18)</span><span
7175 class="cmtt-8"> vector</span><span
7176 class="cmtt-8"> [floor1_Y]</span><span
7177 class="cmtt-8"> element</span><span
7178 class="cmtt-8"> ([j]+[offset])</span><span
7179 class="cmtt-8"> =</span><span
7180 class="cmtt-8"> 0</span>
7181 <br class="fancyvrb" /><a
7183 class="cmr-6">30</span><span
7184 class="cmtt-8"> </span><span
7185 class="cmtt-8"> </span>
7186 <br class="fancyvrb" /><a
7188 class="cmr-6">31</span><span
7189 class="cmtt-8"> </span><span
7190 class="cmtt-8"> </span><span
7191 class="cmtt-8"> </span><span
7192 class="cmtt-8"> </span><span
7193 class="cmtt-8"> </span><span
7194 class="cmtt-8"> </span><span
7195 class="cmtt-8"> </span><span
7196 class="cmtt-8"> </span><span
7197 class="cmtt-8"> </span><span
7198 class="cmtt-8"> </span><span
7199 class="cmtt-8"> </span><span
7200 class="cmtt-8"> </span><span
7201 class="cmtt-8"> </span><span
7202 class="cmtt-8"> </span><span
7203 class="cmtt-8"> </span><span
7204 class="cmtt-8"> </span><span
7205 class="cmtt-8"> </span><span
7206 class="cmtt-8"> </span><span
7207 class="cmtt-8"> </span><span
7208 class="cmsy-8">}</span>
7209 <br class="fancyvrb" /><a
7211 class="cmr-6">32</span><span
7212 class="cmtt-8"> </span><span
7213 class="cmtt-8"> </span><span
7214 class="cmtt-8"> </span><span
7215 class="cmtt-8"> </span><span
7216 class="cmtt-8"> </span><span
7217 class="cmtt-8"> </span><span
7218 class="cmtt-8"> </span><span
7219 class="cmtt-8"> </span><span
7220 class="cmtt-8"> </span><span
7221 class="cmtt-8"> </span><span
7222 class="cmtt-8"> </span><span
7223 class="cmtt-8"> </span><span
7224 class="cmsy-8">}</span>
7225 <br class="fancyvrb" /><a
7227 class="cmr-6">33</span><span
7228 class="cmtt-8"> </span><span
7229 class="cmtt-8"> </span>
7230 <br class="fancyvrb" /><a
7232 class="cmr-6">34</span><span
7233 class="cmtt-8"> </span><span
7234 class="cmtt-8"> </span><span
7235 class="cmtt-8"> </span><span
7236 class="cmtt-8"> </span><span
7237 class="cmtt-8"> </span><span
7238 class="cmtt-8"> </span><span
7239 class="cmtt-8"> </span><span
7240 class="cmtt-8"> 19)</span><span
7241 class="cmtt-8"> [offset]</span><span
7242 class="cmtt-8"> =</span><span
7243 class="cmtt-8"> [offset]</span><span
7244 class="cmtt-8"> +</span><span
7245 class="cmtt-8"> [cdim]</span>
7246 <br class="fancyvrb" /><a
7248 class="cmr-6">35</span><span
7249 class="cmtt-8"> </span><span
7250 class="cmtt-8"> </span>
7251 <br class="fancyvrb" /><a
7253 class="cmr-6">36</span><span
7254 class="cmtt-8"> </span><span
7255 class="cmtt-8"> </span><span
7256 class="cmtt-8"> </span><span
7257 class="cmtt-8"> </span><span
7258 class="cmtt-8"> </span><span
7259 class="cmtt-8"> </span><span
7260 class="cmtt-8"> </span><span
7261 class="cmsy-8">}</span>
7262 <br class="fancyvrb" /><a
7264 class="cmr-6">37</span><span
7265 class="cmtt-8"> </span><span
7266 class="cmtt-8"> </span>
7267 <br class="fancyvrb" /><a
7269 class="cmr-6">38</span><span
7270 class="cmtt-8"> </span><span
7271 class="cmtt-8"> </span><span
7272 class="cmtt-8"> 20)</span><span
7273 class="cmtt-8"> done</span>
7278 <!--l. 226--><p class="noindent" >An end-of-packet condition during curve decode should be consider…
7281 class="cmtt-12">[nonzero] </span>flag had been unset at the beginning of decode.
7282 <!--l. 232--><p class="noindent" >Vector <span
7283 class="cmtt-12">[floor1_Y] </span>contains the values from packet decode needed for floor 1 synthes…
7284 <!--l. 237--><p class="noindent" ><span class="paragraphHead"><a
7286 class="cmbx-12">curve computation</span></span>
7293 <!--l. 247--><p class="noindent" >Although some aspects of the below algorithm look like inconseque…
7296 <!--l. 252--><p class="noindent" >
7297 <dl class="description"><dt class="description">
7299 class="cmssbx-10x-x-120">step 1: amplitude value synthesis</span> </dt><dd
7300 class="description">
7301 …<!--l. 255--><p class="noindent" >Unwrap the always-positive-or-zero values read from the packet i…
7303 <!--l. 258--><p class="noindent" >
7304 <div class="fancyvrb" id="fancyvrb31">
7307 class="cmr-6">1</span><span
7308 class="cmtt-8"> </span><span
7309 class="cmtt-8"> </span><span
7310 class="cmtt-8"> </span><span
7311 class="cmtt-8"> 1)</span><span
7312 class="cmtt-8"> [range]</span><span
7313 class="cmtt-8"> =</span><span
7314 class="cmtt-8"> vector</span><span
7315 class="cmtt-8"> </span><span
7316 class="cmsy-8">{</span><span
7317 class="cmtt-8"> 256,</span><span
7318 class="cmtt-8"> 128,</span><span
7319 class="cmtt-8"> 86,</span><span
7320 class="cmtt-8"> 64</span><span
7321 class="cmtt-8"> </span><span
7322 class="cmsy-8">}</span><span
7323 class="cmtt-8"> element</span><span
7324 class="cmtt-8"> ([floor1_multiplier]-1)</span>
7325 <br class="fancyvrb" /><a
7327 class="cmr-6">2</span><span
7328 class="cmtt-8"> </span><span
7329 class="cmtt-8"> </span><span
7330 class="cmtt-8"> </span><span
7331 class="cmtt-8"> 2)</span><span
7332 class="cmtt-8"> vector</span><span
7333 class="cmtt-8"> [floor1_step2_flag]</span><span
7334 class="cmtt-8"> element</span><span
7335 class="cmtt-8"> [0]</span><span
7336 class="cmtt-8"> =</span><span
7337 class="cmtt-8"> set</span>
7338 <br class="fancyvrb" /><a
7340 class="cmr-6">3</span><span
7341 class="cmtt-8"> </span><span
7342 class="cmtt-8"> </span><span
7343 class="cmtt-8"> </span><span
7344 class="cmtt-8"> 3)</span><span
7345 class="cmtt-8"> vector</span><span
7346 class="cmtt-8"> [floor1_step2_flag]</span><span
7347 class="cmtt-8"> element</span><span
7348 class="cmtt-8"> [1]</span><span
7349 class="cmtt-8"> =</span><span
7350 class="cmtt-8"> set</span>
7351 <br class="fancyvrb" /><a
7353 class="cmr-6">4</span><span
7354 class="cmtt-8"> </span><span
7355 class="cmtt-8"> </span><span
7356 class="cmtt-8"> </span><span
7357 class="cmtt-8"> 4)</span><span
7358 class="cmtt-8"> vector</span><span
7359 class="cmtt-8"> [floor1_final_Y]</span><span
7360 class="cmtt-8"> element</span><span
7361 class="cmtt-8"> [0]</span><span
7362 class="cmtt-8"> =</span><span
7363 class="cmtt-8"> vector</span><span
7364 class="cmtt-8"> [floor1_Y]</span><span
7365 class="cmtt-8"> element</span><span
7366 class="cmtt-8"> [0]</span>
7367 <br class="fancyvrb" /><a
7369 class="cmr-6">5</span><span
7370 class="cmtt-8"> </span><span
7371 class="cmtt-8"> </span><span
7372 class="cmtt-8"> </span><span
7373 class="cmtt-8"> 5)</span><span
7374 class="cmtt-8"> vector</span><span
7375 class="cmtt-8"> [floor1_final_Y]</span><span
7376 class="cmtt-8"> element</span><span
7377 class="cmtt-8"> [1]</span><span
7378 class="cmtt-8"> =</span><span
7379 class="cmtt-8"> vector</span><span
7380 class="cmtt-8"> [floor1_Y]</span><span
7381 class="cmtt-8"> element</span><span
7382 class="cmtt-8"> [1]</span>
7383 <br class="fancyvrb" /><a
7385 class="cmr-6">6</span><span
7386 class="cmtt-8"> </span><span
7387 class="cmtt-8"> </span><span
7388 class="cmtt-8"> </span><span
7389 class="cmtt-8"> 6)</span><span
7390 class="cmtt-8"> iterate</span><span
7391 class="cmtt-8"> [i]</span><span
7392 class="cmtt-8"> over</span><span
7393 class="cmtt-8"> the</span><span
7394 class="cmtt-8"> range</span><span
7395 class="cmtt-8"> 2</span><span
7396 class="cmtt-8"> ...</span><span
7397 class="cmtt-8"> [floor1_values]-1</span><span
7398 class="cmtt-8"> </span><span
7399 class="cmsy-8">{</span>
7400 <br class="fancyvrb" /><a
7402 class="cmr-6">7</span><span
7403 class="cmtt-8"> </span><span
7404 class="cmtt-8"> </span>
7405 <br class="fancyvrb" /><a
7407 class="cmr-6">8</span><span
7408 class="cmtt-8"> </span><span
7409 class="cmtt-8"> </span><span
7410 class="cmtt-8"> </span><span
7411 class="cmtt-8"> </span><span
7412 class="cmtt-8"> </span><span
7413 class="cmtt-8"> </span><span
7414 class="cmtt-8"> </span><span
7415 class="cmtt-8"> </span><span
7416 class="cmtt-8"> 7)</span><span
7417 class="cmtt-8"> [low_neighbor_offset]</span><span
7418 class="cmtt-8"> =</span><span
7419 class="cmtt-8"> </span><a
7421 class="cmtt-8">low_neighbor</span></a><span
7422 class="cmtt-8">([floor1_X_list],[i])</span>
7423 <br class="fancyvrb" /><a
7425 class="cmr-6">9</span><span
7426 class="cmtt-8"> </span><span
7427 class="cmtt-8"> </span><span
7428 class="cmtt-8"> </span><span
7429 class="cmtt-8"> </span><span
7430 class="cmtt-8"> </span><span
7431 class="cmtt-8"> </span><span
7432 class="cmtt-8"> </span><span
7433 class="cmtt-8"> </span><span
7434 class="cmtt-8"> 8)</span><span
7435 class="cmtt-8"> [high_neighbor_offset]</span><span
7436 class="cmtt-8"> =</span><span
7437 class="cmtt-8"> </span><a
7439 class="cmtt-8">high_neighbor</span></a><span
7440 class="cmtt-8">([floor1_X_list],[i])</span>
7441 <br class="fancyvrb" /><a
7443 class="cmr-6">10</span><span
7444 class="cmtt-8"> </span><span
7445 class="cmtt-8"> </span>
7446 <br class="fancyvrb" /><a
7448 class="cmr-6">11</span><span
7449 class="cmtt-8"> </span><span
7450 class="cmtt-8"> </span><span
7451 class="cmtt-8"> </span><span
7452 class="cmtt-8"> </span><span
7453 class="cmtt-8"> </span><span
7454 class="cmtt-8"> </span><span
7455 class="cmtt-8"> </span><span
7456 class="cmtt-8"> </span><span
7457 class="cmtt-8"> 9)</span><span
7458 class="cmtt-8"> [predicted]</span><span
7459 class="cmtt-8"> =</span><span
7460 class="cmtt-8"> </span><a
7462 class="cmtt-8">render_point</span></a><span
7463 class="cmtt-8">(</span><span
7464 class="cmtt-8"> vector</span><span
7465 class="cmtt-8"> [floor1_X_list]</span><span
7466 class="cmtt-8"> element</span><span
7467 class="cmtt-8"> [low_neighbor_offset],</span>
7468 <br class="fancyvrb" /><a
7470 class="cmr-6">12</span><span
7471 class="cmtt-8"> </span><span
7472 class="cmtt-8">  </span><span
7473 class="cmtt-8"> </span><span
7474 class="cmtt-8"> </span><span
7475 class="cmtt-8"> </span><span
7476 class="cmtt-8"> </span><span
7477 class="cmtt-8"> </span><span
7478 class="cmtt-8"> vector</span><span
7479 class="cmtt-8"> [floor1_final_Y]</span><span
7480 class="cmtt-8"> element</span><span
7481 class="cmtt-8"> [low_neighbor_offset],</span>
7482 <br class="fancyvrb" /><a
7484 class="cmr-6">13</span><span
7485 class="cmtt-8"> </span><span
7486 class="cmtt-8"> </span><span
7487 class="cmtt-8"> </span><span
7488 class="cmtt-8"> </span><span
7489 class="cmtt-8"> </span><span
7490 class="cmtt-8"> </span><span
7491 class="cmtt-8"> </span><span
7492 class="cmtt-8"> </span><span
7493 class="cmtt-8"> </span><span
7494 class="cmtt-8"> </span><span
7495 class="cmtt-8"> </span><span
7496 class="cmtt-8"> </span><span
7497 class="cmtt-8"> </span><span
7498 class="cmtt-8"> </span><span
7499 class="cmtt-8"> </span><span
7500 class="cmtt-8"> </span><span
7501 class="cmtt-8"> </span><span
7502 class="cmtt-8"> </span><span
7503 class="cmtt-8"> </span><span
7504 class="cmtt-8"> </span><span
7505 class="cmtt-8"> </span><span
7506 class="cmtt-8"> </span><span
7507 class="cmtt-8"> </span><span
7508 class="cmtt-8"> </span><span
7509 class="cmtt-8"> </span><span
7510 class="cmtt-8"> </span><span
7511 class="cmtt-8"> </span><span
7512 class="cmtt-8"> </span><span
7513 class="cmtt-8"> </span><span
7514 class="cmtt-8"> </span><span
7515 class="cmtt-8"> </span><span
7516 class="cmtt-8"> </span><span
7517 class="cmtt-8"> </span><span
7518 class="cmtt-8"> </span><span
7519 class="cmtt-8"> </span><span
7520 class="cmtt-8"> </span><span
7521 class="cmtt-8"> </span><span
7522 class="cmtt-8"> </span><span
7523 class="cmtt-8"> </span><span
7524 class="cmtt-8"> vector</span><span
7525 class="cmtt-8"> [floor1_X_list]</span><span
7526 class="cmtt-8"> element</span><span
7527 class="cmtt-8"> [high_neighbor_offset],</span>
7528 <br class="fancyvrb" /><a
7530 class="cmr-6">14</span><span
7531 class="cmtt-8"> </span><span
7532 class="cmtt-8">  </span><span
7533 class="cmtt-8"> </span><span
7534 class="cmtt-8"> </span><span
7535 class="cmtt-8"> </span><span
7536 class="cmtt-8"> </span><span
7537 class="cmtt-8"> </span><span
7538 class="cmtt-8"> vector</span><span
7539 class="cmtt-8"> [floor1_final_Y]</span><span
7540 class="cmtt-8"> element</span><span
7541 class="cmtt-8"> [high_neighbor_offset],</span>
7542 <br class="fancyvrb" /><a
7544 class="cmr-6">15</span><span
7545 class="cmtt-8"> </span><span
7546 class="cmtt-8"> </span><span
7547 class="cmtt-8"> </span><span
7548 class="cmtt-8"> </span><span
7549 class="cmtt-8"> </span><span
7550 class="cmtt-8"> </span><span
7551 class="cmtt-8"> </span><span
7552 class="cmtt-8"> </span><span
7553 class="cmtt-8"> </span><span
7554 class="cmtt-8"> </span><span
7555 class="cmtt-8"> </span><span
7556 class="cmtt-8"> </span><span
7557 class="cmtt-8"> </span><span
7558 class="cmtt-8"> </span><span
7559 class="cmtt-8"> </span><span
7560 class="cmtt-8"> </span><span
7561 class="cmtt-8"> </span><span
7562 class="cmtt-8"> </span><span
7563 class="cmtt-8"> </span><span
7564 class="cmtt-8"> </span><span
7565 class="cmtt-8"> </span><span
7566 class="cmtt-8"> </span><span
7567 class="cmtt-8"> </span><span
7568 class="cmtt-8"> </span><span
7569 class="cmtt-8"> </span><span
7570 class="cmtt-8"> </span><span
7571 class="cmtt-8"> </span><span
7572 class="cmtt-8"> </span><span
7573 class="cmtt-8"> </span><span
7574 class="cmtt-8"> </span><span
7575 class="cmtt-8"> </span><span
7576 class="cmtt-8"> </span><span
7577 class="cmtt-8"> </span><span
7578 class="cmtt-8"> </span><span
7579 class="cmtt-8"> </span><span
7580 class="cmtt-8"> </span><span
7581 class="cmtt-8"> </span><span
7582 class="cmtt-8"> </span><span
7583 class="cmtt-8"> </span><span
7584 class="cmtt-8"> vector</span><span
7585 class="cmtt-8"> [floor1_X_list]</span><span
7586 class="cmtt-8"> element</span><span
7587 class="cmtt-8"> [i]</span><span
7588 class="cmtt-8"> )</span>
7589 <br class="fancyvrb" /><a
7591 class="cmr-6">16</span><span
7592 class="cmtt-8"> </span><span
7593 class="cmtt-8"> </span>
7594 <br class="fancyvrb" /><a
7596 class="cmr-6">17</span><span
7597 class="cmtt-8"> </span><span
7598 class="cmtt-8"> </span><span
7599 class="cmtt-8"> </span><span
7600 class="cmtt-8"> </span><span
7601 class="cmtt-8"> </span><span
7602 class="cmtt-8"> </span><span
7603 class="cmtt-8"> </span><span
7604 class="cmtt-8"> 10)</span><span
7605 class="cmtt-8"> [val]</span><span
7606 class="cmtt-8"> =</span><span
7607 class="cmtt-8"> vector</span><span
7608 class="cmtt-8"> [floor1_Y]</span><span
7609 class="cmtt-8"> element</span><span
7610 class="cmtt-8"> [i]</span>
7611 <br class="fancyvrb" /><a
7613 class="cmr-6">18</span><span
7614 class="cmtt-8"> </span><span
7615 class="cmtt-8"> </span><span
7616 class="cmtt-8"> </span><span
7617 class="cmtt-8"> </span><span
7618 class="cmtt-8"> </span><span
7619 class="cmtt-8"> </span><span
7620 class="cmtt-8"> </span><span
7621 class="cmtt-8"> 11)</span><span
7622 class="cmtt-8"> [highroom]</span><span
7623 class="cmtt-8"> =</span><span
7624 class="cmtt-8"> [range]</span><span
7625 class="cmtt-8"> -</span><span
7626 class="cmtt-8"> [predicted]</span>
7627 <br class="fancyvrb" /><a
7629 class="cmr-6">19</span><span
7630 class="cmtt-8"> </span><span
7631 class="cmtt-8"> </span><span
7632 class="cmtt-8"> </span><span
7633 class="cmtt-8"> </span><span
7634 class="cmtt-8"> </span><span
7635 class="cmtt-8"> </span><span
7636 class="cmtt-8"> </span><span
7637 class="cmtt-8"> 12)</span><span
7638 class="cmtt-8"> [lowroom]</span><span
7639 class="cmtt-8"> </span><span
7640 class="cmtt-8"> =</span><span
7641 class="cmtt-8"> [predicted]</span>
7642 <br class="fancyvrb" /><a
7644 class="cmr-6">20</span><span
7645 class="cmtt-8"> </span><span
7646 class="cmtt-8"> </span><span
7647 class="cmtt-8"> </span><span
7648 class="cmtt-8"> </span><span
7649 class="cmtt-8"> </span><span
7650 class="cmtt-8"> </span><span
7651 class="cmtt-8"> </span><span
7652 class="cmtt-8"> 13)</span><span
7653 class="cmtt-8"> if</span><span
7654 class="cmtt-8"> (</span><span
7655 class="cmtt-8"> [highroom]</span><span
7656 class="cmtt-8"> is</span><span
7657 class="cmtt-8"> less</span><span
7658 class="cmtt-8"> than</span><span
7659 class="cmtt-8"> [lowroom]</span><span
7660 class="cmtt-8"> )</span><span
7661 class="cmtt-8"> </span><span
7662 class="cmsy-8">{</span>
7663 <br class="fancyvrb" /><a
7665 class="cmr-6">21</span><span
7666 class="cmtt-8"> </span><span
7667 class="cmtt-8"> </span>
7668 <br class="fancyvrb" /><a
7670 class="cmr-6">22</span><span
7671 class="cmtt-8"> </span><span
7672 class="cmtt-8"> </span><span
7673 class="cmtt-8"> </span><span
7674 class="cmtt-8"> </span><span
7675 class="cmtt-8"> </span><span
7676 class="cmtt-8"> </span><span
7677 class="cmtt-8"> </span><span
7678 class="cmtt-8"> </span><span
7679 class="cmtt-8"> </span><span
7680 class="cmtt-8"> </span><span
7681 class="cmtt-8"> </span><span
7682 class="cmtt-8"> </span><span
7683 class="cmtt-8"> </span><span
7684 class="cmtt-8"> 14)</span><span
7685 class="cmtt-8"> [room]</span><span
7686 class="cmtt-8"> =</span><span
7687 class="cmtt-8"> [highroom]</span><span
7688 class="cmtt-8"> *</span><span
7689 class="cmtt-8"> 2</span>
7693 <br class="fancyvrb" /><a
7695 class="cmr-6">23</span><span
7696 class="cmtt-8"> </span><span
7697 class="cmtt-8"> </span>
7698 <br class="fancyvrb" /><a
7700 class="cmr-6">24</span><span
7701 class="cmtt-8"> </span><span
7702 class="cmtt-8"> </span><span
7703 class="cmtt-8"> </span><span
7704 class="cmtt-8"> </span><span
7705 class="cmtt-8"> </span><span
7706 class="cmtt-8"> </span><span
7707 class="cmtt-8"> </span><span
7708 class="cmtt-8"> </span><span
7709 class="cmtt-8"> </span><span
7710 class="cmtt-8"> </span><span
7711 class="cmtt-8"> </span><span
7712 class="cmtt-8"> </span><span
7713 class="cmsy-8">}</span><span
7714 class="cmtt-8"> else</span><span
7715 class="cmtt-8"> [highroom]</span><span
7716 class="cmtt-8"> is</span><span
7717 class="cmtt-8"> not</span><span
7718 class="cmtt-8"> less</span><span
7719 class="cmtt-8"> than</span><span
7720 class="cmtt-8"> [lowroom]</span><span
7721 class="cmtt-8"> </span><span
7722 class="cmsy-8">{</span>
7723 <br class="fancyvrb" /><a
7725 class="cmr-6">25</span><span
7726 class="cmtt-8"> </span><span
7727 class="cmtt-8"> </span>
7728 <br class="fancyvrb" /><a
7730 class="cmr-6">26</span><span
7731 class="cmtt-8"> </span><span
7732 class="cmtt-8"> </span><span
7733 class="cmtt-8"> </span><span
7734 class="cmtt-8"> </span><span
7735 class="cmtt-8"> </span><span
7736 class="cmtt-8"> </span><span
7737 class="cmtt-8"> </span><span
7738 class="cmtt-8"> </span><span
7739 class="cmtt-8"> </span><span
7740 class="cmtt-8"> </span><span
7741 class="cmtt-8"> </span><span
7742 class="cmtt-8"> </span><span
7743 class="cmtt-8"> </span><span
7744 class="cmtt-8"> 15)</span><span
7745 class="cmtt-8"> [room]</span><span
7746 class="cmtt-8"> =</span><span
7747 class="cmtt-8"> [lowroom]</span><span
7748 class="cmtt-8"> *</span><span
7749 class="cmtt-8"> 2</span>
7750 <br class="fancyvrb" /><a
7752 class="cmr-6">27</span><span
7753 class="cmtt-8"> </span><span
7754 class="cmtt-8"> </span>
7755 <br class="fancyvrb" /><a
7757 class="cmr-6">28</span><span
7758 class="cmtt-8"> </span><span
7759 class="cmtt-8"> </span><span
7760 class="cmtt-8"> </span><span
7761 class="cmtt-8"> </span><span
7762 class="cmtt-8"> </span><span
7763 class="cmtt-8"> </span><span
7764 class="cmtt-8"> </span><span
7765 class="cmtt-8"> </span><span
7766 class="cmtt-8"> </span><span
7767 class="cmtt-8"> </span><span
7768 class="cmtt-8"> </span><span
7769 class="cmtt-8"> </span><span
7770 class="cmsy-8">}</span>
7771 <br class="fancyvrb" /><a
7773 class="cmr-6">29</span><span
7774 class="cmtt-8"> </span><span
7775 class="cmtt-8"> </span>
7776 <br class="fancyvrb" /><a
7778 class="cmr-6">30</span><span
7779 class="cmtt-8"> </span><span
7780 class="cmtt-8"> </span><span
7781 class="cmtt-8"> </span><span
7782 class="cmtt-8"> </span><span
7783 class="cmtt-8"> </span><span
7784 class="cmtt-8"> </span><span
7785 class="cmtt-8"> </span><span
7786 class="cmtt-8"> 16)</span><span
7787 class="cmtt-8"> if</span><span
7788 class="cmtt-8"> (</span><span
7789 class="cmtt-8"> [val]</span><span
7790 class="cmtt-8"> is</span><span
7791 class="cmtt-8"> nonzero</span><span
7792 class="cmtt-8"> )</span><span
7793 class="cmtt-8"> </span><span
7794 class="cmsy-8">{</span>
7795 <br class="fancyvrb" /><a
7797 class="cmr-6">31</span><span
7798 class="cmtt-8"> </span><span
7799 class="cmtt-8"> </span>
7800 <br class="fancyvrb" /><a
7802 class="cmr-6">32</span><span
7803 class="cmtt-8"> </span><span
7804 class="cmtt-8"> </span><span
7805 class="cmtt-8"> </span><span
7806 class="cmtt-8"> </span><span
7807 class="cmtt-8"> </span><span
7808 class="cmtt-8"> </span><span
7809 class="cmtt-8"> </span><span
7810 class="cmtt-8"> </span><span
7811 class="cmtt-8"> </span><span
7812 class="cmtt-8"> </span><span
7813 class="cmtt-8"> </span><span
7814 class="cmtt-8"> </span><span
7815 class="cmtt-8"> </span><span
7816 class="cmtt-8"> 17)</span><span
7817 class="cmtt-8"> vector</span><span
7818 class="cmtt-8"> [floor1_step2_flag]</span><span
7819 class="cmtt-8"> element</span><span
7820 class="cmtt-8"> [low_neighbor_offset]</span><span
7821 class="cmtt-8"> =</span><span
7822 class="cmtt-8"> set</span>
7823 <br class="fancyvrb" /><a
7825 class="cmr-6">33</span><span
7826 class="cmtt-8"> </span><span
7827 class="cmtt-8"> </span><span
7828 class="cmtt-8"> </span><span
7829 class="cmtt-8"> </span><span
7830 class="cmtt-8"> </span><span
7831 class="cmtt-8"> </span><span
7832 class="cmtt-8"> </span><span
7833 class="cmtt-8"> </span><span
7834 class="cmtt-8"> </span><span
7835 class="cmtt-8"> </span><span
7836 class="cmtt-8"> </span><span
7837 class="cmtt-8"> </span><span
7838 class="cmtt-8"> </span><span
7839 class="cmtt-8"> 18)</span><span
7840 class="cmtt-8"> vector</span><span
7841 class="cmtt-8"> [floor1_step2_flag]</span><span
7842 class="cmtt-8"> element</span><span
7843 class="cmtt-8"> [high_neighbor_offset]</span><span
7844 class="cmtt-8"> =</span><span
7845 class="cmtt-8"> set</span>
7846 <br class="fancyvrb" /><a
7848 class="cmr-6">34</span><span
7849 class="cmtt-8"> </span><span
7850 class="cmtt-8"> </span><span
7851 class="cmtt-8"> </span><span
7852 class="cmtt-8"> </span><span
7853 class="cmtt-8"> </span><span
7854 class="cmtt-8"> </span><span
7855 class="cmtt-8"> </span><span
7856 class="cmtt-8"> </span><span
7857 class="cmtt-8"> </span><span
7858 class="cmtt-8"> </span><span
7859 class="cmtt-8"> </span><span
7860 class="cmtt-8"> </span><span
7861 class="cmtt-8"> </span><span
7862 class="cmtt-8"> 19)</span><span
7863 class="cmtt-8"> vector</span><span
7864 class="cmtt-8"> [floor1_step2_flag]</span><span
7865 class="cmtt-8"> element</span><span
7866 class="cmtt-8"> [i]</span><span
7867 class="cmtt-8"> =</span><span
7868 class="cmtt-8"> set</span>
7869 <br class="fancyvrb" /><a
7871 class="cmr-6">35</span><span
7872 class="cmtt-8"> </span><span
7873 class="cmtt-8"> </span><span
7874 class="cmtt-8"> </span><span
7875 class="cmtt-8"> </span><span
7876 class="cmtt-8"> </span><span
7877 class="cmtt-8"> </span><span
7878 class="cmtt-8"> </span><span
7879 class="cmtt-8"> </span><span
7880 class="cmtt-8"> </span><span
7881 class="cmtt-8"> </span><span
7882 class="cmtt-8"> </span><span
7883 class="cmtt-8"> </span><span
7884 class="cmtt-8"> </span><span
7885 class="cmtt-8"> 20)</span><span
7886 class="cmtt-8"> if</span><span
7887 class="cmtt-8"> (</span><span
7888 class="cmtt-8"> [val]</span><span
7889 class="cmtt-8"> is</span><span
7890 class="cmtt-8"> greater</span><span
7891 class="cmtt-8"> than</span><span
7892 class="cmtt-8"> or</span><span
7893 class="cmtt-8"> equal</span><span
7894 class="cmtt-8"> to</span><span
7895 class="cmtt-8"> [room]</span><span
7896 class="cmtt-8"> )</span><span
7897 class="cmtt-8"> </span><span
7898 class="cmsy-8">{</span>
7899 <br class="fancyvrb" /><a
7901 class="cmr-6">36</span><span
7902 class="cmtt-8"> </span><span
7903 class="cmtt-8"> </span>
7904 <br class="fancyvrb" /><a
7906 class="cmr-6">37</span><span
7907 class="cmtt-8"> </span><span
7908 class="cmtt-8"> </span><span
7909 class="cmtt-8"> </span><span
7910 class="cmtt-8"> </span><span
7911 class="cmtt-8"> </span><span
7912 class="cmtt-8"> </span><span
7913 class="cmtt-8"> </span><span
7914 class="cmtt-8"> </span><span
7915 class="cmtt-8"> </span><span
7916 class="cmtt-8"> </span><span
7917 class="cmtt-8"> </span><span
7918 class="cmtt-8"> </span><span
7919 class="cmtt-8"> </span><span
7920 class="cmtt-8"> </span><span
7921 class="cmtt-8"> </span><span
7922 class="cmtt-8"> </span><span
7923 class="cmtt-8"> </span><span
7924 class="cmtt-8"> </span><span
7925 class="cmtt-8"> </span><span
7926 class="cmtt-8"> 21)</span><span
7927 class="cmtt-8"> if</span><span
7928 class="cmtt-8"> (</span><span
7929 class="cmtt-8"> [highroom]</span><span
7930 class="cmtt-8"> is</span><span
7931 class="cmtt-8"> greater</span><span
7932 class="cmtt-8"> than</span><span
7933 class="cmtt-8"> [lowroom]</span><span
7934 class="cmtt-8"> )</span><span
7935 class="cmtt-8"> </span><span
7936 class="cmsy-8">{</span>
7937 <br class="fancyvrb" /><a
7939 class="cmr-6">38</span><span
7940 class="cmtt-8"> </span><span
7941 class="cmtt-8"> </span>
7942 <br class="fancyvrb" /><a
7944 class="cmr-6">39</span><span
7945 class="cmtt-8"> </span><span
7946 class="cmtt-8"> </span><span
7947 class="cmtt-8"> </span><span
7948 class="cmtt-8"> </span><span
7949 class="cmtt-8"> </span><span
7950 class="cmtt-8"> </span><span
7951 class="cmtt-8"> </span><span
7952 class="cmtt-8"> </span><span
7953 class="cmtt-8"> </span><span
7954 class="cmtt-8"> </span><span
7955 class="cmtt-8"> </span><span
7956 class="cmtt-8"> </span><span
7957 class="cmtt-8"> </span><span
7958 class="cmtt-8"> </span><span
7959 class="cmtt-8"> </span><span
7960 class="cmtt-8"> </span><span
7961 class="cmtt-8"> </span><span
7962 class="cmtt-8"> </span><span
7963 class="cmtt-8"> </span><span
7964 class="cmtt-8"> </span><span
7965 class="cmtt-8"> </span><span
7966 class="cmtt-8"> </span><span
7967 class="cmtt-8"> </span><span
7968 class="cmtt-8"> </span><span
7969 class="cmtt-8"> </span><span
7970 class="cmtt-8"> 22)</span><span
7971 class="cmtt-8"> vector</span><span
7972 class="cmtt-8"> [floor1_final_Y]</span><span
7973 class="cmtt-8"> element</span><span
7974 class="cmtt-8"> [i]</span><span
7975 class="cmtt-8"> =</span><span
7976 class="cmtt-8"> [val]</span><span
7977 class="cmtt-8"> -</span><span
7978 class="cmtt-8"> [lowroom]</span><span
7979 class="cmtt-8"> +</span><span
7980 class="cmtt-8"> [predicted]</span>
7981 <br class="fancyvrb" /><a
7983 class="cmr-6">40</span><span
7984 class="cmtt-8"> </span><span
7985 class="cmtt-8"> </span>
7986 <br class="fancyvrb" /><a
7988 class="cmr-6">41</span><span
7989 class="cmtt-8"> </span><span
7990 class="cmtt-8">  </span><span
7991 class="cmtt-8"> </span><span
7992 class="cmtt-8"> </span><span
7993 class="cmtt-8"> </span><span
7994 class="cmtt-8"> </span><span
7995 class="cmtt-8"> </span><span
7996 class="cmtt-8"> </span><span
7997 class="cmsy-8">}</span><span
7998 class="cmtt-8"> else</span><span
7999 class="cmtt-8"> [highroom]</span><span
8000 class="cmtt-8"> is</span><span
8001 class="cmtt-8"> not</span><span
8002 class="cmtt-8"> greater</span><span
8003 class="cmtt-8"> than</span><span
8004 class="cmtt-8"> [lowroom]</span><span
8005 class="cmtt-8"> </span><span
8006 class="cmsy-8">{</span>
8007 <br class="fancyvrb" /><a
8009 class="cmr-6">42</span><span
8010 class="cmtt-8"> </span><span
8011 class="cmtt-8"> </span>
8012 <br class="fancyvrb" /><a
8014 class="cmr-6">43</span><span
8015 class="cmtt-8"> </span><span
8016 class="cmtt-8"> </span><span
8017 class="cmtt-8"> </span><span
8018 class="cmtt-8"> </span><span
8019 class="cmtt-8"> </span><span
8020 class="cmtt-8"> </span><span
8021 class="cmtt-8"> </span><span
8022 class="cmtt-8"> </span><span
8023 class="cmtt-8"> </span><span
8024 class="cmtt-8"> </span><span
8025 class="cmtt-8"> </span><span
8026 class="cmtt-8"> </span><span
8027 class="cmtt-8"> </span><span
8028 class="cmtt-8"> </span><span
8029 class="cmtt-8"> </span><span
8030 class="cmtt-8"> </span><span
8031 class="cmtt-8"> </span><span
8032 class="cmtt-8"> </span><span
8033 class="cmtt-8"> </span><span
8034 class="cmtt-8"> </span><span
8035 class="cmtt-8"> </span><span
8036 class="cmtt-8"> </span><span
8037 class="cmtt-8"> </span><span
8038 class="cmtt-8"> </span><span
8039 class="cmtt-8"> </span><span
8040 class="cmtt-8"> 23)</span><span
8041 class="cmtt-8"> vector</span><span
8042 class="cmtt-8"> [floor1_final_Y]</span><span
8043 class="cmtt-8"> element</span><span
8044 class="cmtt-8"> [i]</span><span
8045 class="cmtt-8"> =</span><span
8046 class="cmtt-8"> [predicted]</span><span
8047 class="cmtt-8"> -</span><span
8048 class="cmtt-8"> [val]</span><span
8049 class="cmtt-8"> +</span><span
8050 class="cmtt-8"> [highroom]</span><span
8051 class="cmtt-8"> -</span><span
8052 class="cmtt-8"> 1</span>
8053 <br class="fancyvrb" /><a
8055 class="cmr-6">44</span><span
8056 class="cmtt-8"> </span><span
8057 class="cmtt-8"> </span>
8058 <br class="fancyvrb" /><a
8060 class="cmr-6">45</span><span
8061 class="cmtt-8"> </span><span
8062 class="cmtt-8"> </span><span
8063 class="cmtt-8"> </span><span
8064 class="cmtt-8"> </span><span
8065 class="cmtt-8"> </span><span
8066 class="cmtt-8"> </span><span
8067 class="cmtt-8"> </span><span
8068 class="cmtt-8"> </span><span
8069 class="cmtt-8"> </span><span
8070 class="cmtt-8"> </span><span
8071 class="cmtt-8"> </span><span
8072 class="cmtt-8"> </span><span
8073 class="cmtt-8"> </span><span
8074 class="cmtt-8"> </span><span
8075 class="cmtt-8"> </span><span
8076 class="cmtt-8"> </span><span
8077 class="cmtt-8"> </span><span
8078 class="cmtt-8"> </span><span
8079 class="cmtt-8"> </span><span
8080 class="cmtt-8"> </span><span
8081 class="cmtt-8"> </span><span
8082 class="cmtt-8"> </span><span
8083 class="cmtt-8"> </span><span
8084 class="cmtt-8"> </span><span
8085 class="cmsy-8">}</span>
8086 <br class="fancyvrb" /><a
8088 class="cmr-6">46</span><span
8089 class="cmtt-8"> </span><span
8090 class="cmtt-8"> </span>
8091 <br class="fancyvrb" /><a
8093 class="cmr-6">47</span><span
8094 class="cmtt-8"> </span><span
8095 class="cmtt-8"> </span><span
8096 class="cmtt-8"> </span><span
8097 class="cmtt-8"> </span><span
8098 class="cmtt-8"> </span><span
8099 class="cmtt-8"> </span><span
8100 class="cmtt-8"> </span><span
8101 class="cmtt-8"> </span><span
8102 class="cmtt-8"> </span><span
8103 class="cmtt-8"> </span><span
8104 class="cmtt-8"> </span><span
8105 class="cmtt-8"> </span><span
8106 class="cmtt-8"> </span><span
8107 class="cmtt-8"> </span><span
8108 class="cmtt-8"> </span><span
8109 class="cmtt-8"> </span><span
8110 class="cmtt-8"> </span><span
8111 class="cmtt-8"> </span><span
8112 class="cmsy-8">}</span><span
8113 class="cmtt-8"> else</span><span
8114 class="cmtt-8"> [val]</span><span
8115 class="cmtt-8"> is</span><span
8116 class="cmtt-8"> less</span><span
8117 class="cmtt-8"> than</span><span
8118 class="cmtt-8"> [room]</span><span
8119 class="cmtt-8"> </span><span
8120 class="cmsy-8">{</span>
8121 <br class="fancyvrb" /><a
8123 class="cmr-6">48</span><span
8124 class="cmtt-8"> </span><span
8125 class="cmtt-8"> </span>
8126 <br class="fancyvrb" /><a
8128 class="cmr-6">49</span><span
8129 class="cmtt-8"> </span><span
8130 class="cmtt-8">  </span><span
8131 class="cmtt-8"> </span><span
8132 class="cmtt-8"> 24)</span><span
8133 class="cmtt-8"> if</span><span
8134 class="cmtt-8"> ([val]</span><span
8135 class="cmtt-8"> is</span><span
8136 class="cmtt-8"> odd)</span><span
8137 class="cmtt-8"> </span><span
8138 class="cmsy-8">{</span>
8139 <br class="fancyvrb" /><a
8141 class="cmr-6">50</span><span
8142 class="cmtt-8"> </span><span
8143 class="cmtt-8"> </span>
8144 <br class="fancyvrb" /><a
8146 class="cmr-6">51</span><span
8147 class="cmtt-8"> </span><span
8148 class="cmtt-8"> </span><span
8149 class="cmtt-8"> </span><span
8150 class="cmtt-8"> </span><span
8151 class="cmtt-8"> </span><span
8152 class="cmtt-8"> </span><span
8153 class="cmtt-8"> </span><span
8154 class="cmtt-8"> </span><span
8155 class="cmtt-8"> </span><span
8156 class="cmtt-8"> </span><span
8157 class="cmtt-8"> </span><span
8158 class="cmtt-8"> </span><span
8159 class="cmtt-8"> </span><span
8160 class="cmtt-8"> </span><span
8161 class="cmtt-8"> </span><span
8162 class="cmtt-8"> </span><span
8163 class="cmtt-8"> </span><span
8164 class="cmtt-8"> </span><span
8165 class="cmtt-8"> </span><span
8166 class="cmtt-8"> </span><span
8167 class="cmtt-8"> </span><span
8168 class="cmtt-8"> </span><span
8169 class="cmtt-8"> </span><span
8170 class="cmtt-8"> </span><span
8171 class="cmtt-8"> </span><span
8172 class="cmtt-8"> 25)</span><span
8173 class="cmtt-8"> vector</span><span
8174 class="cmtt-8"> [floor1_final_Y]</span><span
8175 class="cmtt-8"> element</span><span
8176 class="cmtt-8"> [i]</span><span
8177 class="cmtt-8"> =</span>
8178 <br class="fancyvrb" /><a
8180 class="cmr-6">52</span><span
8181 class="cmtt-8"> </span><span
8182 class="cmtt-8"> </span><span
8183 class="cmtt-8"> </span><span
8184 class="cmtt-8"> </span><span
8185 class="cmtt-8"> </span><span
8186 class="cmtt-8"> </span><span
8187 class="cmtt-8"> </span><span
8188 class="cmtt-8"> </span><span
8189 class="cmtt-8"> </span><span
8190 class="cmtt-8"> </span><span
8191 class="cmtt-8"> </span><span
8192 class="cmtt-8"> </span><span
8193 class="cmtt-8"> </span><span
8194 class="cmtt-8"> </span><span
8195 class="cmtt-8"> </span><span
8196 class="cmtt-8"> </span><span
8197 class="cmtt-8"> </span><span
8198 class="cmtt-8"> </span><span
8199 class="cmtt-8"> </span><span
8200 class="cmtt-8"> </span><span
8201 class="cmtt-8"> </span><span
8202 class="cmtt-8"> </span><span
8203 class="cmtt-8"> </span><span
8204 class="cmtt-8"> </span><span
8205 class="cmtt-8"> </span><span
8206 class="cmtt-8"> </span><span
8207 class="cmtt-8"> </span><span
8208 class="cmtt-8"> </span><span
8209 class="cmtt-8"> </span><span
8210 class="cmtt-8"> [predicted]</span><span
8211 class="cmtt-8"> -</span><span
8212 class="cmtt-8"> (([val]</span><span
8213 class="cmtt-8"> +</span><span
8214 class="cmtt-8"> 1)</span><span
8215 class="cmtt-8"> divided</span><span
8216 class="cmtt-8"> by</span><span
8217 class="cmtt-8"> </span><span
8218 class="cmtt-8"> 2</span><span
8219 class="cmtt-8"> using</span><span
8220 class="cmtt-8"> integer</span><span
8221 class="cmtt-8"> division)</span>
8222 <br class="fancyvrb" /><a
8224 class="cmr-6">53</span><span
8225 class="cmtt-8"> </span><span
8226 class="cmtt-8"> </span>
8227 <br class="fancyvrb" /><a
8229 class="cmr-6">54</span><span
8230 class="cmtt-8"> </span><span
8231 class="cmtt-8"> </span><span
8232 class="cmtt-8"> </span><span
8233 class="cmtt-8"> </span><span
8234 class="cmtt-8"> </span><span
8235 class="cmtt-8"> </span><span
8236 class="cmtt-8"> </span><span
8237 class="cmtt-8"> </span><span
8238 class="cmtt-8"> </span><span
8239 class="cmtt-8"> </span><span
8240 class="cmtt-8"> </span><span
8241 class="cmtt-8"> </span><span
8242 class="cmtt-8"> </span><span
8243 class="cmtt-8"> </span><span
8244 class="cmtt-8"> </span><span
8245 class="cmtt-8"> </span><span
8246 class="cmtt-8"> </span><span
8247 class="cmtt-8"> </span><span
8248 class="cmtt-8"> </span><span
8249 class="cmtt-8"> </span><span
8250 class="cmtt-8"> </span><span
8251 class="cmtt-8"> </span><span
8252 class="cmtt-8"> </span><span
8253 class="cmtt-8"> </span><span
8254 class="cmsy-8">}</span><span
8255 class="cmtt-8"> else</span><span
8256 class="cmtt-8"> [val]</span><span
8257 class="cmtt-8"> is</span><span
8258 class="cmtt-8"> even</span><span
8259 class="cmtt-8"> </span><span
8260 class="cmsy-8">{</span>
8261 <br class="fancyvrb" /><a
8263 class="cmr-6">55</span><span
8264 class="cmtt-8"> </span><span
8265 class="cmtt-8"> </span>
8266 <br class="fancyvrb" /><a
8268 class="cmr-6">56</span><span
8269 class="cmtt-8"> </span><span
8270 class="cmtt-8"> </span><span
8271 class="cmtt-8"> </span><span
8272 class="cmtt-8"> </span><span
8273 class="cmtt-8"> </span><span
8274 class="cmtt-8"> </span><span
8275 class="cmtt-8"> </span><span
8276 class="cmtt-8"> </span><span
8277 class="cmtt-8"> </span><span
8278 class="cmtt-8"> </span><span
8279 class="cmtt-8"> </span><span
8280 class="cmtt-8"> </span><span
8281 class="cmtt-8"> </span><span
8282 class="cmtt-8"> </span><span
8283 class="cmtt-8"> </span><span
8284 class="cmtt-8"> </span><span
8285 class="cmtt-8"> </span><span
8286 class="cmtt-8"> </span><span
8287 class="cmtt-8"> </span><span
8288 class="cmtt-8"> </span><span
8289 class="cmtt-8"> </span><span
8290 class="cmtt-8"> </span><span
8291 class="cmtt-8"> </span><span
8292 class="cmtt-8"> </span><span
8293 class="cmtt-8"> </span><span
8294 class="cmtt-8"> 26)</span><span
8295 class="cmtt-8"> vector</span><span
8296 class="cmtt-8"> [floor1_final_Y]</span><span
8297 class="cmtt-8"> element</span><span
8298 class="cmtt-8"> [i]</span><span
8299 class="cmtt-8"> =</span>
8300 <br class="fancyvrb" /><a
8302 class="cmr-6">57</span><span
8303 class="cmtt-8"> </span><span
8304 class="cmtt-8"> </span><span
8305 class="cmtt-8"> </span><span
8306 class="cmtt-8"> </span><span
8307 class="cmtt-8"> </span><span
8308 class="cmtt-8"> </span><span
8309 class="cmtt-8"> </span><span
8310 class="cmtt-8"> </span><span
8311 class="cmtt-8"> </span><span
8312 class="cmtt-8"> </span><span
8313 class="cmtt-8"> </span><span
8314 class="cmtt-8"> </span><span
8315 class="cmtt-8"> </span><span
8316 class="cmtt-8"> </span><span
8317 class="cmtt-8"> </span><span
8318 class="cmtt-8"> </span><span
8319 class="cmtt-8"> </span><span
8320 class="cmtt-8"> </span><span
8321 class="cmtt-8"> </span><span
8322 class="cmtt-8"> </span><span
8323 class="cmtt-8"> </span><span
8324 class="cmtt-8"> </span><span
8325 class="cmtt-8"> </span><span
8326 class="cmtt-8"> </span><span
8327 class="cmtt-8"> </span><span
8328 class="cmtt-8"> </span><span
8329 class="cmtt-8"> </span><span
8330 class="cmtt-8"> </span><span
8331 class="cmtt-8"> </span><span
8332 class="cmtt-8"> [predicted]</span><span
8333 class="cmtt-8"> +</span><span
8334 class="cmtt-8"> ([val]</span><span
8335 class="cmtt-8"> /</span><span
8336 class="cmtt-8"> 2</span><span
8337 class="cmtt-8"> using</span><span
8338 class="cmtt-8"> integer</span><span
8339 class="cmtt-8"> division)</span>
8340 <br class="fancyvrb" /><a
8342 class="cmr-6">58</span><span
8343 class="cmtt-8"> </span><span
8344 class="cmtt-8"> </span>
8345 <br class="fancyvrb" /><a
8347 class="cmr-6">59</span><span
8348 class="cmtt-8"> </span><span
8349 class="cmtt-8"> </span><span
8350 class="cmtt-8"> </span><span
8351 class="cmtt-8"> </span><span
8352 class="cmtt-8"> </span><span
8353 class="cmtt-8"> </span><span
8354 class="cmtt-8"> </span><span
8355 class="cmtt-8"> </span><span
8356 class="cmtt-8"> </span><span
8357 class="cmtt-8"> </span><span
8358 class="cmtt-8"> </span><span
8359 class="cmtt-8"> </span><span
8360 class="cmtt-8"> </span><span
8361 class="cmtt-8"> </span><span
8362 class="cmtt-8"> </span><span
8363 class="cmtt-8"> </span><span
8364 class="cmtt-8"> </span><span
8365 class="cmtt-8"> </span><span
8366 class="cmtt-8"> </span><span
8367 class="cmtt-8"> </span><span
8368 class="cmtt-8"> </span><span
8369 class="cmtt-8"> </span><span
8370 class="cmtt-8"> </span><span
8371 class="cmtt-8"> </span><span
8372 class="cmsy-8">}</span>
8373 <br class="fancyvrb" /><a
8375 class="cmr-6">60</span><span
8376 class="cmtt-8"> </span><span
8377 class="cmtt-8"> </span>
8378 <br class="fancyvrb" /><a
8380 class="cmr-6">61</span><span
8381 class="cmtt-8"> </span><span
8382 class="cmtt-8"> </span><span
8383 class="cmtt-8"> </span><span
8384 class="cmtt-8"> </span><span
8385 class="cmtt-8"> </span><span
8386 class="cmtt-8"> </span><span
8387 class="cmtt-8"> </span><span
8388 class="cmtt-8"> </span><span
8389 class="cmtt-8"> </span><span
8390 class="cmtt-8"> </span><span
8391 class="cmtt-8"> </span><span
8392 class="cmtt-8"> </span><span
8393 class="cmtt-8"> </span><span
8394 class="cmtt-8"> </span><span
8395 class="cmtt-8"> </span><span
8396 class="cmtt-8"> </span><span
8397 class="cmtt-8"> </span><span
8398 class="cmtt-8"> </span><span
8399 class="cmsy-8">}</span>
8400 <br class="fancyvrb" /><a
8402 class="cmr-6">62</span><span
8403 class="cmtt-8"> </span><span
8404 class="cmtt-8"> </span>
8405 <br class="fancyvrb" /><a
8407 class="cmr-6">63</span><span
8408 class="cmtt-8"> </span><span
8409 class="cmtt-8"> </span><span
8410 class="cmtt-8"> </span><span
8411 class="cmtt-8"> </span><span
8412 class="cmtt-8"> </span><span
8413 class="cmtt-8"> </span><span
8414 class="cmtt-8"> </span><span
8415 class="cmtt-8"> </span><span
8416 class="cmtt-8"> </span><span
8417 class="cmtt-8"> </span><span
8418 class="cmtt-8"> </span><span
8419 class="cmtt-8"> </span><span
8420 class="cmsy-8">}</span><span
8421 class="cmtt-8"> else</span><span
8422 class="cmtt-8"> [val]</span><span
8423 class="cmtt-8"> is</span><span
8424 class="cmtt-8"> zero</span><span
8425 class="cmtt-8"> </span><span
8426 class="cmsy-8">{</span>
8427 <br class="fancyvrb" /><a
8429 class="cmr-6">64</span><span
8430 class="cmtt-8"> </span><span
8431 class="cmtt-8"> </span>
8432 <br class="fancyvrb" /><a
8434 class="cmr-6">65</span><span
8435 class="cmtt-8"> </span><span
8436 class="cmtt-8"> </span><span
8437 class="cmtt-8"> </span><span
8438 class="cmtt-8"> </span><span
8439 class="cmtt-8"> </span><span
8440 class="cmtt-8"> </span><span
8441 class="cmtt-8"> </span><span
8442 class="cmtt-8"> </span><span
8443 class="cmtt-8"> </span><span
8444 class="cmtt-8"> </span><span
8445 class="cmtt-8"> </span><span
8446 class="cmtt-8"> </span><span
8447 class="cmtt-8"> </span><span
8448 class="cmtt-8"> 27)</span><span
8449 class="cmtt-8"> vector</span><span
8450 class="cmtt-8"> [floor1_step2_flag]</span><span
8451 class="cmtt-8"> element</span><span
8452 class="cmtt-8"> [i]</span><span
8453 class="cmtt-8"> =</span><span
8454 class="cmtt-8"> unset</span>
8455 <br class="fancyvrb" /><a
8457 class="cmr-6">66</span><span
8458 class="cmtt-8"> </span><span
8459 class="cmtt-8"> </span><span
8460 class="cmtt-8"> </span><span
8461 class="cmtt-8"> </span><span
8462 class="cmtt-8"> </span><span
8463 class="cmtt-8"> </span><span
8464 class="cmtt-8"> </span><span
8465 class="cmtt-8"> </span><span
8466 class="cmtt-8"> </span><span
8467 class="cmtt-8"> </span><span
8468 class="cmtt-8"> </span><span
8469 class="cmtt-8"> </span><span
8470 class="cmtt-8"> </span><span
8471 class="cmtt-8"> 28)</span><span
8472 class="cmtt-8"> vector</span><span
8473 class="cmtt-8"> [floor1_final_Y]</span><span
8474 class="cmtt-8"> element</span><span
8475 class="cmtt-8"> [i]</span><span
8476 class="cmtt-8"> =</span><span
8477 class="cmtt-8"> [predicted]</span>
8478 <br class="fancyvrb" /><a
8480 class="cmr-6">67</span><span
8481 class="cmtt-8"> </span><span
8482 class="cmtt-8"> </span>
8483 <br class="fancyvrb" /><a
8485 class="cmr-6">68</span><span
8486 class="cmtt-8"> </span><span
8487 class="cmtt-8"> </span><span
8488 class="cmtt-8"> </span><span
8489 class="cmtt-8"> </span><span
8490 class="cmtt-8"> </span><span
8491 class="cmtt-8"> </span><span
8492 class="cmtt-8"> </span><span
8493 class="cmtt-8"> </span><span
8494 class="cmtt-8"> </span><span
8495 class="cmtt-8"> </span><span
8496 class="cmtt-8"> </span><span
8497 class="cmtt-8"> </span><span
8498 class="cmsy-8">}</span>
8499 <br class="fancyvrb" /><a
8501 class="cmr-6">69</span><span
8502 class="cmtt-8"> </span><span
8503 class="cmtt-8"> </span>
8504 <br class="fancyvrb" /><a
8506 class="cmr-6">70</span><span
8507 class="cmtt-8"> </span><span
8508 class="cmtt-8"> </span><span
8509 class="cmtt-8"> </span><span
8510 class="cmtt-8"> </span><span
8511 class="cmtt-8"> </span><span
8512 class="cmtt-8"> </span><span
8513 class="cmtt-8"> </span><span
8514 class="cmsy-8">}</span>
8515 <br class="fancyvrb" /><a
8517 class="cmr-6">71</span><span
8518 class="cmtt-8"> </span><span
8519 class="cmtt-8"> </span>
8520 <br class="fancyvrb" /><a
8522 class="cmr-6">72</span><span
8523 class="cmtt-8"> </span><span
8524 class="cmtt-8"> </span><span
8525 class="cmtt-8"> 29)</span><span
8526 class="cmtt-8"> done</span>
8527 <br class="fancyvrb" /><a
8529 class="cmr-6">73</span><span
8530 class="cmtt-8"> </span><span
8531 class="cmtt-8"> </span>
8533 </dd><dt class="description">
8535 class="cmssbx-10x-x-120">step 2: curve synthesis</span> </dt><dd
8536 class="description">
8537 <!--l. 338--><p class="noindent" >Curve synthesis generates a return vector <span
8538 class="cmtt-12">[floor] </span>of length <span
8539 class="cmtt-12">[n] </span>(where <span
8540 class="cmtt-12">[n] </span>is provided by
8543 class="cmtt-12">[floor1_X_list]</span>, <span
8544 class="cmtt-12">[floor1_final_Y] </span>and <span
8545 class="cmtt-12">[floor1_step2_flag] </span>vectors, as well as
8550 <!--l. 345--><p class="noindent" >Decode begins by sorting the scalars from vectors <span
8551 class="cmtt-12">[floor1_X_list]</span>, <span
8552 class="cmtt-12">[floor1_final_Y] </span>and
8554 class="cmtt-12">[floor1_step2_flag] </span>together into new vectors <span
8555 class="cmtt-12">[floor1_X_list]’</span>, <span
8556 class="cmtt-12">[floor1_final_Y]’</span>
8558 class="cmtt-12">[floor1_step2_flag]’ </span>according to ascending sort order of the values in
8560 class="cmtt-12">[floor1_X_list]</span>. That is, sort the values of <span
8561 class="cmtt-12">[floor1_X_list] </span>and then apply the same
8564 <!--l. 355--><p class="noindent" >Then compute the final curve in one pass:
8565 <!--l. 357--><p class="noindent" >
8566 <div class="fancyvrb" id="fancyvrb32">
8569 class="cmr-6">1</span><span
8570 class="cmtt-8"> </span><span
8571 class="cmtt-8"> </span><span
8572 class="cmtt-8"> </span><span
8573 class="cmtt-8"> 1)</span><span
8574 class="cmtt-8"> [hx]</span><span
8575 class="cmtt-8"> =</span><span
8576 class="cmtt-8"> 0</span>
8577 <br class="fancyvrb" /><a
8579 class="cmr-6">2</span><span
8580 class="cmtt-8"> </span><span
8581 class="cmtt-8"> </span><span
8582 class="cmtt-8"> </span><span
8583 class="cmtt-8"> 2)</span><span
8584 class="cmtt-8"> [lx]</span><span
8585 class="cmtt-8"> =</span><span
8586 class="cmtt-8"> 0</span>
8587 <br class="fancyvrb" /><a
8589 class="cmr-6">3</span><span
8590 class="cmtt-8"> </span><span
8591 class="cmtt-8"> </span><span
8592 class="cmtt-8"> </span><span
8593 class="cmtt-8"> 3)</span><span
8594 class="cmtt-8"> [ly]</span><span
8595 class="cmtt-8"> =</span><span
8596 class="cmtt-8"> vector</span><span
8597 class="cmtt-8"> [floor1_final_Y]’</span><span
8598 class="cmtt-8"> element</span><span
8599 class="cmtt-8"> [0]</span><span
8600 class="cmtt-8"> *</span><span
8601 class="cmtt-8"> [floor1_multiplier]</span>
8602 <br class="fancyvrb" /><a
8604 class="cmr-6">4</span><span
8605 class="cmtt-8"> </span><span
8606 class="cmtt-8"> </span><span
8607 class="cmtt-8"> </span><span
8608 class="cmtt-8"> 4)</span><span
8609 class="cmtt-8"> iterate</span><span
8610 class="cmtt-8"> [i]</span><span
8611 class="cmtt-8"> over</span><span
8612 class="cmtt-8"> the</span><span
8613 class="cmtt-8"> range</span><span
8614 class="cmtt-8"> 1</span><span
8615 class="cmtt-8"> ...</span><span
8616 class="cmtt-8"> [floor1_values]-1</span><span
8617 class="cmtt-8"> </span><span
8618 class="cmsy-8">{</span>
8619 <br class="fancyvrb" /><a
8621 class="cmr-6">5</span><span
8622 class="cmtt-8"> </span><span
8623 class="cmtt-8"> </span>
8624 <br class="fancyvrb" /><a
8626 class="cmr-6">6</span><span
8627 class="cmtt-8"> </span><span
8628 class="cmtt-8"> </span><span
8629 class="cmtt-8"> </span><span
8630 class="cmtt-8"> </span><span
8631 class="cmtt-8"> </span><span
8632 class="cmtt-8"> </span><span
8633 class="cmtt-8"> </span><span
8634 class="cmtt-8"> </span><span
8635 class="cmtt-8"> 5)</span><span
8636 class="cmtt-8"> if</span><span
8637 class="cmtt-8"> (</span><span
8638 class="cmtt-8"> [floor1_step2_flag]’</span><span
8639 class="cmtt-8"> element</span><span
8640 class="cmtt-8"> [i]</span><span
8641 class="cmtt-8"> is</span><span
8642 class="cmtt-8"> set</span><span
8643 class="cmtt-8"> )</span><span
8644 class="cmtt-8"> </span><span
8645 class="cmsy-8">{</span>
8646 <br class="fancyvrb" /><a
8648 class="cmr-6">7</span><span
8649 class="cmtt-8"> </span><span
8650 class="cmtt-8"> </span>
8651 <br class="fancyvrb" /><a
8653 class="cmr-6">8</span><span
8654 class="cmtt-8"> </span><span
8655 class="cmtt-8"> </span><span
8656 class="cmtt-8"> </span><span
8657 class="cmtt-8"> </span><span
8658 class="cmtt-8"> </span><span
8659 class="cmtt-8"> </span><span
8660 class="cmtt-8"> </span><span
8661 class="cmtt-8"> </span><span
8662 class="cmtt-8"> </span><span
8663 class="cmtt-8"> </span><span
8664 class="cmtt-8"> </span><span
8665 class="cmtt-8"> </span><span
8666 class="cmtt-8"> </span><span
8667 class="cmtt-8"> </span><span
8668 class="cmtt-8"> 6)</span><span
8669 class="cmtt-8"> [hy]</span><span
8670 class="cmtt-8"> =</span><span
8671 class="cmtt-8"> [floor1_final_Y]’</span><span
8672 class="cmtt-8"> element</span><span
8673 class="cmtt-8"> [i]</span><span
8674 class="cmtt-8"> *</span><span
8675 class="cmtt-8"> [floor1_multiplier]</span>
8676 <br class="fancyvrb" /><a
8678 class="cmr-6">9</span><span
8679 class="cmtt-8"> </span><span
8680 class="cmtt-8"> </span><span
8681 class="cmtt-8">  </span><span
8682 class="cmtt-8"> </span><span
8683 class="cmtt-8"> </span><span
8684 class="cmtt-8"> </span><span
8685 class="cmtt-8"> </span><span
8686 class="cmtt-8"> 7)</span><span
8687 class="cmtt-8"> [hx]</span><span
8688 class="cmtt-8"> =</span><span
8689 class="cmtt-8"> [floor1_X_list]’</span><span
8690 class="cmtt-8"> element</span><span
8691 class="cmtt-8"> [i]</span>
8692 <br class="fancyvrb" /><a
8694 class="cmr-6">10</span><span
8695 class="cmtt-8"> </span><span
8696 class="cmtt-8"> </span><span
8697 class="cmtt-8"> </span><span
8698 class="cmtt-8"> </span><span
8699 class="cmtt-8"> </span><span
8700 class="cmtt-8"> </span><span
8701 class="cmtt-8"> </span><span
8702 class="cmtt-8"> </span><span
8703 class="cmtt-8"> </span><span
8704 class="cmtt-8"> </span><span
8705 class="cmtt-8"> </span><span
8706 class="cmtt-8"> </span><span
8707 class="cmtt-8"> </span><span
8708 class="cmtt-8"> </span><span
8709 class="cmtt-8"> 8)</span><span
8710 class="cmtt-8"> </span><a
8712 class="cmtt-8">render_line</span></a><span
8713 class="cmtt-8">(</span><span
8714 class="cmtt-8"> [lx],</span><span
8715 class="cmtt-8"> [ly],</span><span
8716 class="cmtt-8"> [hx],</span><span
8717 class="cmtt-8"> [hy],</span><span
8718 class="cmtt-8"> [floor]</span><span
8719 class="cmtt-8"> )</span>
8720 <br class="fancyvrb" /><a
8722 class="cmr-6">11</span><span
8723 class="cmtt-8"> </span><span
8724 class="cmtt-8"> </span><span
8725 class="cmtt-8"> </span><span
8726 class="cmtt-8"> </span><span
8727 class="cmtt-8"> </span><span
8728 class="cmtt-8"> </span><span
8729 class="cmtt-8"> </span><span
8730 class="cmtt-8"> </span><span
8731 class="cmtt-8"> </span><span
8732 class="cmtt-8"> </span><span
8733 class="cmtt-8"> </span><span
8734 class="cmtt-8"> </span><span
8735 class="cmtt-8"> </span><span
8736 class="cmtt-8"> </span><span
8737 class="cmtt-8"> 9)</span><span
8738 class="cmtt-8"> [lx]</span><span
8739 class="cmtt-8"> =</span><span
8740 class="cmtt-8"> [hx]</span>
8741 <br class="fancyvrb" /><a
8743 class="cmr-6">12</span><span
8744 class="cmtt-8"> </span><span
8745 class="cmtt-8">  </span><span
8746 class="cmtt-8"> </span><span
8747 class="cmtt-8"> </span><span
8748 class="cmtt-8"> </span><span
8749 class="cmtt-8"> 10)</span><span
8750 class="cmtt-8"> [ly]</span><span
8751 class="cmtt-8"> =</span><span
8752 class="cmtt-8"> [hy]</span>
8753 <br class="fancyvrb" /><a
8755 class="cmr-6">13</span><span
8756 class="cmtt-8"> </span><span
8757 class="cmtt-8"> </span><span
8758 class="cmtt-8"> </span><span
8759 class="cmtt-8"> </span><span
8760 class="cmtt-8"> </span><span
8761 class="cmtt-8"> </span><span
8762 class="cmtt-8"> </span><span
8763 class="cmtt-8"> </span><span
8764 class="cmtt-8"> </span><span
8765 class="cmtt-8"> </span><span
8766 class="cmtt-8"> </span><span
8767 class="cmtt-8"> </span><span
8768 class="cmsy-8">}</span>
8769 <br class="fancyvrb" /><a
8771 class="cmr-6">14</span><span
8772 class="cmtt-8"> </span><span
8773 class="cmtt-8"> </span><span
8774 class="cmtt-8"> </span><span
8775 class="cmtt-8"> </span><span
8776 class="cmtt-8"> </span><span
8777 class="cmtt-8"> </span><span
8778 class="cmtt-8"> </span><span
8779 class="cmsy-8">}</span>
8780 <br class="fancyvrb" /><a
8782 class="cmr-6">15</span><span
8783 class="cmtt-8"> </span><span
8784 class="cmtt-8"> </span>
8785 <br class="fancyvrb" /><a
8787 class="cmr-6">16</span><span
8788 class="cmtt-8"> </span><span
8789 class="cmtt-8"> </span><span
8790 class="cmtt-8"> 11)</span><span
8791 class="cmtt-8"> if</span><span
8792 class="cmtt-8"> (</span><span
8793 class="cmtt-8"> [hx]</span><span
8794 class="cmtt-8"> is</span><span
8795 class="cmtt-8"> less</span><span
8796 class="cmtt-8"> than</span><span
8797 class="cmtt-8"> [n]</span><span
8798 class="cmtt-8"> )</span><span
8799 class="cmtt-8"> </span><span
8800 class="cmsy-8">{</span>
8801 <br class="fancyvrb" /><a
8803 class="cmr-6">17</span><span
8804 class="cmtt-8"> </span><span
8805 class="cmtt-8"> </span>
8806 <br class="fancyvrb" /><a
8808 class="cmr-6">18</span><span
8809 class="cmtt-8"> </span><span
8810 class="cmtt-8"> </span><span
8811 class="cmtt-8"> </span><span
8812 class="cmtt-8"> </span><span
8813 class="cmtt-8"> </span><span
8814 class="cmtt-8"> </span><span
8815 class="cmtt-8"> </span><span
8816 class="cmtt-8"> </span><span
8817 class="cmtt-8"> </span><span
8818 class="cmtt-8"> 12)</span><span
8819 class="cmtt-8"> </span><a
8821 class="cmtt-8">render_line</span></a><span
8822 class="cmtt-8">(</span><span
8823 class="cmtt-8"> [hx],</span><span
8824 class="cmtt-8"> [hy],</span><span
8825 class="cmtt-8"> [n],</span><span
8826 class="cmtt-8"> [hy],</span><span
8827 class="cmtt-8"> [floor]</span><span
8828 class="cmtt-8"> )</span>
8829 <br class="fancyvrb" /><a
8831 class="cmr-6">19</span><span
8832 class="cmtt-8"> </span><span
8833 class="cmtt-8"> </span>
8834 <br class="fancyvrb" /><a
8836 class="cmr-6">20</span><span
8837 class="cmtt-8"> </span><span
8838 class="cmtt-8"> </span><span
8839 class="cmtt-8"> </span><span
8840 class="cmtt-8"> </span><span
8841 class="cmtt-8"> </span><span
8842 class="cmtt-8"> </span><span
8843 class="cmtt-8"> </span><span
8844 class="cmsy-8">}</span>
8845 <br class="fancyvrb" /><a
8847 class="cmr-6">21</span><span
8848 class="cmtt-8"> </span><span
8849 class="cmtt-8"> </span>
8850 <br class="fancyvrb" /><a
8852 class="cmr-6">22</span><span
8853 class="cmtt-8"> </span><span
8854 class="cmtt-8"> </span><span
8855 class="cmtt-8"> 13)</span><span
8856 class="cmtt-8"> if</span><span
8857 class="cmtt-8"> (</span><span
8858 class="cmtt-8"> [hx]</span><span
8859 class="cmtt-8"> is</span><span
8860 class="cmtt-8"> greater</span><span
8861 class="cmtt-8"> than</span><span
8862 class="cmtt-8"> [n]</span><span
8863 class="cmtt-8"> )</span><span
8864 class="cmtt-8"> </span><span
8865 class="cmsy-8">{</span>
8866 <br class="fancyvrb" /><a
8868 class="cmr-6">23</span><span
8869 class="cmtt-8"> </span><span
8870 class="cmtt-8"> </span>
8871 <br class="fancyvrb" /><a
8873 class="cmr-6">24</span><span
8874 class="cmtt-8"> </span><span
8875 class="cmtt-8"> </span><span
8876 class="cmtt-8"> </span><span
8877 class="cmtt-8"> </span><span
8878 class="cmtt-8"> </span><span
8879 class="cmtt-8"> </span><span
8880 class="cmtt-8"> </span><span
8881 class="cmtt-8"> </span><span
8882 class="cmtt-8"> </span><span
8883 class="cmtt-8"> </span><span
8884 class="cmtt-8"> </span><span
8885 class="cmtt-8"> </span><span
8886 class="cmtt-8"> </span><span
8887 class="cmtt-8"> 14)</span><span
8888 class="cmtt-8"> truncate</span><span
8889 class="cmtt-8"> vector</span><span
8890 class="cmtt-8"> [floor]</span><span
8891 class="cmtt-8"> to</span><span
8892 class="cmtt-8"> [n]</span><span
8893 class="cmtt-8"> elements</span>
8894 <br class="fancyvrb" /><a
8896 class="cmr-6">25</span><span
8897 class="cmtt-8"> </span><span
8898 class="cmtt-8"> </span>
8899 <br class="fancyvrb" /><a
8901 class="cmr-6">26</span><span
8902 class="cmtt-8"> </span><span
8903 class="cmtt-8"> </span><span
8904 class="cmtt-8"> </span><span
8905 class="cmtt-8"> </span><span
8906 class="cmtt-8"> </span><span
8907 class="cmtt-8"> </span><span
8908 class="cmtt-8"> </span><span
8909 class="cmsy-8">}</span>
8910 <br class="fancyvrb" /><a
8912 class="cmr-6">27</span><span
8913 class="cmtt-8"> </span><span
8914 class="cmtt-8"> </span>
8915 <br class="fancyvrb" /><a
8917 class="cmr-6">28</span><span
8918 class="cmtt-8"> </span><span
8919 class="cmtt-8"> </span><span
8920 class="cmtt-8"> 15)</span><span
8921 class="cmtt-8"> for</span><span
8922 class="cmtt-8"> each</span><span
8923 class="cmtt-8"> scalar</span><span
8924 class="cmtt-8"> in</span><span
8925 class="cmtt-8"> vector</span><span
8926 class="cmtt-8"> [floor],</span><span
8927 class="cmtt-8"> perform</span><span
8928 class="cmtt-8"> a</span><span
8929 class="cmtt-8"> lookup</span><span
8930 class="cmtt-8"> substitution</span><span
8931 class="cmtt-8"> using</span>
8932 <br class="fancyvrb" /><a
8934 class="cmr-6">29</span><span
8935 class="cmtt-8"> </span><span
8936 class="cmtt-8"> </span><span
8937 class="cmtt-8"> </span><span
8938 class="cmtt-8"> </span><span
8939 class="cmtt-8"> </span><span
8940 class="cmtt-8"> </span><span
8941 class="cmtt-8"> the</span><span
8942 class="cmtt-8"> scalar</span><span
8943 class="cmtt-8"> value</span><span
8944 class="cmtt-8"> from</span><span
8945 class="cmtt-8"> [floor]</span><span
8946 class="cmtt-8"> as</span><span
8947 class="cmtt-8"> an</span><span
8948 class="cmtt-8"> offset</span><span
8949 class="cmtt-8"> into</span><span
8950 class="cmtt-8"> the</span><span
8951 class="cmtt-8"> vector</span><span
8952 class="cmtt-8"> </span><a
8954 class="cmtt-8">[floor1_inverse_dB_static_table]</span></a>
8955 <br class="fancyvrb" /><a
8957 class="cmr-6">30</span><span
8958 class="cmtt-8"> </span><span
8959 class="cmtt-8"> </span>
8960 <br class="fancyvrb" /><a
8962 class="cmr-6">31</span><span
8963 class="cmtt-8"> </span><span
8964 class="cmtt-8"> </span><span
8965 class="cmtt-8"> 16)</span><span
8966 class="cmtt-8"> done</span>
8967 <br class="fancyvrb" /><a
8969 class="cmr-6">32</span><span
8970 class="cmtt-8"> </span><span
8971 class="cmtt-8"> </span>
8977 <h3 class="sectionHead"><span class="titlemark">8 </span> <a
8979 <!--l. 6--><p class="noindent" >
8980 <h4 class="subsectionHead"><span class="titlemark">8.1 </span> <a
8982 <!--l. 8--><p class="noindent" >A residue vector represents the fine detail of the audio spectrum o…
8987 <!--l. 15--><p class="noindent" >Whatever the exact qualities, the Vorbis residue abstraction codes…
8991 <!--l. 23--><p class="noindent" >
8992 <h4 class="subsectionHead"><span class="titlemark">8.2 </span> <a
8994 <!--l. 25--><p class="noindent" >Residue format partitions each vector in the vector bundle into ch…
9000 <!--l. 33--><p class="noindent" >A set of coded residue vectors are all of the same length. High le…
9003 <ul class="itemize1">
9004 …<li class="itemize">Each vector is partitioned into multiple equal sized chunks according to confi…
9006 class="cmti-12">n</span>, a partition size <span
9007 class="cmti-12">residue˙partition˙size</span>, and
9009 class="cmti-12">ch </span>residue vectors, the total number of partitioned chunks coded is
9014 class="cmti-12">n</span>/<span
9015 class="cmti-12">residue˙partition˙size</span>*<span
9016 class="cmti-12">ch</span>. It is important to note that the integer division truncates.
9018 class="cmti-12">residue˙partition˙size </span>of 8.
9020 …<li class="itemize">Each partition in each vector has a classification number that specifies which…
9029 …<li class="itemize">The values in a residue vector may be encoded monolithically in a single pass …
9036 <div class="center"
9038 <!--l. 70--><p class="noindent" >
9040 <!--l. 71--><p class="noindent" ><img
9043 <br /> <div class="caption"
9044 ><span class="id">Figure 11: </span><span
9045 class="content">illustration of residue vector format</span></div><!--tex4ht:label?: x1-10400111 -->
9047 <!--l. 77--><p class="noindent" >
9048 <h4 class="subsectionHead"><span class="titlemark">8.3 </span> <a
9050 <!--l. 79--><p class="noindent" >Residue 0 and 1 differ only in the way the values within a residue…
9053 <!--l. 83--><p class="noindent" >Residue encoding 0 interleaves VQ encoding according to the dimens…
9060 <!--l. 89--><p class="noindent" >As an example, assume a partition vector of size eight, to be enco…
9062 <!--l. 92--><p class="noindent" >
9063 <div class="fancyvrb" id="fancyvrb33">
9066 class="cmr-6">1</span><span
9067 class="cmtt-8"> </span><span
9068 class="cmtt-8"> </span>
9069 <br class="fancyvrb" /><a
9071 class="cmr-6">2</span><span
9072 class="cmtt-8"> </span><span
9073 class="cmtt-8"> </span><span
9074 class="cmtt-8"> </span><span
9075 class="cmtt-8"> </span><span
9076 class="cmtt-8"> </span><span
9077 class="cmtt-8"> </span><span
9078 class="cmtt-8"> </span><span
9079 class="cmtt-8"> </span><span
9080 class="cmtt-8"> </span><span
9081 class="cmtt-8"> </span><span
9082 class="cmtt-8"> </span><span
9083 class="cmtt-8"> </span><span
9084 class="cmtt-8"> </span><span
9085 class="cmtt-8"> original</span><span
9086 class="cmtt-8"> residue</span><span
9087 class="cmtt-8"> vector:</span><span
9088 class="cmtt-8"> [</span><span
9089 class="cmtt-8"> 0</span><span
9090 class="cmtt-8"> 1</span><span
9091 class="cmtt-8"> 2</span><span
9092 class="cmtt-8"> 3</span><span
9093 class="cmtt-8"> 4</span><span
9094 class="cmtt-8"> 5</span><span
9095 class="cmtt-8"> 6</span><span
9096 class="cmtt-8"> 7</span><span
9097 class="cmtt-8"> ]</span>
9098 <br class="fancyvrb" /><a
9100 class="cmr-6">3</span><span
9101 class="cmtt-8"> </span><span
9102 class="cmtt-8"> </span>
9103 <br class="fancyvrb" /><a
9105 class="cmr-6">4</span><span
9106 class="cmtt-8"> </span><span
9107 class="cmtt-8"> codebook</span><span
9108 class="cmtt-8"> dimensions</span><span
9109 class="cmtt-8"> =</span><span
9110 class="cmtt-8"> 8</span><span
9111 class="cmtt-8"> </span><span
9112 class="cmtt-8"> encoded</span><span
9113 class="cmtt-8"> as:</span><span
9114 class="cmtt-8"> [</span><span
9115 class="cmtt-8"> 0</span><span
9116 class="cmtt-8"> 1</span><span
9117 class="cmtt-8"> 2</span><span
9118 class="cmtt-8"> 3</span><span
9119 class="cmtt-8"> 4</span><span
9120 class="cmtt-8"> 5</span><span
9121 class="cmtt-8"> 6</span><span
9122 class="cmtt-8"> 7</span><span
9123 class="cmtt-8"> ]</span>
9124 <br class="fancyvrb" /><a
9126 class="cmr-6">5</span><span
9127 class="cmtt-8"> </span><span
9128 class="cmtt-8"> </span>
9129 <br class="fancyvrb" /><a
9131 class="cmr-6">6</span><span
9132 class="cmtt-8"> </span><span
9133 class="cmtt-8"> codebook</span><span
9134 class="cmtt-8"> dimensions</span><span
9135 class="cmtt-8"> =</span><span
9136 class="cmtt-8"> 4</span><span
9137 class="cmtt-8"> </span><span
9138 class="cmtt-8"> encoded</span><span
9139 class="cmtt-8"> as:</span><span
9140 class="cmtt-8"> [</span><span
9141 class="cmtt-8"> 0</span><span
9142 class="cmtt-8"> 2</span><span
9143 class="cmtt-8"> 4</span><span
9144 class="cmtt-8"> 6</span><span
9145 class="cmtt-8"> ],</span><span
9146 class="cmtt-8"> [</span><span
9147 class="cmtt-8"> 1</span><span
9148 class="cmtt-8"> 3</span><span
9149 class="cmtt-8"> 5</span><span
9150 class="cmtt-8"> 7</span><span
9151 class="cmtt-8"> ]</span>
9152 <br class="fancyvrb" /><a
9154 class="cmr-6">7</span><span
9155 class="cmtt-8"> </span><span
9156 class="cmtt-8"> </span>
9157 <br class="fancyvrb" /><a
9159 class="cmr-6">8</span><span
9160 class="cmtt-8"> </span><span
9161 class="cmtt-8"> codebook</span><span
9162 class="cmtt-8"> dimensions</span><span
9163 class="cmtt-8"> =</span><span
9164 class="cmtt-8"> 2</span><span
9165 class="cmtt-8"> </span><span
9166 class="cmtt-8"> encoded</span><span
9167 class="cmtt-8"> as:</span><span
9168 class="cmtt-8"> [</span><span
9169 class="cmtt-8"> 0</span><span
9170 class="cmtt-8"> 4</span><span
9171 class="cmtt-8"> ],</span><span
9172 class="cmtt-8"> [</span><span
9173 class="cmtt-8"> 1</span><span
9174 class="cmtt-8"> 5</span><span
9175 class="cmtt-8"> ],</span><span
9176 class="cmtt-8"> [</span><span
9177 class="cmtt-8"> 2</span><span
9178 class="cmtt-8"> 6</span><span
9179 class="cmtt-8"> ],</span><span
9180 class="cmtt-8"> [</span><span
9181 class="cmtt-8"> 3</span><span
9182 class="cmtt-8"> 7</span><span
9183 class="cmtt-8"> ]</span>
9184 <br class="fancyvrb" /><a
9186 class="cmr-6">9</span><span
9187 class="cmtt-8"> </span><span
9188 class="cmtt-8"> </span>
9189 <br class="fancyvrb" /><a
9191 class="cmr-6">10</span><span
9192 class="cmtt-8"> </span><span
9193 class="cmtt-8"> codebook</span><span
9194 class="cmtt-8"> dimensions</span><span
9195 class="cmtt-8"> =</span><span
9196 class="cmtt-8"> 1</span><span
9197 class="cmtt-8"> </span><span
9198 class="cmtt-8"> encoded</span><span
9199 class="cmtt-8"> as:</span><span
9200 class="cmtt-8"> [</span><span
9201 class="cmtt-8"> 0</span><span
9202 class="cmtt-8"> ],</span><span
9203 class="cmtt-8"> [</span><span
9204 class="cmtt-8"> 1</span><span
9205 class="cmtt-8"> ],</span><span
9206 class="cmtt-8"> [</span><span
9207 class="cmtt-8"> 2</span><span
9208 class="cmtt-8"> ],</span><span
9209 class="cmtt-8"> [</span><span
9210 class="cmtt-8"> 3</span><span
9211 class="cmtt-8"> ],</span><span
9212 class="cmtt-8"> [</span><span
9213 class="cmtt-8"> 4</span><span
9214 class="cmtt-8"> ],</span><span
9215 class="cmtt-8"> [</span><span
9216 class="cmtt-8"> 5</span><span
9217 class="cmtt-8"> ],</span><span
9218 class="cmtt-8"> [</span><span
9219 class="cmtt-8"> 6</span><span
9220 class="cmtt-8"> ],</span><span
9221 class="cmtt-8"> [</span><span
9222 class="cmtt-8"> 7</span><span
9223 class="cmtt-8"> ]</span>
9224 <br class="fancyvrb" /><a
9226 class="cmr-6">11</span><span
9227 class="cmtt-8"> </span><span
9228 class="cmtt-8"> </span>
9230 <!--l. 106--><p class="noindent" >It is worth mentioning at this point that no configurable value i…
9232 <!--l. 111--><p class="noindent" >
9233 <h4 class="subsectionHead"><span class="titlemark">8.4 </span> <a
9235 <!--l. 113--><p class="noindent" >Residue 1 does not interleave VQ encoding. It represents partitio…
9238 <!--l. 118--><p class="noindent" >As an example, assume a partition vector of size eight, to be enc…
9240 <!--l. 121--><p class="noindent" >
9241 <div class="fancyvrb" id="fancyvrb34">
9244 class="cmr-6">1</span><span
9245 class="cmtt-8"> </span><span
9246 class="cmtt-8"> </span>
9247 <br class="fancyvrb" /><a
9249 class="cmr-6">2</span><span
9250 class="cmtt-8"> </span><span
9251 class="cmtt-8"> </span><span
9252 class="cmtt-8"> </span><span
9253 class="cmtt-8"> </span><span
9254 class="cmtt-8"> </span><span
9255 class="cmtt-8"> </span><span
9256 class="cmtt-8"> </span><span
9257 class="cmtt-8"> </span><span
9258 class="cmtt-8"> </span><span
9259 class="cmtt-8"> </span><span
9260 class="cmtt-8"> </span><span
9261 class="cmtt-8"> </span><span
9262 class="cmtt-8"> </span><span
9263 class="cmtt-8"> original</span><span
9264 class="cmtt-8"> residue</span><span
9265 class="cmtt-8"> vector:</span><span
9266 class="cmtt-8"> [</span><span
9267 class="cmtt-8"> 0</span><span
9268 class="cmtt-8"> 1</span><span
9269 class="cmtt-8"> 2</span><span
9270 class="cmtt-8"> 3</span><span
9271 class="cmtt-8"> 4</span><span
9272 class="cmtt-8"> 5</span><span
9273 class="cmtt-8"> 6</span><span
9274 class="cmtt-8"> 7</span><span
9275 class="cmtt-8"> ]</span>
9276 <br class="fancyvrb" /><a
9278 class="cmr-6">3</span><span
9279 class="cmtt-8"> </span><span
9280 class="cmtt-8"> </span>
9281 <br class="fancyvrb" /><a
9283 class="cmr-6">4</span><span
9284 class="cmtt-8"> </span><span
9285 class="cmtt-8"> codebook</span><span
9286 class="cmtt-8"> dimensions</span><span
9287 class="cmtt-8"> =</span><span
9288 class="cmtt-8"> 8</span><span
9289 class="cmtt-8"> </span><span
9290 class="cmtt-8"> encoded</span><span
9291 class="cmtt-8"> as:</span><span
9292 class="cmtt-8"> [</span><span
9293 class="cmtt-8"> 0</span><span
9294 class="cmtt-8"> 1</span><span
9295 class="cmtt-8"> 2</span><span
9296 class="cmtt-8"> 3</span><span
9297 class="cmtt-8"> 4</span><span
9298 class="cmtt-8"> 5</span><span
9299 class="cmtt-8"> 6</span><span
9300 class="cmtt-8"> 7</span><span
9301 class="cmtt-8"> ]</span>
9302 <br class="fancyvrb" /><a
9304 class="cmr-6">5</span><span
9305 class="cmtt-8"> </span><span
9306 class="cmtt-8"> </span>
9307 <br class="fancyvrb" /><a
9309 class="cmr-6">6</span><span
9310 class="cmtt-8"> </span><span
9311 class="cmtt-8"> codebook</span><span
9312 class="cmtt-8"> dimensions</span><span
9313 class="cmtt-8"> =</span><span
9314 class="cmtt-8"> 4</span><span
9315 class="cmtt-8"> </span><span
9316 class="cmtt-8"> encoded</span><span
9317 class="cmtt-8"> as:</span><span
9318 class="cmtt-8"> [</span><span
9319 class="cmtt-8"> 0</span><span
9320 class="cmtt-8"> 1</span><span
9321 class="cmtt-8"> 2</span><span
9322 class="cmtt-8"> 3</span><span
9323 class="cmtt-8"> ],</span><span
9324 class="cmtt-8"> [</span><span
9325 class="cmtt-8"> 4</span><span
9326 class="cmtt-8"> 5</span><span
9327 class="cmtt-8"> 6</span><span
9328 class="cmtt-8"> 7</span><span
9329 class="cmtt-8"> ]</span>
9330 <br class="fancyvrb" /><a
9332 class="cmr-6">7</span><span
9333 class="cmtt-8"> </span><span
9334 class="cmtt-8"> </span>
9335 <br class="fancyvrb" /><a
9337 class="cmr-6">8</span><span
9338 class="cmtt-8"> </span><span
9339 class="cmtt-8"> codebook</span><span
9340 class="cmtt-8"> dimensions</span><span
9341 class="cmtt-8"> =</span><span
9342 class="cmtt-8"> 2</span><span
9343 class="cmtt-8"> </span><span
9344 class="cmtt-8"> encoded</span><span
9345 class="cmtt-8"> as:</span><span
9346 class="cmtt-8"> [</span><span
9347 class="cmtt-8"> 0</span><span
9348 class="cmtt-8"> 1</span><span
9349 class="cmtt-8"> ],</span><span
9350 class="cmtt-8"> [</span><span
9351 class="cmtt-8"> 2</span><span
9352 class="cmtt-8"> 3</span><span
9353 class="cmtt-8"> ],</span><span
9354 class="cmtt-8"> [</span><span
9355 class="cmtt-8"> 4</span><span
9356 class="cmtt-8"> 5</span><span
9357 class="cmtt-8"> ],</span><span
9358 class="cmtt-8"> [</span><span
9359 class="cmtt-8"> 6</span><span
9360 class="cmtt-8"> 7</span><span
9361 class="cmtt-8"> ]</span>
9362 <br class="fancyvrb" /><a
9364 class="cmr-6">9</span><span
9365 class="cmtt-8"> </span><span
9366 class="cmtt-8"> </span>
9367 <br class="fancyvrb" /><a
9369 class="cmr-6">10</span><span
9370 class="cmtt-8"> </span><span
9371 class="cmtt-8"> codebook</span><span
9372 class="cmtt-8"> dimensions</span><span
9373 class="cmtt-8"> =</span><span
9374 class="cmtt-8"> 1</span><span
9375 class="cmtt-8"> </span><span
9376 class="cmtt-8"> encoded</span><span
9377 class="cmtt-8"> as:</span><span
9378 class="cmtt-8"> [</span><span
9379 class="cmtt-8"> 0</span><span
9380 class="cmtt-8"> ],</span><span
9381 class="cmtt-8"> [</span><span
9382 class="cmtt-8"> 1</span><span
9383 class="cmtt-8"> ],</span><span
9384 class="cmtt-8"> [</span><span
9385 class="cmtt-8"> 2</span><span
9386 class="cmtt-8"> ],</span><span
9387 class="cmtt-8"> [</span><span
9388 class="cmtt-8"> 3</span><span
9389 class="cmtt-8"> ],</span><span
9390 class="cmtt-8"> [</span><span
9391 class="cmtt-8"> 4</span><span
9392 class="cmtt-8"> ],</span><span
9393 class="cmtt-8"> [</span><span
9394 class="cmtt-8"> 5</span><span
9395 class="cmtt-8"> ],</span><span
9396 class="cmtt-8"> [</span><span
9397 class="cmtt-8"> 6</span><span
9398 class="cmtt-8"> ],</span><span
9399 class="cmtt-8"> [</span><span
9400 class="cmtt-8"> 7</span><span
9401 class="cmtt-8"> ]</span>
9402 <br class="fancyvrb" /><a
9404 class="cmr-6">11</span><span
9405 class="cmtt-8"> </span><span
9406 class="cmtt-8"> </span>
9411 <!--l. 137--><p class="noindent" >
9412 <h4 class="subsectionHead"><span class="titlemark">8.5 </span> <a
9414 <!--l. 139--><p class="noindent" >Residue type two can be thought of as a variant of residue type 1…
9416 class="cmti-12">ch </span>passed in vectors of length <span
9417 class="cmti-12">n </span>are first interleaved
9419 class="cmti-12">ch</span>*<span
9420 class="cmti-12">n</span>. Encoding then proceeds as in type 1. Decoding
9423 <div class="center"
9425 <!--l. 147--><p class="noindent" >
9427 <!--l. 148--><p class="noindent" ><img
9430 <br /> <div class="caption"
9431 ><span class="id">Figure 12: </span><span
9432 class="content">illustration of residue type 2</span></div><!--tex4ht:label?: x1-10700112 -->
9434 <!--l. 153--><p class="noindent" >
9435 <h4 class="subsectionHead"><span class="titlemark">8.6 </span> <a
9437 <!--l. 155--><p class="noindent" >
9438 <h5 class="subsubsectionHead"><span class="titlemark">8.6.1 </span> <a
9440 <!--l. 157--><p class="noindent" >Header decode for all three residue types is identical.
9441 <div class="fancyvrb" id="fancyvrb35">
9444 class="cmr-6">1</span><span
9445 class="cmtt-8"> </span><span
9446 class="cmtt-8"> </span><span
9447 class="cmtt-8"> </span><span
9448 class="cmtt-8"> 1)</span><span
9449 class="cmtt-8"> [residue_begin]</span><span
9450 class="cmtt-8"> =</span><span
9451 class="cmtt-8"> read</span><span
9452 class="cmtt-8"> 24</span><span
9453 class="cmtt-8"> bits</span><span
9454 class="cmtt-8"> as</span><span
9455 class="cmtt-8"> unsigned</span><span
9456 class="cmtt-8"> integer</span>
9457 <br class="fancyvrb" /><a
9459 class="cmr-6">2</span><span
9460 class="cmtt-8"> </span><span
9461 class="cmtt-8"> </span><span
9462 class="cmtt-8"> </span><span
9463 class="cmtt-8"> 2)</span><span
9464 class="cmtt-8"> [residue_end]</span><span
9465 class="cmtt-8"> =</span><span
9466 class="cmtt-8"> read</span><span
9467 class="cmtt-8"> 24</span><span
9468 class="cmtt-8"> bits</span><span
9469 class="cmtt-8"> as</span><span
9470 class="cmtt-8"> unsigned</span><span
9471 class="cmtt-8"> integer</span>
9472 <br class="fancyvrb" /><a
9474 class="cmr-6">3</span><span
9475 class="cmtt-8"> </span><span
9476 class="cmtt-8"> </span><span
9477 class="cmtt-8"> </span><span
9478 class="cmtt-8"> 3)</span><span
9479 class="cmtt-8"> [residue_partition_size]</span><span
9480 class="cmtt-8"> =</span><span
9481 class="cmtt-8"> read</span><span
9482 class="cmtt-8"> 24</span><span
9483 class="cmtt-8"> bits</span><span
9484 class="cmtt-8"> as</span><span
9485 class="cmtt-8"> unsigned</span><span
9486 class="cmtt-8"> integer</span><span
9487 class="cmtt-8"> and</span><span
9488 class="cmtt-8"> add</span><span
9489 class="cmtt-8"> one</span>
9490 <br class="fancyvrb" /><a
9492 class="cmr-6">4</span><span
9493 class="cmtt-8"> </span><span
9494 class="cmtt-8"> </span><span
9495 class="cmtt-8"> </span><span
9496 class="cmtt-8"> 4)</span><span
9497 class="cmtt-8"> [residue_classifications]</span><span
9498 class="cmtt-8"> =</span><span
9499 class="cmtt-8"> read</span><span
9500 class="cmtt-8"> 6</span><span
9501 class="cmtt-8"> bits</span><span
9502 class="cmtt-8"> as</span><span
9503 class="cmtt-8"> unsigned</span><span
9504 class="cmtt-8"> integer</span><span
9505 class="cmtt-8"> and</span><span
9506 class="cmtt-8"> add</span><span
9507 class="cmtt-8"> one</span>
9511 <br class="fancyvrb" /><a
9513 class="cmr-6">5</span><span
9514 class="cmtt-8"> </span><span
9515 class="cmtt-8"> </span><span
9516 class="cmtt-8"> </span><span
9517 class="cmtt-8"> 5)</span><span
9518 class="cmtt-8"> [residue_classbook]</span><span
9519 class="cmtt-8"> =</span><span
9520 class="cmtt-8"> read</span><span
9521 class="cmtt-8"> 8</span><span
9522 class="cmtt-8"> bits</span><span
9523 class="cmtt-8"> as</span><span
9524 class="cmtt-8"> unsigned</span><span
9525 class="cmtt-8"> integer</span>
9527 <!--l. 166--><p class="noindent" ><span
9528 class="cmtt-12">[residue_begin] </span>and <span
9529 class="cmtt-12">[residue_end] </span>select the specific sub-portion of each vector that is
9532 class="cmtt-12">[residue_begin] </span>and ends at <span
9533 class="cmtt-12">[residue_end]</span>. Preceding and
9536 class="cmtt-12">[residue_partition_size]</span>apply to the interleaved vector, not the
9538 class="cmtt-12">[residue_partition_size] </span>is as explained above,
9540 class="cmtt-12">[residue_classifications] </span>is the number of possible classification to which …
9542 class="cmtt-12">[residue_classbook] </span>is the codebook number used to code classification
9544 class="cmtt-12">[residue_classbook] </span>determines how
9547 class="cmtt-12">[residue_classbook]</span>, along with
9549 class="cmtt-12">[residue_classifications]</span>, overdetermines to possible number of classificati…
9551 class="cmtt-12">[residue_classifications]</span>ˆ<span
9552 class="cmtt-12">[residue_classbook]</span>.dimensions exceeds
9554 class="cmtt-12">[residue_classbook]</span>.entries, the bitstream should be regarded to be undecoda…
9555 <!--l. 190--><p class="noindent" >Next we read a bitmap pattern that specifies which partition clas…
9557 <!--l. 193--><p class="noindent" >
9558 <div class="fancyvrb" id="fancyvrb36">
9561 class="cmr-6">1</span><span
9562 class="cmtt-8"> </span><span
9563 class="cmtt-8"> </span><span
9564 class="cmtt-8"> </span><span
9565 class="cmtt-8"> 1)</span><span
9566 class="cmtt-8"> iterate</span><span
9567 class="cmtt-8"> [i]</span><span
9568 class="cmtt-8"> over</span><span
9569 class="cmtt-8"> the</span><span
9570 class="cmtt-8"> range</span><span
9571 class="cmtt-8"> 0</span><span
9572 class="cmtt-8"> ...</span><span
9573 class="cmtt-8"> [residue_classifications]-1</span><span
9574 class="cmtt-8"> {</span>
9575 <br class="fancyvrb" /><a
9577 class="cmr-6">2</span><span
9578 class="cmtt-8"> </span><span
9579 class="cmtt-8"> </span>
9580 <br class="fancyvrb" /><a
9582 class="cmr-6">3</span><span
9583 class="cmtt-8"> </span><span
9584 class="cmtt-8"> </span><span
9585 class="cmtt-8"> </span><span
9586 class="cmtt-8"> </span><span
9587 class="cmtt-8"> </span><span
9588 class="cmtt-8"> </span><span
9589 class="cmtt-8"> </span><span
9590 class="cmtt-8"> </span><span
9591 class="cmtt-8"> 2)</span><span
9592 class="cmtt-8"> [high_bits]</span><span
9593 class="cmtt-8"> =</span><span
9594 class="cmtt-8"> 0</span>
9595 <br class="fancyvrb" /><a
9597 class="cmr-6">4</span><span
9598 class="cmtt-8"> </span><span
9599 class="cmtt-8"> </span><span
9600 class="cmtt-8"> </span><span
9601 class="cmtt-8"> </span><span
9602 class="cmtt-8"> </span><span
9603 class="cmtt-8"> </span><span
9604 class="cmtt-8"> </span><span
9605 class="cmtt-8"> </span><span
9606 class="cmtt-8"> 3)</span><span
9607 class="cmtt-8"> [low_bits]</span><span
9608 class="cmtt-8"> =</span><span
9609 class="cmtt-8"> read</span><span
9610 class="cmtt-8"> 3</span><span
9611 class="cmtt-8"> bits</span><span
9612 class="cmtt-8"> as</span><span
9613 class="cmtt-8"> unsigned</span><span
9614 class="cmtt-8"> integer</span>
9615 <br class="fancyvrb" /><a
9617 class="cmr-6">5</span><span
9618 class="cmtt-8"> </span><span
9619 class="cmtt-8"> </span><span
9620 class="cmtt-8"> </span><span
9621 class="cmtt-8"> </span><span
9622 class="cmtt-8"> </span><span
9623 class="cmtt-8"> </span><span
9624 class="cmtt-8"> </span><span
9625 class="cmtt-8"> </span><span
9626 class="cmtt-8"> 4)</span><span
9627 class="cmtt-8"> [bitflag]</span><span
9628 class="cmtt-8"> =</span><span
9629 class="cmtt-8"> read</span><span
9630 class="cmtt-8"> one</span><span
9631 class="cmtt-8"> bit</span><span
9632 class="cmtt-8"> as</span><span
9633 class="cmtt-8"> boolean</span>
9634 <br class="fancyvrb" /><a
9636 class="cmr-6">6</span><span
9637 class="cmtt-8"> </span><span
9638 class="cmtt-8"> </span><span
9639 class="cmtt-8"> </span><span
9640 class="cmtt-8"> </span><span
9641 class="cmtt-8"> </span><span
9642 class="cmtt-8"> </span><span
9643 class="cmtt-8"> </span><span
9644 class="cmtt-8"> </span><span
9645 class="cmtt-8"> 5)</span><span
9646 class="cmtt-8"> if</span><span
9647 class="cmtt-8"> (</span><span
9648 class="cmtt-8"> [bitflag]</span><span
9649 class="cmtt-8"> is</span><span
9650 class="cmtt-8"> set</span><span
9651 class="cmtt-8"> )</span><span
9652 class="cmtt-8"> then</span><span
9653 class="cmtt-8"> [high_bits]</span><span
9654 class="cmtt-8"> =</span><span
9655 class="cmtt-8"> read</span><span
9656 class="cmtt-8"> five</span><span
9657 class="cmtt-8"> bits</span><span
9658 class="cmtt-8"> as</span><span
9659 class="cmtt-8"> unsigned</span><span
9660 class="cmtt-8"> integer</span>
9661 <br class="fancyvrb" /><a
9663 class="cmr-6">7</span><span
9664 class="cmtt-8"> </span><span
9665 class="cmtt-8"> </span><span
9666 class="cmtt-8"> </span><span
9667 class="cmtt-8"> </span><span
9668 class="cmtt-8"> </span><span
9669 class="cmtt-8"> </span><span
9670 class="cmtt-8"> </span><span
9671 class="cmtt-8"> </span><span
9672 class="cmtt-8"> 6)</span><span
9673 class="cmtt-8"> vector</span><span
9674 class="cmtt-8"> [residue_cascade]</span><span
9675 class="cmtt-8"> element</span><span
9676 class="cmtt-8"> [i]</span><span
9677 class="cmtt-8"> =</span><span
9678 class="cmtt-8"> [high_bits]</span><span
9679 class="cmtt-8"> *</span><span
9680 class="cmtt-8"> 8</span><span
9681 class="cmtt-8"> +</span><span
9682 class="cmtt-8"> [low_bits]</span>
9683 <br class="fancyvrb" /><a
9685 class="cmr-6">8</span><span
9686 class="cmtt-8"> </span><span
9687 class="cmtt-8"> </span><span
9688 class="cmtt-8"> </span><span
9689 class="cmtt-8"> </span><span
9690 class="cmtt-8"> </span><span
9691 class="cmtt-8"> </span><span
9692 class="cmtt-8"> }</span>
9693 <br class="fancyvrb" /><a
9695 class="cmr-6">9</span><span
9696 class="cmtt-8"> </span><span
9697 class="cmtt-8"> </span><span
9698 class="cmtt-8"> </span><span
9699 class="cmtt-8"> 7)</span><span
9700 class="cmtt-8"> done</span>
9702 <!--l. 205--><p class="noindent" >Finally, we read in a list of book numbers, each corresponding to…
9706 <!--l. 211--><p class="noindent" >
9707 <div class="fancyvrb" id="fancyvrb37">
9710 class="cmr-6">1</span><span
9711 class="cmtt-8"> </span><span
9712 class="cmtt-8"> </span><span
9713 class="cmtt-8"> </span><span
9714 class="cmtt-8"> 1)</span><span
9715 class="cmtt-8"> iterate</span><span
9716 class="cmtt-8"> [i]</span><span
9717 class="cmtt-8"> over</span><span
9718 class="cmtt-8"> the</span><span
9719 class="cmtt-8"> range</span><span
9720 class="cmtt-8"> 0</span><span
9721 class="cmtt-8"> ...</span><span
9722 class="cmtt-8"> [residue_classifications]-1</span><span
9723 class="cmtt-8"> {</span>
9724 <br class="fancyvrb" /><a
9726 class="cmr-6">2</span><span
9727 class="cmtt-8"> </span><span
9728 class="cmtt-8"> </span>
9729 <br class="fancyvrb" /><a
9731 class="cmr-6">3</span><span
9732 class="cmtt-8"> </span><span
9733 class="cmtt-8"> </span><span
9734 class="cmtt-8"> </span><span
9735 class="cmtt-8"> </span><span
9736 class="cmtt-8"> </span><span
9737 class="cmtt-8"> </span><span
9738 class="cmtt-8"> </span><span
9739 class="cmtt-8"> </span><span
9740 class="cmtt-8"> 2)</span><span
9741 class="cmtt-8"> iterate</span><span
9742 class="cmtt-8"> [j]</span><span
9743 class="cmtt-8"> over</span><span
9744 class="cmtt-8"> the</span><span
9745 class="cmtt-8"> range</span><span
9746 class="cmtt-8"> 0</span><span
9747 class="cmtt-8"> ...</span><span
9748 class="cmtt-8"> 7</span><span
9749 class="cmtt-8"> {</span>
9750 <br class="fancyvrb" /><a
9752 class="cmr-6">4</span><span
9753 class="cmtt-8"> </span><span
9754 class="cmtt-8"> </span>
9755 <br class="fancyvrb" /><a
9757 class="cmr-6">5</span><span
9758 class="cmtt-8"> </span><span
9759 class="cmtt-8"> </span><span
9760 class="cmtt-8"> </span><span
9761 class="cmtt-8"> </span><span
9762 class="cmtt-8"> </span><span
9763 class="cmtt-8"> </span><span
9764 class="cmtt-8"> </span><span
9765 class="cmtt-8"> </span><span
9766 class="cmtt-8"> </span><span
9767 class="cmtt-8"> </span><span
9768 class="cmtt-8"> </span><span
9769 class="cmtt-8"> </span><span
9770 class="cmtt-8"> </span><span
9771 class="cmtt-8"> 3)</span><span
9772 class="cmtt-8"> if</span><span
9773 class="cmtt-8"> (</span><span
9774 class="cmtt-8"> vector</span><span
9775 class="cmtt-8"> [residue_cascade]</span><span
9776 class="cmtt-8"> element</span><span
9777 class="cmtt-8"> [i]</span><span
9778 class="cmtt-8"> bit</span><span
9779 class="cmtt-8"> [j]</span><span
9780 class="cmtt-8"> is</span><span
9781 class="cmtt-8"> set</span><span
9782 class="cmtt-8"> )</span><span
9783 class="cmtt-8"> {</span>
9784 <br class="fancyvrb" /><a
9786 class="cmr-6">6</span><span
9787 class="cmtt-8"> </span><span
9788 class="cmtt-8"> </span>
9789 <br class="fancyvrb" /><a
9791 class="cmr-6">7</span><span
9792 class="cmtt-8"> </span><span
9793 class="cmtt-8"> </span><span
9794 class="cmtt-8"> </span><span
9795 class="cmtt-8"> </span><span
9796 class="cmtt-8"> </span><span
9797 class="cmtt-8"> </span><span
9798 class="cmtt-8"> </span><span
9799 class="cmtt-8"> </span><span
9800 class="cmtt-8"> </span><span
9801 class="cmtt-8"> </span><span
9802 class="cmtt-8"> </span><span
9803 class="cmtt-8"> </span><span
9804 class="cmtt-8"> </span><span
9805 class="cmtt-8"> </span><span
9806 class="cmtt-8"> </span><span
9807 class="cmtt-8"> </span><span
9808 class="cmtt-8"> </span><span
9809 class="cmtt-8"> </span><span
9810 class="cmtt-8"> 4)</span><span
9811 class="cmtt-8"> array</span><span
9812 class="cmtt-8"> [residue_books]</span><span
9813 class="cmtt-8"> element</span><span
9814 class="cmtt-8"> [i][j]</span><span
9815 class="cmtt-8"> =</span><span
9816 class="cmtt-8"> read</span><span
9817 class="cmtt-8"> 8</span><span
9818 class="cmtt-8"> bits</span><span
9819 class="cmtt-8"> as</span><span
9820 class="cmtt-8"> unsigned</span><span
9821 class="cmtt-8"> integer</span>
9822 <br class="fancyvrb" /><a
9824 class="cmr-6">8</span><span
9825 class="cmtt-8"> </span><span
9826 class="cmtt-8"> </span>
9827 <br class="fancyvrb" /><a
9829 class="cmr-6">9</span><span
9830 class="cmtt-8"> </span><span
9831 class="cmtt-8"> </span><span
9832 class="cmtt-8"> </span><span
9833 class="cmtt-8"> </span><span
9834 class="cmtt-8"> </span><span
9835 class="cmtt-8"> </span><span
9836 class="cmtt-8"> </span><span
9837 class="cmtt-8"> </span><span
9838 class="cmtt-8"> </span><span
9839 class="cmtt-8"> </span><span
9840 class="cmtt-8"> </span><span
9841 class="cmtt-8"> </span><span
9842 class="cmtt-8"> </span><span
9843 class="cmtt-8"> </span><span
9844 class="cmtt-8"> </span><span
9845 class="cmtt-8"> </span><span
9846 class="cmtt-8"> }</span><span
9847 class="cmtt-8"> else</span><span
9848 class="cmtt-8"> {</span>
9852 <br class="fancyvrb" /><a
9854 class="cmr-6">10</span><span
9855 class="cmtt-8"> </span><span
9856 class="cmtt-8"> </span>
9857 <br class="fancyvrb" /><a
9859 class="cmr-6">11</span><span
9860 class="cmtt-8"> </span><span
9861 class="cmtt-8"> </span><span
9862 class="cmtt-8"> </span><span
9863 class="cmtt-8"> </span><span
9864 class="cmtt-8"> </span><span
9865 class="cmtt-8"> </span><span
9866 class="cmtt-8"> </span><span
9867 class="cmtt-8"> </span><span
9868 class="cmtt-8"> </span><span
9869 class="cmtt-8"> </span><span
9870 class="cmtt-8"> </span><span
9871 class="cmtt-8"> </span><span
9872 class="cmtt-8"> </span><span
9873 class="cmtt-8"> </span><span
9874 class="cmtt-8"> </span><span
9875 class="cmtt-8"> </span><span
9876 class="cmtt-8"> </span><span
9877 class="cmtt-8"> </span><span
9878 class="cmtt-8"> 5)</span><span
9879 class="cmtt-8"> array</span><span
9880 class="cmtt-8"> [residue_books]</span><span
9881 class="cmtt-8"> element</span><span
9882 class="cmtt-8"> [i][j]</span><span
9883 class="cmtt-8"> =</span><span
9884 class="cmtt-8"> unused</span>
9885 <br class="fancyvrb" /><a
9887 class="cmr-6">12</span><span
9888 class="cmtt-8"> </span><span
9889 class="cmtt-8"> </span>
9890 <br class="fancyvrb" /><a
9892 class="cmr-6">13</span><span
9893 class="cmtt-8"> </span><span
9894 class="cmtt-8"> </span><span
9895 class="cmtt-8"> </span><span
9896 class="cmtt-8"> </span><span
9897 class="cmtt-8"> </span><span
9898 class="cmtt-8"> </span><span
9899 class="cmtt-8"> </span><span
9900 class="cmtt-8"> </span><span
9901 class="cmtt-8"> </span><span
9902 class="cmtt-8"> </span><span
9903 class="cmtt-8"> </span><span
9904 class="cmtt-8"> </span><span
9905 class="cmtt-8"> </span><span
9906 class="cmtt-8"> </span><span
9907 class="cmtt-8"> </span><span
9908 class="cmtt-8"> </span><span
9909 class="cmtt-8"> }</span>
9910 <br class="fancyvrb" /><a
9912 class="cmr-6">14</span><span
9913 class="cmtt-8"> </span><span
9914 class="cmtt-8"> </span><span
9915 class="cmtt-8"> </span><span
9916 class="cmtt-8"> </span><span
9917 class="cmtt-8"> </span><span
9918 class="cmtt-8"> </span><span
9919 class="cmtt-8"> </span><span
9920 class="cmtt-8"> </span><span
9921 class="cmtt-8"> </span><span
9922 class="cmtt-8"> </span><span
9923 class="cmtt-8"> </span><span
9924 class="cmtt-8"> }</span>
9925 <br class="fancyvrb" /><a
9927 class="cmr-6">15</span><span
9928 class="cmtt-8"> </span><span
9929 class="cmtt-8"> </span><span
9930 class="cmtt-8"> </span><span
9931 class="cmtt-8"> </span><span
9932 class="cmtt-8"> </span><span
9933 class="cmtt-8"> </span><span
9934 class="cmtt-8"> </span><span
9935 class="cmtt-8"> }</span>
9936 <br class="fancyvrb" /><a
9938 class="cmr-6">16</span><span
9939 class="cmtt-8"> </span><span
9940 class="cmtt-8"> </span>
9941 <br class="fancyvrb" /><a
9943 class="cmr-6">17</span><span
9944 class="cmtt-8"> </span><span
9945 class="cmtt-8"> </span><span
9946 class="cmtt-8"> </span><span
9947 class="cmtt-8"> 6)</span><span
9948 class="cmtt-8"> done</span>
9950 <!--l. 231--><p class="noindent" >An end-of-packet condition at any point in header decode renders …
9956 <!--l. 241--><p class="noindent" >
9957 <h5 class="subsubsectionHead"><span class="titlemark">8.6.2 </span> <a
9959 <!--l. 243--><p class="noindent" >Format 0 and 1 packet decode is identical except for specific par…
9962 <!--l. 248--><p class="noindent" >In addition to configuration information, the residue decode proc…
9967 <!--l. 255--><p class="noindent" >Depending on the values of <span
9968 class="cmtt-12">[residue_begin] </span>and <span
9969 class="cmtt-12">[residue_end]</span>, it is obvious that the
9973 class="cmtt-12">[residue_begin] </span>and <span
9974 class="cmtt-12">[residue_end] </span>to specify a range partially or wholly
9976 class="cmtt-12">[residue_begin]</span>
9978 class="cmtt-12">[residue_end] </span>to the maximum possible vector size as follows. We assume that
9980 class="cmtt-12">[ch] </span>is provided by the higher level decoding
9982 <!--l. 269--><p class="noindent" >
9983 <div class="fancyvrb" id="fancyvrb38">
9986 class="cmr-6">1</span><span
9987 class="cmtt-8"> </span><span
9988 class="cmtt-8"> </span><span
9989 class="cmtt-8"> </span><span
9990 class="cmtt-8"> 1)</span><span
9991 class="cmtt-8"> [actual_size]</span><span
9992 class="cmtt-8"> =</span><span
9993 class="cmtt-8"> current</span><span
9994 class="cmtt-8"> blocksize/2;</span>
9995 <br class="fancyvrb" /><a
9997 class="cmr-6">2</span><span
9998 class="cmtt-8"> </span><span
9999 class="cmtt-8"> </span><span
10000 class="cmtt-8"> </span><span
10001 class="cmtt-8"> 2)</span><span
10002 class="cmtt-8"> if</span><span
10003 class="cmtt-8"> residue</span><span
10004 class="cmtt-8"> encoding</span><span
10005 class="cmtt-8"> is</span><span
10006 class="cmtt-8"> format</span><span
10007 class="cmtt-8"> 2</span>
10008 <br class="fancyvrb" /><a
10010 class="cmr-6">3</span><span
10011 class="cmtt-8"> </span><span
10012 class="cmtt-8"> </span><span
10013 class="cmtt-8"> </span><span
10014 class="cmtt-8"> </span><span
10015 class="cmtt-8"> </span><span
10016 class="cmtt-8"> </span><span
10017 class="cmtt-8"> </span><span
10018 class="cmtt-8"> </span><span
10019 class="cmtt-8"> 3)</span><span
10020 class="cmtt-8"> [actual_size]</span><span
10021 class="cmtt-8"> =</span><span
10022 class="cmtt-8"> [actual_size]</span><span
10023 class="cmtt-8"> *</span><span
10024 class="cmtt-8"> [ch];</span>
10028 <br class="fancyvrb" /><a
10030 class="cmr-6">4</span><span
10031 class="cmtt-8"> </span><span
10032 class="cmtt-8"> </span><span
10033 class="cmtt-8"> </span><span
10034 class="cmtt-8"> 4)</span><span
10035 class="cmtt-8"> [limit_residue_begin]</span><span
10036 class="cmtt-8"> =</span><span
10037 class="cmtt-8"> maximum</span><span
10038 class="cmtt-8"> of</span><span
10039 class="cmtt-8"> ([residue_begin],[actual_size]);</span>
10040 <br class="fancyvrb" /><a
10042 class="cmr-6">5</span><span
10043 class="cmtt-8"> </span><span
10044 class="cmtt-8"> </span><span
10045 class="cmtt-8"> </span><span
10046 class="cmtt-8"> 5)</span><span
10047 class="cmtt-8"> [limit_residue_end]</span><span
10048 class="cmtt-8"> =</span><span
10049 class="cmtt-8"> maximum</span><span
10050 class="cmtt-8"> of</span><span
10051 class="cmtt-8"> ([residue_end],[actual_size]);</span>
10053 <!--l. 277--><p class="noindent" >The following convenience values are conceptually useful to clari…
10054 <!--l. 280--><p class="noindent" >
10055 <div class="fancyvrb" id="fancyvrb39">
10058 class="cmr-6">1</span><span
10059 class="cmtt-8"> </span><span
10060 class="cmtt-8"> </span><span
10061 class="cmtt-8"> </span><span
10062 class="cmtt-8"> 1)</span><span
10063 class="cmtt-8"> [classwords_per_codeword]</span><span
10064 class="cmtt-8"> =</span><span
10065 class="cmtt-8"> [codebook_dimensions]</span><span
10066 class="cmtt-8"> value</span><span
10067 class="cmtt-8"> of</span><span
10068 class="cmtt-8"> codebook</span><span
10069 class="cmtt-8"> [residue_classbook]</span>
10070 <br class="fancyvrb" /><a
10072 class="cmr-6">2</span><span
10073 class="cmtt-8"> </span><span
10074 class="cmtt-8"> </span><span
10075 class="cmtt-8"> </span><span
10076 class="cmtt-8"> 2)</span><span
10077 class="cmtt-8"> [n_to_read]</span><span
10078 class="cmtt-8"> =</span><span
10079 class="cmtt-8"> [limit_residue_end]</span><span
10080 class="cmtt-8"> -</span><span
10081 class="cmtt-8"> [limit_residue_begin]</span>
10082 <br class="fancyvrb" /><a
10084 class="cmr-6">3</span><span
10085 class="cmtt-8"> </span><span
10086 class="cmtt-8"> </span><span
10087 class="cmtt-8"> </span><span
10088 class="cmtt-8"> 3)</span><span
10089 class="cmtt-8"> [partitions_to_read]</span><span
10090 class="cmtt-8"> =</span><span
10091 class="cmtt-8"> [n_to_read]</span><span
10092 class="cmtt-8"> /</span><span
10093 class="cmtt-8"> [residue_partition_size]</span>
10095 <!--l. 286--><p class="noindent" >Packet decode proceeds as follows, matching the description offer…
10096 <div class="fancyvrb" id="fancyvrb40">
10099 class="cmr-6">1</span><span
10100 class="cmtt-8"> </span><span
10101 class="cmtt-8"> </span><span
10102 class="cmtt-8"> </span><span
10103 class="cmtt-8"> 1)</span><span
10104 class="cmtt-8"> allocate</span><span
10105 class="cmtt-8"> and</span><span
10106 class="cmtt-8"> zero</span><span
10107 class="cmtt-8"> all</span><span
10108 class="cmtt-8"> vectors</span><span
10109 class="cmtt-8"> that</span><span
10110 class="cmtt-8"> will</span><span
10111 class="cmtt-8"> be</span><span
10112 class="cmtt-8"> returned.</span>
10113 <br class="fancyvrb" /><a
10115 class="cmr-6">2</span><span
10116 class="cmtt-8"> </span><span
10117 class="cmtt-8"> </span><span
10118 class="cmtt-8"> </span><span
10119 class="cmtt-8"> 2)</span><span
10120 class="cmtt-8"> if</span><span
10121 class="cmtt-8"> ([n_to_read]</span><span
10122 class="cmtt-8"> is</span><span
10123 class="cmtt-8"> zero),</span><span
10124 class="cmtt-8"> stop;</span><span
10125 class="cmtt-8"> there</span><span
10126 class="cmtt-8"> is</span><span
10127 class="cmtt-8"> no</span><span
10128 class="cmtt-8"> residue</span><span
10129 class="cmtt-8"> to</span><span
10130 class="cmtt-8"> decode.</span>
10131 <br class="fancyvrb" /><a
10133 class="cmr-6">3</span><span
10134 class="cmtt-8"> </span><span
10135 class="cmtt-8"> </span><span
10136 class="cmtt-8"> </span><span
10137 class="cmtt-8"> 3)</span><span
10138 class="cmtt-8"> iterate</span><span
10139 class="cmtt-8"> [pass]</span><span
10140 class="cmtt-8"> over</span><span
10141 class="cmtt-8"> the</span><span
10142 class="cmtt-8"> range</span><span
10143 class="cmtt-8"> 0</span><span
10144 class="cmtt-8"> ...</span><span
10145 class="cmtt-8"> 7</span><span
10146 class="cmtt-8"> {</span>
10147 <br class="fancyvrb" /><a
10149 class="cmr-6">4</span><span
10150 class="cmtt-8"> </span><span
10151 class="cmtt-8"> </span>
10152 <br class="fancyvrb" /><a
10154 class="cmr-6">5</span><span
10155 class="cmtt-8"> </span><span
10156 class="cmtt-8"> </span><span
10157 class="cmtt-8"> </span><span
10158 class="cmtt-8"> </span><span
10159 class="cmtt-8"> </span><span
10160 class="cmtt-8"> </span><span
10161 class="cmtt-8"> </span><span
10162 class="cmtt-8"> </span><span
10163 class="cmtt-8"> 4)</span><span
10164 class="cmtt-8"> [partition_count]</span><span
10165 class="cmtt-8"> =</span><span
10166 class="cmtt-8"> 0</span>
10167 <br class="fancyvrb" /><a
10169 class="cmr-6">6</span><span
10170 class="cmtt-8"> </span><span
10171 class="cmtt-8"> </span>
10172 <br class="fancyvrb" /><a
10174 class="cmr-6">7</span><span
10175 class="cmtt-8"> </span><span
10176 class="cmtt-8"> </span><span
10177 class="cmtt-8"> </span><span
10178 class="cmtt-8"> </span><span
10179 class="cmtt-8"> </span><span
10180 class="cmtt-8"> </span><span
10181 class="cmtt-8"> </span><span
10182 class="cmtt-8"> </span><span
10183 class="cmtt-8"> 5)</span><span
10184 class="cmtt-8"> while</span><span
10185 class="cmtt-8"> [partition_count]</span><span
10186 class="cmtt-8"> is</span><span
10187 class="cmtt-8"> less</span><span
10188 class="cmtt-8"> than</span><span
10189 class="cmtt-8"> [partitions_to_read]</span>
10190 <br class="fancyvrb" /><a
10192 class="cmr-6">8</span><span
10193 class="cmtt-8"> </span><span
10194 class="cmtt-8"> </span>
10195 <br class="fancyvrb" /><a
10197 class="cmr-6">9</span><span
10198 class="cmtt-8"> </span><span
10199 class="cmtt-8"> </span><span
10200 class="cmtt-8"> </span><span
10201 class="cmtt-8"> </span><span
10202 class="cmtt-8"> </span><span
10203 class="cmtt-8"> </span><span
10204 class="cmtt-8"> </span><span
10205 class="cmtt-8"> </span><span
10206 class="cmtt-8"> </span><span
10207 class="cmtt-8"> </span><span
10208 class="cmtt-8"> </span><span
10209 class="cmtt-8"> </span><span
10210 class="cmtt-8"> </span><span
10211 class="cmtt-8"> 6)</span><span
10212 class="cmtt-8"> if</span><span
10213 class="cmtt-8"> ([pass]</span><span
10214 class="cmtt-8"> is</span><span
10215 class="cmtt-8"> zero)</span><span
10216 class="cmtt-8"> {</span>
10217 <br class="fancyvrb" /><a
10219 class="cmr-6">10</span><span
10220 class="cmtt-8"> </span><span
10221 class="cmtt-8"> </span>
10222 <br class="fancyvrb" /><a
10224 class="cmr-6">11</span><span
10225 class="cmtt-8"> </span><span
10226 class="cmtt-8"> </span><span
10227 class="cmtt-8"> </span><span
10228 class="cmtt-8"> </span><span
10229 class="cmtt-8"> </span><span
10230 class="cmtt-8"> </span><span
10231 class="cmtt-8"> </span><span
10232 class="cmtt-8"> </span><span
10233 class="cmtt-8"> </span><span
10234 class="cmtt-8"> </span><span
10235 class="cmtt-8"> </span><span
10236 class="cmtt-8"> </span><span
10237 class="cmtt-8"> </span><span
10238 class="cmtt-8"> </span><span
10239 class="cmtt-8"> </span><span
10240 class="cmtt-8"> </span><span
10241 class="cmtt-8"> </span><span
10242 class="cmtt-8"> </span><span
10243 class="cmtt-8"> 7)</span><span
10244 class="cmtt-8"> iterate</span><span
10245 class="cmtt-8"> [j]</span><span
10246 class="cmtt-8"> over</span><span
10247 class="cmtt-8"> the</span><span
10248 class="cmtt-8"> range</span><span
10249 class="cmtt-8"> 0</span><span
10250 class="cmtt-8"> ..</span><span
10251 class="cmtt-8"> [ch]-1</span><span
10252 class="cmtt-8"> {</span>
10253 <br class="fancyvrb" /><a
10255 class="cmr-6">12</span><span
10256 class="cmtt-8"> </span><span
10257 class="cmtt-8"> </span>
10258 <br class="fancyvrb" /><a
10260 class="cmr-6">13</span><span
10261 class="cmtt-8"> </span><span
10262 class="cmtt-8"> </span><span
10263 class="cmtt-8"> </span><span
10264 class="cmtt-8"> </span><span
10265 class="cmtt-8"> </span><span
10266 class="cmtt-8"> </span><span
10267 class="cmtt-8"> </span><span
10268 class="cmtt-8"> </span><span
10269 class="cmtt-8"> </span><span
10270 class="cmtt-8"> </span><span
10271 class="cmtt-8"> </span><span
10272 class="cmtt-8"> </span><span
10273 class="cmtt-8"> </span><span
10274 class="cmtt-8"> </span><span
10275 class="cmtt-8"> </span><span
10276 class="cmtt-8"> </span><span
10277 class="cmtt-8"> </span><span
10278 class="cmtt-8"> </span><span
10279 class="cmtt-8"> </span><span
10280 class="cmtt-8"> </span><span
10281 class="cmtt-8"> </span><span
10282 class="cmtt-8"> </span><span
10283 class="cmtt-8"> </span><span
10284 class="cmtt-8"> 8)</span><span
10285 class="cmtt-8"> if</span><span
10286 class="cmtt-8"> vector</span><span
10287 class="cmtt-8"> [j]</span><span
10288 class="cmtt-8"> is</span><span
10289 class="cmtt-8"> not</span><span
10290 class="cmtt-8"> marked</span><span
10291 class="cmtt-8"> ’do</span><span
10292 class="cmtt-8"> not</span><span
10293 class="cmtt-8"> decode’</span><span
10294 class="cmtt-8"> {</span>
10295 <br class="fancyvrb" /><a
10297 class="cmr-6">14</span><span
10298 class="cmtt-8"> </span><span
10299 class="cmtt-8"> </span>
10300 <br class="fancyvrb" /><a
10302 class="cmr-6">15</span><span
10303 class="cmtt-8"> </span><span
10304 class="cmtt-8"> </span><span
10305 class="cmtt-8"> </span><span
10306 class="cmtt-8"> </span><span
10307 class="cmtt-8"> </span><span
10308 class="cmtt-8"> </span><span
10309 class="cmtt-8"> </span><span
10310 class="cmtt-8"> </span><span
10311 class="cmtt-8"> </span><span
10312 class="cmtt-8"> </span><span
10313 class="cmtt-8"> </span><span
10314 class="cmtt-8"> </span><span
10315 class="cmtt-8"> </span><span
10316 class="cmtt-8"> </span><span
10317 class="cmtt-8"> </span><span
10318 class="cmtt-8"> </span><span
10319 class="cmtt-8"> </span><span
10320 class="cmtt-8"> </span><span
10321 class="cmtt-8"> </span><span
10322 class="cmtt-8"> </span><span
10323 class="cmtt-8"> </span><span
10324 class="cmtt-8"> </span><span
10325 class="cmtt-8"> </span><span
10326 class="cmtt-8"> </span><span
10327 class="cmtt-8"> </span><span
10328 class="cmtt-8"> </span><span
10329 class="cmtt-8"> </span><span
10330 class="cmtt-8"> </span><span
10331 class="cmtt-8"> 9)</span><span
10332 class="cmtt-8"> [temp]</span><span
10333 class="cmtt-8"> =</span><span
10334 class="cmtt-8"> read</span><span
10335 class="cmtt-8"> from</span><span
10336 class="cmtt-8"> packet</span><span
10337 class="cmtt-8"> using</span><span
10338 class="cmtt-8"> codebook</span><span
10339 class="cmtt-8"> [residue_classbook]</span><span
10340 class="cmtt-8"> in</span><span
10341 class="cmtt-8"> scalar</span><span
10342 class="cmtt-8"> context</span>
10343 <br class="fancyvrb" /><a
10345 class="cmr-6">16</span><span
10346 class="cmtt-8"> </span><span
10347 class="cmtt-8"> </span><span
10348 class="cmtt-8"> </span><span
10349 class="cmtt-8"> </span><span
10350 class="cmtt-8"> </span><span
10351 class="cmtt-8"> </span><span
10352 class="cmtt-8"> </span><span
10353 class="cmtt-8"> </span><span
10354 class="cmtt-8"> </span><span
10355 class="cmtt-8"> </span><span
10356 class="cmtt-8"> </span><span
10357 class="cmtt-8"> </span><span
10358 class="cmtt-8"> </span><span
10359 class="cmtt-8"> </span><span
10360 class="cmtt-8"> </span><span
10361 class="cmtt-8"> </span><span
10362 class="cmtt-8"> </span><span
10363 class="cmtt-8"> </span><span
10364 class="cmtt-8"> </span><span
10365 class="cmtt-8"> </span><span
10366 class="cmtt-8"> </span><span
10367 class="cmtt-8"> </span><span
10368 class="cmtt-8"> </span><span
10369 class="cmtt-8"> </span><span
10370 class="cmtt-8"> </span><span
10371 class="cmtt-8"> </span><span
10372 class="cmtt-8"> </span><span
10373 class="cmtt-8"> 10)</span><span
10374 class="cmtt-8"> iterate</span><span
10375 class="cmtt-8"> [i]</span><span
10376 class="cmtt-8"> descending</span><span
10377 class="cmtt-8"> over</span><span
10378 class="cmtt-8"> the</span><span
10379 class="cmtt-8"> range</span><span
10380 class="cmtt-8"> [classwords_per_codeword]-1</span><span
10381 class="cmtt-8"> ...</span><span
10382 class="cmtt-8"> 0</span><span
10383 class="cmtt-8"> {</span>
10384 <br class="fancyvrb" /><a
10386 class="cmr-6">17</span><span
10387 class="cmtt-8"> </span><span
10388 class="cmtt-8"> </span>
10389 <br class="fancyvrb" /><a
10391 class="cmr-6">18</span><span
10392 class="cmtt-8"> </span><span
10393 class="cmtt-8"> </span><span
10394 class="cmtt-8"> </span><span
10395 class="cmtt-8"> </span><span
10396 class="cmtt-8"> </span><span
10397 class="cmtt-8"> </span><span
10398 class="cmtt-8"> </span><span
10399 class="cmtt-8"> </span><span
10400 class="cmtt-8"> </span><span
10401 class="cmtt-8"> </span><span
10402 class="cmtt-8"> </span><span
10403 class="cmtt-8"> </span><span
10404 class="cmtt-8"> </span><span
10405 class="cmtt-8"> </span><span
10406 class="cmtt-8"> </span><span
10407 class="cmtt-8"> </span><span
10408 class="cmtt-8"> </span><span
10409 class="cmtt-8"> </span><span
10410 class="cmtt-8"> </span><span
10411 class="cmtt-8"> </span><span
10412 class="cmtt-8"> </span><span
10413 class="cmtt-8"> </span><span
10414 class="cmtt-8"> </span><span
10415 class="cmtt-8"> </span><span
10416 class="cmtt-8"> </span><span
10417 class="cmtt-8"> </span><span
10418 class="cmtt-8"> </span><span
10419 class="cmtt-8"> </span><span
10420 class="cmtt-8"> </span><span
10421 class="cmtt-8"> </span><span
10422 class="cmtt-8"> </span><span
10423 class="cmtt-8"> </span><span
10424 class="cmtt-8"> 11)</span><span
10425 class="cmtt-8"> array</span><span
10426 class="cmtt-8"> [classifications]</span><span
10427 class="cmtt-8"> element</span><span
10428 class="cmtt-8"> [j],([i]+[partition_count])</span><span
10429 class="cmtt-8"> =</span>
10430 <br class="fancyvrb" /><a
10432 class="cmr-6">19</span><span
10433 class="cmtt-8"> </span><span
10434 class="cmtt-8"> </span><span
10435 class="cmtt-8"> </span><span
10436 class="cmtt-8"> </span><span
10437 class="cmtt-8"> </span><span
10438 class="cmtt-8"> </span><span
10439 class="cmtt-8"> </span><span
10440 class="cmtt-8"> </span><span
10441 class="cmtt-8"> </span><span
10442 class="cmtt-8"> </span><span
10443 class="cmtt-8"> </span><span
10444 class="cmtt-8"> </span><span
10445 class="cmtt-8"> </span><span
10446 class="cmtt-8"> </span><span
10447 class="cmtt-8"> </span><span
10448 class="cmtt-8"> </span><span
10449 class="cmtt-8"> </span><span
10450 class="cmtt-8"> </span><span
10451 class="cmtt-8"> </span><span
10452 class="cmtt-8"> </span><span
10453 class="cmtt-8"> </span><span
10454 class="cmtt-8"> </span><span
10455 class="cmtt-8"> </span><span
10456 class="cmtt-8"> </span><span
10457 class="cmtt-8"> </span><span
10458 class="cmtt-8"> </span><span
10459 class="cmtt-8"> </span><span
10460 class="cmtt-8"> </span><span
10461 class="cmtt-8"> </span><span
10462 class="cmtt-8"> </span><span
10463 class="cmtt-8"> </span><span
10464 class="cmtt-8"> </span><span
10465 class="cmtt-8"> </span><span
10466 class="cmtt-8"> </span><span
10467 class="cmtt-8"> </span><span
10468 class="cmtt-8"> </span><span
10469 class="cmtt-8"> [temp]</span><span
10470 class="cmtt-8"> integer</span><span
10471 class="cmtt-8"> modulo</span><span
10472 class="cmtt-8"> [residue_classifications]</span>
10473 <br class="fancyvrb" /><a
10475 class="cmr-6">20</span><span
10476 class="cmtt-8"> </span><span
10477 class="cmtt-8"> </span><span
10478 class="cmtt-8"> </span><span
10479 class="cmtt-8"> </span><span
10480 class="cmtt-8"> </span><span
10481 class="cmtt-8"> </span><span
10482 class="cmtt-8"> </span><span
10483 class="cmtt-8"> </span><span
10484 class="cmtt-8"> </span><span
10485 class="cmtt-8"> </span><span
10486 class="cmtt-8"> </span><span
10487 class="cmtt-8"> </span><span
10488 class="cmtt-8"> </span><span
10489 class="cmtt-8"> </span><span
10490 class="cmtt-8"> </span><span
10491 class="cmtt-8"> </span><span
10492 class="cmtt-8"> </span><span
10493 class="cmtt-8"> </span><span
10494 class="cmtt-8"> </span><span
10495 class="cmtt-8"> </span><span
10496 class="cmtt-8"> </span><span
10497 class="cmtt-8"> </span><span
10498 class="cmtt-8"> </span><span
10499 class="cmtt-8"> </span><span
10500 class="cmtt-8"> </span><span
10501 class="cmtt-8"> </span><span
10502 class="cmtt-8"> </span><span
10503 class="cmtt-8"> </span><span
10504 class="cmtt-8"> </span><span
10505 class="cmtt-8"> </span><span
10506 class="cmtt-8"> </span><span
10507 class="cmtt-8"> </span><span
10508 class="cmtt-8"> 12)</span><span
10509 class="cmtt-8"> [temp]</span><span
10510 class="cmtt-8"> =</span><span
10511 class="cmtt-8"> [temp]</span><span
10512 class="cmtt-8"> /</span><span
10513 class="cmtt-8"> [residue_classifications]</span><span
10514 class="cmtt-8"> using</span><span
10515 class="cmtt-8"> integer</span><span
10516 class="cmtt-8"> division</span>
10517 <br class="fancyvrb" /><a
10519 class="cmr-6">21</span><span
10520 class="cmtt-8"> </span><span
10521 class="cmtt-8"> </span>
10522 <br class="fancyvrb" /><a
10524 class="cmr-6">22</span><span
10525 class="cmtt-8"> </span><span
10526 class="cmtt-8"> </span><span
10527 class="cmtt-8"> </span><span
10528 class="cmtt-8"> </span><span
10529 class="cmtt-8"> </span><span
10530 class="cmtt-8"> </span><span
10531 class="cmtt-8"> </span><span
10532 class="cmtt-8"> </span><span
10533 class="cmtt-8"> </span><span
10534 class="cmtt-8"> </span><span
10535 class="cmtt-8"> </span><span
10536 class="cmtt-8"> </span><span
10537 class="cmtt-8"> </span><span
10538 class="cmtt-8"> </span><span
10539 class="cmtt-8"> </span><span
10540 class="cmtt-8"> </span><span
10541 class="cmtt-8"> </span><span
10542 class="cmtt-8"> </span><span
10543 class="cmtt-8"> </span><span
10544 class="cmtt-8"> </span><span
10545 class="cmtt-8"> </span><span
10546 class="cmtt-8"> </span><span
10547 class="cmtt-8"> </span><span
10548 class="cmtt-8"> </span><span
10549 class="cmtt-8"> </span><span
10550 class="cmtt-8"> </span><span
10551 class="cmtt-8"> </span><span
10552 class="cmtt-8"> </span><span
10553 class="cmtt-8"> </span><span
10554 class="cmtt-8"> </span><span
10555 class="cmtt-8"> </span><span
10556 class="cmtt-8"> }</span>
10557 <br class="fancyvrb" /><a
10559 class="cmr-6">23</span><span
10560 class="cmtt-8"> </span><span
10561 class="cmtt-8"> </span>
10562 <br class="fancyvrb" /><a
10564 class="cmr-6">24</span><span
10565 class="cmtt-8"> </span><span
10566 class="cmtt-8"> </span><span
10567 class="cmtt-8"> </span><span
10568 class="cmtt-8"> </span><span
10569 class="cmtt-8"> </span><span
10570 class="cmtt-8"> </span><span
10571 class="cmtt-8"> </span><span
10572 class="cmtt-8"> </span><span
10573 class="cmtt-8"> </span><span
10574 class="cmtt-8"> </span><span
10575 class="cmtt-8"> </span><span
10576 class="cmtt-8"> </span><span
10577 class="cmtt-8"> </span><span
10578 class="cmtt-8"> </span><span
10579 class="cmtt-8"> </span><span
10580 class="cmtt-8"> </span><span
10581 class="cmtt-8"> </span><span
10582 class="cmtt-8"> </span><span
10583 class="cmtt-8"> </span><span
10584 class="cmtt-8"> </span><span
10585 class="cmtt-8"> </span><span
10586 class="cmtt-8"> </span><span
10587 class="cmtt-8"> </span><span
10588 class="cmtt-8"> </span><span
10589 class="cmtt-8"> </span><span
10590 class="cmtt-8"> </span><span
10591 class="cmtt-8"> }</span>
10592 <br class="fancyvrb" /><a
10594 class="cmr-6">25</span><span
10595 class="cmtt-8"> </span><span
10596 class="cmtt-8"> </span>
10597 <br class="fancyvrb" /><a
10599 class="cmr-6">26</span><span
10600 class="cmtt-8"> </span><span
10601 class="cmtt-8"> </span><span
10602 class="cmtt-8"> </span><span
10603 class="cmtt-8"> </span><span
10604 class="cmtt-8"> </span><span
10605 class="cmtt-8"> </span><span
10606 class="cmtt-8"> </span><span
10607 class="cmtt-8"> </span><span
10608 class="cmtt-8"> </span><span
10609 class="cmtt-8"> </span><span
10610 class="cmtt-8"> </span><span
10611 class="cmtt-8"> </span><span
10612 class="cmtt-8"> </span><span
10613 class="cmtt-8"> </span><span
10614 class="cmtt-8"> </span><span
10615 class="cmtt-8"> </span><span
10616 class="cmtt-8"> </span><span
10617 class="cmtt-8"> </span><span
10618 class="cmtt-8"> </span><span
10619 class="cmtt-8"> </span><span
10620 class="cmtt-8"> </span><span
10621 class="cmtt-8"> }</span>
10622 <br class="fancyvrb" /><a
10624 class="cmr-6">27</span><span
10625 class="cmtt-8"> </span><span
10626 class="cmtt-8"> </span>
10627 <br class="fancyvrb" /><a
10629 class="cmr-6">28</span><span
10630 class="cmtt-8"> </span><span
10631 class="cmtt-8"> </span><span
10632 class="cmtt-8"> </span><span
10633 class="cmtt-8"> </span><span
10634 class="cmtt-8"> </span><span
10635 class="cmtt-8"> </span><span
10636 class="cmtt-8"> </span><span
10637 class="cmtt-8"> </span><span
10638 class="cmtt-8"> </span><span
10639 class="cmtt-8"> </span><span
10640 class="cmtt-8"> </span><span
10641 class="cmtt-8"> </span><span
10642 class="cmtt-8"> </span><span
10643 class="cmtt-8"> </span><span
10644 class="cmtt-8"> </span><span
10645 class="cmtt-8"> </span><span
10646 class="cmtt-8"> }</span>
10647 <br class="fancyvrb" /><a
10649 class="cmr-6">29</span><span
10650 class="cmtt-8"> </span><span
10651 class="cmtt-8"> </span>
10652 <br class="fancyvrb" /><a
10654 class="cmr-6">30</span><span
10655 class="cmtt-8"> </span><span
10656 class="cmtt-8"> </span><span
10657 class="cmtt-8"> </span><span
10658 class="cmtt-8"> </span><span
10659 class="cmtt-8"> </span><span
10660 class="cmtt-8"> </span><span
10661 class="cmtt-8"> </span><span
10662 class="cmtt-8"> </span><span
10663 class="cmtt-8"> </span><span
10664 class="cmtt-8"> </span><span
10665 class="cmtt-8"> </span><span
10666 class="cmtt-8"> </span><span
10667 class="cmtt-8"> 13)</span><span
10668 class="cmtt-8"> iterate</span><span
10669 class="cmtt-8"> [i]</span><span
10670 class="cmtt-8"> over</span><span
10671 class="cmtt-8"> the</span><span
10672 class="cmtt-8"> range</span><span
10673 class="cmtt-8"> 0</span><span
10674 class="cmtt-8"> ..</span><span
10675 class="cmtt-8"> ([classwords_per_codeword]</span><span
10676 class="cmtt-8"> -</span><span
10677 class="cmtt-8"> 1)</span><span
10678 class="cmtt-8"> while</span><span
10679 class="cmtt-8"> [partition_count]</span>
10680 <br class="fancyvrb" /><a
10682 class="cmr-6">31</span><span
10683 class="cmtt-8"> </span><span
10684 class="cmtt-8"> </span><span
10685 class="cmtt-8"> </span><span
10686 class="cmtt-8"> </span><span
10687 class="cmtt-8"> </span><span
10688 class="cmtt-8"> </span><span
10689 class="cmtt-8"> </span><span
10690 class="cmtt-8"> </span><span
10691 class="cmtt-8"> </span><span
10692 class="cmtt-8"> </span><span
10693 class="cmtt-8"> </span><span
10694 class="cmtt-8"> </span><span
10695 class="cmtt-8"> </span><span
10696 class="cmtt-8"> </span><span
10697 class="cmtt-8"> </span><span
10698 class="cmtt-8"> </span><span
10699 class="cmtt-8"> is</span><span
10700 class="cmtt-8"> also</span><span
10701 class="cmtt-8"> less</span><span
10702 class="cmtt-8"> than</span><span
10703 class="cmtt-8"> [partitions_to_read]</span><span
10704 class="cmtt-8"> {</span>
10705 <br class="fancyvrb" /><a
10707 class="cmr-6">32</span><span
10708 class="cmtt-8"> </span><span
10709 class="cmtt-8"> </span>
10710 <br class="fancyvrb" /><a
10712 class="cmr-6">33</span><span
10713 class="cmtt-8"> </span><span
10714 class="cmtt-8"> </span><span
10715 class="cmtt-8"> </span><span
10716 class="cmtt-8"> </span><span
10717 class="cmtt-8"> </span><span
10718 class="cmtt-8"> </span><span
10719 class="cmtt-8"> </span><span
10720 class="cmtt-8"> </span><span
10721 class="cmtt-8"> </span><span
10722 class="cmtt-8"> </span><span
10723 class="cmtt-8"> </span><span
10724 class="cmtt-8"> </span><span
10725 class="cmtt-8"> </span><span
10726 class="cmtt-8"> </span><span
10727 class="cmtt-8"> </span><span
10728 class="cmtt-8"> </span><span
10729 class="cmtt-8"> </span><span
10730 class="cmtt-8"> </span><span
10731 class="cmtt-8"> 14)</span><span
10732 class="cmtt-8"> iterate</span><span
10733 class="cmtt-8"> [j]</span><span
10734 class="cmtt-8"> over</span><span
10735 class="cmtt-8"> the</span><span
10736 class="cmtt-8"> range</span><span
10737 class="cmtt-8"> 0</span><span
10738 class="cmtt-8"> ..</span><span
10739 class="cmtt-8"> [ch]-1</span><span
10740 class="cmtt-8"> {</span>
10741 <br class="fancyvrb" /><a
10743 class="cmr-6">34</span><span
10744 class="cmtt-8"> </span><span
10745 class="cmtt-8"> </span>
10746 <br class="fancyvrb" /><a
10748 class="cmr-6">35</span><span
10749 class="cmtt-8"> </span><span
10750 class="cmtt-8"> </span><span
10751 class="cmtt-8"> </span><span
10752 class="cmtt-8"> </span><span
10753 class="cmtt-8"> </span><span
10754 class="cmtt-8"> </span><span
10755 class="cmtt-8"> </span><span
10756 class="cmtt-8"> </span><span
10757 class="cmtt-8"> </span><span
10758 class="cmtt-8"> </span><span
10759 class="cmtt-8"> </span><span
10760 class="cmtt-8"> </span><span
10761 class="cmtt-8"> </span><span
10762 class="cmtt-8"> </span><span
10763 class="cmtt-8"> </span><span
10764 class="cmtt-8"> </span><span
10765 class="cmtt-8"> </span><span
10766 class="cmtt-8"> </span><span
10767 class="cmtt-8"> </span><span
10768 class="cmtt-8"> </span><span
10769 class="cmtt-8"> </span><span
10770 class="cmtt-8"> </span><span
10771 class="cmtt-8"> </span><span
10772 class="cmtt-8"> 15)</span><span
10773 class="cmtt-8"> if</span><span
10774 class="cmtt-8"> vector</span><span
10775 class="cmtt-8"> [j]</span><span
10776 class="cmtt-8"> is</span><span
10777 class="cmtt-8"> not</span><span
10778 class="cmtt-8"> marked</span><span
10779 class="cmtt-8"> ’do</span><span
10780 class="cmtt-8"> not</span><span
10781 class="cmtt-8"> decode’</span><span
10782 class="cmtt-8"> {</span>
10783 <br class="fancyvrb" /><a
10785 class="cmr-6">36</span><span
10786 class="cmtt-8"> </span><span
10787 class="cmtt-8"> </span>
10788 <br class="fancyvrb" /><a
10790 class="cmr-6">37</span><span
10791 class="cmtt-8"> </span><span
10792 class="cmtt-8"> </span><span
10793 class="cmtt-8"> </span><span
10794 class="cmtt-8"> </span><span
10795 class="cmtt-8"> </span><span
10796 class="cmtt-8"> </span><span
10797 class="cmtt-8"> </span><span
10798 class="cmtt-8"> </span><span
10799 class="cmtt-8"> </span><span
10800 class="cmtt-8"> </span><span
10801 class="cmtt-8"> </span><span
10802 class="cmtt-8"> </span><span
10803 class="cmtt-8"> </span><span
10804 class="cmtt-8"> </span><span
10805 class="cmtt-8"> </span><span
10806 class="cmtt-8"> </span><span
10807 class="cmtt-8"> </span><span
10808 class="cmtt-8"> </span><span
10809 class="cmtt-8"> </span><span
10810 class="cmtt-8"> </span><span
10811 class="cmtt-8"> </span><span
10812 class="cmtt-8"> </span><span
10813 class="cmtt-8"> </span><span
10814 class="cmtt-8"> </span><span
10815 class="cmtt-8"> </span><span
10816 class="cmtt-8"> </span><span
10817 class="cmtt-8"> </span><span
10818 class="cmtt-8"> </span><span
10819 class="cmtt-8"> 16)</span><span
10820 class="cmtt-8"> [vqclass]</span><span
10821 class="cmtt-8"> =</span><span
10822 class="cmtt-8"> array</span><span
10823 class="cmtt-8"> [classifications]</span><span
10824 class="cmtt-8"> element</span><span
10825 class="cmtt-8"> [j],[partition_count]</span>
10826 <br class="fancyvrb" /><a
10828 class="cmr-6">38</span><span
10829 class="cmtt-8"> </span><span
10830 class="cmtt-8"> </span><span
10831 class="cmtt-8"> </span><span
10832 class="cmtt-8"> </span><span
10833 class="cmtt-8"> </span><span
10834 class="cmtt-8"> </span><span
10835 class="cmtt-8"> </span><span
10836 class="cmtt-8"> </span><span
10837 class="cmtt-8"> </span><span
10838 class="cmtt-8"> </span><span
10839 class="cmtt-8"> </span><span
10840 class="cmtt-8"> </span><span
10841 class="cmtt-8"> </span><span
10842 class="cmtt-8"> </span><span
10843 class="cmtt-8"> </span><span
10844 class="cmtt-8"> </span><span
10845 class="cmtt-8"> </span><span
10846 class="cmtt-8"> </span><span
10847 class="cmtt-8"> </span><span
10848 class="cmtt-8"> </span><span
10849 class="cmtt-8"> </span><span
10850 class="cmtt-8"> </span><span
10851 class="cmtt-8"> </span><span
10852 class="cmtt-8"> </span><span
10853 class="cmtt-8"> </span><span
10854 class="cmtt-8"> </span><span
10855 class="cmtt-8"> </span><span
10856 class="cmtt-8"> </span><span
10857 class="cmtt-8"> 17)</span><span
10858 class="cmtt-8"> [vqbook]</span><span
10859 class="cmtt-8"> =</span><span
10860 class="cmtt-8"> array</span><span
10861 class="cmtt-8"> [residue_books]</span><span
10862 class="cmtt-8"> element</span><span
10863 class="cmtt-8"> [vqclass],[pass]</span>
10864 <br class="fancyvrb" /><a
10866 class="cmr-6">39</span><span
10867 class="cmtt-8"> </span><span
10868 class="cmtt-8"> </span><span
10869 class="cmtt-8"> </span><span
10870 class="cmtt-8"> </span><span
10871 class="cmtt-8"> </span><span
10872 class="cmtt-8"> </span><span
10873 class="cmtt-8"> </span><span
10874 class="cmtt-8"> </span><span
10875 class="cmtt-8"> </span><span
10876 class="cmtt-8"> </span><span
10877 class="cmtt-8"> </span><span
10878 class="cmtt-8"> </span><span
10879 class="cmtt-8"> </span><span
10880 class="cmtt-8"> </span><span
10881 class="cmtt-8"> </span><span
10882 class="cmtt-8"> </span><span
10883 class="cmtt-8"> </span><span
10884 class="cmtt-8"> </span><span
10885 class="cmtt-8"> </span><span
10886 class="cmtt-8"> </span><span
10887 class="cmtt-8"> </span><span
10888 class="cmtt-8"> </span><span
10889 class="cmtt-8"> </span><span
10890 class="cmtt-8"> </span><span
10891 class="cmtt-8"> </span><span
10892 class="cmtt-8"> </span><span
10893 class="cmtt-8"> </span><span
10894 class="cmtt-8"> </span><span
10895 class="cmtt-8"> 18)</span><span
10896 class="cmtt-8"> if</span><span
10897 class="cmtt-8"> ([vqbook]</span><span
10898 class="cmtt-8"> is</span><span
10899 class="cmtt-8"> not</span><span
10900 class="cmtt-8"> ’unused’)</span><span
10901 class="cmtt-8"> {</span>
10902 <br class="fancyvrb" /><a
10904 class="cmr-6">40</span><span
10905 class="cmtt-8"> </span><span
10906 class="cmtt-8"> </span>
10907 <br class="fancyvrb" /><a
10909 class="cmr-6">41</span><span
10910 class="cmtt-8"> </span><span
10911 class="cmtt-8"> </span><span
10912 class="cmtt-8"> </span><span
10913 class="cmtt-8"> </span><span
10914 class="cmtt-8"> </span><span
10915 class="cmtt-8"> </span><span
10916 class="cmtt-8"> </span><span
10917 class="cmtt-8"> </span><span
10918 class="cmtt-8"> </span><span
10919 class="cmtt-8"> </span><span
10920 class="cmtt-8"> </span><span
10921 class="cmtt-8"> </span><span
10922 class="cmtt-8"> </span><span
10923 class="cmtt-8"> </span><span
10924 class="cmtt-8"> </span><span
10925 class="cmtt-8"> </span><span
10926 class="cmtt-8"> </span><span
10927 class="cmtt-8"> </span><span
10928 class="cmtt-8"> </span><span
10929 class="cmtt-8"> </span><span
10930 class="cmtt-8"> </span><span
10931 class="cmtt-8"> </span><span
10932 class="cmtt-8"> </span><span
10933 class="cmtt-8"> </span><span
10934 class="cmtt-8"> </span><span
10935 class="cmtt-8"> </span><span
10936 class="cmtt-8"> </span><span
10937 class="cmtt-8"> </span><span
10938 class="cmtt-8"> </span><span
10939 class="cmtt-8"> </span><span
10940 class="cmtt-8"> </span><span
10941 class="cmtt-8"> </span><span
10942 class="cmtt-8"> </span><span
10943 class="cmtt-8"> 19)</span><span
10944 class="cmtt-8"> decode</span><span
10945 class="cmtt-8"> partition</span><span
10946 class="cmtt-8"> into</span><span
10947 class="cmtt-8"> output</span><span
10948 class="cmtt-8"> vector</span><span
10949 class="cmtt-8"> number</span><span
10950 class="cmtt-8"> [j],</span><span
10951 class="cmtt-8"> starting</span><span
10952 class="cmtt-8"> at</span><span
10953 class="cmtt-8"> scalar</span>
10954 <br class="fancyvrb" /><a
10956 class="cmr-6">42</span><span
10957 class="cmtt-8"> </span><span
10958 class="cmtt-8"> </span><span
10959 class="cmtt-8"> </span><span
10960 class="cmtt-8"> </span><span
10961 class="cmtt-8"> </span><span
10962 class="cmtt-8"> </span><span
10963 class="cmtt-8"> </span><span
10964 class="cmtt-8"> </span><span
10965 class="cmtt-8"> </span><span
10966 class="cmtt-8"> </span><span
10967 class="cmtt-8"> </span><span
10968 class="cmtt-8"> </span><span
10969 class="cmtt-8"> </span><span
10970 class="cmtt-8"> </span><span
10971 class="cmtt-8"> </span><span
10972 class="cmtt-8"> </span><span
10973 class="cmtt-8"> </span><span
10974 class="cmtt-8"> </span><span
10975 class="cmtt-8"> </span><span
10976 class="cmtt-8"> </span><span
10977 class="cmtt-8"> </span><span
10978 class="cmtt-8"> </span><span
10979 class="cmtt-8"> </span><span
10980 class="cmtt-8"> </span><span
10981 class="cmtt-8"> </span><span
10982 class="cmtt-8"> </span><span
10983 class="cmtt-8"> </span><span
10984 class="cmtt-8"> </span><span
10985 class="cmtt-8"> </span><span
10986 class="cmtt-8"> </span><span
10987 class="cmtt-8"> </span><span
10988 class="cmtt-8"> </span><span
10989 class="cmtt-8"> </span><span
10990 class="cmtt-8"> </span><span
10991 class="cmtt-8"> </span><span
10992 class="cmtt-8"> </span><span
10993 class="cmtt-8"> </span><span
10994 class="cmtt-8"> offset</span><span
10995 class="cmtt-8"> [limit_residue_begin]+[partition_count]*[residue_partition_size]</span><span
10996 class="cmtt-8"> using</span>
10997 <br class="fancyvrb" /><a
10999 class="cmr-6">43</span><span
11000 class="cmtt-8"> </span><span
11001 class="cmtt-8"> </span><span
11002 class="cmtt-8"> </span><span
11003 class="cmtt-8"> </span><span
11004 class="cmtt-8"> </span><span
11005 class="cmtt-8"> </span><span
11006 class="cmtt-8"> </span><span
11007 class="cmtt-8"> </span><span
11008 class="cmtt-8"> </span><span
11009 class="cmtt-8"> </span><span
11010 class="cmtt-8"> </span><span
11011 class="cmtt-8"> </span><span
11012 class="cmtt-8"> </span><span
11013 class="cmtt-8"> </span><span
11014 class="cmtt-8"> </span><span
11015 class="cmtt-8"> </span><span
11016 class="cmtt-8"> </span><span
11017 class="cmtt-8"> </span><span
11018 class="cmtt-8"> </span><span
11019 class="cmtt-8"> </span><span
11020 class="cmtt-8"> </span><span
11021 class="cmtt-8"> </span><span
11022 class="cmtt-8"> </span><span
11023 class="cmtt-8"> </span><span
11024 class="cmtt-8"> </span><span
11025 class="cmtt-8"> </span><span
11026 class="cmtt-8"> </span><span
11027 class="cmtt-8"> </span><span
11028 class="cmtt-8"> </span><span
11029 class="cmtt-8"> </span><span
11030 class="cmtt-8"> </span><span
11031 class="cmtt-8"> </span><span
11032 class="cmtt-8"> </span><span
11033 class="cmtt-8"> </span><span
11034 class="cmtt-8"> </span><span
11035 class="cmtt-8"> </span><span
11036 class="cmtt-8"> </span><span
11037 class="cmtt-8"> codebook</span><span
11038 class="cmtt-8"> number</span><span
11039 class="cmtt-8"> [vqbook]</span><span
11040 class="cmtt-8"> in</span><span
11041 class="cmtt-8"> VQ</span><span
11042 class="cmtt-8"> context</span>
11043 <br class="fancyvrb" /><a
11045 class="cmr-6">44</span><span
11046 class="cmtt-8"> </span><span
11047 class="cmtt-8"> </span><span
11048 class="cmtt-8"> </span><span
11049 class="cmtt-8"> </span><span
11050 class="cmtt-8"> </span><span
11051 class="cmtt-8"> </span><span
11052 class="cmtt-8"> </span><span
11053 class="cmtt-8"> </span><span
11054 class="cmtt-8"> </span><span
11055 class="cmtt-8"> </span><span
11056 class="cmtt-8"> </span><span
11057 class="cmtt-8"> </span><span
11058 class="cmtt-8"> </span><span
11059 class="cmtt-8"> </span><span
11060 class="cmtt-8"> </span><span
11061 class="cmtt-8"> </span><span
11062 class="cmtt-8"> </span><span
11063 class="cmtt-8"> </span><span
11064 class="cmtt-8"> </span><span
11065 class="cmtt-8"> </span><span
11066 class="cmtt-8"> </span><span
11067 class="cmtt-8"> </span><span
11068 class="cmtt-8"> </span><span
11069 class="cmtt-8"> </span><span
11070 class="cmtt-8"> </span><span
11071 class="cmtt-8"> </span><span
11072 class="cmtt-8"> </span><span
11073 class="cmtt-8"> }</span>
11077 <br class="fancyvrb" /><a
11079 class="cmr-6">45</span><span
11080 class="cmtt-8"> </span><span
11081 class="cmtt-8"> </span><span
11082 class="cmtt-8"> </span><span
11083 class="cmtt-8"> </span><span
11084 class="cmtt-8"> </span><span
11085 class="cmtt-8"> </span><span
11086 class="cmtt-8"> </span><span
11087 class="cmtt-8"> </span><span
11088 class="cmtt-8"> </span><span
11089 class="cmtt-8"> </span><span
11090 class="cmtt-8"> </span><span
11091 class="cmtt-8"> </span><span
11092 class="cmtt-8"> </span><span
11093 class="cmtt-8"> </span><span
11094 class="cmtt-8"> </span><span
11095 class="cmtt-8"> </span><span
11096 class="cmtt-8"> </span><span
11097 class="cmtt-8"> </span><span
11098 class="cmtt-8"> </span><span
11099 class="cmtt-8"> </span><span
11100 class="cmtt-8"> </span><span
11101 class="cmtt-8"> </span><span
11102 class="cmtt-8"> }</span>
11103 <br class="fancyvrb" /><a
11105 class="cmr-6">46</span><span
11106 class="cmtt-8"> </span><span
11107 class="cmtt-8"> </span>
11108 <br class="fancyvrb" /><a
11110 class="cmr-6">47</span><span
11111 class="cmtt-8"> </span><span
11112 class="cmtt-8"> </span><span
11113 class="cmtt-8"> </span><span
11114 class="cmtt-8"> </span><span
11115 class="cmtt-8"> </span><span
11116 class="cmtt-8"> </span><span
11117 class="cmtt-8"> </span><span
11118 class="cmtt-8"> </span><span
11119 class="cmtt-8"> </span><span
11120 class="cmtt-8"> </span><span
11121 class="cmtt-8"> </span><span
11122 class="cmtt-8"> </span><span
11123 class="cmtt-8"> </span><span
11124 class="cmtt-8"> </span><span
11125 class="cmtt-8"> </span><span
11126 class="cmtt-8"> </span><span
11127 class="cmtt-8"> </span><span
11128 class="cmtt-8"> </span><span
11129 class="cmtt-8"> 20)</span><span
11130 class="cmtt-8"> increment</span><span
11131 class="cmtt-8"> [partition_count]</span><span
11132 class="cmtt-8"> by</span><span
11133 class="cmtt-8"> one</span>
11134 <br class="fancyvrb" /><a
11136 class="cmr-6">48</span><span
11137 class="cmtt-8"> </span><span
11138 class="cmtt-8"> </span>
11139 <br class="fancyvrb" /><a
11141 class="cmr-6">49</span><span
11142 class="cmtt-8"> </span><span
11143 class="cmtt-8"> </span><span
11144 class="cmtt-8"> </span><span
11145 class="cmtt-8"> </span><span
11146 class="cmtt-8"> </span><span
11147 class="cmtt-8"> </span><span
11148 class="cmtt-8"> </span><span
11149 class="cmtt-8"> </span><span
11150 class="cmtt-8"> </span><span
11151 class="cmtt-8"> </span><span
11152 class="cmtt-8"> </span><span
11153 class="cmtt-8"> </span><span
11154 class="cmtt-8"> </span><span
11155 class="cmtt-8"> </span><span
11156 class="cmtt-8"> </span><span
11157 class="cmtt-8"> </span><span
11158 class="cmtt-8"> }</span>
11159 <br class="fancyvrb" /><a
11161 class="cmr-6">50</span><span
11162 class="cmtt-8"> </span><span
11163 class="cmtt-8"> </span><span
11164 class="cmtt-8"> </span><span
11165 class="cmtt-8"> </span><span
11166 class="cmtt-8"> </span><span
11167 class="cmtt-8"> </span><span
11168 class="cmtt-8"> </span><span
11169 class="cmtt-8"> </span><span
11170 class="cmtt-8"> </span><span
11171 class="cmtt-8"> </span><span
11172 class="cmtt-8"> </span><span
11173 class="cmtt-8"> }</span>
11174 <br class="fancyvrb" /><a
11176 class="cmr-6">51</span><span
11177 class="cmtt-8"> </span><span
11178 class="cmtt-8"> </span><span
11179 class="cmtt-8"> </span><span
11180 class="cmtt-8"> </span><span
11181 class="cmtt-8"> </span><span
11182 class="cmtt-8"> </span><span
11183 class="cmtt-8"> }</span>
11184 <br class="fancyvrb" /><a
11186 class="cmr-6">52</span><span
11187 class="cmtt-8"> </span><span
11188 class="cmtt-8"> </span>
11189 <br class="fancyvrb" /><a
11191 class="cmr-6">53</span><span
11192 class="cmtt-8"> </span><span
11193 class="cmtt-8"> </span><span
11194 class="cmtt-8"> 21)</span><span
11195 class="cmtt-8"> done</span>
11196 <br class="fancyvrb" /><a
11198 class="cmr-6">54</span><span
11199 class="cmtt-8"> </span><span
11200 class="cmtt-8"> </span>
11202 <!--l. 344--><p class="noindent" >An end-of-packet condition during packet decode is to be consider…
11204 <!--l. 350--><p class="noindent" >
11205 <h5 class="subsubsectionHead"><span class="titlemark">8.6.3 </span> <a
11207 <!--l. 352--><p class="noindent" >Format zero decodes partitions exactly as described earlier in th…
11209 <ul class="itemize1">
11210 <li class="itemize"><span
11211 class="cmtt-12">[n] </span>is the value in <span
11212 class="cmtt-12">[residue_partition_size]</span>
11214 <li class="itemize"><span
11215 class="cmtt-12">[v] </span>is the residue vector
11217 <li class="itemize"><span
11218 class="cmtt-12">[offset] </span>is the beginning read offset in [v]</li></ul>
11219 <!--l. 363--><p class="noindent" >
11220 <div class="fancyvrb" id="fancyvrb41">
11223 class="cmr-6">1</span><span
11224 class="cmtt-8"> </span><span
11225 class="cmtt-8"> </span><span
11226 class="cmtt-8"> 1)</span><span
11227 class="cmtt-8"> [step]</span><span
11228 class="cmtt-8"> =</span><span
11229 class="cmtt-8"> [n]</span><span
11230 class="cmtt-8"> /</span><span
11231 class="cmtt-8"> [codebook_dimensions]</span>
11232 <br class="fancyvrb" /><a
11234 class="cmr-6">2</span><span
11235 class="cmtt-8"> </span><span
11236 class="cmtt-8"> </span><span
11237 class="cmtt-8"> 2)</span><span
11238 class="cmtt-8"> iterate</span><span
11239 class="cmtt-8"> [i]</span><span
11240 class="cmtt-8"> over</span><span
11241 class="cmtt-8"> the</span><span
11242 class="cmtt-8"> range</span><span
11243 class="cmtt-8"> 0</span><span
11244 class="cmtt-8"> ...</span><span
11245 class="cmtt-8"> [step]-1</span><span
11246 class="cmtt-8"> {</span>
11247 <br class="fancyvrb" /><a
11249 class="cmr-6">3</span><span
11250 class="cmtt-8"> </span><span
11251 class="cmtt-8"> </span>
11252 <br class="fancyvrb" /><a
11254 class="cmr-6">4</span><span
11255 class="cmtt-8"> </span><span
11256 class="cmtt-8"> </span><span
11257 class="cmtt-8"> </span><span
11258 class="cmtt-8"> </span><span
11259 class="cmtt-8"> </span><span
11260 class="cmtt-8"> </span><span
11261 class="cmtt-8"> </span><span
11262 class="cmtt-8"> 3)</span><span
11263 class="cmtt-8"> vector</span><span
11264 class="cmtt-8"> [entry_temp]</span><span
11265 class="cmtt-8"> =</span><span
11266 class="cmtt-8"> read</span><span
11267 class="cmtt-8"> vector</span><span
11268 class="cmtt-8"> from</span><span
11269 class="cmtt-8"> packet</span><span
11270 class="cmtt-8"> using</span><span
11271 class="cmtt-8"> current</span><span
11272 class="cmtt-8"> codebook</span><span
11273 class="cmtt-8"> in</span><span
11274 class="cmtt-8"> VQ</span><span
11275 class="cmtt-8"> context</span>
11276 <br class="fancyvrb" /><a
11278 class="cmr-6">5</span><span
11279 class="cmtt-8"> </span><span
11280 class="cmtt-8"> </span><span
11281 class="cmtt-8"> </span><span
11282 class="cmtt-8"> </span><span
11283 class="cmtt-8"> </span><span
11284 class="cmtt-8"> </span><span
11285 class="cmtt-8"> </span><span
11286 class="cmtt-8"> 4)</span><span
11287 class="cmtt-8"> iterate</span><span
11288 class="cmtt-8"> [j]</span><span
11289 class="cmtt-8"> over</span><span
11290 class="cmtt-8"> the</span><span
11291 class="cmtt-8"> range</span><span
11292 class="cmtt-8"> 0</span><span
11293 class="cmtt-8"> ...</span><span
11294 class="cmtt-8"> [codebook_dimensions]-1</span><span
11295 class="cmtt-8"> {</span>
11296 <br class="fancyvrb" /><a
11298 class="cmr-6">6</span><span
11299 class="cmtt-8"> </span><span
11300 class="cmtt-8"> </span>
11301 <br class="fancyvrb" /><a
11303 class="cmr-6">7</span><span
11304 class="cmtt-8"> </span><span
11305 class="cmtt-8"> </span><span
11306 class="cmtt-8"> </span><span
11307 class="cmtt-8"> </span><span
11308 class="cmtt-8"> </span><span
11309 class="cmtt-8"> </span><span
11310 class="cmtt-8"> </span><span
11311 class="cmtt-8"> </span><span
11312 class="cmtt-8"> </span><span
11313 class="cmtt-8"> </span><span
11314 class="cmtt-8"> </span><span
11315 class="cmtt-8"> </span><span
11316 class="cmtt-8"> 5)</span><span
11317 class="cmtt-8"> vector</span><span
11318 class="cmtt-8"> [v]</span><span
11319 class="cmtt-8"> element</span><span
11320 class="cmtt-8"> ([offset]+[i]+[j]*[step])</span><span
11321 class="cmtt-8"> =</span>
11322 <br class="fancyvrb" /><a
11324 class="cmr-6">8</span><span
11325 class="cmtt-8"> </span><span
11326 class="cmtt-8">  </span><span
11327 class="cmtt-8"> </span><span
11328 class="cmtt-8"> </span><span
11329 class="cmtt-8"> </span><span
11330 class="cmtt-8"> </span><span
11331 class="cmtt-8"> </span><span
11332 class="cmtt-8"> </span><span
11333 class="cmtt-8"> </span><span
11334 class="cmtt-8"> vector</span><span
11335 class="cmtt-8"> [v]</span><span
11336 class="cmtt-8"> element</span><span
11337 class="cmtt-8"> ([offset]+[i]+[j]*[step])</span><span
11338 class="cmtt-8"> +</span>
11339 <br class="fancyvrb" /><a
11341 class="cmr-6">9</span><span
11342 class="cmtt-8"> </span><span
11343 class="cmtt-8"> </span><span
11344 class="cmtt-8"> </span><span
11345 class="cmtt-8"> </span><span
11346 class="cmtt-8"> </span><span
11347 class="cmtt-8"> </span><span
11348 class="cmtt-8"> </span><span
11349 class="cmtt-8"> </span><span
11350 class="cmtt-8"> </span><span
11351 class="cmtt-8"> </span><span
11352 class="cmtt-8"> </span><span
11353 class="cmtt-8"> </span><span
11354 class="cmtt-8"> </span><span
11355 class="cmtt-8"> </span><span
11356 class="cmtt-8"> </span><span
11357 class="cmtt-8"> </span><span
11358 class="cmtt-8"> </span><span
11359 class="cmtt-8"> vector</span><span
11360 class="cmtt-8"> [entry_temp]</span><span
11361 class="cmtt-8"> element</span><span
11362 class="cmtt-8"> [j]</span>
11363 <br class="fancyvrb" /><a
11365 class="cmr-6">10</span><span
11366 class="cmtt-8"> </span><span
11367 class="cmtt-8"> </span>
11368 <br class="fancyvrb" /><a
11370 class="cmr-6">11</span><span
11371 class="cmtt-8"> </span><span
11372 class="cmtt-8"> </span><span
11373 class="cmtt-8"> </span><span
11374 class="cmtt-8"> </span><span
11375 class="cmtt-8"> </span><span
11376 class="cmtt-8"> </span><span
11377 class="cmtt-8"> </span><span
11378 class="cmtt-8"> </span><span
11379 class="cmtt-8"> </span><span
11380 class="cmtt-8"> </span><span
11381 class="cmtt-8"> }</span>
11382 <br class="fancyvrb" /><a
11384 class="cmr-6">12</span><span
11385 class="cmtt-8"> </span><span
11386 class="cmtt-8"> </span>
11387 <br class="fancyvrb" /><a
11389 class="cmr-6">13</span><span
11390 class="cmtt-8"> </span><span
11391 class="cmtt-8"> </span><span
11392 class="cmtt-8"> </span><span
11393 class="cmtt-8"> </span><span
11394 class="cmtt-8"> </span><span
11395 class="cmtt-8"> }</span>
11396 <br class="fancyvrb" /><a
11398 class="cmr-6">14</span><span
11399 class="cmtt-8"> </span><span
11400 class="cmtt-8"> </span>
11401 <br class="fancyvrb" /><a
11403 class="cmr-6">15</span><span
11404 class="cmtt-8"> </span><span
11405 class="cmtt-8"> </span><span
11406 class="cmtt-8"> </span><span
11407 class="cmtt-8"> 6)</span><span
11408 class="cmtt-8"> done</span>
11409 <br class="fancyvrb" /><a
11411 class="cmr-6">16</span><span
11412 class="cmtt-8"> </span><span
11413 class="cmtt-8"> </span>
11418 <!--l. 384--><p class="noindent" >
11419 <h5 class="subsubsectionHead"><span class="titlemark">8.6.4 </span> <a
11421 <!--l. 386--><p class="noindent" >Format 1 decodes partitions exactly as described earlier in the &…
11423 <ul class="itemize1">
11424 <li class="itemize"><span
11425 class="cmtt-12">[n] </span>is the value in <span
11426 class="cmtt-12">[residue_partition_size]</span>
11428 <li class="itemize"><span
11429 class="cmtt-12">[v] </span>is the residue vector
11431 <li class="itemize"><span
11432 class="cmtt-12">[offset] </span>is the beginning read offset in [v]</li></ul>
11433 <!--l. 398--><p class="noindent" >
11434 <div class="fancyvrb" id="fancyvrb42">
11437 class="cmr-6">1</span><span
11438 class="cmtt-8"> </span><span
11439 class="cmtt-8"> </span><span
11440 class="cmtt-8"> 1)</span><span
11441 class="cmtt-8"> [i]</span><span
11442 class="cmtt-8"> =</span><span
11443 class="cmtt-8"> 0</span>
11444 <br class="fancyvrb" /><a
11446 class="cmr-6">2</span><span
11447 class="cmtt-8"> </span><span
11448 class="cmtt-8"> </span><span
11449 class="cmtt-8"> 2)</span><span
11450 class="cmtt-8"> vector</span><span
11451 class="cmtt-8"> [entry_temp]</span><span
11452 class="cmtt-8"> =</span><span
11453 class="cmtt-8"> read</span><span
11454 class="cmtt-8"> vector</span><span
11455 class="cmtt-8"> from</span><span
11456 class="cmtt-8"> packet</span><span
11457 class="cmtt-8"> using</span><span
11458 class="cmtt-8"> current</span><span
11459 class="cmtt-8"> codebook</span><span
11460 class="cmtt-8"> in</span><span
11461 class="cmtt-8"> VQ</span><span
11462 class="cmtt-8"> context</span>
11463 <br class="fancyvrb" /><a
11465 class="cmr-6">3</span><span
11466 class="cmtt-8"> </span><span
11467 class="cmtt-8"> </span><span
11468 class="cmtt-8"> 3)</span><span
11469 class="cmtt-8"> iterate</span><span
11470 class="cmtt-8"> [j]</span><span
11471 class="cmtt-8"> over</span><span
11472 class="cmtt-8"> the</span><span
11473 class="cmtt-8"> range</span><span
11474 class="cmtt-8"> 0</span><span
11475 class="cmtt-8"> ...</span><span
11476 class="cmtt-8"> [codebook_dimensions]-1</span><span
11477 class="cmtt-8"> {</span>
11478 <br class="fancyvrb" /><a
11480 class="cmr-6">4</span><span
11481 class="cmtt-8"> </span><span
11482 class="cmtt-8"> </span>
11483 <br class="fancyvrb" /><a
11485 class="cmr-6">5</span><span
11486 class="cmtt-8"> </span><span
11487 class="cmtt-8"> </span><span
11488 class="cmtt-8"> </span><span
11489 class="cmtt-8"> </span><span
11490 class="cmtt-8"> </span><span
11491 class="cmtt-8"> </span><span
11492 class="cmtt-8"> </span><span
11493 class="cmtt-8"> 4)</span><span
11494 class="cmtt-8"> vector</span><span
11495 class="cmtt-8"> [v]</span><span
11496 class="cmtt-8"> element</span><span
11497 class="cmtt-8"> ([offset]+[i])</span><span
11498 class="cmtt-8"> =</span>
11499 <br class="fancyvrb" /><a
11501 class="cmr-6">6</span><span
11502 class="cmtt-8"> </span><span
11503 class="cmtt-8">  </span><span
11504 class="cmtt-8"> </span><span
11505 class="cmtt-8"> vector</span><span
11506 class="cmtt-8"> [v]</span><span
11507 class="cmtt-8"> element</span><span
11508 class="cmtt-8"> ([offset]+[i])</span><span
11509 class="cmtt-8"> +</span>
11510 <br class="fancyvrb" /><a
11512 class="cmr-6">7</span><span
11513 class="cmtt-8"> </span><span
11514 class="cmtt-8"> </span><span
11515 class="cmtt-8"> </span><span
11516 class="cmtt-8"> </span><span
11517 class="cmtt-8"> </span><span
11518 class="cmtt-8"> </span><span
11519 class="cmtt-8"> </span><span
11520 class="cmtt-8"> </span><span
11521 class="cmtt-8"> </span><span
11522 class="cmtt-8"> </span><span
11523 class="cmtt-8"> </span><span
11524 class="cmtt-8"> vector</span><span
11525 class="cmtt-8"> [entry_temp]</span><span
11526 class="cmtt-8"> element</span><span
11527 class="cmtt-8"> [j]</span>
11528 <br class="fancyvrb" /><a
11530 class="cmr-6">8</span><span
11531 class="cmtt-8"> </span><span
11532 class="cmtt-8"> </span><span
11533 class="cmtt-8"> </span><span
11534 class="cmtt-8"> </span><span
11535 class="cmtt-8"> </span><span
11536 class="cmtt-8"> </span><span
11537 class="cmtt-8"> </span><span
11538 class="cmtt-8"> 5)</span><span
11539 class="cmtt-8"> increment</span><span
11540 class="cmtt-8"> [i]</span>
11541 <br class="fancyvrb" /><a
11543 class="cmr-6">9</span><span
11544 class="cmtt-8"> </span><span
11545 class="cmtt-8"> </span>
11546 <br class="fancyvrb" /><a
11548 class="cmr-6">10</span><span
11549 class="cmtt-8"> </span><span
11550 class="cmtt-8"> </span><span
11551 class="cmtt-8"> </span><span
11552 class="cmtt-8"> </span><span
11553 class="cmtt-8"> </span><span
11554 class="cmtt-8"> }</span>
11555 <br class="fancyvrb" /><a
11557 class="cmr-6">11</span><span
11558 class="cmtt-8"> </span><span
11559 class="cmtt-8"> </span>
11560 <br class="fancyvrb" /><a
11562 class="cmr-6">12</span><span
11563 class="cmtt-8"> </span><span
11564 class="cmtt-8"> </span><span
11565 class="cmtt-8"> </span><span
11566 class="cmtt-8"> 6)</span><span
11567 class="cmtt-8"> if</span><span
11568 class="cmtt-8"> (</span><span
11569 class="cmtt-8"> [i]</span><span
11570 class="cmtt-8"> is</span><span
11571 class="cmtt-8"> less</span><span
11572 class="cmtt-8"> than</span><span
11573 class="cmtt-8"> [n]</span><span
11574 class="cmtt-8"> )</span><span
11575 class="cmtt-8"> continue</span><span
11576 class="cmtt-8"> at</span><span
11577 class="cmtt-8"> step</span><span
11578 class="cmtt-8"> 2</span>
11579 <br class="fancyvrb" /><a
11581 class="cmr-6">13</span><span
11582 class="cmtt-8"> </span><span
11583 class="cmtt-8"> </span><span
11584 class="cmtt-8"> </span><span
11585 class="cmtt-8"> 7)</span><span
11586 class="cmtt-8"> done</span>
11588 <!--l. 416--><p class="noindent" >
11589 <h5 class="subsubsectionHead"><span class="titlemark">8.6.5 </span> <a
11591 <!--l. 418--><p class="noindent" >Format 2 is reducible to format 1. It may be implemented as an ad…
11596 <!--l. 421--><p class="noindent" >Format 2 handles ’do not decode’ vectors differently …
11602 <!--l. 428--><p class="noindent" >
11603 <ol class="enumerate1" >
11605 class="enumerate" id="x1-113002x1">If all vectors 0 through <span
11606 class="cmti-12">ch</span>-1 are marked ’do not decode’, allocate and clear a single
11608 class="cmtt-12">[v]</span>of length <span
11609 class="cmti-12">ch*n </span>and skip step 2 below; proceed directly to the post-decode
11613 class="enumerate" id="x1-113004x2">Rather than performing format 1 decode to produce <span
11614 class="cmti-12">ch </span>vectors of length <span
11615 class="cmti-12">n </span>each, call
11617 class="cmtt-12">[v] </span>of length <span
11618 class="cmti-12">ch*n</span>.
11621 class="enumerate" id="x1-113006x3">Post decode: Deinterleave the single vector <span
11622 class="cmtt-12">[v] </span>returned by format 1 decode as
11624 class="cmti-12">ch </span>independent vectors, one for each outputchannel, according
11626 <div class="fancyvrb" id="fancyvrb43">
11629 class="cmr-6">1</span><span
11630 class="cmtt-8"> </span><span
11631 class="cmtt-8"> </span><span
11632 class="cmtt-8"> </span><span
11633 class="cmtt-8"> 1)</span><span
11634 class="cmtt-8"> iterate</span><span
11635 class="cmtt-8"> [i]</span><span
11636 class="cmtt-8"> over</span><span
11637 class="cmtt-8"> the</span><span
11638 class="cmtt-8"> range</span><span
11639 class="cmtt-8"> 0</span><span
11640 class="cmtt-8"> ...</span><span
11641 class="cmtt-8"> [n]-1</span><span
11642 class="cmtt-8"> {</span>
11643 <br class="fancyvrb" /><a
11645 class="cmr-6">2</span><span
11646 class="cmtt-8"> </span><span
11647 class="cmtt-8"> </span>
11648 <br class="fancyvrb" /><a
11650 class="cmr-6">3</span><span
11651 class="cmtt-8"> </span><span
11652 class="cmtt-8"> </span><span
11653 class="cmtt-8"> </span><span
11654 class="cmtt-8"> </span><span
11655 class="cmtt-8"> </span><span
11656 class="cmtt-8"> </span><span
11657 class="cmtt-8"> </span><span
11658 class="cmtt-8"> </span><span
11659 class="cmtt-8"> 2)</span><span
11660 class="cmtt-8"> iterate</span><span
11661 class="cmtt-8"> [j]</span><span
11662 class="cmtt-8"> over</span><span
11663 class="cmtt-8"> the</span><span
11664 class="cmtt-8"> range</span><span
11665 class="cmtt-8"> 0</span><span
11666 class="cmtt-8"> ...</span><span
11667 class="cmtt-8"> [ch]-1</span><span
11668 class="cmtt-8"> {</span>
11669 <br class="fancyvrb" /><a
11671 class="cmr-6">4</span><span
11672 class="cmtt-8"> </span><span
11673 class="cmtt-8"> </span>
11674 <br class="fancyvrb" /><a
11676 class="cmr-6">5</span><span
11677 class="cmtt-8"> </span><span
11678 class="cmtt-8"> </span><span
11679 class="cmtt-8"> </span><span
11680 class="cmtt-8"> </span><span
11681 class="cmtt-8"> </span><span
11682 class="cmtt-8"> </span><span
11683 class="cmtt-8"> </span><span
11684 class="cmtt-8"> </span><span
11685 class="cmtt-8"> </span><span
11686 class="cmtt-8"> </span><span
11687 class="cmtt-8"> </span><span
11688 class="cmtt-8"> </span><span
11689 class="cmtt-8"> </span><span
11690 class="cmtt-8"> 3)</span><span
11691 class="cmtt-8"> output</span><span
11692 class="cmtt-8"> vector</span><span
11693 class="cmtt-8"> number</span><span
11694 class="cmtt-8"> [j]</span><span
11695 class="cmtt-8"> element</span><span
11696 class="cmtt-8"> [i]</span><span
11697 class="cmtt-8"> =</span><span
11698 class="cmtt-8"> vector</span><span
11699 class="cmtt-8"> [v]</span><span
11700 class="cmtt-8"> element</span><span
11701 class="cmtt-8"> ([i]</span><span
11702 class="cmtt-8"> *</span><span
11703 class="cmtt-8"> [ch]</span><span
11704 class="cmtt-8"> +</span><span
11705 class="cmtt-8"> [j])</span>
11706 <br class="fancyvrb" /><a
11708 class="cmr-6">6</span><span
11709 class="cmtt-8"> </span><span
11710 class="cmtt-8"> </span>
11711 <br class="fancyvrb" /><a
11713 class="cmr-6">7</span><span
11714 class="cmtt-8"> </span><span
11715 class="cmtt-8"> </span><span
11716 class="cmtt-8"> </span><span
11717 class="cmtt-8"> </span><span
11718 class="cmtt-8"> </span><span
11719 class="cmtt-8"> </span><span
11720 class="cmtt-8"> </span><span
11721 class="cmtt-8"> </span><span
11722 class="cmtt-8"> </span><span
11723 class="cmtt-8"> </span><span
11724 class="cmtt-8"> </span><span
11725 class="cmtt-8"> }</span>
11726 <br class="fancyvrb" /><a
11728 class="cmr-6">8</span><span
11729 class="cmtt-8"> </span><span
11730 class="cmtt-8"> </span><span
11731 class="cmtt-8"> </span><span
11732 class="cmtt-8"> </span><span
11733 class="cmtt-8"> </span><span
11734 class="cmtt-8"> </span><span
11735 class="cmtt-8"> }</span>
11736 <br class="fancyvrb" /><a
11738 class="cmr-6">9</span><span
11739 class="cmtt-8"> </span><span
11740 class="cmtt-8"> </span>
11741 <br class="fancyvrb" /><a
11743 class="cmr-6">10</span><span
11744 class="cmtt-8"> </span><span
11745 class="cmtt-8"> </span><span
11746 class="cmtt-8"> </span><span
11747 class="cmtt-8"> 4)</span><span
11748 class="cmtt-8"> done</span>
11757 <h3 class="sectionHead"><span class="titlemark">9 </span> <a
11759 <!--l. 6--><p class="noindent" >
11760 <h4 class="subsectionHead"><span class="titlemark">9.1 </span> <a
11762 <!--l. 8--><p class="noindent" >The equations below are used in multiple places by the Vorbis codec…
11765 <!--l. 13--><p class="noindent" >
11766 <h4 class="subsectionHead"><span class="titlemark">9.2 </span> <a
11768 <!--l. 15--><p class="noindent" >
11769 <h5 class="subsubsectionHead"><span class="titlemark">9.2.1 </span> <a
11771 <!--l. 17--><p class="noindent" >The ”ilog(x)” function returns the position number (1 …
11773 class="cmtt-12">[x]</span>. Values of <span
11774 class="cmtt-12">[x] </span>less than zero are defined to return
11776 <!--l. 20--><p class="noindent" >
11777 <div class="fancyvrb" id="fancyvrb44">
11780 class="cmr-6">1</span><span
11781 class="cmtt-8"> </span><span
11782 class="cmtt-8"> </span><span
11783 class="cmtt-8"> </span><span
11784 class="cmtt-8"> 1)</span><span
11785 class="cmtt-8"> [return_value]</span><span
11786 class="cmtt-8"> =</span><span
11787 class="cmtt-8"> 0;</span>
11788 <br class="fancyvrb" /><a
11790 class="cmr-6">2</span><span
11791 class="cmtt-8"> </span><span
11792 class="cmtt-8"> </span><span
11793 class="cmtt-8"> </span><span
11794 class="cmtt-8"> 2)</span><span
11795 class="cmtt-8"> if</span><span
11796 class="cmtt-8"> (</span><span
11797 class="cmtt-8"> [x]</span><span
11798 class="cmtt-8"> is</span><span
11799 class="cmtt-8"> greater</span><span
11800 class="cmtt-8"> than</span><span
11801 class="cmtt-8"> zero</span><span
11802 class="cmtt-8"> )</span><span
11803 class="cmtt-8"> {</span>
11804 <br class="fancyvrb" /><a
11806 class="cmr-6">3</span><span
11807 class="cmtt-8"> </span><span
11808 class="cmtt-8"> </span>
11809 <br class="fancyvrb" /><a
11811 class="cmr-6">4</span><span
11812 class="cmtt-8"> </span><span
11813 class="cmtt-8"> </span><span
11814 class="cmtt-8"> </span><span
11815 class="cmtt-8"> </span><span
11816 class="cmtt-8"> </span><span
11817 class="cmtt-8"> </span><span
11818 class="cmtt-8"> </span><span
11819 class="cmtt-8"> </span><span
11820 class="cmtt-8"> 3)</span><span
11821 class="cmtt-8"> increment</span><span
11822 class="cmtt-8"> [return_value];</span>
11823 <br class="fancyvrb" /><a
11825 class="cmr-6">5</span><span
11826 class="cmtt-8"> </span><span
11827 class="cmtt-8"> </span><span
11828 class="cmtt-8"> </span><span
11829 class="cmtt-8"> </span><span
11830 class="cmtt-8"> </span><span
11831 class="cmtt-8"> </span><span
11832 class="cmtt-8"> </span><span
11833 class="cmtt-8"> </span><span
11834 class="cmtt-8"> 4)</span><span
11835 class="cmtt-8"> logical</span><span
11836 class="cmtt-8"> shift</span><span
11837 class="cmtt-8"> [x]</span><span
11838 class="cmtt-8"> one</span><span
11839 class="cmtt-8"> bit</span><span
11840 class="cmtt-8"> to</span><span
11841 class="cmtt-8"> the</span><span
11842 class="cmtt-8"> right,</span><span
11843 class="cmtt-8"> padding</span><span
11844 class="cmtt-8"> the</span><span
11845 class="cmtt-8"> MSb</span><span
11846 class="cmtt-8"> with</span><span
11847 class="cmtt-8"> zero</span>
11848 <br class="fancyvrb" /><a
11850 class="cmr-6">6</span><span
11851 class="cmtt-8"> </span><span
11852 class="cmtt-8"> </span><span
11853 class="cmtt-8"> </span><span
11854 class="cmtt-8"> </span><span
11855 class="cmtt-8"> </span><span
11856 class="cmtt-8"> </span><span
11857 class="cmtt-8"> </span><span
11858 class="cmtt-8"> </span><span
11859 class="cmtt-8"> 5)</span><span
11860 class="cmtt-8"> repeat</span><span
11861 class="cmtt-8"> at</span><span
11862 class="cmtt-8"> step</span><span
11863 class="cmtt-8"> 2)</span>
11864 <br class="fancyvrb" /><a
11866 class="cmr-6">7</span><span
11867 class="cmtt-8"> </span><span
11868 class="cmtt-8"> </span>
11869 <br class="fancyvrb" /><a
11871 class="cmr-6">8</span><span
11872 class="cmtt-8"> </span><span
11873 class="cmtt-8"> </span><span
11874 class="cmtt-8"> </span><span
11875 class="cmtt-8"> </span><span
11876 class="cmtt-8"> </span><span
11877 class="cmtt-8"> </span><span
11878 class="cmtt-8"> }</span>
11879 <br class="fancyvrb" /><a
11881 class="cmr-6">9</span><span
11882 class="cmtt-8"> </span><span
11883 class="cmtt-8"> </span>
11884 <br class="fancyvrb" /><a
11886 class="cmr-6">10</span><span
11887 class="cmtt-8"> </span><span
11888 class="cmtt-8"> </span><span
11889 class="cmtt-8"> </span><span
11890 class="cmtt-8"> </span><span
11891 class="cmtt-8"> 6)</span><span
11892 class="cmtt-8"> done</span>
11897 <!--l. 33--><p class="noindent" >Examples:
11898 <ul class="itemize1">
11899 <li class="itemize">ilog(0) = 0;
11901 <li class="itemize">ilog(1) = 1;
11903 <li class="itemize">ilog(2) = 2;
11905 <li class="itemize">ilog(3) = 2;
11907 <li class="itemize">ilog(4) = 3;
11909 <li class="itemize">ilog(7) = 3;
11911 <li class="itemize">ilog(negative number) = 0;</li></ul>
11912 <!--l. 48--><p class="noindent" >
11913 <h5 class="subsubsectionHead"><span class="titlemark">9.2.2 </span> <a
11915 <!--l. 50--><p class="noindent" >”float32˙unpack(x)” is intended to translate th…
11919 <!--l. 56--><p class="noindent" >
11920 <div class="fancyvrb" id="fancyvrb45">
11923 class="cmr-6">1</span><span
11924 class="cmtt-8"> </span><span
11925 class="cmtt-8"> </span><span
11926 class="cmtt-8"> </span><span
11927 class="cmtt-8"> 1)</span><span
11928 class="cmtt-8"> [mantissa]</span><span
11929 class="cmtt-8"> =</span><span
11930 class="cmtt-8"> [x]</span><span
11931 class="cmtt-8"> bitwise</span><span
11932 class="cmtt-8"> AND</span><span
11933 class="cmtt-8"> 0x1fffff</span><span
11934 class="cmtt-8"> (unsigned</span><span
11935 class="cmtt-8"> result)</span>
11936 <br class="fancyvrb" /><a
11938 class="cmr-6">2</span><span
11939 class="cmtt-8"> </span><span
11940 class="cmtt-8"> </span><span
11941 class="cmtt-8"> </span><span
11942 class="cmtt-8"> 2)</span><span
11943 class="cmtt-8"> [sign]</span><span
11944 class="cmtt-8"> =</span><span
11945 class="cmtt-8"> [x]</span><span
11946 class="cmtt-8"> bitwise</span><span
11947 class="cmtt-8"> AND</span><span
11948 class="cmtt-8"> 0x80000000</span><span
11949 class="cmtt-8"> (unsigned</span><span
11950 class="cmtt-8"> result)</span>
11951 <br class="fancyvrb" /><a
11953 class="cmr-6">3</span><span
11954 class="cmtt-8"> </span><span
11955 class="cmtt-8"> </span><span
11956 class="cmtt-8"> </span><span
11957 class="cmtt-8"> 3)</span><span
11958 class="cmtt-8"> [exponent]</span><span
11959 class="cmtt-8"> =</span><span
11960 class="cmtt-8"> (</span><span
11961 class="cmtt-8"> [x]</span><span
11962 class="cmtt-8"> bitwise</span><span
11963 class="cmtt-8"> AND</span><span
11964 class="cmtt-8"> 0x7fe00000)</span><span
11965 class="cmtt-8"> shifted</span><span
11966 class="cmtt-8"> right</span><span
11967 class="cmtt-8"> 21</span><span
11968 class="cmtt-8"> bits</span><span
11969 class="cmtt-8"> (unsigned</span><span
11970 class="cmtt-8"> result)</span>
11971 <br class="fancyvrb" /><a
11973 class="cmr-6">4</span><span
11974 class="cmtt-8"> </span><span
11975 class="cmtt-8"> </span><span
11976 class="cmtt-8"> </span><span
11977 class="cmtt-8"> 4)</span><span
11978 class="cmtt-8"> if</span><span
11979 class="cmtt-8"> (</span><span
11980 class="cmtt-8"> [sign]</span><span
11981 class="cmtt-8"> is</span><span
11982 class="cmtt-8"> nonzero</span><span
11983 class="cmtt-8"> )</span><span
11984 class="cmtt-8"> then</span><span
11985 class="cmtt-8"> negate</span><span
11986 class="cmtt-8"> [mantissa]</span>
11987 <br class="fancyvrb" /><a
11989 class="cmr-6">5</span><span
11990 class="cmtt-8"> </span><span
11991 class="cmtt-8"> </span><span
11992 class="cmtt-8"> </span><span
11993 class="cmtt-8"> 5)</span><span
11994 class="cmtt-8"> return</span><span
11995 class="cmtt-8"> [mantissa]</span><span
11996 class="cmtt-8"> *</span><span
11997 class="cmtt-8"> (</span><span
11998 class="cmtt-8"> 2</span><span
11999 class="cmtt-8"> ^</span><span
12000 class="cmtt-8"> (</span><span
12001 class="cmtt-8"> [exponent]</span><span
12002 class="cmtt-8"> -</span><span
12003 class="cmtt-8"> 788</span><span
12004 class="cmtt-8"> )</span><span
12005 class="cmtt-8"> )</span>
12010 <!--l. 66--><p class="noindent" >
12011 <h5 class="subsubsectionHead"><span class="titlemark">9.2.3 </span> <a
12013 <!--l. 68--><p class="noindent" >”lookup1˙values(codebook˙entries,codebook…
12016 class="cmtt-12">[codebook_entries]</span>.
12017 <!--l. 74--><p class="noindent" >The return value for this function is defined to be ’the gre…
12019 class="cmtt-12">[return_value] </span>to the power of <span
12020 class="cmtt-12">[codebook_dimensions] </span>is less than or equal to
12022 class="cmtt-12">[codebook_entries]</span>’.
12023 <!--l. 81--><p class="noindent" >
12024 <h5 class="subsubsectionHead"><span class="titlemark">9.2.4 </span> <a
12026 <!--l. 83--><p class="noindent" >”low˙neighbor(v,x)” finds the position <span
12027 class="cmtt-12">n </span>in vector <span
12028 class="cmtt-12">[v] </span>of the greatest value scalar element for
12030 class="cmtt-12">n </span>is less than <span
12031 class="cmtt-12">[x] </span>and vector <span
12032 class="cmtt-12">[v] </span>element <span
12033 class="cmtt-12">n </span>is less than vector <span
12034 class="cmtt-12">[v] </span>element
12036 class="cmtt-12">[x]</span>.
12037 <!--l. 88--><p class="noindent" >
12038 <h5 class="subsubsectionHead"><span class="titlemark">9.2.5 </span> <a
12040 <!--l. 90--><p class="noindent" >”high˙neighbor(v,x)” finds the position <span
12041 class="cmtt-12">n </span>in vector [v] of the lowest value scalar element for
12043 class="cmtt-12">n </span>is less than <span
12044 class="cmtt-12">[x] </span>and vector <span
12045 class="cmtt-12">[v] </span>element <span
12046 class="cmtt-12">n </span>is greater than vector <span
12047 class="cmtt-12">[v] </span>element
12049 class="cmtt-12">[x]</span>.
12050 <!--l. 97--><p class="noindent" >
12051 <h5 class="subsubsectionHead"><span class="titlemark">9.2.6 </span> <a
12053 <!--l. 99--><p class="noindent" >”render˙point(x0,y0,x1,y1,X)” is used to find t…
12056 <!--l. 104--><p class="noindent" >
12060 <div class="fancyvrb" id="fancyvrb46">
12063 class="cmr-6">1</span><span
12064 class="cmtt-8"> </span><span
12065 class="cmtt-8"> </span><span
12066 class="cmtt-8"> </span><span
12067 class="cmtt-8"> 1)</span><span
12068 class="cmtt-8"> </span><span
12069 class="cmtt-8"> [dy]</span><span
12070 class="cmtt-8"> =</span><span
12071 class="cmtt-8"> [y1]</span><span
12072 class="cmtt-8"> -</span><span
12073 class="cmtt-8"> [y0]</span>
12074 <br class="fancyvrb" /><a
12076 class="cmr-6">2</span><span
12077 class="cmtt-8"> </span><span
12078 class="cmtt-8"> </span><span
12079 class="cmtt-8"> </span><span
12080 class="cmtt-8"> 2)</span><span
12081 class="cmtt-8"> [adx]</span><span
12082 class="cmtt-8"> =</span><span
12083 class="cmtt-8"> [x1]</span><span
12084 class="cmtt-8"> -</span><span
12085 class="cmtt-8"> [x0]</span>
12086 <br class="fancyvrb" /><a
12088 class="cmr-6">3</span><span
12089 class="cmtt-8"> </span><span
12090 class="cmtt-8"> </span><span
12091 class="cmtt-8"> </span><span
12092 class="cmtt-8"> 3)</span><span
12093 class="cmtt-8"> [ady]</span><span
12094 class="cmtt-8"> =</span><span
12095 class="cmtt-8"> absolute</span><span
12096 class="cmtt-8"> value</span><span
12097 class="cmtt-8"> of</span><span
12098 class="cmtt-8"> [dy]</span>
12099 <br class="fancyvrb" /><a
12101 class="cmr-6">4</span><span
12102 class="cmtt-8"> </span><span
12103 class="cmtt-8"> </span><span
12104 class="cmtt-8"> </span><span
12105 class="cmtt-8"> 4)</span><span
12106 class="cmtt-8"> [err]</span><span
12107 class="cmtt-8"> =</span><span
12108 class="cmtt-8"> [ady]</span><span
12109 class="cmtt-8"> *</span><span
12110 class="cmtt-8"> ([X]</span><span
12111 class="cmtt-8"> -</span><span
12112 class="cmtt-8"> [x0])</span>
12113 <br class="fancyvrb" /><a
12115 class="cmr-6">5</span><span
12116 class="cmtt-8"> </span><span
12117 class="cmtt-8"> </span><span
12118 class="cmtt-8"> </span><span
12119 class="cmtt-8"> 5)</span><span
12120 class="cmtt-8"> [off]</span><span
12121 class="cmtt-8"> =</span><span
12122 class="cmtt-8"> [err]</span><span
12123 class="cmtt-8"> /</span><span
12124 class="cmtt-8"> [adx]</span><span
12125 class="cmtt-8"> using</span><span
12126 class="cmtt-8"> integer</span><span
12127 class="cmtt-8"> division</span>
12128 <br class="fancyvrb" /><a
12130 class="cmr-6">6</span><span
12131 class="cmtt-8"> </span><span
12132 class="cmtt-8"> </span><span
12133 class="cmtt-8"> </span><span
12134 class="cmtt-8"> 6)</span><span
12135 class="cmtt-8"> if</span><span
12136 class="cmtt-8"> (</span><span
12137 class="cmtt-8"> [dy]</span><span
12138 class="cmtt-8"> is</span><span
12139 class="cmtt-8"> less</span><span
12140 class="cmtt-8"> than</span><span
12141 class="cmtt-8"> zero</span><span
12142 class="cmtt-8"> )</span><span
12143 class="cmtt-8"> {</span>
12144 <br class="fancyvrb" /><a
12146 class="cmr-6">7</span><span
12147 class="cmtt-8"> </span><span
12148 class="cmtt-8"> </span>
12149 <br class="fancyvrb" /><a
12151 class="cmr-6">8</span><span
12152 class="cmtt-8"> </span><span
12153 class="cmtt-8"> </span><span
12154 class="cmtt-8"> </span><span
12155 class="cmtt-8"> </span><span
12156 class="cmtt-8"> </span><span
12157 class="cmtt-8"> </span><span
12158 class="cmtt-8"> </span><span
12159 class="cmtt-8"> </span><span
12160 class="cmtt-8"> 7)</span><span
12161 class="cmtt-8"> [Y]</span><span
12162 class="cmtt-8"> =</span><span
12163 class="cmtt-8"> [y0]</span><span
12164 class="cmtt-8"> -</span><span
12165 class="cmtt-8"> [off]</span>
12166 <br class="fancyvrb" /><a
12168 class="cmr-6">9</span><span
12169 class="cmtt-8"> </span><span
12170 class="cmtt-8"> </span>
12171 <br class="fancyvrb" /><a
12173 class="cmr-6">10</span><span
12174 class="cmtt-8"> </span><span
12175 class="cmtt-8"> </span><span
12176 class="cmtt-8"> </span><span
12177 class="cmtt-8"> </span><span
12178 class="cmtt-8"> </span><span
12179 class="cmtt-8"> </span><span
12180 class="cmtt-8"> }</span><span
12181 class="cmtt-8"> else</span><span
12182 class="cmtt-8"> {</span>
12183 <br class="fancyvrb" /><a
12185 class="cmr-6">11</span><span
12186 class="cmtt-8"> </span><span
12187 class="cmtt-8"> </span>
12188 <br class="fancyvrb" /><a
12190 class="cmr-6">12</span><span
12191 class="cmtt-8"> </span><span
12192 class="cmtt-8"> </span><span
12193 class="cmtt-8"> </span><span
12194 class="cmtt-8"> </span><span
12195 class="cmtt-8"> </span><span
12196 class="cmtt-8"> </span><span
12197 class="cmtt-8"> </span><span
12198 class="cmtt-8"> </span><span
12199 class="cmtt-8"> 8)</span><span
12200 class="cmtt-8"> [Y]</span><span
12201 class="cmtt-8"> =</span><span
12202 class="cmtt-8"> [y0]</span><span
12203 class="cmtt-8"> +</span><span
12204 class="cmtt-8"> [off]</span>
12205 <br class="fancyvrb" /><a
12207 class="cmr-6">13</span><span
12208 class="cmtt-8"> </span><span
12209 class="cmtt-8"> </span>
12210 <br class="fancyvrb" /><a
12212 class="cmr-6">14</span><span
12213 class="cmtt-8"> </span><span
12214 class="cmtt-8"> </span><span
12215 class="cmtt-8"> </span><span
12216 class="cmtt-8"> </span><span
12217 class="cmtt-8"> </span><span
12218 class="cmtt-8"> </span><span
12219 class="cmtt-8"> }</span>
12220 <br class="fancyvrb" /><a
12222 class="cmr-6">15</span><span
12223 class="cmtt-8"> </span><span
12224 class="cmtt-8"> </span>
12225 <br class="fancyvrb" /><a
12227 class="cmr-6">16</span><span
12228 class="cmtt-8"> </span><span
12229 class="cmtt-8"> </span><span
12230 class="cmtt-8"> </span><span
12231 class="cmtt-8"> 9)</span><span
12232 class="cmtt-8"> done</span>
12234 <!--l. 125--><p class="noindent" >
12235 <h5 class="subsubsectionHead"><span class="titlemark">9.2.7 </span> <a
12237 <!--l. 127--><p class="noindent" >Floor decode type one uses the integer line drawing algorithm of …
12241 <!--l. 134--><p class="noindent" >
12242 <div class="fancyvrb" id="fancyvrb47">
12245 class="cmr-6">1</span><span
12246 class="cmtt-8"> </span><span
12247 class="cmtt-8"> </span><span
12248 class="cmtt-8"> </span><span
12249 class="cmtt-8"> 1)</span><span
12250 class="cmtt-8"> </span><span
12251 class="cmtt-8"> </span><span
12252 class="cmtt-8"> [dy]</span><span
12253 class="cmtt-8"> =</span><span
12254 class="cmtt-8"> [y1]</span><span
12255 class="cmtt-8"> -</span><span
12256 class="cmtt-8"> [y0]</span>
12257 <br class="fancyvrb" /><a
12259 class="cmr-6">2</span><span
12260 class="cmtt-8"> </span><span
12261 class="cmtt-8"> </span><span
12262 class="cmtt-8"> </span><span
12263 class="cmtt-8"> 2)</span><span
12264 class="cmtt-8"> </span><span
12265 class="cmtt-8"> [adx]</span><span
12266 class="cmtt-8"> =</span><span
12267 class="cmtt-8"> [x1]</span><span
12268 class="cmtt-8"> -</span><span
12269 class="cmtt-8"> [x0]</span>
12270 <br class="fancyvrb" /><a
12272 class="cmr-6">3</span><span
12273 class="cmtt-8"> </span><span
12274 class="cmtt-8"> </span><span
12275 class="cmtt-8"> </span><span
12276 class="cmtt-8"> 3)</span><span
12277 class="cmtt-8"> </span><span
12278 class="cmtt-8"> [ady]</span><span
12279 class="cmtt-8"> =</span><span
12280 class="cmtt-8"> absolute</span><span
12281 class="cmtt-8"> value</span><span
12282 class="cmtt-8"> of</span><span
12283 class="cmtt-8"> [dy]</span>
12284 <br class="fancyvrb" /><a
12286 class="cmr-6">4</span><span
12287 class="cmtt-8"> </span><span
12288 class="cmtt-8"> </span><span
12289 class="cmtt-8"> </span><span
12290 class="cmtt-8"> 4)</span><span
12291 class="cmtt-8"> [base]</span><span
12292 class="cmtt-8"> =</span><span
12293 class="cmtt-8"> [dy]</span><span
12294 class="cmtt-8"> /</span><span
12295 class="cmtt-8"> [adx]</span><span
12296 class="cmtt-8"> using</span><span
12297 class="cmtt-8"> integer</span><span
12298 class="cmtt-8"> division</span>
12299 <br class="fancyvrb" /><a
12301 class="cmr-6">5</span><span
12302 class="cmtt-8"> </span><span
12303 class="cmtt-8"> </span><span
12304 class="cmtt-8"> </span><span
12305 class="cmtt-8"> 5)</span><span
12306 class="cmtt-8"> </span><span
12307 class="cmtt-8"> </span><span
12308 class="cmtt-8"> </span><span
12309 class="cmtt-8"> [x]</span><span
12310 class="cmtt-8"> =</span><span
12311 class="cmtt-8"> [x0]</span>
12312 <br class="fancyvrb" /><a
12314 class="cmr-6">6</span><span
12315 class="cmtt-8"> </span><span
12316 class="cmtt-8"> </span><span
12317 class="cmtt-8"> </span><span
12318 class="cmtt-8"> 6)</span><span
12319 class="cmtt-8"> </span><span
12320 class="cmtt-8"> </span><span
12321 class="cmtt-8"> </span><span
12322 class="cmtt-8"> [y]</span><span
12323 class="cmtt-8"> =</span><span
12324 class="cmtt-8"> [y0]</span>
12325 <br class="fancyvrb" /><a
12327 class="cmr-6">7</span><span
12328 class="cmtt-8"> </span><span
12329 class="cmtt-8"> </span><span
12330 class="cmtt-8"> </span><span
12331 class="cmtt-8"> 7)</span><span
12332 class="cmtt-8"> </span><span
12333 class="cmtt-8"> [err]</span><span
12334 class="cmtt-8"> =</span><span
12335 class="cmtt-8"> 0</span>
12336 <br class="fancyvrb" /><a
12338 class="cmr-6">8</span><span
12339 class="cmtt-8"> </span><span
12340 class="cmtt-8"> </span>
12341 <br class="fancyvrb" /><a
12343 class="cmr-6">9</span><span
12344 class="cmtt-8"> </span><span
12345 class="cmtt-8"> </span><span
12346 class="cmtt-8"> </span><span
12347 class="cmtt-8"> 8)</span><span
12348 class="cmtt-8"> if</span><span
12349 class="cmtt-8"> (</span><span
12350 class="cmtt-8"> [dy]</span><span
12351 class="cmtt-8"> is</span><span
12352 class="cmtt-8"> less</span><span
12353 class="cmtt-8"> than</span><span
12354 class="cmtt-8"> 0</span><span
12355 class="cmtt-8"> )</span><span
12356 class="cmtt-8"> {</span>
12357 <br class="fancyvrb" /><a
12359 class="cmr-6">10</span><span
12360 class="cmtt-8"> </span><span
12361 class="cmtt-8"> </span>
12362 <br class="fancyvrb" /><a
12364 class="cmr-6">11</span><span
12365 class="cmtt-8"> </span><span
12366 class="cmtt-8"> </span><span
12367 class="cmtt-8"> </span><span
12368 class="cmtt-8"> </span><span
12369 class="cmtt-8"> </span><span
12370 class="cmtt-8"> </span><span
12371 class="cmtt-8"> </span><span
12372 class="cmtt-8"> </span><span
12373 class="cmtt-8"> </span><span
12374 class="cmtt-8"> 9)</span><span
12375 class="cmtt-8"> [sy]</span><span
12376 class="cmtt-8"> =</span><span
12377 class="cmtt-8"> [base]</span><span
12378 class="cmtt-8"> -</span><span
12379 class="cmtt-8"> 1</span>
12380 <br class="fancyvrb" /><a
12382 class="cmr-6">12</span><span
12383 class="cmtt-8"> </span><span
12384 class="cmtt-8"> </span>
12385 <br class="fancyvrb" /><a
12387 class="cmr-6">13</span><span
12388 class="cmtt-8"> </span><span
12389 class="cmtt-8"> </span><span
12390 class="cmtt-8"> </span><span
12391 class="cmtt-8"> </span><span
12392 class="cmtt-8"> </span><span
12393 class="cmtt-8"> </span><span
12394 class="cmtt-8"> }</span><span
12395 class="cmtt-8"> else</span><span
12396 class="cmtt-8"> {</span>
12397 <br class="fancyvrb" /><a
12399 class="cmr-6">14</span><span
12400 class="cmtt-8"> </span><span
12401 class="cmtt-8"> </span>
12402 <br class="fancyvrb" /><a
12404 class="cmr-6">15</span><span
12405 class="cmtt-8"> </span><span
12406 class="cmtt-8"> </span><span
12407 class="cmtt-8"> </span><span
12408 class="cmtt-8"> </span><span
12409 class="cmtt-8"> </span><span
12410 class="cmtt-8"> </span><span
12411 class="cmtt-8"> </span><span
12412 class="cmtt-8"> </span><span
12413 class="cmtt-8"> 10)</span><span
12414 class="cmtt-8"> [sy]</span><span
12415 class="cmtt-8"> =</span><span
12416 class="cmtt-8"> [base]</span><span
12417 class="cmtt-8"> +</span><span
12418 class="cmtt-8"> 1</span>
12419 <br class="fancyvrb" /><a
12421 class="cmr-6">16</span><span
12422 class="cmtt-8"> </span><span
12423 class="cmtt-8"> </span>
12424 <br class="fancyvrb" /><a
12426 class="cmr-6">17</span><span
12427 class="cmtt-8"> </span><span
12428 class="cmtt-8"> </span><span
12429 class="cmtt-8"> </span><span
12430 class="cmtt-8"> </span><span
12431 class="cmtt-8"> </span><span
12432 class="cmtt-8"> </span><span
12433 class="cmtt-8"> }</span>
12434 <br class="fancyvrb" /><a
12436 class="cmr-6">18</span><span
12437 class="cmtt-8"> </span><span
12438 class="cmtt-8"> </span>
12439 <br class="fancyvrb" /><a
12441 class="cmr-6">19</span><span
12442 class="cmtt-8"> </span><span
12443 class="cmtt-8"> </span><span
12444 class="cmtt-8"> 11)</span><span
12445 class="cmtt-8"> [ady]</span><span
12446 class="cmtt-8"> =</span><span
12447 class="cmtt-8"> [ady]</span><span
12448 class="cmtt-8"> -</span><span
12449 class="cmtt-8"> (absolute</span><span
12450 class="cmtt-8"> value</span><span
12451 class="cmtt-8"> of</span><span
12452 class="cmtt-8"> [base])</span><span
12453 class="cmtt-8"> *</span><span
12454 class="cmtt-8"> [adx]</span>
12455 <br class="fancyvrb" /><a
12457 class="cmr-6">20</span><span
12458 class="cmtt-8"> </span><span
12459 class="cmtt-8"> </span><span
12460 class="cmtt-8"> 12)</span><span
12461 class="cmtt-8"> vector</span><span
12462 class="cmtt-8"> [v]</span><span
12463 class="cmtt-8"> element</span><span
12464 class="cmtt-8"> [x]</span><span
12465 class="cmtt-8"> =</span><span
12466 class="cmtt-8"> [y]</span>
12467 <br class="fancyvrb" /><a
12469 class="cmr-6">21</span><span
12470 class="cmtt-8"> </span><span
12471 class="cmtt-8"> </span>
12472 <br class="fancyvrb" /><a
12474 class="cmr-6">22</span><span
12475 class="cmtt-8"> </span><span
12476 class="cmtt-8"> </span><span
12477 class="cmtt-8"> 13)</span><span
12478 class="cmtt-8"> iterate</span><span
12479 class="cmtt-8"> [x]</span><span
12480 class="cmtt-8"> over</span><span
12481 class="cmtt-8"> the</span><span
12482 class="cmtt-8"> range</span><span
12483 class="cmtt-8"> [x0]+1</span><span
12484 class="cmtt-8"> ...</span><span
12485 class="cmtt-8"> [x1]-1</span><span
12486 class="cmtt-8"> {</span>
12487 <br class="fancyvrb" /><a
12489 class="cmr-6">23</span><span
12490 class="cmtt-8"> </span><span
12491 class="cmtt-8"> </span>
12492 <br class="fancyvrb" /><a
12494 class="cmr-6">24</span><span
12495 class="cmtt-8"> </span><span
12496 class="cmtt-8"> </span><span
12497 class="cmtt-8"> </span><span
12498 class="cmtt-8"> </span><span
12499 class="cmtt-8"> </span><span
12500 class="cmtt-8"> </span><span
12501 class="cmtt-8"> </span><span
12502 class="cmtt-8"> </span><span
12503 class="cmtt-8"> 14)</span><span
12504 class="cmtt-8"> [err]</span><span
12505 class="cmtt-8"> =</span><span
12506 class="cmtt-8"> [err]</span><span
12507 class="cmtt-8"> +</span><span
12508 class="cmtt-8"> [ady];</span>
12512 <br class="fancyvrb" /><a
12514 class="cmr-6">25</span><span
12515 class="cmtt-8"> </span><span
12516 class="cmtt-8"> </span><span
12517 class="cmtt-8"> </span><span
12518 class="cmtt-8"> </span><span
12519 class="cmtt-8"> </span><span
12520 class="cmtt-8"> </span><span
12521 class="cmtt-8"> </span><span
12522 class="cmtt-8"> </span><span
12523 class="cmtt-8"> 15)</span><span
12524 class="cmtt-8"> if</span><span
12525 class="cmtt-8"> (</span><span
12526 class="cmtt-8"> [err]</span><span
12527 class="cmtt-8"> >=</span><span
12528 class="cmtt-8"> [adx]</span><span
12529 class="cmtt-8"> )</span><span
12530 class="cmtt-8"> {</span>
12531 <br class="fancyvrb" /><a
12533 class="cmr-6">26</span><span
12534 class="cmtt-8"> </span><span
12535 class="cmtt-8"> </span>
12536 <br class="fancyvrb" /><a
12538 class="cmr-6">27</span><span
12539 class="cmtt-8"> </span><span
12540 class="cmtt-8"> </span><span
12541 class="cmtt-8"> </span><span
12542 class="cmtt-8"> </span><span
12543 class="cmtt-8"> </span><span
12544 class="cmtt-8"> </span><span
12545 class="cmtt-8"> </span><span
12546 class="cmtt-8"> </span><span
12547 class="cmtt-8"> </span><span
12548 class="cmtt-8"> </span><span
12549 class="cmtt-8"> </span><span
12550 class="cmtt-8"> </span><span
12551 class="cmtt-8"> </span><span
12552 class="cmtt-8"> </span><span
12553 class="cmtt-8"> 16)</span><span
12554 class="cmtt-8"> [err]</span><span
12555 class="cmtt-8"> =</span><span
12556 class="cmtt-8"> [err]</span><span
12557 class="cmtt-8"> -</span><span
12558 class="cmtt-8"> [adx]</span>
12559 <br class="fancyvrb" /><a
12561 class="cmr-6">28</span><span
12562 class="cmtt-8"> </span><span
12563 class="cmtt-8"> </span><span
12564 class="cmtt-8"> </span><span
12565 class="cmtt-8"> </span><span
12566 class="cmtt-8"> </span><span
12567 class="cmtt-8"> </span><span
12568 class="cmtt-8"> </span><span
12569 class="cmtt-8"> </span><span
12570 class="cmtt-8"> </span><span
12571 class="cmtt-8"> </span><span
12572 class="cmtt-8"> </span><span
12573 class="cmtt-8"> </span><span
12574 class="cmtt-8"> </span><span
12575 class="cmtt-8"> </span><span
12576 class="cmtt-8"> 17)</span><span
12577 class="cmtt-8"> </span><span
12578 class="cmtt-8"> </span><span
12579 class="cmtt-8"> [y]</span><span
12580 class="cmtt-8"> =</span><span
12581 class="cmtt-8"> [y]</span><span
12582 class="cmtt-8"> +</span><span
12583 class="cmtt-8"> [sy]</span>
12584 <br class="fancyvrb" /><a
12586 class="cmr-6">29</span><span
12587 class="cmtt-8"> </span><span
12588 class="cmtt-8"> </span>
12589 <br class="fancyvrb" /><a
12591 class="cmr-6">30</span><span
12592 class="cmtt-8"> </span><span
12593 class="cmtt-8"> </span><span
12594 class="cmtt-8"> </span><span
12595 class="cmtt-8"> </span><span
12596 class="cmtt-8"> </span><span
12597 class="cmtt-8"> </span><span
12598 class="cmtt-8"> </span><span
12599 class="cmtt-8"> </span><span
12600 class="cmtt-8"> </span><span
12601 class="cmtt-8"> </span><span
12602 class="cmtt-8"> </span><span
12603 class="cmtt-8"> </span><span
12604 class="cmtt-8"> }</span><span
12605 class="cmtt-8"> else</span><span
12606 class="cmtt-8"> {</span>
12607 <br class="fancyvrb" /><a
12609 class="cmr-6">31</span><span
12610 class="cmtt-8"> </span><span
12611 class="cmtt-8"> </span>
12612 <br class="fancyvrb" /><a
12614 class="cmr-6">32</span><span
12615 class="cmtt-8"> </span><span
12616 class="cmtt-8"> </span><span
12617 class="cmtt-8"> </span><span
12618 class="cmtt-8"> </span><span
12619 class="cmtt-8"> </span><span
12620 class="cmtt-8"> </span><span
12621 class="cmtt-8"> </span><span
12622 class="cmtt-8"> </span><span
12623 class="cmtt-8"> </span><span
12624 class="cmtt-8"> </span><span
12625 class="cmtt-8"> </span><span
12626 class="cmtt-8"> </span><span
12627 class="cmtt-8"> </span><span
12628 class="cmtt-8"> </span><span
12629 class="cmtt-8"> 18)</span><span
12630 class="cmtt-8"> [y]</span><span
12631 class="cmtt-8"> =</span><span
12632 class="cmtt-8"> [y]</span><span
12633 class="cmtt-8"> +</span><span
12634 class="cmtt-8"> [base]</span>
12635 <br class="fancyvrb" /><a
12637 class="cmr-6">33</span><span
12638 class="cmtt-8"> </span><span
12639 class="cmtt-8"> </span>
12640 <br class="fancyvrb" /><a
12642 class="cmr-6">34</span><span
12643 class="cmtt-8"> </span><span
12644 class="cmtt-8"> </span><span
12645 class="cmtt-8"> </span><span
12646 class="cmtt-8"> </span><span
12647 class="cmtt-8"> </span><span
12648 class="cmtt-8"> </span><span
12649 class="cmtt-8"> </span><span
12650 class="cmtt-8"> </span><span
12651 class="cmtt-8"> </span><span
12652 class="cmtt-8"> </span><span
12653 class="cmtt-8"> </span><span
12654 class="cmtt-8"> </span><span
12655 class="cmtt-8"> }</span>
12656 <br class="fancyvrb" /><a
12658 class="cmr-6">35</span><span
12659 class="cmtt-8"> </span><span
12660 class="cmtt-8"> </span>
12661 <br class="fancyvrb" /><a
12663 class="cmr-6">36</span><span
12664 class="cmtt-8"> </span><span
12665 class="cmtt-8"> </span><span
12666 class="cmtt-8"> </span><span
12667 class="cmtt-8"> </span><span
12668 class="cmtt-8"> </span><span
12669 class="cmtt-8"> </span><span
12670 class="cmtt-8"> </span><span
12671 class="cmtt-8"> </span><span
12672 class="cmtt-8"> 19)</span><span
12673 class="cmtt-8"> vector</span><span
12674 class="cmtt-8"> [v]</span><span
12675 class="cmtt-8"> element</span><span
12676 class="cmtt-8"> [x]</span><span
12677 class="cmtt-8"> =</span><span
12678 class="cmtt-8"> [y]</span>
12679 <br class="fancyvrb" /><a
12681 class="cmr-6">37</span><span
12682 class="cmtt-8"> </span><span
12683 class="cmtt-8"> </span>
12684 <br class="fancyvrb" /><a
12686 class="cmr-6">38</span><span
12687 class="cmtt-8"> </span><span
12688 class="cmtt-8"> </span><span
12689 class="cmtt-8"> </span><span
12690 class="cmtt-8"> </span><span
12691 class="cmtt-8"> </span><span
12692 class="cmtt-8"> </span><span
12693 class="cmtt-8"> }</span>
12701 <h3 class="sectionHead"><span class="titlemark">10 </span> <a
12703 <!--l. 6--><p class="noindent" >
12704 <h4 class="subsectionHead"><span class="titlemark">10.1 </span> <a
12706 <!--l. 8--><p class="noindent" >The vector <span
12707 class="cmtt-12">[floor1_inverse_dB_table] </span>is a 256 element static lookup table consiting of …
12709 <!--l. 12--><p class="noindent" >
12710 <div class="fancyvrb" id="fancyvrb48">
12713 class="cmr-6">1</span><span
12714 class="cmtt-8"> </span><span
12715 class="cmtt-8"> </span><span
12716 class="cmtt-8"> </span><span
12717 class="cmtt-8"> 1.0649863e-07,</span><span
12718 class="cmtt-8"> 1.1341951e-07,</span><span
12719 class="cmtt-8"> 1.2079015e-07,</span><span
12720 class="cmtt-8"> 1.2863978e-07,</span>
12721 <br class="fancyvrb" /><a
12723 class="cmr-6">2</span><span
12724 class="cmtt-8"> </span><span
12725 class="cmtt-8"> </span><span
12726 class="cmtt-8"> </span><span
12727 class="cmtt-8"> 1.3699951e-07,</span><span
12728 class="cmtt-8"> 1.4590251e-07,</span><span
12729 class="cmtt-8"> 1.5538408e-07,</span><span
12730 class="cmtt-8"> 1.6548181e-07,</span>
12731 <br class="fancyvrb" /><a
12733 class="cmr-6">3</span><span
12734 class="cmtt-8"> </span><span
12735 class="cmtt-8"> </span><span
12736 class="cmtt-8"> </span><span
12737 class="cmtt-8"> 1.7623575e-07,</span><span
12738 class="cmtt-8"> 1.8768855e-07,</span><span
12739 class="cmtt-8"> 1.9988561e-07,</span><span
12740 class="cmtt-8"> 2.1287530e-07,</span>
12741 <br class="fancyvrb" /><a
12743 class="cmr-6">4</span><span
12744 class="cmtt-8"> </span><span
12745 class="cmtt-8"> </span><span
12746 class="cmtt-8"> </span><span
12747 class="cmtt-8"> 2.2670913e-07,</span><span
12748 class="cmtt-8"> 2.4144197e-07,</span><span
12749 class="cmtt-8"> 2.5713223e-07,</span><span
12750 class="cmtt-8"> 2.7384213e-07,</span>
12751 <br class="fancyvrb" /><a
12753 class="cmr-6">5</span><span
12754 class="cmtt-8"> </span><span
12755 class="cmtt-8"> </span><span
12756 class="cmtt-8"> </span><span
12757 class="cmtt-8"> 2.9163793e-07,</span><span
12758 class="cmtt-8"> 3.1059021e-07,</span><span
12759 class="cmtt-8"> 3.3077411e-07,</span><span
12760 class="cmtt-8"> 3.5226968e-07,</span>
12761 <br class="fancyvrb" /><a
12763 class="cmr-6">6</span><span
12764 class="cmtt-8"> </span><span
12765 class="cmtt-8"> </span><span
12766 class="cmtt-8"> </span><span
12767 class="cmtt-8"> 3.7516214e-07,</span><span
12768 class="cmtt-8"> 3.9954229e-07,</span><span
12769 class="cmtt-8"> 4.2550680e-07,</span><span
12770 class="cmtt-8"> 4.5315863e-07,</span>
12771 <br class="fancyvrb" /><a
12773 class="cmr-6">7</span><span
12774 class="cmtt-8"> </span><span
12775 class="cmtt-8"> </span><span
12776 class="cmtt-8"> </span><span
12777 class="cmtt-8"> 4.8260743e-07,</span><span
12778 class="cmtt-8"> 5.1396998e-07,</span><span
12779 class="cmtt-8"> 5.4737065e-07,</span><span
12780 class="cmtt-8"> 5.8294187e-07,</span>
12781 <br class="fancyvrb" /><a
12783 class="cmr-6">8</span><span
12784 class="cmtt-8"> </span><span
12785 class="cmtt-8"> </span><span
12786 class="cmtt-8"> </span><span
12787 class="cmtt-8"> 6.2082472e-07,</span><span
12788 class="cmtt-8"> 6.6116941e-07,</span><span
12789 class="cmtt-8"> 7.0413592e-07,</span><span
12790 class="cmtt-8"> 7.4989464e-07,</span>
12791 <br class="fancyvrb" /><a
12793 class="cmr-6">9</span><span
12794 class="cmtt-8"> </span><span
12795 class="cmtt-8"> </span><span
12796 class="cmtt-8"> </span><span
12797 class="cmtt-8"> 7.9862701e-07,</span><span
12798 class="cmtt-8"> 8.5052630e-07,</span><span
12799 class="cmtt-8"> 9.0579828e-07,</span><span
12800 class="cmtt-8"> 9.6466216e-07,</span>
12801 <br class="fancyvrb" /><a
12803 class="cmr-6">10</span><span
12804 class="cmtt-8"> </span><span
12805 class="cmtt-8"> </span><span
12806 class="cmtt-8"> </span><span
12807 class="cmtt-8"> 1.0273513e-06,</span><span
12808 class="cmtt-8"> 1.0941144e-06,</span><span
12809 class="cmtt-8"> 1.1652161e-06,</span><span
12810 class="cmtt-8"> 1.2409384e-06,</span>
12811 <br class="fancyvrb" /><a
12813 class="cmr-6">11</span><span
12814 class="cmtt-8"> </span><span
12815 class="cmtt-8"> </span><span
12816 class="cmtt-8"> </span><span
12817 class="cmtt-8"> 1.3215816e-06,</span><span
12818 class="cmtt-8"> 1.4074654e-06,</span><span
12819 class="cmtt-8"> 1.4989305e-06,</span><span
12820 class="cmtt-8"> 1.5963394e-06,</span>
12821 <br class="fancyvrb" /><a
12823 class="cmr-6">12</span><span
12824 class="cmtt-8"> </span><span
12825 class="cmtt-8"> </span><span
12826 class="cmtt-8"> </span><span
12827 class="cmtt-8"> 1.7000785e-06,</span><span
12828 class="cmtt-8"> 1.8105592e-06,</span><span
12829 class="cmtt-8"> 1.9282195e-06,</span><span
12830 class="cmtt-8"> 2.0535261e-06,</span>
12831 <br class="fancyvrb" /><a
12833 class="cmr-6">13</span><span
12834 class="cmtt-8"> </span><span
12835 class="cmtt-8"> </span><span
12836 class="cmtt-8"> </span><span
12837 class="cmtt-8"> 2.1869758e-06,</span><span
12838 class="cmtt-8"> 2.3290978e-06,</span><span
12839 class="cmtt-8"> 2.4804557e-06,</span><span
12840 class="cmtt-8"> 2.6416497e-06,</span>
12841 <br class="fancyvrb" /><a
12843 class="cmr-6">14</span><span
12844 class="cmtt-8"> </span><span
12845 class="cmtt-8"> </span><span
12846 class="cmtt-8"> </span><span
12847 class="cmtt-8"> 2.8133190e-06,</span><span
12848 class="cmtt-8"> 2.9961443e-06,</span><span
12849 class="cmtt-8"> 3.1908506e-06,</span><span
12850 class="cmtt-8"> 3.3982101e-06,</span>
12851 <br class="fancyvrb" /><a
12853 class="cmr-6">15</span><span
12854 class="cmtt-8"> </span><span
12855 class="cmtt-8"> </span><span
12856 class="cmtt-8"> </span><span
12857 class="cmtt-8"> 3.6190449e-06,</span><span
12858 class="cmtt-8"> 3.8542308e-06,</span><span
12859 class="cmtt-8"> 4.1047004e-06,</span><span
12860 class="cmtt-8"> 4.3714470e-06,</span>
12861 <br class="fancyvrb" /><a
12863 class="cmr-6">16</span><span
12864 class="cmtt-8"> </span><span
12865 class="cmtt-8"> </span><span
12866 class="cmtt-8"> </span><span
12867 class="cmtt-8"> 4.6555282e-06,</span><span
12868 class="cmtt-8"> 4.9580707e-06,</span><span
12869 class="cmtt-8"> 5.2802740e-06,</span><span
12870 class="cmtt-8"> 5.6234160e-06,</span>
12871 <br class="fancyvrb" /><a
12873 class="cmr-6">17</span><span
12874 class="cmtt-8"> </span><span
12875 class="cmtt-8"> </span><span
12876 class="cmtt-8"> </span><span
12877 class="cmtt-8"> 5.9888572e-06,</span><span
12878 class="cmtt-8"> 6.3780469e-06,</span><span
12879 class="cmtt-8"> 6.7925283e-06,</span><span
12880 class="cmtt-8"> 7.2339451e-06,</span>
12881 <br class="fancyvrb" /><a
12883 class="cmr-6">18</span><span
12884 class="cmtt-8"> </span><span
12885 class="cmtt-8"> </span><span
12886 class="cmtt-8"> </span><span
12887 class="cmtt-8"> 7.7040476e-06,</span><span
12888 class="cmtt-8"> 8.2047000e-06,</span><span
12889 class="cmtt-8"> 8.7378876e-06,</span><span
12890 class="cmtt-8"> 9.3057248e-06,</span>
12891 <br class="fancyvrb" /><a
12893 class="cmr-6">19</span><span
12894 class="cmtt-8"> </span><span
12895 class="cmtt-8"> </span><span
12896 class="cmtt-8"> </span><span
12897 class="cmtt-8"> 9.9104632e-06,</span><span
12898 class="cmtt-8"> 1.0554501e-05,</span><span
12899 class="cmtt-8"> 1.1240392e-05,</span><span
12900 class="cmtt-8"> 1.1970856e-05,</span>
12901 <br class="fancyvrb" /><a
12903 class="cmr-6">20</span><span
12904 class="cmtt-8"> </span><span
12905 class="cmtt-8"> </span><span
12906 class="cmtt-8"> </span><span
12907 class="cmtt-8"> 1.2748789e-05,</span><span
12908 class="cmtt-8"> 1.3577278e-05,</span><span
12909 class="cmtt-8"> 1.4459606e-05,</span><span
12910 class="cmtt-8"> 1.5399272e-05,</span>
12911 <br class="fancyvrb" /><a
12913 class="cmr-6">21</span><span
12914 class="cmtt-8"> </span><span
12915 class="cmtt-8"> </span><span
12916 class="cmtt-8"> </span><span
12917 class="cmtt-8"> 1.6400004e-05,</span><span
12918 class="cmtt-8"> 1.7465768e-05,</span><span
12919 class="cmtt-8"> 1.8600792e-05,</span><span
12920 class="cmtt-8"> 1.9809576e-05,</span>
12921 <br class="fancyvrb" /><a
12923 class="cmr-6">22</span><span
12924 class="cmtt-8"> </span><span
12925 class="cmtt-8"> </span><span
12926 class="cmtt-8"> </span><span
12927 class="cmtt-8"> 2.1096914e-05,</span><span
12928 class="cmtt-8"> 2.2467911e-05,</span><span
12929 class="cmtt-8"> 2.3928002e-05,</span><span
12930 class="cmtt-8"> 2.5482978e-05,</span>
12931 <br class="fancyvrb" /><a
12933 class="cmr-6">23</span><span
12934 class="cmtt-8"> </span><span
12935 class="cmtt-8"> </span><span
12936 class="cmtt-8"> </span><span
12937 class="cmtt-8"> 2.7139006e-05,</span><span
12938 class="cmtt-8"> 2.8902651e-05,</span><span
12939 class="cmtt-8"> 3.0780908e-05,</span><span
12940 class="cmtt-8"> 3.2781225e-05,</span>
12941 <br class="fancyvrb" /><a
12943 class="cmr-6">24</span><span
12944 class="cmtt-8"> </span><span
12945 class="cmtt-8"> </span><span
12946 class="cmtt-8"> </span><span
12947 class="cmtt-8"> 3.4911534e-05,</span><span
12948 class="cmtt-8"> 3.7180282e-05,</span><span
12949 class="cmtt-8"> 3.9596466e-05,</span><span
12950 class="cmtt-8"> 4.2169667e-05,</span>
12951 <br class="fancyvrb" /><a
12953 class="cmr-6">25</span><span
12954 class="cmtt-8"> </span><span
12955 class="cmtt-8"> </span><span
12956 class="cmtt-8"> </span><span
12957 class="cmtt-8"> 4.4910090e-05,</span><span
12958 class="cmtt-8"> 4.7828601e-05,</span><span
12959 class="cmtt-8"> 5.0936773e-05,</span><span
12960 class="cmtt-8"> 5.4246931e-05,</span>
12961 <br class="fancyvrb" /><a
12963 class="cmr-6">26</span><span
12964 class="cmtt-8"> </span><span
12965 class="cmtt-8"> </span><span
12966 class="cmtt-8"> </span><span
12967 class="cmtt-8"> 5.7772202e-05,</span><span
12968 class="cmtt-8"> 6.1526565e-05,</span><span
12969 class="cmtt-8"> 6.5524908e-05,</span><span
12970 class="cmtt-8"> 6.9783085e-05,</span>
12971 <br class="fancyvrb" /><a
12973 class="cmr-6">27</span><span
12974 class="cmtt-8"> </span><span
12975 class="cmtt-8"> </span><span
12976 class="cmtt-8"> </span><span
12977 class="cmtt-8"> 7.4317983e-05,</span><span
12978 class="cmtt-8"> 7.9147585e-05,</span><span
12979 class="cmtt-8"> 8.4291040e-05,</span><span
12980 class="cmtt-8"> 8.9768747e-05,</span>
12981 <br class="fancyvrb" /><a
12983 class="cmr-6">28</span><span
12984 class="cmtt-8"> </span><span
12985 class="cmtt-8"> </span><span
12986 class="cmtt-8"> </span><span
12987 class="cmtt-8"> 9.5602426e-05,</span><span
12988 class="cmtt-8"> 0.00010181521,</span><span
12989 class="cmtt-8"> 0.00010843174,</span><span
12990 class="cmtt-8"> 0.00011547824,</span>
12991 <br class="fancyvrb" /><a
12993 class="cmr-6">29</span><span
12994 class="cmtt-8"> </span><span
12995 class="cmtt-8"> </span><span
12996 class="cmtt-8"> </span><span
12997 class="cmtt-8"> 0.00012298267,</span><span
12998 class="cmtt-8"> 0.00013097477,</span><span
12999 class="cmtt-8"> 0.00013948625,</span><span
13000 class="cmtt-8"> 0.00014855085,</span>
13001 <br class="fancyvrb" /><a
13003 class="cmr-6">30</span><span
13004 class="cmtt-8"> </span><span
13005 class="cmtt-8"> </span><span
13006 class="cmtt-8"> </span><span
13007 class="cmtt-8"> 0.00015820453,</span><span
13008 class="cmtt-8"> 0.00016848555,</span><span
13009 class="cmtt-8"> 0.00017943469,</span><span
13010 class="cmtt-8"> 0.00019109536,</span>
13011 <br class="fancyvrb" /><a
13013 class="cmr-6">31</span><span
13014 class="cmtt-8"> </span><span
13015 class="cmtt-8"> </span><span
13016 class="cmtt-8"> </span><span
13017 class="cmtt-8"> 0.00020351382,</span><span
13018 class="cmtt-8"> 0.00021673929,</span><span
13019 class="cmtt-8"> 0.00023082423,</span><span
13020 class="cmtt-8"> 0.00024582449,</span>
13021 <br class="fancyvrb" /><a
13023 class="cmr-6">32</span><span
13024 class="cmtt-8"> </span><span
13025 class="cmtt-8"> </span><span
13026 class="cmtt-8"> </span><span
13027 class="cmtt-8"> 0.00026179955,</span><span
13028 class="cmtt-8"> 0.00027881276,</span><span
13029 class="cmtt-8"> 0.00029693158,</span><span
13030 class="cmtt-8"> 0.00031622787,</span>
13031 <br class="fancyvrb" /><a
13033 class="cmr-6">33</span><span
13034 class="cmtt-8"> </span><span
13035 class="cmtt-8"> </span><span
13036 class="cmtt-8"> </span><span
13037 class="cmtt-8"> 0.00033677814,</span><span
13038 class="cmtt-8"> 0.00035866388,</span><span
13039 class="cmtt-8"> 0.00038197188,</span><span
13040 class="cmtt-8"> 0.00040679456,</span>
13041 <br class="fancyvrb" /><a
13043 class="cmr-6">34</span><span
13044 class="cmtt-8"> </span><span
13045 class="cmtt-8"> </span><span
13046 class="cmtt-8"> </span><span
13047 class="cmtt-8"> 0.00043323036,</span><span
13048 class="cmtt-8"> 0.00046138411,</span><span
13049 class="cmtt-8"> 0.00049136745,</span><span
13050 class="cmtt-8"> 0.00052329927,</span>
13051 <br class="fancyvrb" /><a
13053 class="cmr-6">35</span><span
13054 class="cmtt-8"> </span><span
13055 class="cmtt-8"> </span><span
13056 class="cmtt-8"> </span><span
13057 class="cmtt-8"> 0.00055730621,</span><span
13058 class="cmtt-8"> 0.00059352311,</span><span
13059 class="cmtt-8"> 0.00063209358,</span><span
13060 class="cmtt-8"> 0.00067317058,</span>
13061 <br class="fancyvrb" /><a
13063 class="cmr-6">36</span><span
13064 class="cmtt-8"> </span><span
13065 class="cmtt-8"> </span><span
13066 class="cmtt-8"> </span><span
13067 class="cmtt-8"> 0.00071691700,</span><span
13068 class="cmtt-8"> 0.00076350630,</span><span
13069 class="cmtt-8"> 0.00081312324,</span><span
13070 class="cmtt-8"> 0.00086596457,</span>
13071 <br class="fancyvrb" /><a
13073 class="cmr-6">37</span><span
13074 class="cmtt-8"> </span><span
13075 class="cmtt-8"> </span><span
13076 class="cmtt-8"> </span><span
13077 class="cmtt-8"> 0.00092223983,</span><span
13078 class="cmtt-8"> 0.00098217216,</span><span
13079 class="cmtt-8"> 0.0010459992,</span><span
13080 class="cmtt-8"> </span><span
13081 class="cmtt-8"> 0.0011139742,</span>
13082 <br class="fancyvrb" /><a
13084 class="cmr-6">38</span><span
13085 class="cmtt-8"> </span><span
13086 class="cmtt-8"> </span><span
13087 class="cmtt-8"> </span><span
13088 class="cmtt-8"> 0.0011863665,</span><span
13089 class="cmtt-8"> </span><span
13090 class="cmtt-8"> 0.0012634633,</span><span
13091 class="cmtt-8"> </span><span
13092 class="cmtt-8"> 0.0013455702,</span><span
13093 class="cmtt-8"> </span><span
13094 class="cmtt-8"> 0.0014330129,</span>
13095 <br class="fancyvrb" /><a
13097 class="cmr-6">39</span><span
13098 class="cmtt-8"> </span><span
13099 class="cmtt-8"> </span><span
13100 class="cmtt-8"> </span><span
13101 class="cmtt-8"> 0.0015261382,</span><span
13102 class="cmtt-8"> </span><span
13103 class="cmtt-8"> 0.0016253153,</span><span
13104 class="cmtt-8"> </span><span
13105 class="cmtt-8"> 0.0017309374,</span><span
13106 class="cmtt-8"> </span><span
13107 class="cmtt-8"> 0.0018434235,</span>
13108 <br class="fancyvrb" /><a
13110 class="cmr-6">40</span><span
13111 class="cmtt-8"> </span><span
13112 class="cmtt-8"> </span><span
13113 class="cmtt-8"> </span><span
13114 class="cmtt-8"> 0.0019632195,</span><span
13115 class="cmtt-8"> </span><span
13116 class="cmtt-8"> 0.0020908006,</span><span
13117 class="cmtt-8"> </span><span
13118 class="cmtt-8"> 0.0022266726,</span><span
13119 class="cmtt-8"> </span><span
13120 class="cmtt-8"> 0.0023713743,</span>
13121 <br class="fancyvrb" /><a
13123 class="cmr-6">41</span><span
13124 class="cmtt-8"> </span><span
13125 class="cmtt-8"> </span><span
13126 class="cmtt-8"> </span><span
13127 class="cmtt-8"> 0.0025254795,</span><span
13128 class="cmtt-8"> </span><span
13129 class="cmtt-8"> 0.0026895994,</span><span
13130 class="cmtt-8"> </span><span
13131 class="cmtt-8"> 0.0028643847,</span><span
13132 class="cmtt-8"> </span><span
13133 class="cmtt-8"> 0.0030505286,</span>
13134 <br class="fancyvrb" /><a
13136 class="cmr-6">42</span><span
13137 class="cmtt-8"> </span><span
13138 class="cmtt-8"> </span><span
13139 class="cmtt-8"> </span><span
13140 class="cmtt-8"> 0.0032487691,</span><span
13141 class="cmtt-8"> </span><span
13142 class="cmtt-8"> 0.0034598925,</span><span
13143 class="cmtt-8"> </span><span
13144 class="cmtt-8"> 0.0036847358,</span><span
13145 class="cmtt-8"> </span><span
13146 class="cmtt-8"> 0.0039241906,</span>
13150 <br class="fancyvrb" /><a
13152 class="cmr-6">43</span><span
13153 class="cmtt-8"> </span><span
13154 class="cmtt-8"> </span><span
13155 class="cmtt-8"> </span><span
13156 class="cmtt-8"> 0.0041792066,</span><span
13157 class="cmtt-8"> </span><span
13158 class="cmtt-8"> 0.0044507950,</span><span
13159 class="cmtt-8"> </span><span
13160 class="cmtt-8"> 0.0047400328,</span><span
13161 class="cmtt-8"> </span><span
13162 class="cmtt-8"> 0.0050480668,</span>
13163 <br class="fancyvrb" /><a
13165 class="cmr-6">44</span><span
13166 class="cmtt-8"> </span><span
13167 class="cmtt-8"> </span><span
13168 class="cmtt-8"> </span><span
13169 class="cmtt-8"> 0.0053761186,</span><span
13170 class="cmtt-8"> </span><span
13171 class="cmtt-8"> 0.0057254891,</span><span
13172 class="cmtt-8"> </span><span
13173 class="cmtt-8"> 0.0060975636,</span><span
13174 class="cmtt-8"> </span><span
13175 class="cmtt-8"> 0.0064938176,</span>
13176 <br class="fancyvrb" /><a
13178 class="cmr-6">45</span><span
13179 class="cmtt-8"> </span><span
13180 class="cmtt-8"> </span><span
13181 class="cmtt-8"> </span><span
13182 class="cmtt-8"> 0.0069158225,</span><span
13183 class="cmtt-8"> </span><span
13184 class="cmtt-8"> 0.0073652516,</span><span
13185 class="cmtt-8"> </span><span
13186 class="cmtt-8"> 0.0078438871,</span><span
13187 class="cmtt-8"> </span><span
13188 class="cmtt-8"> 0.0083536271,</span>
13189 <br class="fancyvrb" /><a
13191 class="cmr-6">46</span><span
13192 class="cmtt-8"> </span><span
13193 class="cmtt-8"> </span><span
13194 class="cmtt-8"> </span><span
13195 class="cmtt-8"> 0.0088964928,</span><span
13196 class="cmtt-8"> </span><span
13197 class="cmtt-8"> 0.009474637,</span><span
13198 class="cmtt-8"> </span><span
13199 class="cmtt-8"> </span><span
13200 class="cmtt-8"> 0.010090352,</span><span
13201 class="cmtt-8"> </span><span
13202 class="cmtt-8"> </span><span
13203 class="cmtt-8"> 0.010746080,</span>
13204 <br class="fancyvrb" /><a
13206 class="cmr-6">47</span><span
13207 class="cmtt-8"> </span><span
13208 class="cmtt-8"> </span><span
13209 class="cmtt-8"> </span><span
13210 class="cmtt-8"> 0.011444421,</span><span
13211 class="cmtt-8"> </span><span
13212 class="cmtt-8"> </span><span
13213 class="cmtt-8"> 0.012188144,</span><span
13214 class="cmtt-8"> </span><span
13215 class="cmtt-8"> </span><span
13216 class="cmtt-8"> 0.012980198,</span><span
13217 class="cmtt-8"> </span><span
13218 class="cmtt-8"> </span><span
13219 class="cmtt-8"> 0.013823725,</span>
13220 <br class="fancyvrb" /><a
13222 class="cmr-6">48</span><span
13223 class="cmtt-8"> </span><span
13224 class="cmtt-8"> </span><span
13225 class="cmtt-8"> </span><span
13226 class="cmtt-8"> 0.014722068,</span><span
13227 class="cmtt-8"> </span><span
13228 class="cmtt-8"> </span><span
13229 class="cmtt-8"> 0.015678791,</span><span
13230 class="cmtt-8"> </span><span
13231 class="cmtt-8"> </span><span
13232 class="cmtt-8"> 0.016697687,</span><span
13233 class="cmtt-8"> </span><span
13234 class="cmtt-8"> </span><span
13235 class="cmtt-8"> 0.017782797,</span>
13236 <br class="fancyvrb" /><a
13238 class="cmr-6">49</span><span
13239 class="cmtt-8"> </span><span
13240 class="cmtt-8"> </span><span
13241 class="cmtt-8"> </span><span
13242 class="cmtt-8"> 0.018938423,</span><span
13243 class="cmtt-8"> </span><span
13244 class="cmtt-8"> </span><span
13245 class="cmtt-8"> 0.020169149,</span><span
13246 class="cmtt-8"> </span><span
13247 class="cmtt-8"> </span><span
13248 class="cmtt-8"> 0.021479854,</span><span
13249 class="cmtt-8"> </span><span
13250 class="cmtt-8"> </span><span
13251 class="cmtt-8"> 0.022875735,</span>
13252 <br class="fancyvrb" /><a
13254 class="cmr-6">50</span><span
13255 class="cmtt-8"> </span><span
13256 class="cmtt-8"> </span><span
13257 class="cmtt-8"> </span><span
13258 class="cmtt-8"> 0.024362330,</span><span
13259 class="cmtt-8"> </span><span
13260 class="cmtt-8"> </span><span
13261 class="cmtt-8"> 0.025945531,</span><span
13262 class="cmtt-8"> </span><span
13263 class="cmtt-8"> </span><span
13264 class="cmtt-8"> 0.027631618,</span><span
13265 class="cmtt-8"> </span><span
13266 class="cmtt-8"> </span><span
13267 class="cmtt-8"> 0.029427276,</span>
13268 <br class="fancyvrb" /><a
13270 class="cmr-6">51</span><span
13271 class="cmtt-8"> </span><span
13272 class="cmtt-8"> </span><span
13273 class="cmtt-8"> </span><span
13274 class="cmtt-8"> 0.031339626,</span><span
13275 class="cmtt-8"> </span><span
13276 class="cmtt-8"> </span><span
13277 class="cmtt-8"> 0.033376252,</span><span
13278 class="cmtt-8"> </span><span
13279 class="cmtt-8"> </span><span
13280 class="cmtt-8"> 0.035545228,</span><span
13281 class="cmtt-8"> </span><span
13282 class="cmtt-8"> </span><span
13283 class="cmtt-8"> 0.037855157,</span>
13284 <br class="fancyvrb" /><a
13286 class="cmr-6">52</span><span
13287 class="cmtt-8"> </span><span
13288 class="cmtt-8"> </span><span
13289 class="cmtt-8"> </span><span
13290 class="cmtt-8"> 0.040315199,</span><span
13291 class="cmtt-8"> </span><span
13292 class="cmtt-8"> </span><span
13293 class="cmtt-8"> 0.042935108,</span><span
13294 class="cmtt-8"> </span><span
13295 class="cmtt-8"> </span><span
13296 class="cmtt-8"> 0.045725273,</span><span
13297 class="cmtt-8"> </span><span
13298 class="cmtt-8"> </span><span
13299 class="cmtt-8"> 0.048696758,</span>
13300 <br class="fancyvrb" /><a
13302 class="cmr-6">53</span><span
13303 class="cmtt-8"> </span><span
13304 class="cmtt-8"> </span><span
13305 class="cmtt-8"> </span><span
13306 class="cmtt-8"> 0.051861348,</span><span
13307 class="cmtt-8"> </span><span
13308 class="cmtt-8"> </span><span
13309 class="cmtt-8"> 0.055231591,</span><span
13310 class="cmtt-8"> </span><span
13311 class="cmtt-8"> </span><span
13312 class="cmtt-8"> 0.058820850,</span><span
13313 class="cmtt-8"> </span><span
13314 class="cmtt-8"> </span><span
13315 class="cmtt-8"> 0.062643361,</span>
13316 <br class="fancyvrb" /><a
13318 class="cmr-6">54</span><span
13319 class="cmtt-8"> </span><span
13320 class="cmtt-8"> </span><span
13321 class="cmtt-8"> </span><span
13322 class="cmtt-8"> 0.066714279,</span><span
13323 class="cmtt-8"> </span><span
13324 class="cmtt-8"> </span><span
13325 class="cmtt-8"> 0.071049749,</span><span
13326 class="cmtt-8"> </span><span
13327 class="cmtt-8"> </span><span
13328 class="cmtt-8"> 0.075666962,</span><span
13329 class="cmtt-8"> </span><span
13330 class="cmtt-8"> </span><span
13331 class="cmtt-8"> 0.080584227,</span>
13332 <br class="fancyvrb" /><a
13334 class="cmr-6">55</span><span
13335 class="cmtt-8"> </span><span
13336 class="cmtt-8"> </span><span
13337 class="cmtt-8"> </span><span
13338 class="cmtt-8"> 0.085821044,</span><span
13339 class="cmtt-8"> </span><span
13340 class="cmtt-8"> </span><span
13341 class="cmtt-8"> 0.091398179,</span><span
13342 class="cmtt-8"> </span><span
13343 class="cmtt-8"> </span><span
13344 class="cmtt-8"> 0.097337747,</span><span
13345 class="cmtt-8"> </span><span
13346 class="cmtt-8"> </span><span
13347 class="cmtt-8"> 0.10366330,</span>
13348 <br class="fancyvrb" /><a
13350 class="cmr-6">56</span><span
13351 class="cmtt-8"> </span><span
13352 class="cmtt-8"> </span><span
13353 class="cmtt-8"> </span><span
13354 class="cmtt-8"> 0.11039993,</span><span
13355 class="cmtt-8"> </span><span
13356 class="cmtt-8"> </span><span
13357 class="cmtt-8"> </span><span
13358 class="cmtt-8"> 0.11757434,</span><span
13359 class="cmtt-8"> </span><span
13360 class="cmtt-8"> </span><span
13361 class="cmtt-8"> </span><span
13362 class="cmtt-8"> 0.12521498,</span><span
13363 class="cmtt-8"> </span><span
13364 class="cmtt-8"> </span><span
13365 class="cmtt-8"> </span><span
13366 class="cmtt-8"> 0.13335215,</span>
13367 <br class="fancyvrb" /><a
13369 class="cmr-6">57</span><span
13370 class="cmtt-8"> </span><span
13371 class="cmtt-8"> </span><span
13372 class="cmtt-8"> </span><span
13373 class="cmtt-8"> 0.14201813,</span><span
13374 class="cmtt-8"> </span><span
13375 class="cmtt-8"> </span><span
13376 class="cmtt-8"> </span><span
13377 class="cmtt-8"> 0.15124727,</span><span
13378 class="cmtt-8"> </span><span
13379 class="cmtt-8"> </span><span
13380 class="cmtt-8"> </span><span
13381 class="cmtt-8"> 0.16107617,</span><span
13382 class="cmtt-8"> </span><span
13383 class="cmtt-8"> </span><span
13384 class="cmtt-8"> </span><span
13385 class="cmtt-8"> 0.17154380,</span>
13386 <br class="fancyvrb" /><a
13388 class="cmr-6">58</span><span
13389 class="cmtt-8"> </span><span
13390 class="cmtt-8"> </span><span
13391 class="cmtt-8"> </span><span
13392 class="cmtt-8"> 0.18269168,</span><span
13393 class="cmtt-8"> </span><span
13394 class="cmtt-8"> </span><span
13395 class="cmtt-8"> </span><span
13396 class="cmtt-8"> 0.19456402,</span><span
13397 class="cmtt-8"> </span><span
13398 class="cmtt-8"> </span><span
13399 class="cmtt-8"> </span><span
13400 class="cmtt-8"> 0.20720788,</span><span
13401 class="cmtt-8"> </span><span
13402 class="cmtt-8"> </span><span
13403 class="cmtt-8"> </span><span
13404 class="cmtt-8"> 0.22067342,</span>
13405 <br class="fancyvrb" /><a
13407 class="cmr-6">59</span><span
13408 class="cmtt-8"> </span><span
13409 class="cmtt-8"> </span><span
13410 class="cmtt-8"> </span><span
13411 class="cmtt-8"> 0.23501402,</span><span
13412 class="cmtt-8"> </span><span
13413 class="cmtt-8"> </span><span
13414 class="cmtt-8"> </span><span
13415 class="cmtt-8"> 0.25028656,</span><span
13416 class="cmtt-8"> </span><span
13417 class="cmtt-8"> </span><span
13418 class="cmtt-8"> </span><span
13419 class="cmtt-8"> 0.26655159,</span><span
13420 class="cmtt-8"> </span><span
13421 class="cmtt-8"> </span><span
13422 class="cmtt-8"> </span><span
13423 class="cmtt-8"> 0.28387361,</span>
13424 <br class="fancyvrb" /><a
13426 class="cmr-6">60</span><span
13427 class="cmtt-8"> </span><span
13428 class="cmtt-8"> </span><span
13429 class="cmtt-8"> </span><span
13430 class="cmtt-8"> 0.30232132,</span><span
13431 class="cmtt-8"> </span><span
13432 class="cmtt-8"> </span><span
13433 class="cmtt-8"> </span><span
13434 class="cmtt-8"> 0.32196786,</span><span
13435 class="cmtt-8"> </span><span
13436 class="cmtt-8"> </span><span
13437 class="cmtt-8"> </span><span
13438 class="cmtt-8"> 0.34289114,</span><span
13439 class="cmtt-8"> </span><span
13440 class="cmtt-8"> </span><span
13441 class="cmtt-8"> </span><span
13442 class="cmtt-8"> 0.36517414,</span>
13443 <br class="fancyvrb" /><a
13445 class="cmr-6">61</span><span
13446 class="cmtt-8"> </span><span
13447 class="cmtt-8"> </span><span
13448 class="cmtt-8"> </span><span
13449 class="cmtt-8"> 0.38890521,</span><span
13450 class="cmtt-8"> </span><span
13451 class="cmtt-8"> </span><span
13452 class="cmtt-8"> </span><span
13453 class="cmtt-8"> 0.41417847,</span><span
13454 class="cmtt-8"> </span><span
13455 class="cmtt-8"> </span><span
13456 class="cmtt-8"> </span><span
13457 class="cmtt-8"> 0.44109412,</span><span
13458 class="cmtt-8"> </span><span
13459 class="cmtt-8"> </span><span
13460 class="cmtt-8"> </span><span
13461 class="cmtt-8"> 0.46975890,</span>
13462 <br class="fancyvrb" /><a
13464 class="cmr-6">62</span><span
13465 class="cmtt-8"> </span><span
13466 class="cmtt-8"> </span><span
13467 class="cmtt-8"> </span><span
13468 class="cmtt-8"> 0.50028648,</span><span
13469 class="cmtt-8"> </span><span
13470 class="cmtt-8"> </span><span
13471 class="cmtt-8"> </span><span
13472 class="cmtt-8"> 0.53279791,</span><span
13473 class="cmtt-8"> </span><span
13474 class="cmtt-8"> </span><span
13475 class="cmtt-8"> </span><span
13476 class="cmtt-8"> 0.56742212,</span><span
13477 class="cmtt-8"> </span><span
13478 class="cmtt-8"> </span><span
13479 class="cmtt-8"> </span><span
13480 class="cmtt-8"> 0.60429640,</span>
13481 <br class="fancyvrb" /><a
13483 class="cmr-6">63</span><span
13484 class="cmtt-8"> </span><span
13485 class="cmtt-8"> </span><span
13486 class="cmtt-8"> </span><span
13487 class="cmtt-8"> 0.64356699,</span><span
13488 class="cmtt-8"> </span><span
13489 class="cmtt-8"> </span><span
13490 class="cmtt-8"> </span><span
13491 class="cmtt-8"> 0.68538959,</span><span
13492 class="cmtt-8"> </span><span
13493 class="cmtt-8"> </span><span
13494 class="cmtt-8"> </span><span
13495 class="cmtt-8"> 0.72993007,</span><span
13496 class="cmtt-8"> </span><span
13497 class="cmtt-8"> </span><span
13498 class="cmtt-8"> </span><span
13499 class="cmtt-8"> 0.77736504,</span>
13500 <br class="fancyvrb" /><a
13502 class="cmr-6">64</span><span
13503 class="cmtt-8"> </span><span
13504 class="cmtt-8"> </span><span
13505 class="cmtt-8"> </span><span
13506 class="cmtt-8"> 0.82788260,</span><span
13507 class="cmtt-8"> </span><span
13508 class="cmtt-8"> </span><span
13509 class="cmtt-8"> </span><span
13510 class="cmtt-8"> 0.88168307,</span><span
13511 class="cmtt-8"> </span><span
13512 class="cmtt-8"> </span><span
13513 class="cmtt-8"> </span><span
13514 class="cmtt-8"> 0.9389798,</span><span
13515 class="cmtt-8"> </span><span
13516 class="cmtt-8"> </span><span
13517 class="cmtt-8"> </span><span
13518 class="cmtt-8"> </span><span
13519 class="cmtt-8"> 1.</span>
13527 <h3 class="sectionHead"><span class="titlemark">A </span> <a
13529 <!--l. 6--><p class="noindent" >
13530 <h4 class="subsectionHead"><span class="titlemark">A.1 </span> <a
13532 <!--l. 8--><p class="noindent" >This document describes using Ogg logical and physical transport st…
13534 <!--l. 12--><p class="noindent" >The <a
13538 <!--l. 15--><p class="noindent" >The <a
13544 <!--l. 22--><p class="noindent" >
13545 <h5 class="subsubsectionHead"><span class="titlemark">A.1.1 </span> <a
13547 <!--l. 24--><p class="noindent" >The Ogg/Vorbis I specification currently dictates that Ogg/Vorbis …
13549 <ul class="itemize1">
13550 <li class="itemize">A meta-headerless Ogg file encapsulates the Vorbis I packets
13552 …<li class="itemize">The Ogg stream may be chained, i.e., contain multiple, contigous logical strea…
13555 … <li class="itemize">The Ogg stream must be unmultiplexed (only one stream, a Vorbis audio stream,
13561 <!--l. 41--><p class="noindent" >This is not to say that it is not currently possible to multiplex …
13569 <!--l. 55--><p class="noindent" >
13570 <h5 class="subsubsectionHead"><span class="titlemark">A.1.2 </span> <a
13572 <!--l. 57--><p class="noindent" >The MIME type of Ogg files depend on the context. Specifically, co…
13574 class="cmtt-12">application/ogg</span>, while visual media should use <span
13575 class="cmtt-12">video/ogg</span>, and audio
13577 class="cmtt-12">audio/ogg</span>. Vorbis data encapsulated in Ogg may appear in any of those types.…
13579 class="cmtt-12">audio/vorbis </span>+ <span
13580 class="cmtt-12">audio/vorbis-config</span>.
13581 <!--l. 65--><p class="noindent" >
13582 <h4 class="subsectionHead"><span class="titlemark">A.2 </span> <a
13584 <!--l. 67--><p class="noindent" >Ogg encapsulation of a Vorbis packet stream is straightforward.
13585 <ul class="itemize1">
13586 …<li class="itemize">The first Vorbis packet (the identification header), which uniquely identifies…
13591 … <li class="itemize">This first page is marked ’beginning of stream’ in the page flags.
13593 …<li class="itemize">The second and third vorbis packets (comment and setup headers) may span one or
13601 <li class="itemize">The granule position of these first pages containing only headers is zero.
13603 <li class="itemize">The first audio packet of the logical stream begins a fresh Ogg page.
13605 <li class="itemize">Packets are placed into ogg pages in order until the end of stream.
13607 <li class="itemize">The last page is marked ’end of stream’ in the page flags.
13609 <li class="itemize">Vorbis packets may span page boundaries.
13611 … <li class="itemize">The granule position of pages containing Vorbis audio is in units of PCM audio
13615 …<li class="itemize">The granule position of a page represents the end PCM sample position of the l…
13617 class="cmti-12">completed </span>on that page. The ’last PCM sample’ is the last comple…
13621 …<!--l. 126--><p class="noindent" >Note that the last decoded (fully lapped) PCM sample fr…
13627 … <li class="itemize">The granule (PCM) position of the first page need not indicate that the stream
13631 <ul class="itemize2">
13632 …<li class="itemize">A positive starting value simply indicates that this stream begins a…
13636 … <li class="itemize">A negative value indicates that output samples preceeding time zero should be
13645 …<!--l. 161--><p class="noindent" >In both of these cases in which the initial audio PCM starting o…
13651 <!--l. 170--><p class="noindent" ><span class="likesubparagraphHead"><a
13653 class="cmbx-12">Note:</span></span> Failure to do so should, at worst, cause a decoder implementati…
13657 …<li class="itemize">A granule position on the final page in a stream that indicates less audio dat…
13666 <h3 class="sectionHead"><span class="titlemark">B </span> <a
13668 <!--l. 8--><p class="noindent" >Please consult RFC 5215 <span
13669 class="cmti-12">“RTP Payload Format for Vorbis Encoded Audio” </span>for description of
13677 <h3 class="likesectionHead"><a
13679 <!--l. 6--><p class="noindent" ><img
13680 src="Vorbis_I_spec13x.png" alt="PIC" class="graphics"><!--tex4ht:graphics
13683 <!--l. 10--><p class="noindent" >Ogg is a <a
13688 <!--l. 17--><p class="noindent" >Ogg Vorbis is the first Ogg audio CODEC. Anyone may freely use and…
13692 <!--l. 23--><p class="noindent" >Xiph.org’s Vorbis software CODEC implementation is distribut…
13695 <!--l. 28--><p class="noindent" >Ogg, Vorbis, Xiph.org Foundation and their logos are trademarks (t…
13699 <!--l. 33--><p class="noindent" >This document is set using <span class="LATEX">L<span class="A">A<…
13700 class="E">E</span>X</span></span>.
13704 <h3 class="likesectionHead"><a
13706 <!--l. 123--><p class="noindent" >
13707 <div class="thebibliography">
13708 <p class="bibitem" ><span class="biblabel">
13709 [1]<span class="bibsp">   </span></span><a
13713 href="http://www.iocon.com/resource/docs/ps/eusipco_corrected.ps" class="url" ><span
13714 class="cmtt-12">http://www.iocon.com/resource/docs/ps/eusipco_corrected.ps</span></a>.