[xiph-commits] r18067 - trunk/vorbis/doc
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Thu Aug 11 00:30:43 PDT 2011
Author: xiphmont
Date: 2011-08-11 00:30:43 -0700 (Thu, 11 Aug 2011)
New Revision: 18067
Modified:
trunk/vorbis/doc/01-introduction.tex
trunk/vorbis/doc/03-codebook.tex
trunk/vorbis/doc/04-codec.tex
trunk/vorbis/doc/05-comment.tex
trunk/vorbis/doc/07-floor1.tex
trunk/vorbis/doc/08-residue.tex
trunk/vorbis/doc/09-helper.tex
trunk/vorbis/doc/10-tables.tex
trunk/vorbis/doc/Vorbis_I_spec.html
trunk/vorbis/doc/Vorbis_I_spec.pdf
Log:
More underscore cleanups; it appears that \usepackage{underscore} in
unreliable in several environments like \mathtt and \emph
Modified: trunk/vorbis/doc/01-introduction.tex
===================================================================
--- trunk/vorbis/doc/01-introduction.tex 2011-08-11 07:04:25 UTC (rev 18066)
+++ trunk/vorbis/doc/01-introduction.tex 2011-08-11 07:30:43 UTC (rev 18067)
@@ -517,7 +517,7 @@
correct data range; the amount of data to be returned is:
\begin{Verbatim}[commandchars=\\\{\}]
-window_blocksize(previous_window)/4+window_blocksize(current_window)/4
+window\_blocksize(previous\_window)/4+window\_blocksize(current\_window)/4
\end{Verbatim}
from the center of the previous window to the center of the current
Modified: trunk/vorbis/doc/03-codebook.tex
===================================================================
--- trunk/vorbis/doc/03-codebook.tex 2011-08-11 07:04:25 UTC (rev 18066)
+++ trunk/vorbis/doc/03-codebook.tex 2011-08-11 07:30:43 UTC (rev 18067)
@@ -41,16 +41,16 @@
byte 2: [ 0 1 0 1 0 1 1 0 ] (0x56)
\end{Verbatim}
-16 bit \varname{[codebook_dimensions]} and 24 bit \varname{[codebook_entries]} fields:
+16 bit \varname{[codebook\_dimensions]} and 24 bit \varname{[codebook\_entries]} fields:
\begin{Verbatim}[commandchars=\\\{\}]
byte 3: [ X X X X X X X X ]
-byte 4: [ X X X X X X X X ] [codebook_dimensions] (16 bit unsigned)
+byte 4: [ X X X X X X X X ] [codebook\_dimensions] (16 bit unsigned)
byte 5: [ X X X X X X X X ]
byte 6: [ X X X X X X X X ]
-byte 7: [ X X X X X X X X ] [codebook_entries] (24 bit unsigned)
+byte 7: [ X X X X X X X X ] [codebook\_entries] (24 bit unsigned)
\end{Verbatim}
@@ -63,9 +63,9 @@
\end{Verbatim}
Each entry, numbering a
-total of \varname{[codebook_entries]}, is assigned a codeword length.
+total of \varname{[codebook\_entries]}, is assigned a codeword length.
We now read the list of codeword lengths and store these lengths in
-the array \varname{[codebook_codeword_lengths]}. Decode of lengths is
+the array \varname{[codebook\_codeword\_lengths]}. Decode of lengths is
according to whether the \varname{[ordered]} flag is set or unset.
\begin{itemize}
@@ -83,7 +83,7 @@
byte 8: [ X 1 ] [sparse] flag (1 bit)
\end{Verbatim}
- The decoder now performs for each of the \varname{[codebook_entries]}
+ The decoder now performs for each of the \varname{[codebook\_entries]}
codebook entries:
\begin{Verbatim}[commandchars=\\\{\}]
@@ -118,16 +118,16 @@
codewords per length. That is, beginning at entry zero:
\begin{Verbatim}[commandchars=\\\{\}]
- 1) [current_entry] = 0;
- 2) [current_length] = read a five bit unsigned integer and add 1;
- 3) [number] = read \link{vorbis:spec:ilog}{ilog}([codebook_entries] - [current_entry]) bits as an unsigned integer
- 4) set the entries [current_entry] through [current_entry]+[number]-1, inclusive,
- of the [codebook_codeword_lengths] array to [current_length]
- 5) set [current_entry] to [number] + [current_entry]
- 6) increment [current_length] by 1
- 7) if [current_entry] is greater than [codebook_entries] ERROR CONDITION;
+ 1) [current\_entry] = 0;
+ 2) [current\_length] = read a five bit unsigned integer and add 1;
+ 3) [number] = read \link{vorbis:spec:ilog}{ilog}([codebook\_entries] - [current\_entry]) bits as an unsigned integer
+ 4) set the entries [current\_entry] through [current\_entry]+[number]-1, inclusive,
+ of the [codebook\_codeword\_lengths] array to [current\_length]
+ 5) set [current\_entry] to [number] + [current\_entry]
+ 6) increment [current\_length] by 1
+ 7) if [current\_entry] is greater than [codebook\_entries] ERROR CONDITION;
the decoder will not be able to read this stream.
- 8) if [current_entry] is less than [codebook_entries], repeat process starting at 3)
+ 8) if [current\_entry] is less than [codebook\_entries], repeat process starting at 3)
9) done.
\end{Verbatim}
@@ -148,10 +148,10 @@
The lookup table type is read as a four bit unsigned integer:
\begin{Verbatim}[commandchars=\\\{\}]
- 1) [codebook_lookup_type] = read four bits as an unsigned integer
+ 1) [codebook\_lookup\_type] = read four bits as an unsigned integer
\end{Verbatim}
-Codebook decode precedes according to \varname{[codebook_lookup_type]}:
+Codebook decode precedes according to \varname{[codebook\_lookup\_type]}:
\begin{itemize}
\item
Lookup type zero indicates no lookup to be read. Proceed past
@@ -160,32 +160,32 @@
Lookup types one and two are similar, differing only in the
number of lookup values to be read. Lookup type one reads a list of
values that are permuted in a set pattern to build a list of vectors,
-each vector of order \varname{[codebook_dimensions]} scalars. Lookup
+each vector of order \varname{[codebook\_dimensions]} scalars. Lookup
type two builds the same vector list, but reads each scalar for each
vector explicitly, rather than building vectors from a smaller list of
possible scalar values. Lookup decode proceeds as follows:
\begin{Verbatim}[commandchars=\\\{\}]
- 1) [codebook_minimum_value] = \link{vorbis:spec:float32:unpack}{float32_unpack}( read 32 bits as an unsigned integer)
- 2) [codebook_delta_value] = \link{vorbis:spec:float32:unpack}{float32_unpack}( read 32 bits as an unsigned integer)
- 3) [codebook_value_bits] = read 4 bits as an unsigned integer and add 1
- 4) [codebook_sequence_p] = read 1 bit as a boolean flag
+ 1) [codebook\_minimum\_value] = \link{vorbis:spec:float32:unpack}{float32\_unpack}( read 32 bits as an unsigned integer)
+ 2) [codebook\_delta\_value] = \link{vorbis:spec:float32:unpack}{float32\_unpack}( read 32 bits as an unsigned integer)
+ 3) [codebook\_value\_bits] = read 4 bits as an unsigned integer and add 1
+ 4) [codebook\_sequence\_p] = read 1 bit as a boolean flag
- if ( [codebook_lookup_type] is 1 ) \{
+ if ( [codebook\_lookup\_type] is 1 ) \{
- 5) [codebook_lookup_values] = \link{vorbis:spec:lookup1:values}{lookup1_values}(\varname{[codebook_entries]}, \varname{[codebook_dimensions]} )
+ 5) [codebook\_lookup\_values] = \link{vorbis:spec:lookup1:values}{lookup1\_values}(\varname{[codebook\_entries]}, \varname{[codebook\_dimensions]} )
\} else \{
- 6) [codebook_lookup_values] = \varname{[codebook_entries]} * \varname{[codebook_dimensions]}
+ 6) [codebook\_lookup\_values] = \varname{[codebook\_entries]} * \varname{[codebook\_dimensions]}
\}
- 7) read a total of [codebook_lookup_values] unsigned integers of [codebook_value_bits] each;
- store these in order in the array [codebook_multiplicands]
+ 7) read a total of [codebook\_lookup\_values] unsigned integers of [codebook\_value\_bits] each;
+ store these in order in the array [codebook\_multiplicands]
\end{Verbatim}
\item
-A \varname{[codebook_lookup_type]} of greater than two is reserved
+A \varname{[codebook\_lookup\_type]} of greater than two is reserved
and indicates a stream that is not decodable by the specification in this
document.
@@ -197,8 +197,8 @@
\paragraph{Huffman decision tree representation}
-The \varname{[codebook_codeword_lengths]} array and
-\varname{[codebook_entries]} value uniquely define the Huffman decision
+The \varname{[codebook\_codeword\_lengths]} array and
+\varname{[codebook\_entries]} value uniquely define the Huffman decision
tree used for entropy decoding.
Briefly, each used codebook entry (recall that length-unordered
@@ -282,20 +282,20 @@
Unpacking the VQ lookup table vectors relies on the following values:
\begin{programlisting}
-the [codebook_multiplicands] array
-[codebook_minimum_value]
-[codebook_delta_value]
-[codebook_sequence_p]
-[codebook_lookup_type]
-[codebook_entries]
-[codebook_dimensions]
-[codebook_lookup_values]
+the [codebook\_multiplicands] array
+[codebook\_minimum\_value]
+[codebook\_delta\_value]
+[codebook\_sequence\_p]
+[codebook\_lookup\_type]
+[codebook\_entries]
+[codebook\_dimensions]
+[codebook\_lookup\_values]
\end{programlisting}
\bigskip
Decoding (unpacking) a specific vector in the vector lookup table
-proceeds according to \varname{[codebook_lookup_type]}. The unpacked
+proceeds according to \varname{[codebook\_lookup\_type]}. The unpacked
vector values are what a codebook would return during audio packet
decode in a VQ context.
@@ -304,25 +304,25 @@
Lookup type one specifies a lattice VQ lookup table built
algorithmically from a list of scalar values. Calculate (unpack) the
final values of a codebook entry vector from the entries in
-\varname{[codebook_multiplicands]} as follows (\varname{[value_vector]}
+\varname{[codebook\_multiplicands]} as follows (\varname{[value\_vector]}
is the output vector representing the vector of values for entry number
-\varname{[lookup_offset]} in this codebook):
+\varname{[lookup\_offset]} in this codebook):
\begin{Verbatim}[commandchars=\\\{\}]
1) [last] = 0;
- 2) [index_divisor] = 1;
- 3) iterate [i] over the range 0 ... [codebook_dimensions]-1 (once for each scalar value in the value vector) \{
+ 2) [index\_divisor] = 1;
+ 3) iterate [i] over the range 0 ... [codebook\_dimensions]-1 (once for each scalar value in the value vector) \{
- 4) [multiplicand_offset] = ( [lookup_offset] divided by [index_divisor] using integer
- division ) integer modulo [codebook_lookup_values]
+ 4) [multiplicand\_offset] = ( [lookup\_offset] divided by [index\_divisor] using integer
+ division ) integer modulo [codebook\_lookup\_values]
- 5) vector [value_vector] element [i] =
- ( [codebook_multiplicands] array element number [multiplicand_offset] ) *
- [codebook_delta_value] + [codebook_minimum_value] + [last];
+ 5) vector [value\_vector] element [i] =
+ ( [codebook\_multiplicands] array element number [multiplicand\_offset] ) *
+ [codebook\_delta\_value] + [codebook\_minimum\_value] + [last];
- 6) if ( [codebook_sequence_p] is set ) then set [last] = vector [value_vector] element [i]
+ 6) if ( [codebook\_sequence\_p] is set ) then set [last] = vector [value\_vector] element [i]
- 7) [index_divisor] = [index_divisor] * [codebook_lookup_values]
+ 7) [index\_divisor] = [index\_divisor] * [codebook\_lookup\_values]
\}
@@ -334,25 +334,25 @@
\paragraph{Vector value decode: Lookup type 2}
Lookup type two specifies a VQ lookup table in which each scalar in
-each vector is explicitly set by the \varname{[codebook_multiplicands]}
+each vector is explicitly set by the \varname{[codebook\_multiplicands]}
array in a one-to-one mapping. Calculate [unpack] the
final values of a codebook entry vector from the entries in
-\varname{[codebook_multiplicands]} as follows (\varname{[value_vector]}
+\varname{[codebook\_multiplicands]} as follows (\varname{[value\_vector]}
is the output vector representing the vector of values for entry number
-\varname{[lookup_offset]} in this codebook):
+\varname{[lookup\_offset]} in this codebook):
\begin{Verbatim}[commandchars=\\\{\}]
1) [last] = 0;
- 2) [multiplicand_offset] = [lookup_offset] * [codebook_dimensions]
- 3) iterate [i] over the range 0 ... [codebook_dimensions]-1 (once for each scalar value in the value vector) \{
+ 2) [multiplicand\_offset] = [lookup\_offset] * [codebook\_dimensions]
+ 3) iterate [i] over the range 0 ... [codebook\_dimensions]-1 (once for each scalar value in the value vector) \{
- 4) vector [value_vector] element [i] =
- ( [codebook_multiplicands] array element number [multiplicand_offset] ) *
- [codebook_delta_value] + [codebook_minimum_value] + [last];
+ 4) vector [value\_vector] element [i] =
+ ( [codebook\_multiplicands] array element number [multiplicand\_offset] ) *
+ [codebook\_delta\_value] + [codebook\_minimum\_value] + [last];
- 5) if ( [codebook_sequence_p] is set ) then set [last] = vector [value_vector] element [i]
+ 5) if ( [codebook\_sequence\_p] is set ) then set [last] = vector [value\_vector] element [i]
- 6) increment [multiplicand_offset]
+ 6) increment [multiplicand\_offset]
\}
Modified: trunk/vorbis/doc/04-codec.tex
===================================================================
--- trunk/vorbis/doc/04-codec.tex 2011-08-11 07:04:25 UTC (rev 18066)
+++ trunk/vorbis/doc/04-codec.tex 2011-08-11 07:30:43 UTC (rev 18067)
@@ -29,7 +29,7 @@
\begin{Verbatim}[commandchars=\\\{\}]
- 1) [packet_type] : 8 bit value
+ 1) [packet\_type] : 8 bit value
2) 0x76, 0x6f, 0x72, 0x62, 0x69, 0x73: the characters 'v','o','r','b','i','s' as six octets
\end{Verbatim}
@@ -49,23 +49,23 @@
identification header is coded as follows:
\begin{Verbatim}[commandchars=\\\{\}]
- 1) [vorbis_version] = read 32 bits as unsigned integer
- 2) [audio_channels] = read 8 bit integer as unsigned
- 3) [audio_sample_rate] = read 32 bits as unsigned integer
- 4) [bitrate_maximum] = read 32 bits as signed integer
- 5) [bitrate_nominal] = read 32 bits as signed integer
- 6) [bitrate_minimum] = read 32 bits as signed integer
- 7) [blocksize_0] = 2 exponent (read 4 bits as unsigned integer)
- 8) [blocksize_1] = 2 exponent (read 4 bits as unsigned integer)
- 9) [framing_flag] = read one bit
+ 1) [vorbis\_version] = read 32 bits as unsigned integer
+ 2) [audio\_channels] = read 8 bit integer as unsigned
+ 3) [audio\_sample\_rate] = read 32 bits as unsigned integer
+ 4) [bitrate\_maximum] = read 32 bits as signed integer
+ 5) [bitrate\_nominal] = read 32 bits as signed integer
+ 6) [bitrate\_minimum] = read 32 bits as signed integer
+ 7) [blocksize\_0] = 2 exponent (read 4 bits as unsigned integer)
+ 8) [blocksize\_1] = 2 exponent (read 4 bits as unsigned integer)
+ 9) [framing\_flag] = read one bit
\end{Verbatim}
-\varname{[vorbis_version]} is to read '0' in order to be compatible
-with this document. Both \varname{[audio_channels]} and
-\varname{[audio_sample_rate]} must read greater than zero. Allowed final
+\varname{[vorbis\_version]} is to read '0' in order to be compatible
+with this document. Both \varname{[audio\_channels]} and
+\varname{[audio\_sample\_rate]} must read greater than zero. Allowed final
blocksize values are 64, 128, 256, 512, 1024, 2048, 4096 and 8192 in
-Vorbis I. \varname{[blocksize_0]} must be less than or equal to
-\varname{[blocksize_1]}. The framing bit must be nonzero. Failure to
+Vorbis I. \varname{[blocksize\_0]} must be less than or equal to
+\varname{[blocksize\_1]}. The framing bit must be nonzero. Failure to
meet any of these conditions renders a stream undecodable.
The bitrate fields above are used only as hints. The nominal bitrate
@@ -108,11 +108,11 @@
\paragraph{Codebooks}
\begin{enumerate}
-\item \varname{[vorbis_codebook_count]} = read eight bits as unsigned integer and add one
-\item Decode \varname{[vorbis_codebook_count]} codebooks in order as defined
+\item \varname{[vorbis\_codebook\_count]} = read eight bits as unsigned integer and add one
+\item Decode \varname{[vorbis\_codebook\_count]} codebooks in order as defined
in \xref{vorbis:spec:codebook}. Save each configuration, in
order, in an array of
-codebook configurations \varname{[vorbis_codebook_configurations]}.
+codebook configurations \varname{[vorbis\_codebook\_configurations]}.
\end{enumerate}
@@ -124,8 +124,8 @@
sync.
\begin{enumerate}
-\item \varname{[vorbis_time_count]} = read 6 bits as unsigned integer and add one
-\item read \varname{[vorbis_time_count]} 16 bit values; each value should be zero. If any value is nonzero, this is an error condition and the stream is undecodable.
+\item \varname{[vorbis\_time\_count]} = read 6 bits as unsigned integer and add one
+\item read \varname{[vorbis\_time\_count]} 16 bit values; each value should be zero. If any value is nonzero, this is an error condition and the stream is undecodable.
\end{enumerate}
@@ -136,17 +136,17 @@
abstraction of the appropriate type.
\begin{enumerate}
- \item \varname{[vorbis_floor_count]} = read 6 bits as unsigned integer and add one
- \item For each \varname{[i]} of \varname{[vorbis_floor_count]} floor numbers:
+ \item \varname{[vorbis\_floor\_count]} = read 6 bits as unsigned integer and add one
+ \item For each \varname{[i]} of \varname{[vorbis\_floor\_count]} floor numbers:
\begin{enumerate}
- \item read the floor type: vector \varname{[vorbis_floor_types]} element \varname{[i]} =
+ \item read the floor type: vector \varname{[vorbis\_floor\_types]} element \varname{[i]} =
read 16 bits as unsigned integer
\item If the floor type is zero, decode the floor
configuration as defined in \xref{vorbis:spec:floor0}; save
this
-configuration in slot \varname{[i]} of the floor configuration array \varname{[vorbis_floor_configurations]}.
+configuration in slot \varname{[i]} of the floor configuration array \varname{[vorbis\_floor\_configurations]}.
\item If the floor type is one,
-decode the floor configuration as defined in \xref{vorbis:spec:floor1}; save this configuration in slot \varname{[i]} of the floor configuration array \varname{[vorbis_floor_configurations]}.
+decode the floor configuration as defined in \xref{vorbis:spec:floor1}; save this configuration in slot \varname{[i]} of the floor configuration array \varname{[vorbis\_floor\_configurations]}.
\item If the the floor type is greater than one, this stream is undecodable; ERROR CONDITION
\end{enumerate}
@@ -160,13 +160,13 @@
\begin{enumerate}
-\item \varname{[vorbis_residue_count]} = read 6 bits as unsigned integer and add one
+\item \varname{[vorbis\_residue\_count]} = read 6 bits as unsigned integer and add one
-\item For each of \varname{[vorbis_residue_count]} residue numbers:
+\item For each of \varname{[vorbis\_residue\_count]} residue numbers:
\begin{enumerate}
- \item read the residue type; vector \varname{[vorbis_residue_types]} element \varname{[i]} = read 16 bits as unsigned integer
+ \item read the residue type; vector \varname{[vorbis\_residue\_types]} element \varname{[i]} = read 16 bits as unsigned integer
\item If the residue type is zero,
-one or two, decode the residue configuration as defined in \xref{vorbis:spec:residue}; save this configuration in slot \varname{[i]} of the residue configuration array \varname{[vorbis_residue_configurations]}.
+one or two, decode the residue configuration as defined in \xref{vorbis:spec:residue}; save this configuration in slot \varname{[i]} of the residue configuration array \varname{[vorbis\_residue\_configurations]}.
\item If the the residue type is greater than two, this stream is undecodable; ERROR CONDITION
\end{enumerate}
@@ -185,8 +185,8 @@
% rewrite this pseudocode using listings or algoritmicx or some other
% package geared towards this.
\begin{enumerate}
- \item \varname{[vorbis_mapping_count]} = read 6 bits as unsigned integer and add one
- \item For each \varname{[i]} of \varname{[vorbis_mapping_count]} mapping numbers:
+ \item \varname{[vorbis\_mapping\_count]} = read 6 bits as unsigned integer and add one
+ \item For each \varname{[i]} of \varname{[vorbis\_mapping\_count]} mapping numbers:
\begin{enumerate}
\item read the mapping type: 16 bits as unsigned integer. There's no reason to save the mapping type in Vorbis I.
\item If the mapping type is nonzero, the stream is undecodable
@@ -194,8 +194,8 @@
\begin{enumerate}
\item read 1 bit as a boolean flag
\begin{enumerate}
- \item if set, \varname{[vorbis_mapping_submaps]} = read 4 bits as unsigned integer and add one
- \item if unset, \varname{[vorbis_mapping_submaps]} = 1
+ \item if set, \varname{[vorbis\_mapping\_submaps]} = read 4 bits as unsigned integer and add one
+ \item if unset, \varname{[vorbis\_mapping\_submaps]} = 1
\end{enumerate}
@@ -203,39 +203,39 @@
\begin{enumerate}
\item if set, square polar channel mapping is in use:
\begin{itemize}
- \item \varname{[vorbis_mapping_coupling_steps]} = read 8 bits as unsigned integer and add one
- \item for \varname{[j]} each of \varname{[vorbis_mapping_coupling_steps]} steps:
+ \item \varname{[vorbis\_mapping\_coupling\_steps]} = read 8 bits as unsigned integer and add one
+ \item for \varname{[j]} each of \varname{[vorbis\_mapping\_coupling\_steps]} steps:
\begin{itemize}
- \item vector \varname{[vorbis_mapping_magnitude]} element \varname{[j]}= read \link{vorbis:spec:ilog}{ilog}(\varname{[audio_channels]} - 1) bits as unsigned integer
- \item vector \varname{[vorbis_mapping_angle]} element \varname{[j]}= read \link{vorbis:spec:ilog}{ilog}(\varname{[audio_channels]} - 1) bits as unsigned integer
- \item the numbers read in the above two steps are channel numbers representing the channel to treat as magnitude and the channel to treat as angle, respectively. If for any coupling step the angle channel number equals the magnitude channel number, the magnitude channel number is greater than \varname{[audio_channels]}-1, or the angle channel is greater than \varname{[audio_channels]}-1, the stream is undecodable.
+ \item vector \varname{[vorbis\_mapping\_magnitude]} element \varname{[j]}= read \link{vorbis:spec:ilog}{ilog}(\varname{[audio\_channels]} - 1) bits as unsigned integer
+ \item vector \varname{[vorbis\_mapping\_angle]} element \varname{[j]}= read \link{vorbis:spec:ilog}{ilog}(\varname{[audio\_channels]} - 1) bits as unsigned integer
+ \item the numbers read in the above two steps are channel numbers representing the channel to treat as magnitude and the channel to treat as angle, respectively. If for any coupling step the angle channel number equals the magnitude channel number, the magnitude channel number is greater than \varname{[audio\_channels]}-1, or the angle channel is greater than \varname{[audio\_channels]}-1, the stream is undecodable.
\end{itemize}
\end{itemize}
- \item if unset, \varname{[vorbis_mapping_coupling_steps]} = 0
+ \item if unset, \varname{[vorbis\_mapping\_coupling\_steps]} = 0
\end{enumerate}
\item read 2 bits (reserved field); if the value is nonzero, the stream is undecodable
- \item if \varname{[vorbis_mapping_submaps]} is greater than one, we read channel multiplex settings. For each \varname{[j]} of \varname{[audio_channels]} channels:
+ \item if \varname{[vorbis\_mapping\_submaps]} is greater than one, we read channel multiplex settings. For each \varname{[j]} of \varname{[audio\_channels]} channels:
\begin{enumerate}
- \item vector \varname{[vorbis_mapping_mux]} element \varname{[j]} = read 4 bits as unsigned integer
- \item if the value is greater than the highest numbered submap (\varname{[vorbis_mapping_submaps]} - 1), this in an error condition rendering the stream undecodable
+ \item vector \varname{[vorbis\_mapping\_mux]} element \varname{[j]} = read 4 bits as unsigned integer
+ \item if the value is greater than the highest numbered submap (\varname{[vorbis\_mapping\_submaps]} - 1), this in an error condition rendering the stream undecodable
\end{enumerate}
- \item for each submap \varname{[j]} of \varname{[vorbis_mapping_submaps]} submaps, read the floor and residue numbers for use in decoding that submap:
+ \item for each submap \varname{[j]} of \varname{[vorbis\_mapping\_submaps]} submaps, read the floor and residue numbers for use in decoding that submap:
\begin{enumerate}
\item read and discard 8 bits (the unused time configuration placeholder)
- \item read 8 bits as unsigned integer for the floor number; save in vector \varname{[vorbis_mapping_submap_floor]} element \varname{[j]}
+ \item read 8 bits as unsigned integer for the floor number; save in vector \varname{[vorbis\_mapping\_submap\_floor]} element \varname{[j]}
\item verify the floor number is not greater than the highest number floor configured for the bitstream. If it is, the bitstream is undecodable
- \item read 8 bits as unsigned integer for the residue number; save in vector \varname{[vorbis_mapping_submap_residue]} element \varname{[j]}
+ \item read 8 bits as unsigned integer for the residue number; save in vector \varname{[vorbis\_mapping\_submap\_residue]} element \varname{[j]}
\item verify the residue number is not greater than the highest number residue configured for the bitstream. If it is, the bitstream is undecodable
\end{enumerate}
- \item save this mapping configuration in slot \varname{[i]} of the mapping configuration array \varname{[vorbis_mapping_configurations]}.
+ \item save this mapping configuration in slot \varname{[i]} of the mapping configuration array \varname{[vorbis\_mapping\_configurations]}.
\end{enumerate}
\end{enumerate}
@@ -247,18 +247,18 @@
\paragraph{Modes}
\begin{enumerate}
- \item \varname{[vorbis_mode_count]} = read 6 bits as unsigned integer and add one
- \item For each of \varname{[vorbis_mode_count]} mode numbers:
+ \item \varname{[vorbis\_mode\_count]} = read 6 bits as unsigned integer and add one
+ \item For each of \varname{[vorbis\_mode\_count]} mode numbers:
\begin{enumerate}
- \item \varname{[vorbis_mode_blockflag]} = read 1 bit
- \item \varname{[vorbis_mode_windowtype]} = read 16 bits as unsigned integer
- \item \varname{[vorbis_mode_transformtype]} = read 16 bits as unsigned integer
- \item \varname{[vorbis_mode_mapping]} = read 8 bits as unsigned integer
+ \item \varname{[vorbis\_mode\_blockflag]} = read 1 bit
+ \item \varname{[vorbis\_mode\_windowtype]} = read 16 bits as unsigned integer
+ \item \varname{[vorbis\_mode\_transformtype]} = read 16 bits as unsigned integer
+ \item \varname{[vorbis\_mode\_mapping]} = read 8 bits as unsigned integer
\item verify ranges; zero is the only legal value in Vorbis I for
-\varname{[vorbis_mode_windowtype]}
-and \varname{[vorbis_mode_transformtype]}. \varname{[vorbis_mode_mapping]} must not be greater than the highest number mapping in use. Any illegal values render the stream undecodable.
+\varname{[vorbis\_mode\_windowtype]}
+and \varname{[vorbis\_mode\_transformtype]}. \varname{[vorbis\_mode\_mapping]} must not be greater than the highest number mapping in use. Any illegal values render the stream undecodable.
\item save this mode configuration in slot \varname{[i]} of the mode configuration array
-\varname{[vorbis_mode_configurations]}.
+\varname{[vorbis\_mode\_configurations]}.
\end{enumerate}
\item read 1 bit as a framing flag. If unset, a framing error occurred and the stream is not
@@ -286,25 +286,25 @@
\subsubsection{packet type, mode and window decode}
\begin{enumerate}
- \item read 1 bit \varname{[packet_type]}; check that packet type is 0 (audio)
- \item read \link{vorbis:spec:ilog}{ilog}([vorbis_mode_count]-1) bits
-\varname{[mode_number]}
- \item decode blocksize \varname{[n]} is equal to \varname{[blocksize_0]} if
-\varname{[vorbis_mode_blockflag]} is 0, else \varname{[n]} is equal to \varname{[blocksize_1]}.
+ \item read 1 bit \varname{[packet\_type]}; check that packet type is 0 (audio)
+ \item read \link{vorbis:spec:ilog}{ilog}([vorbis\_mode\_count]-1) bits
+\varname{[mode\_number]}
+ \item decode blocksize \varname{[n]} is equal to \varname{[blocksize\_0]} if
+\varname{[vorbis\_mode\_blockflag]} is 0, else \varname{[n]} is equal to \varname{[blocksize\_1]}.
\item perform window selection and setup; this window is used later by the inverse MDCT:
\begin{enumerate}
- \item if this is a long window (the \varname{[vorbis_mode_blockflag]} flag of this mode is
+ \item if this is a long window (the \varname{[vorbis\_mode\_blockflag]} flag of this mode is
set):
\begin{enumerate}
- \item read 1 bit for \varname{[previous_window_flag]}
- \item read 1 bit for \varname{[next_window_flag]}
- \item if \varname{[previous_window_flag]} is not set, the left half
+ \item read 1 bit for \varname{[previous\_window\_flag]}
+ \item read 1 bit for \varname{[next\_window\_flag]}
+ \item if \varname{[previous\_window\_flag]} is not set, the left half
of the window will be a hybrid window for lapping with a
short block. See \xref{vorbis:spec:window} for an illustration of overlapping
dissimilar
windows. Else, the left half window will have normal long
shape.
- \item if \varname{[next_window_flag]} is not set, the right half of
+ \item if \varname{[next\_window\_flag]} is not set, the right half of
the window will be a hybrid window for lapping with a short
block. See \xref{vorbis:spec:window} for an
illustration of overlapping dissimilar
@@ -324,44 +324,44 @@
proceeds as follows:
\begin{enumerate}
- \item \varname{[window_center]} = \varname{[n]} / 2
- \item if (\varname{[vorbis_mode_blockflag]} is set and \varname{[previous_window_flag]} is
+ \item \varname{[window\_center]} = \varname{[n]} / 2
+ \item if (\varname{[vorbis\_mode\_blockflag]} is set and \varname{[previous\_window\_flag]} is
not set) then
\begin{enumerate}
- \item \varname{[left_window_start]} = \varname{[n]}/4 -
-\varname{[blocksize_0]}/4
- \item \varname{[left_window_end]} = \varname{[n]}/4 + \varname{[blocksize_0]}/4
- \item \varname{[left_n]} = \varname{[blocksize_0]}/2
+ \item \varname{[left\_window\_start]} = \varname{[n]}/4 -
+\varname{[blocksize\_0]}/4
+ \item \varname{[left\_window\_end]} = \varname{[n]}/4 + \varname{[blocksize\_0]}/4
+ \item \varname{[left\_n]} = \varname{[blocksize\_0]}/2
\end{enumerate}
else
\begin{enumerate}
- \item \varname{[left_window_start]} = 0
- \item \varname{[left_window_end]} = \varname{[window_center]}
- \item \varname{[left_n]} = \varname{[n]}/2
+ \item \varname{[left\_window\_start]} = 0
+ \item \varname{[left\_window\_end]} = \varname{[window\_center]}
+ \item \varname{[left\_n]} = \varname{[n]}/2
\end{enumerate}
- \item if (\varname{[vorbis_mode_blockflag]} is set and \varname{[next_window_flag]} is not
+ \item if (\varname{[vorbis\_mode\_blockflag]} is set and \varname{[next\_window\_flag]} is not
set) then
\begin{enumerate}
- \item \varname{[right_window_start]} = \varname{[n]*3}/4 -
-\varname{[blocksize_0]}/4
- \item \varname{[right_window_end]} = \varname{[n]*3}/4 +
-\varname{[blocksize_0]}/4
- \item \varname{[right_n]} = \varname{[blocksize_0]}/2
+ \item \varname{[right\_window\_start]} = \varname{[n]*3}/4 -
+\varname{[blocksize\_0]}/4
+ \item \varname{[right\_window\_end]} = \varname{[n]*3}/4 +
+\varname{[blocksize\_0]}/4
+ \item \varname{[right\_n]} = \varname{[blocksize\_0]}/2
\end{enumerate}
else
\begin{enumerate}
- \item \varname{[right_window_start]} = \varname{[window_center]}
- \item \varname{[right_window_end]} = \varname{[n]}
- \item \varname{[right_n]} = \varname{[n]}/2
+ \item \varname{[right\_window\_start]} = \varname{[window\_center]}
+ \item \varname{[right\_window\_end]} = \varname{[n]}
+ \item \varname{[right\_n]} = \varname{[n]}/2
\end{enumerate}
- \item window from range 0 ... \varname{[left_window_start]}-1 inclusive is zero
- \item for \varname{[i]} in range \varname{[left_window_start]} ...
-\varname{[left_window_end]}-1, window(\varname{[i]}) = $\sin(\frac{\pi}{2} * \sin^2($ (\varname{[i]}-\varname{[left_window_start]}+0.5) / \varname{[left_n]} $* \frac{\pi}{2})$ )
- \item window from range \varname{[left_window_end]} ... \varname{[right_window_start]}-1
-inclusive is one\item for \varname{[i]} in range \varname{[right_window_start]} ... \varname{[right_window_end]}-1, window(\varname{[i]}) = $\sin(\frac{\pi}{2} * \sin^2($ (\varname{[i]}-\varname{[right_window_start]}+0.5) / \varname{[right_n]} $ * \frac{\pi}{2} + \frac{\pi}{2})$ )
-\item window from range \varname{[right_window_start]} ... \varname{[n]}-1 is
+ \item window from range 0 ... \varname{[left\_window\_start]}-1 inclusive is zero
+ \item for \varname{[i]} in range \varname{[left\_window\_start]} ...
+\varname{[left\_window\_end]}-1, window(\varname{[i]}) = $\sin(\frac{\pi}{2} * \sin^2($ (\varname{[i]}-\varname{[left\_window\_start]}+0.5) / \varname{[left\_n]} $* \frac{\pi}{2})$ )
+ \item window from range \varname{[left\_window\_end]} ... \varname{[right\_window\_start]}-1
+inclusive is one\item for \varname{[i]} in range \varname{[right\_window\_start]} ... \varname{[right\_window\_end]}-1, window(\varname{[i]}) = $\sin(\frac{\pi}{2} * \sin^2($ (\varname{[i]}-\varname{[right\_window\_start]}+0.5) / \varname{[right\_n]} $ * \frac{\pi}{2} + \frac{\pi}{2})$ )
+\item window from range \varname{[right\_window\_start]} ... \varname{[n]}-1 is
zero
\end{enumerate}
@@ -375,30 +375,30 @@
\subsubsection{floor curve decode}
From this point on, we assume out decode context is using mode number
-\varname{[mode_number]} from configuration array
-\varname{[vorbis_mode_configurations]} and the map number
-\varname{[vorbis_mode_mapping]} (specified by the current mode) taken
+\varname{[mode\_number]} from configuration array
+\varname{[vorbis\_mode\_configurations]} and the map number
+\varname{[vorbis\_mode\_mapping]} (specified by the current mode) taken
from the mapping configuration array
-\varname{[vorbis_mapping_configurations]}.
+\varname{[vorbis\_mapping\_configurations]}.
Floor curves are decoded one-by-one in channel order.
-For each floor \varname{[i]} of \varname{[audio_channels]}
+For each floor \varname{[i]} of \varname{[audio\_channels]}
\begin{enumerate}
- \item \varname{[submap_number]} = element \varname{[i]} of vector [vorbis_mapping_mux]
- \item \varname{[floor_number]} = element \varname{[submap_number]} of vector
-[vorbis_submap_floor]
+ \item \varname{[submap\_number]} = element \varname{[i]} of vector [vorbis\_mapping\_mux]
+ \item \varname{[floor\_number]} = element \varname{[submap\_number]} of vector
+[vorbis\_submap\_floor]
\item if the floor type of this
-floor (vector \varname{[vorbis_floor_types]} element
-\varname{[floor_number]}) is zero then decode the floor for
+floor (vector \varname{[vorbis\_floor\_types]} element
+\varname{[floor\_number]}) is zero then decode the floor for
channel \varname{[i]} according to the
\xref{vorbis:spec:floor0-decode}
\item if the type of this floor
is one then decode the floor for channel \varname{[i]} according
to the \xref{vorbis:spec:floor1-decode}
\item save the needed decoded floor information for channel for later synthesis
- \item if the decoded floor returned 'unused', set vector \varname{[no_residue]} element
-\varname{[i]} to true, else set vector \varname{[no_residue]} element \varname{[i]} to
+ \item if the decoded floor returned 'unused', set vector \varname{[no\_residue]} element
+\varname{[i]} to true, else set vector \varname{[no\_residue]} element \varname{[i]} to
false
\end{enumerate}
@@ -418,13 +418,13 @@
used and some are not, channel coupling could result in mixing a
zeroed and nonzeroed vector to produce two nonzeroed vectors.
-for each \varname{[i]} from 0 ... \varname{[vorbis_mapping_coupling_steps]}-1
+for each \varname{[i]} from 0 ... \varname{[vorbis\_mapping\_coupling\_steps]}-1
\begin{enumerate}
- \item if either \varname{[no_residue]} entry for channel
-(\varname{[vorbis_mapping_magnitude]} element \varname{[i]})
+ \item if either \varname{[no\_residue]} entry for channel
+(\varname{[vorbis\_mapping\_magnitude]} element \varname{[i]})
or channel
-(\varname{[vorbis_mapping_angle]} element \varname{[i]})
+(\varname{[vorbis\_mapping\_angle]} element \varname{[i]})
are set to false, then both must be set to false. Note that an 'unused'
floor has no decoded floor information; it is important that this is
remembered at floor curve synthesis time.
@@ -438,34 +438,34 @@
Unlike floors, which are decoded in channel order, the residue vectors
are decoded in submap order.
-for each submap \varname{[i]} in order from 0 ... \varname{[vorbis_mapping_submaps]}-1
+for each submap \varname{[i]} in order from 0 ... \varname{[vorbis\_mapping\_submaps]}-1
\begin{enumerate}
\item \varname{[ch]} = 0
- \item for each channel \varname{[j]} in order from 0 ... \varname{[audio_channels]} - 1
+ \item for each channel \varname{[j]} in order from 0 ... \varname{[audio\_channels]} - 1
\begin{enumerate}
- \item if channel \varname{[j]} in submap \varname{[i]} (vector \varname{[vorbis_mapping_mux]} element \varname{[j]} is equal to \varname{[i]})
+ \item if channel \varname{[j]} in submap \varname{[i]} (vector \varname{[vorbis\_mapping\_mux]} element \varname{[j]} is equal to \varname{[i]})
\begin{enumerate}
- \item if vector \varname{[no_residue]} element \varname{[j]} is true
+ \item if vector \varname{[no\_residue]} element \varname{[j]} is true
\begin{enumerate}
- \item vector \varname{[do_not_decode_flag]} element \varname{[ch]} is set
+ \item vector \varname{[do\_not\_decode\_flag]} element \varname{[ch]} is set
\end{enumerate}
else
\begin{enumerate}
- \item vector \varname{[do_not_decode_flag]} element \varname{[ch]} is unset
+ \item vector \varname{[do\_not\_decode\_flag]} element \varname{[ch]} is unset
\end{enumerate}
\item increment \varname{[ch]}
\end{enumerate}
\end{enumerate}
- \item \varname{[residue_number]} = vector \varname{[vorbis_mapping_submap_residue]} element \varname{[i]}
- \item \varname{[residue_type]} = vector \varname{[vorbis_residue_types]} element \varname{[residue_number]}
- \item decode \varname{[ch]} vectors using residue \varname{[residue_number]}, according to type \varname{[residue_type]}, also passing vector \varname{[do_not_decode_flag]} to indicate which vectors in the bundle should not be decoded. Correct per-vector decode length is \varname{[n]}/2.
+ \item \varname{[residue\_number]} = vector \varname{[vorbis\_mapping\_submap\_residue]} element \varname{[i]}
+ \item \varname{[residue\_type]} = vector \varname{[vorbis\_residue\_types]} element \varname{[residue\_number]}
+ \item decode \varname{[ch]} vectors using residue \varname{[residue\_number]}, according to type \varname{[residue\_type]}, also passing vector \varname{[do\_not\_decode\_flag]} to indicate which vectors in the bundle should not be decoded. Correct per-vector decode length is \varname{[n]}/2.
\item \varname{[ch]} = 0
- \item for each channel \varname{[j]} in order from 0 ... \varname{[audio_channels]}
+ \item for each channel \varname{[j]} in order from 0 ... \varname{[audio\_channels]}
\begin{enumerate}
- \item if channel \varname{[j]} is in submap \varname{[i]} (vector \varname{[vorbis_mapping_mux]} element \varname{[j]} is equal to \varname{[i]})
+ \item if channel \varname{[j]} is in submap \varname{[i]} (vector \varname{[vorbis\_mapping\_mux]} element \varname{[j]} is equal to \varname{[i]})
\begin{enumerate}
\item residue vector for channel \varname{[j]} is set to decoded residue vector \varname{[ch]}
\item increment \varname{[ch]}
@@ -479,26 +479,26 @@
\subsubsection{inverse coupling}
-for each \varname{[i]} from \varname{[vorbis_mapping_coupling_steps]}-1 descending to 0
+for each \varname{[i]} from \varname{[vorbis\_mapping\_coupling\_steps]}-1 descending to 0
\begin{enumerate}
- \item \varname{[magnitude_vector]} = the residue vector for channel
-(vector \varname{[vorbis_mapping_magnitude]} element \varname{[i]})
- \item \varname{[angle_vector]} = the residue vector for channel (vector
-\varname{[vorbis_mapping_angle]} element \varname{[i]})
- \item for each scalar value \varname{[M]} in vector \varname{[magnitude_vector]} and the corresponding scalar value \varname{[A]} in vector \varname{[angle_vector]}:
+ \item \varname{[magnitude\_vector]} = the residue vector for channel
+(vector \varname{[vorbis\_mapping\_magnitude]} element \varname{[i]})
+ \item \varname{[angle\_vector]} = the residue vector for channel (vector
+\varname{[vorbis\_mapping\_angle]} element \varname{[i]})
+ \item for each scalar value \varname{[M]} in vector \varname{[magnitude\_vector]} and the corresponding scalar value \varname{[A]} in vector \varname{[angle\_vector]}:
\begin{enumerate}
\item if (\varname{[M]} is greater than zero)
\begin{enumerate}
\item if (\varname{[A]} is greater than zero)
\begin{enumerate}
- \item \varname{[new_M]} = \varname{[M]}
- \item \varname{[new_A]} = \varname{[M]}-\varname{[A]}
+ \item \varname{[new\_M]} = \varname{[M]}
+ \item \varname{[new\_A]} = \varname{[M]}-\varname{[A]}
\end{enumerate}
else
\begin{enumerate}
- \item \varname{[new_A]} = \varname{[M]}
- \item \varname{[new_M]} = \varname{[M]}+\varname{[A]}
+ \item \varname{[new\_A]} = \varname{[M]}
+ \item \varname{[new\_M]} = \varname{[M]}+\varname{[A]}
\end{enumerate}
\end{enumerate}
@@ -506,19 +506,19 @@
\begin{enumerate}
\item if (\varname{[A]} is greater than zero)
\begin{enumerate}
- \item \varname{[new_M]} = \varname{[M]}
- \item \varname{[new_A]} = \varname{[M]}+\varname{[A]}
+ \item \varname{[new\_M]} = \varname{[M]}
+ \item \varname{[new\_A]} = \varname{[M]}+\varname{[A]}
\end{enumerate}
else
\begin{enumerate}
- \item \varname{[new_A]} = \varname{[M]}
- \item \varname{[new_M]} = \varname{[M]}-\varname{[A]}
+ \item \varname{[new\_A]} = \varname{[M]}
+ \item \varname{[new\_M]} = \varname{[M]}-\varname{[A]}
\end{enumerate}
\end{enumerate}
- \item set scalar value \varname{[M]} in vector \varname{[magnitude_vector]} to \varname{[new_M]}
- \item set scalar value \varname{[A]} in vector \varname{[angle_vector]} to \varname{[new_A]}
+ \item set scalar value \varname{[M]} in vector \varname{[magnitude\_vector]} to \varname{[new\_M]}
+ \item set scalar value \varname{[A]} in vector \varname{[angle\_vector]} to \varname{[new\_A]}
\end{enumerate}
\end{enumerate}
@@ -573,7 +573,7 @@
-\subsubsection{overlap_add}
+\subsubsection{overlap\_add}
Windowed MDCT output is overlapped and added with the right hand data
of the previous window such that the 3/4 point of the previous window
@@ -590,7 +590,7 @@
data to be returned is:
\begin{programlisting}
-window_blocksize(previous_window)/4+window_blocksize(current_window)/4
+window\_blocksize(previous\_window)/4+window\_blocksize(current\_window)/4
\end{programlisting}
from the center (element windowsize/2) of the previous window to the
Modified: trunk/vorbis/doc/05-comment.tex
===================================================================
--- trunk/vorbis/doc/05-comment.tex 2011-08-11 07:04:25 UTC (rev 18066)
+++ trunk/vorbis/doc/05-comment.tex 2011-08-11 07:30:43 UTC (rev 18067)
@@ -46,15 +46,15 @@
The comment header is decoded as follows:
\begin{programlisting}
- 1) [vendor_length] = read an unsigned integer of 32 bits
- 2) [vendor_string] = read a UTF-8 vector as [vendor_length] octets
- 3) [user_comment_list_length] = read an unsigned integer of 32 bits
- 4) iterate [user_comment_list_length] times {
+ 1) [vendor\_length] = read an unsigned integer of 32 bits
+ 2) [vendor\_string] = read a UTF-8 vector as [vendor\_length] octets
+ 3) [user\_comment\_list\_length] = read an unsigned integer of 32 bits
+ 4) iterate [user\_comment\_list\_length] times {
5) [length] = read an unsigned integer of 32 bits
6) this iteration's user comment = read a UTF-8 vector as [length] octets
}
- 7) [framing_bit] = read a single bit as boolean
- 8) if ( [framing_bit] unset or end-of-packet ) then ERROR
+ 7) [framing\_bit] = read a single bit as boolean
+ 8) if ( [framing\_bit] unset or end-of-packet ) then ERROR
9) done.
\end{programlisting}
@@ -124,7 +124,7 @@
Use Permitted', a URL to a license such as a Creative Commons license
("www.creativecommons.org/blahblah/license.html") or the EFF Open
Audio License ('distributed under the terms of the Open Audio
-License. see http://www.eff.org/IP/Open_licenses/eff_oal.html for
+License. see http://www.eff.org/IP/Open\_licenses/eff\_oal.html for
details'), etc.
\item[ORGANIZATION]
@@ -231,7 +231,7 @@
\end{enumerate}
-This is actually somewhat easier to describe in code; implementation of the above can be found in \filename{vorbis/lib/info.c}, \function{_vorbis_pack_comment()} and \function{_vorbis_unpack_comment()}.
+This is actually somewhat easier to describe in code; implementation of the above can be found in \filename{vorbis/lib/info.c}, \function{\_vorbis\_pack\_comment()} and \function{\_vorbis\_unpack\_comment()}.
Modified: trunk/vorbis/doc/07-floor1.tex
===================================================================
--- trunk/vorbis/doc/07-floor1.tex 2011-08-11 07:04:25 UTC (rev 18066)
+++ trunk/vorbis/doc/07-floor1.tex 2011-08-11 07:30:43 UTC (rev 18067)
@@ -111,44 +111,44 @@
\begin{Verbatim}[commandchars=\\\{\}]
- 1) [floor1_partitions] = read 5 bits as unsigned integer
- 2) [maximum_class] = -1
- 3) iterate [i] over the range 0 ... [floor1_partitions]-1 \{
+ 1) [floor1\_partitions] = read 5 bits as unsigned integer
+ 2) [maximum\_class] = -1
+ 3) iterate [i] over the range 0 ... [floor1\_partitions]-1 \{
- 4) vector [floor1_partition_class_list] element [i] = read 4 bits as unsigned integer
+ 4) vector [floor1\_partition\_class\_list] element [i] = read 4 bits as unsigned integer
\}
- 5) [maximum_class] = largest integer scalar value in vector [floor1_partition_class_list]
- 6) iterate [i] over the range 0 ... [maximum_class] \{
+ 5) [maximum\_class] = largest integer scalar value in vector [floor1\_partition\_class\_list]
+ 6) iterate [i] over the range 0 ... [maximum\_class] \{
- 7) vector [floor1_class_dimensions] element [i] = read 3 bits as unsigned integer and add 1
- 8) vector [floor1_class_subclasses] element [i] = read 2 bits as unsigned integer
- 9) if ( vector [floor1_class_subclasses] element [i] is nonzero ) \{
+ 7) vector [floor1\_class\_dimensions] element [i] = read 3 bits as unsigned integer and add 1
+ 8) vector [floor1\_class\_subclasses] element [i] = read 2 bits as unsigned integer
+ 9) if ( vector [floor1\_class\_subclasses] element [i] is nonzero ) \{
- 10) vector [floor1_class_masterbooks] element [i] = read 8 bits as unsigned integer
+ 10) vector [floor1\_class\_masterbooks] element [i] = read 8 bits as unsigned integer
\}
- 11) iterate [j] over the range 0 ... (2 exponent [floor1_class_subclasses] element [i]) - 1 \{
+ 11) iterate [j] over the range 0 ... (2 exponent [floor1\_class\_subclasses] element [i]) - 1 \{
- 12) array [floor1_subclass_books] element [i],[j] =
+ 12) array [floor1\_subclass\_books] element [i],[j] =
read 8 bits as unsigned integer and subtract one
\}
\}
- 13) [floor1_multiplier] = read 2 bits as unsigned integer and add one
+ 13) [floor1\_multiplier] = read 2 bits as unsigned integer and add one
14) [rangebits] = read 4 bits as unsigned integer
- 15) vector [floor1_X_list] element [0] = 0
- 16) vector [floor1_X_list] element [1] = 2 exponent [rangebits];
- 17) [floor1_values] = 2
- 18) iterate [i] over the range 0 ... [floor1_partitions]-1 \{
+ 15) vector [floor1\_X\_list] element [0] = 0
+ 16) vector [floor1\_X\_list] element [1] = 2 exponent [rangebits];
+ 17) [floor1\_values] = 2
+ 18) iterate [i] over the range 0 ... [floor1\_partitions]-1 \{
- 19) [current_class_number] = vector [floor1_partition_class_list] element [i]
- 20) iterate [j] over the range 0 ... ([floor1_class_dimensions] element [current_class_number])-1 \{
- 21) vector [floor1_X_list] element ([floor1_values]) =
+ 19) [current\_class\_number] = vector [floor1\_partition\_class\_list] element [i]
+ 20) iterate [j] over the range 0 ... ([floor1\_class\_dimensions] element [current\_class\_number])-1 \{
+ 21) vector [floor1\_X\_list] element ([floor1\_values]) =
read [rangebits] bits as unsigned integer
- 22) increment [floor1_values] by one
+ 22) increment [floor1\_values] by one
\}
\}
@@ -157,11 +157,11 @@
An end-of-packet condition while reading any aspect of a floor 1
configuration during setup renders a stream undecodable. In addition,
-a \varname{[floor1_class_masterbooks]} or
-\varname{[floor1_subclass_books]} scalar element greater than the
+a \varname{[floor1\_class\_masterbooks]} or
+\varname{[floor1\_subclass\_books]} scalar element greater than the
highest numbered codebook configured in this stream is an error
condition that renders the stream undecodable. All vector
-[floor1_x_list] element values must be unique within the vector; a
+[floor1\_x\_list] element values must be unique within the vector; a
non-unique value renders the stream undecodable.
\paragraph{packet decode} \label{vorbis:spec:floor1-decode}
@@ -183,35 +183,35 @@
Assuming \varname{[nonzero]} is set, decode proceeds as follows:
\begin{Verbatim}[commandchars=\\\{\}]
- 1) [range] = vector \{ 256, 128, 86, 64 \} element ([floor1_multiplier]-1)
- 2) vector [floor1_Y] element [0] = read \link{vorbis:spec:ilog}{ilog}([range]-1) bits as unsigned integer
- 3) vector [floor1_Y] element [1] = read \link{vorbis:spec:ilog}{ilog}([range]-1) bits as unsigned integer
+ 1) [range] = vector \{ 256, 128, 86, 64 \} element ([floor1\_multiplier]-1)
+ 2) vector [floor1\_Y] element [0] = read \link{vorbis:spec:ilog}{ilog}([range]-1) bits as unsigned integer
+ 3) vector [floor1\_Y] element [1] = read \link{vorbis:spec:ilog}{ilog}([range]-1) bits as unsigned integer
4) [offset] = 2;
- 5) iterate [i] over the range 0 ... [floor1_partitions]-1 \{
+ 5) iterate [i] over the range 0 ... [floor1\_partitions]-1 \{
- 6) [class] = vector [floor1_partition_class] element [i]
- 7) [cdim] = vector [floor1_class_dimensions] element [class]
- 8) [cbits] = vector [floor1_class_subclasses] element [class]
+ 6) [class] = vector [floor1\_partition\_class] element [i]
+ 7) [cdim] = vector [floor1\_class\_dimensions] element [class]
+ 8) [cbits] = vector [floor1\_class\_subclasses] element [class]
9) [csub] = (2 exponent [cbits])-1
10) [cval] = 0
11) if ( [cbits] is greater than zero ) \{
12) [cval] = read from packet using codebook number
- (vector [floor1_class_masterbooks] element [class]) in scalar context
+ (vector [floor1\_class\_masterbooks] element [class]) in scalar context
\}
13) iterate [j] over the range 0 ... [cdim]-1 \{
- 14) [book] = array [floor1_subclass_books] element [class],([cval] bitwise AND [csub])
+ 14) [book] = array [floor1\_subclass\_books] element [class],([cval] bitwise AND [csub])
15) [cval] = [cval] right shifted [cbits] bits
16) if ( [book] is not less than zero ) \{
- 17) vector [floor1_Y] element ([j]+[offset]) = read from packet using codebook
+ 17) vector [floor1\_Y] element ([j]+[offset]) = read from packet using codebook
[book] in scalar context
\} else [book] is less than zero \{
- 18) vector [floor1_Y] element ([j]+[offset]) = 0
+ 18) vector [floor1\_Y] element ([j]+[offset]) = 0
\}
\}
@@ -229,7 +229,7 @@
\varname{[nonzero]} flag had been unset at the beginning of decode.
-Vector \varname{[floor1_Y]} contains the values from packet decode
+Vector \varname{[floor1\_Y]} contains the values from packet decode
needed for floor 1 synthesis.
@@ -256,23 +256,23 @@
+/- difference values, then apply to line prediction.
\begin{Verbatim}[commandchars=\\\{\}]
- 1) [range] = vector \{ 256, 128, 86, 64 \} element ([floor1_multiplier]-1)
- 2) vector [floor1_step2_flag] element [0] = set
- 3) vector [floor1_step2_flag] element [1] = set
- 4) vector [floor1_final_Y] element [0] = vector [floor1_Y] element [0]
- 5) vector [floor1_final_Y] element [1] = vector [floor1_Y] element [1]
- 6) iterate [i] over the range 2 ... [floor1_values]-1 \{
+ 1) [range] = vector \{ 256, 128, 86, 64 \} element ([floor1\_multiplier]-1)
+ 2) vector [floor1\_step2\_flag] element [0] = set
+ 3) vector [floor1\_step2\_flag] element [1] = set
+ 4) vector [floor1\_final\_Y] element [0] = vector [floor1\_Y] element [0]
+ 5) vector [floor1\_final\_Y] element [1] = vector [floor1\_Y] element [1]
+ 6) iterate [i] over the range 2 ... [floor1\_values]-1 \{
- 7) [low_neighbor_offset] = \link{vorbis:spec:low:neighbor}{low_neighbor}([floor1_X_list],[i])
- 8) [high_neighbor_offset] = \link{vorbis:spec:high:neighbor}{high_neighbor}([floor1_X_list],[i])
+ 7) [low\_neighbor\_offset] = \link{vorbis:spec:low:neighbor}{low\_neighbor}([floor1\_X\_list],[i])
+ 8) [high\_neighbor\_offset] = \link{vorbis:spec:high:neighbor}{high\_neighbor}([floor1\_X\_list],[i])
- 9) [predicted] = \link{vorbis:spec:render:point}{render_point}( vector [floor1_X_list] element [low_neighbor_offset],
- vector [floor1_final_Y] element [low_neighbor_offset],
- vector [floor1_X_list] element [high_neighbor_offset],
- vector [floor1_final_Y] element [high_neighbor_offset],
- vector [floor1_X_list] element [i] )
+ 9) [predicted] = \link{vorbis:spec:render:point}{render\_point}( vector [floor1\_X\_list] element [low\_neighbor\_offset],
+ vector [floor1\_final\_Y] element [low\_neighbor\_offset],
+ vector [floor1\_X\_list] element [high\_neighbor\_offset],
+ vector [floor1\_final\_Y] element [high\_neighbor\_offset],
+ vector [floor1\_X\_list] element [i] )
- 10) [val] = vector [floor1_Y] element [i]
+ 10) [val] = vector [floor1\_Y] element [i]
11) [highroom] = [range] - [predicted]
12) [lowroom] = [predicted]
13) if ( [highroom] is less than [lowroom] ) \{
@@ -287,18 +287,18 @@
16) if ( [val] is nonzero ) \{
- 17) vector [floor1_step2_flag] element [low_neighbor_offset] = set
- 18) vector [floor1_step2_flag] element [high_neighbor_offset] = set
- 19) vector [floor1_step2_flag] element [i] = set
+ 17) vector [floor1\_step2\_flag] element [low\_neighbor\_offset] = set
+ 18) vector [floor1\_step2\_flag] element [high\_neighbor\_offset] = set
+ 19) vector [floor1\_step2\_flag] element [i] = set
20) if ( [val] is greater than or equal to [room] ) \{
21) if ( [highroom] is greater than [lowroom] ) \{
- 22) vector [floor1_final_Y] element [i] = [val] - [lowroom] + [predicted]
+ 22) vector [floor1\_final\_Y] element [i] = [val] - [lowroom] + [predicted]
\} else [highroom] is not greater than [lowroom] \{
- 23) vector [floor1_final_Y] element [i] = [predicted] - [val] + [highroom] - 1
+ 23) vector [floor1\_final\_Y] element [i] = [predicted] - [val] + [highroom] - 1
\}
@@ -306,12 +306,12 @@
24) if ([val] is odd) \{
- 25) vector [floor1_final_Y] element [i] =
+ 25) vector [floor1\_final\_Y] element [i] =
[predicted] - (([val] + 1) divided by 2 using integer division)
\} else [val] is even \{
- 26) vector [floor1_final_Y] element [i] =
+ 26) vector [floor1\_final\_Y] element [i] =
[predicted] + ([val] / 2 using integer division)
\}
@@ -320,8 +320,8 @@
\} else [val] is zero \{
- 27) vector [floor1_step2_flag] element [i] = unset
- 28) vector [floor1_final_Y] element [i] = [predicted]
+ 27) vector [floor1\_step2\_flag] element [i] = unset
+ 28) vector [floor1\_final\_Y] element [i] = [predicted]
\}
@@ -338,18 +338,18 @@
Curve synthesis generates a return vector \varname{[floor]} of length
\varname{[n]} (where \varname{[n]} is provided by the decode process
calling to floor decode). Floor 1 curve synthesis makes use of the
-\varname{[floor1_X_list]}, \varname{[floor1_final_Y]} and
-\varname{[floor1_step2_flag]} vectors, as well as [floor1_multiplier]
-and [floor1_values] values.
+\varname{[floor1\_X\_list]}, \varname{[floor1\_final\_Y]} and
+\varname{[floor1\_step2\_flag]} vectors, as well as [floor1\_multiplier]
+and [floor1\_values] values.
Decode begins by sorting the scalars from vectors
-\varname{[floor1_X_list]}, \varname{[floor1_final_Y]} and
-\varname{[floor1_step2_flag]} together into new vectors
-\varname{[floor1_X_list]'}, \varname{[floor1_final_Y]'} and
-\varname{[floor1_step2_flag]'} according to ascending sort order of the
-values in \varname{[floor1_X_list]}. That is, sort the values of
-\varname{[floor1_X_list]} and then apply the same permutation to
-elements of the other two vectors so that the X, Y and step2_flag
+\varname{[floor1\_X\_list]}, \varname{[floor1\_final\_Y]} and
+\varname{[floor1\_step2\_flag]} together into new vectors
+\varname{[floor1\_X\_list]'}, \varname{[floor1\_final\_Y]'} and
+\varname{[floor1\_step2\_flag]'} according to ascending sort order of the
+values in \varname{[floor1\_X\_list]}. That is, sort the values of
+\varname{[floor1\_X\_list]} and then apply the same permutation to
+elements of the other two vectors so that the X, Y and step2\_flag
values still match.
Then compute the final curve in one pass:
@@ -357,14 +357,14 @@
\begin{Verbatim}[commandchars=\\\{\}]
1) [hx] = 0
2) [lx] = 0
- 3) [ly] = vector [floor1_final_Y]' element [0] * [floor1_multiplier]
- 4) iterate [i] over the range 1 ... [floor1_values]-1 \{
+ 3) [ly] = vector [floor1\_final\_Y]' element [0] * [floor1\_multiplier]
+ 4) iterate [i] over the range 1 ... [floor1\_values]-1 \{
- 5) if ( [floor1_step2_flag]' element [i] is set ) \{
+ 5) if ( [floor1\_step2\_flag]' element [i] is set ) \{
- 6) [hy] = [floor1_final_Y]' element [i] * [floor1_multiplier]
- 7) [hx] = [floor1_X_list]' element [i]
- 8) \link{vorbis:spec:render:line}{render_line}( [lx], [ly], [hx], [hy], [floor] )
+ 6) [hy] = [floor1\_final\_Y]' element [i] * [floor1\_multiplier]
+ 7) [hx] = [floor1\_X\_list]' element [i]
+ 8) \link{vorbis:spec:render:line}{render\_line}( [lx], [ly], [hx], [hy], [floor] )
9) [lx] = [hx]
10) [ly] = [hy]
\}
@@ -372,7 +372,7 @@
11) if ( [hx] is less than [n] ) \{
- 12) \link{vorbis:spec:render:line}{render_line}( [hx], [hy], [n], [hy], [floor] )
+ 12) \link{vorbis:spec:render:line}{render\_line}( [hx], [hy], [n], [hy], [floor] )
\}
@@ -383,7 +383,7 @@
\}
15) for each scalar in vector [floor], perform a lookup substitution using
- the scalar value from [floor] as an offset into the vector \link{vorbis:spec:floor1:inverse:dB:table}{[floor1_inverse_dB_static_table]}
+ the scalar value from [floor] as an offset into the vector \link{vorbis:spec:floor1:inverse:dB:table}{[floor1\_inverse\_dB\_static\_table]}
16) done
Modified: trunk/vorbis/doc/08-residue.tex
===================================================================
--- trunk/vorbis/doc/08-residue.tex 2011-08-11 07:04:25 UTC (rev 18066)
+++ trunk/vorbis/doc/08-residue.tex 2011-08-11 07:30:43 UTC (rev 18067)
@@ -37,11 +37,11 @@
\begin{itemize}
\item Each vector is partitioned into multiple equal sized chunks
according to configuration specified. If we have a vector size of
-\emph{n}, a partition size \emph{residue_partition_size}, and a total
+\emph{n}, a partition size \emph{residue\_partition\_size}, and a total
of \emph{ch} residue vectors, the total number of partitioned chunks
-coded is \emph{n}/\emph{residue_partition_size}*\emph{ch}. It is
+coded is \emph{n}/\emph{residue\_partition\_size}*\emph{ch}. It is
important to note that the integer division truncates. In the below
-example, we assume an example \emph{residue_partition_size} of 8.
+example, we assume an example \emph{residue\_partition\_size} of 8.
\item Each partition in each vector has a classification number that
specifies which of multiple configured VQ codebook setups are used to
@@ -156,48 +156,48 @@
Header decode for all three residue types is identical.
\begin{programlisting}
- 1) [residue_begin] = read 24 bits as unsigned integer
- 2) [residue_end] = read 24 bits as unsigned integer
- 3) [residue_partition_size] = read 24 bits as unsigned integer and add one
- 4) [residue_classifications] = read 6 bits as unsigned integer and add one
- 5) [residue_classbook] = read 8 bits as unsigned integer
+ 1) [residue\_begin] = read 24 bits as unsigned integer
+ 2) [residue\_end] = read 24 bits as unsigned integer
+ 3) [residue\_partition\_size] = read 24 bits as unsigned integer and add one
+ 4) [residue\_classifications] = read 6 bits as unsigned integer and add one
+ 5) [residue\_classbook] = read 8 bits as unsigned integer
\end{programlisting}
-\varname{[residue_begin]} and
-\varname{[residue_end]} select the specific sub-portion of
+\varname{[residue\_begin]} and
+\varname{[residue\_end]} select the specific sub-portion of
each vector that is actually coded; it implements akin to a bandpass
where, for coding purposes, the vector effectively begins at element
-\varname{[residue_begin]} and ends at
-\varname{[residue_end]}. Preceding and following values in
+\varname{[residue\_begin]} and ends at
+\varname{[residue\_end]}. Preceding and following values in
the unpacked vectors are zeroed. Note that for residue type 2, these
-values as well as \varname{[residue_partition_size]}apply to
+values as well as \varname{[residue\_partition\_size]}apply to
the interleaved vector, not the individual vectors before interleave.
-\varname{[residue_partition_size]} is as explained above,
-\varname{[residue_classifications]} is the number of possible
+\varname{[residue\_partition\_size]} is as explained above,
+\varname{[residue\_classifications]} is the number of possible
classification to which a partition can belong and
-\varname{[residue_classbook]} is the codebook number used to
+\varname{[residue\_classbook]} is the codebook number used to
code classification codewords. The number of dimensions in book
-\varname{[residue_classbook]} determines how many
+\varname{[residue\_classbook]} determines how many
classification values are grouped into a single classification
codeword. Note that the number of entries and dimensions in book
-\varname{[residue_classbook]}, along with
-\varname{[residue_classifications]}, overdetermines to
+\varname{[residue\_classbook]}, along with
+\varname{[residue\_classifications]}, overdetermines to
possible number of classification codewords.
-If \varname{[residue_classifications]}\^{}\varname{[residue_classbook]}.dimensions
-exceeds \varname{[residue_classbook]}.entries, the
+If \varname{[residue\_classifications]}\^{}\varname{[residue\_classbook]}.dimensions
+exceeds \varname{[residue\_classbook]}.entries, the
bitstream should be regarded to be undecodable.
Next we read a bitmap pattern that specifies which partition classes
code values in which passes.
\begin{programlisting}
- 1) iterate [i] over the range 0 ... [residue_classifications]-1 {
+ 1) iterate [i] over the range 0 ... [residue\_classifications]-1 {
- 2) [high_bits] = 0
- 3) [low_bits] = read 3 bits as unsigned integer
+ 2) [high\_bits] = 0
+ 3) [low\_bits] = read 3 bits as unsigned integer
4) [bitflag] = read one bit as boolean
- 5) if ( [bitflag] is set ) then [high_bits] = read five bits as unsigned integer
- 6) vector [residue_cascade] element [i] = [high_bits] * 8 + [low_bits]
+ 5) if ( [bitflag] is set ) then [high\_bits] = read five bits as unsigned integer
+ 6) vector [residue\_cascade] element [i] = [high\_bits] * 8 + [low\_bits]
}
7) done
\end{programlisting}
@@ -209,17 +209,17 @@
bitmap being eight bits):
\begin{programlisting}
- 1) iterate [i] over the range 0 ... [residue_classifications]-1 {
+ 1) iterate [i] over the range 0 ... [residue\_classifications]-1 {
2) iterate [j] over the range 0 ... 7 {
- 3) if ( vector [residue_cascade] element [i] bit [j] is set ) {
+ 3) if ( vector [residue\_cascade] element [i] bit [j] is set ) {
- 4) array [residue_books] element [i][j] = read 8 bits as unsigned integer
+ 4) array [residue\_books] element [i][j] = read 8 bits as unsigned integer
} else {
- 5) array [residue_books] element [i][j] = unused
+ 5) array [residue\_books] element [i][j] = unused
}
}
@@ -231,9 +231,9 @@
An end-of-packet condition at any point in header decode renders the
stream undecodable. In addition, any codebook number greater than the
maximum numbered codebook set up in this stream also renders the
-stream undecodable. All codebooks in array [residue_books] are
+stream undecodable. All codebooks in array [residue\_books] are
required to have a value mapping. The presence of codebook in array
-[residue_books] without a value mapping (maptype equals zero) renders
+[residue\_books] without a value mapping (maptype equals zero) renders
the stream undecodable.
@@ -252,46 +252,46 @@
decode', decode skips vector 1 during the decode loop. However, even
'do not decode' vectors are allocated and zeroed.
-Depending on the values of \varname{[residue_begin]} and
-\varname{[residue_end]}, it is obvious that the encoded
+Depending on the values of \varname{[residue\_begin]} and
+\varname{[residue\_end]}, it is obvious that the encoded
portion of a residue vector may be the entire possible residue vector
or some other strict subset of the actual residue vector size with
zero padding at either uncoded end. However, it is also possible to
-set \varname{[residue_begin]} and
-\varname{[residue_end]} to specify a range partially or
+set \varname{[residue\_begin]} and
+\varname{[residue\_end]} to specify a range partially or
wholly beyond the maximum vector size. Before beginning residue
-decode, limit \varname{[residue_begin]} and
-\varname{[residue_end]} to the maximum possible vector size
+decode, limit \varname{[residue\_begin]} and
+\varname{[residue\_end]} to the maximum possible vector size
as follows. We assume that the number of vectors being encoded,
\varname{[ch]} is provided by the higher level decoding
process.
\begin{programlisting}
- 1) [actual_size] = current blocksize/2;
+ 1) [actual\_size] = current blocksize/2;
2) if residue encoding is format 2
- 3) [actual_size] = [actual_size] * [ch];
- 4) [limit_residue_begin] = maximum of ([residue_begin],[actual_size]);
- 5) [limit_residue_end] = maximum of ([residue_end],[actual_size]);
+ 3) [actual\_size] = [actual\_size] * [ch];
+ 4) [limit\_residue\_begin] = maximum of ([residue\_begin],[actual\_size]);
+ 5) [limit\_residue\_end] = maximum of ([residue\_end],[actual\_size]);
\end{programlisting}
The following convenience values are conceptually useful to clarifying
the decode process:
\begin{programlisting}
- 1) [classwords_per_codeword] = [codebook_dimensions] value of codebook [residue_classbook]
- 2) [n_to_read] = [limit_residue_end] - [limit_residue_begin]
- 3) [partitions_to_read] = [n_to_read] / [residue_partition_size]
+ 1) [classwords\_per\_codeword] = [codebook\_dimensions] value of codebook [residue\_classbook]
+ 2) [n\_to\_read] = [limit\_residue\_end] - [limit\_residue\_begin]
+ 3) [partitions\_to\_read] = [n\_to\_read] / [residue\_partition\_size]
\end{programlisting}
Packet decode proceeds as follows, matching the description offered earlier in the document.
\begin{programlisting}
1) allocate and zero all vectors that will be returned.
- 2) if ([n_to_read] is zero), stop; there is no residue to decode.
+ 2) if ([n\_to\_read] is zero), stop; there is no residue to decode.
3) iterate [pass] over the range 0 ... 7 {
- 4) [partition_count] = 0
+ 4) [partition\_count] = 0
- 5) while [partition_count] is less than [partitions_to_read]
+ 5) while [partition\_count] is less than [partitions\_to\_read]
6) if ([pass] is zero) {
@@ -299,12 +299,12 @@
8) if vector [j] is not marked 'do not decode' {
- 9) [temp] = read from packet using codebook [residue_classbook] in scalar context
- 10) iterate [i] descending over the range [classwords_per_codeword]-1 ... 0 {
+ 9) [temp] = read from packet using codebook [residue\_classbook] in scalar context
+ 10) iterate [i] descending over the range [classwords\_per\_codeword]-1 ... 0 {
- 11) array [classifications] element [j],([i]+[partition_count]) =
- [temp] integer modulo [residue_classifications]
- 12) [temp] = [temp] / [residue_classifications] using integer division
+ 11) array [classifications] element [j],([i]+[partition\_count]) =
+ [temp] integer modulo [residue\_classifications]
+ 12) [temp] = [temp] / [residue\_classifications] using integer division
}
@@ -314,24 +314,24 @@
}
- 13) iterate [i] over the range 0 .. ([classwords_per_codeword] - 1) while [partition_count]
- is also less than [partitions_to_read] {
+ 13) iterate [i] over the range 0 .. ([classwords\_per\_codeword] - 1) while [partition\_count]
+ is also less than [partitions\_to\_read] {
14) iterate [j] over the range 0 .. [ch]-1 {
15) if vector [j] is not marked 'do not decode' {
- 16) [vqclass] = array [classifications] element [j],[partition_count]
- 17) [vqbook] = array [residue_books] element [vqclass],[pass]
+ 16) [vqclass] = array [classifications] element [j],[partition\_count]
+ 17) [vqbook] = array [residue\_books] element [vqclass],[pass]
18) if ([vqbook] is not 'unused') {
19) decode partition into output vector number [j], starting at scalar
- offset [limit_residue_begin]+[partition_count]*[residue_partition_size] using
+ offset [limit\_residue\_begin]+[partition\_count]*[residue\_partition\_size] using
codebook number [vqbook] in VQ context
}
}
- 20) increment [partition_count] by one
+ 20) increment [partition\_count] by one
}
}
@@ -354,22 +354,22 @@
presents the same algorithm. Assume:
\begin{itemize}
-\item \varname{[n]} is the value in \varname{[residue_partition_size]}
+\item \varname{[n]} is the value in \varname{[residue\_partition\_size]}
\item \varname{[v]} is the residue vector
\item \varname{[offset]} is the beginning read offset in [v]
\end{itemize}
\begin{programlisting}
- 1) [step] = [n] / [codebook_dimensions]
+ 1) [step] = [n] / [codebook\_dimensions]
2) iterate [i] over the range 0 ... [step]-1 {
- 3) vector [entry_temp] = read vector from packet using current codebook in VQ context
- 4) iterate [j] over the range 0 ... [codebook_dimensions]-1 {
+ 3) vector [entry\_temp] = read vector from packet using current codebook in VQ context
+ 4) iterate [j] over the range 0 ... [codebook\_dimensions]-1 {
5) vector [v] element ([offset]+[i]+[j]*[step]) =
vector [v] element ([offset]+[i]+[j]*[step]) +
- vector [entry_temp] element [j]
+ vector [entry\_temp] element [j]
}
@@ -389,7 +389,7 @@
\begin{itemize}
\item \varname{[n]} is the value in
-\varname{[residue_partition_size]}
+\varname{[residue\_partition\_size]}
\item \varname{[v]} is the residue vector
\item \varname{[offset]} is the beginning read offset in [v]
\end{itemize}
@@ -397,12 +397,12 @@
\begin{programlisting}
1) [i] = 0
- 2) vector [entry_temp] = read vector from packet using current codebook in VQ context
- 3) iterate [j] over the range 0 ... [codebook_dimensions]-1 {
+ 2) vector [entry\_temp] = read vector from packet using current codebook in VQ context
+ 3) iterate [j] over the range 0 ... [codebook\_dimensions]-1 {
4) vector [v] element ([offset]+[i]) =
vector [v] element ([offset]+[i]) +
- vector [entry_temp] element [j]
+ vector [entry\_temp] element [j]
5) increment [i]
}
Modified: trunk/vorbis/doc/09-helper.tex
===================================================================
--- trunk/vorbis/doc/09-helper.tex 2011-08-11 07:04:25 UTC (rev 18066)
+++ trunk/vorbis/doc/09-helper.tex 2011-08-11 07:30:43 UTC (rev 18067)
@@ -18,10 +18,10 @@
\varname{[x]}. Values of \varname{[x]} less than zero are defined to return zero.
\begin{programlisting}
- 1) [return_value] = 0;
+ 1) [return\_value] = 0;
2) if ( [x] is greater than zero ) {
- 3) increment [return_value];
+ 3) increment [return\_value];
4) logical shift [x] one bit to the right, padding the MSb with zero
5) repeat at step 2)
@@ -45,9 +45,9 @@
-\subsubsection{float32_unpack} \label{vorbis:spec:float32:unpack}
+\subsubsection{float32\_unpack} \label{vorbis:spec:float32:unpack}
-"float32_unpack(x)" is intended to translate the packed binary
+"float32\_unpack(x)" is intended to translate the packed binary
representation of a Vorbis codebook float value into the
representation used by the decoder for floating point numbers. For
purposes of this example, we will unpack a Vorbis float32 into a
@@ -63,40 +63,40 @@
-\subsubsection{lookup1_values} \label{vorbis:spec:lookup1:values}
+\subsubsection{lookup1\_values} \label{vorbis:spec:lookup1:values}
-"lookup1_values(codebook_entries,codebook_dimensions)" is used to
+"lookup1\_values(codebook\_entries,codebook\_dimensions)" is used to
compute the correct length of the value index for a codebook VQ lookup
table of lookup type 1. The values on this list are permuted to
construct the VQ vector lookup table of size
-\varname{[codebook_entries]}.
+\varname{[codebook\_entries]}.
The return value for this function is defined to be 'the greatest
-integer value for which \varname{[return_value]} to the power of
-\varname{[codebook_dimensions]} is less than or equal to
-\varname{[codebook_entries]}'.
+integer value for which \varname{[return\_value]} to the power of
+\varname{[codebook\_dimensions]} is less than or equal to
+\varname{[codebook\_entries]}'.
-\subsubsection{low_neighbor} \label{vorbis:spec:low:neighbor}
+\subsubsection{low\_neighbor} \label{vorbis:spec:low:neighbor}
-"low_neighbor(v,x)" finds the position \varname{n} in vector \varname{[v]} of
+"low\_neighbor(v,x)" finds the position \varname{n} in vector \varname{[v]} of
the greatest value scalar element for which \varname{n} is less than
\varname{[x]} and vector \varname{[v]} element \varname{n} is less
than vector \varname{[v]} element \varname{[x]}.
-\subsubsection{high_neighbor} \label{vorbis:spec:high:neighbor}
+\subsubsection{high\_neighbor} \label{vorbis:spec:high:neighbor}
-"high_neighbor(v,x)" finds the position \varname{n} in vector [v] of
+"high\_neighbor(v,x)" finds the position \varname{n} in vector [v] of
the lowest value scalar element for which \varname{n} is less than
\varname{[x]} and vector \varname{[v]} element \varname{n} is greater
than vector \varname{[v]} element \varname{[x]}.
-\subsubsection{render_point} \label{vorbis:spec:render:point}
+\subsubsection{render\_point} \label{vorbis:spec:render:point}
-"render_point(x0,y0,x1,y1,X)" is used to find the Y value at point X
+"render\_point(x0,y0,x1,y1,X)" is used to find the Y value at point X
along the line specified by x0, x1, y0 and y1. This function uses an
integer algorithm to solve for the point directly without calculating
intervening values along the line.
@@ -122,10 +122,10 @@
-\subsubsection{render_line} \label{vorbis:spec:render:line}
+\subsubsection{render\_line} \label{vorbis:spec:render:line}
Floor decode type one uses the integer line drawing algorithm of
-"render_line(x0, y0, x1, y1, v)" to construct an integer floor
+"render\_line(x0, y0, x1, y1, v)" to construct an integer floor
curve for contiguous piecewise line segments. Note that it has not
been relevant elsewhere, but here we must define integer division as
rounding division of both positive and negative numbers toward zero.
Modified: trunk/vorbis/doc/10-tables.tex
===================================================================
--- trunk/vorbis/doc/10-tables.tex 2011-08-11 07:04:25 UTC (rev 18066)
+++ trunk/vorbis/doc/10-tables.tex 2011-08-11 07:30:43 UTC (rev 18067)
@@ -5,7 +5,7 @@
\subsection{floor1\_inverse\_dB\_table} \label{vorbis:spec:floor1:inverse:dB:table}
-The vector \varname{[floor1_inverse_dB_table]} is a 256 element static
+The vector \varname{[floor1\_inverse\_dB\_table]} is a 256 element static
lookup table consiting of the following values (read left to right
then top to bottom):
Modified: trunk/vorbis/doc/Vorbis_I_spec.html
===================================================================
--- trunk/vorbis/doc/Vorbis_I_spec.html 2011-08-11 07:04:25 UTC (rev 18066)
+++ trunk/vorbis/doc/Vorbis_I_spec.html 2011-08-11 07:30:43 UTC (rev 18067)
@@ -7,7 +7,7 @@
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<!-- html -->
<meta name="src" content="Vorbis_I_spec.tex">
-<meta name="date" content="2011-08-11 03:03:00">
+<meta name="date" content="2011-08-11 03:29:00">
<link rel="stylesheet" type="text/css" href="Vorbis_I_spec.css">
</head><body
>
@@ -136,7 +136,7 @@
<br />   <span class="subsubsectionToc" >4.3.7 <a
href="#x1-780004.3.7" id="QQ2-1-84">inverse MDCT</a></span>
<br />   <span class="subsubsectionToc" >4.3.8 <a
-href="#x1-790004.3.8" id="QQ2-1-85">overlap˙add</a></span>
+href="#x1-790004.3.8" id="QQ2-1-85">overlap_add</a></span>
<br />   <span class="subsubsectionToc" >4.3.9 <a
href="#x1-800004.3.9" id="QQ2-1-86">output channel order</a></span>
<br /> <span class="sectionToc" >5 <a
@@ -209,17 +209,17 @@
<br />   <span class="subsubsectionToc" >9.2.1 <a
href="#x1-1170009.2.1" id="QQ2-1-129">ilog</a></span>
<br />   <span class="subsubsectionToc" >9.2.2 <a
-href="#x1-1180009.2.2" id="QQ2-1-130">float32˙unpack</a></span>
+href="#x1-1180009.2.2" id="QQ2-1-130">float32_unpack</a></span>
<br />   <span class="subsubsectionToc" >9.2.3 <a
-href="#x1-1190009.2.3" id="QQ2-1-131">lookup1˙values</a></span>
+href="#x1-1190009.2.3" id="QQ2-1-131">lookup1_values</a></span>
<br />   <span class="subsubsectionToc" >9.2.4 <a
-href="#x1-1200009.2.4" id="QQ2-1-132">low˙neighbor</a></span>
+href="#x1-1200009.2.4" id="QQ2-1-132">low_neighbor</a></span>
<br />   <span class="subsubsectionToc" >9.2.5 <a
-href="#x1-1210009.2.5" id="QQ2-1-133">high˙neighbor</a></span>
+href="#x1-1210009.2.5" id="QQ2-1-133">high_neighbor</a></span>
<br />   <span class="subsubsectionToc" >9.2.6 <a
-href="#x1-1220009.2.6" id="QQ2-1-134">render˙point</a></span>
+href="#x1-1220009.2.6" id="QQ2-1-134">render_point</a></span>
<br />   <span class="subsubsectionToc" >9.2.7 <a
-href="#x1-1230009.2.7" id="QQ2-1-135">render˙line</a></span>
+href="#x1-1230009.2.7" id="QQ2-1-135">render_line</a></span>
<br /> <span class="sectionToc" >10 <a
href="#x1-12400010" id="QQ2-1-136">Tables</a></span>
<br />  <span class="subsectionToc" >10.1 <a
@@ -3060,43 +3060,43 @@
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
class="cmtt-8"> the</span><span
-class="cmtt-8"> [codebook_multiplicands]</span><span
+class="cmtt-8"> [codebook\_multiplicands]</span><span
class="cmtt-8"> array</span>
<br class="fancyvrb" /><a
id="x1-54004r2"></a><span
class="cmr-6">2</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook_minimum_value]</span>
+class="cmtt-8"> [codebook\_minimum\_value]</span>
<br class="fancyvrb" /><a
id="x1-54006r3"></a><span
class="cmr-6">3</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook_delta_value]</span>
+class="cmtt-8"> [codebook\_delta\_value]</span>
<br class="fancyvrb" /><a
id="x1-54008r4"></a><span
class="cmr-6">4</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook_sequence_p]</span>
+class="cmtt-8"> [codebook\_sequence\_p]</span>
<br class="fancyvrb" /><a
id="x1-54010r5"></a><span
class="cmr-6">5</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook_lookup_type]</span>
+class="cmtt-8"> [codebook\_lookup\_type]</span>
<br class="fancyvrb" /><a
id="x1-54012r6"></a><span
class="cmr-6">6</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook_entries]</span>
+class="cmtt-8"> [codebook\_entries]</span>
<br class="fancyvrb" /><a
id="x1-54014r7"></a><span
class="cmr-6">7</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook_dimensions]</span>
+class="cmtt-8"> [codebook\_dimensions]</span>
<br class="fancyvrb" /><a
id="x1-54016r8"></a><span
class="cmr-6">8</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> [codebook_lookup_values]</span>
+class="cmtt-8"> [codebook\_lookup\_values]</span>
</div>
<!--l. 297--><p class="noindent" >Decoding (unpacking) a specific vector in the vector lookup table proceeds according to
<span
@@ -4199,7 +4199,7 @@
</li>
<li
class="enumerate" id="x1-72004x2">read <a
-href="#x1-1170009.2.1">ilog</a>([vorbis˙mode˙count]-1) bits <span
+href="#x1-1170009.2.1">ilog</a>([vorbis_mode_count]-1) bits <span
class="cmtt-12">[mode_number]</span>
</li>
<li
@@ -4436,12 +4436,12 @@
<li
class="enumerate" id="x1-73002x1"><span
class="cmtt-12">[submap_number] </span>= element <span
-class="cmtt-12">[i] </span>of vector [vorbis˙mapping˙mux]
+class="cmtt-12">[i] </span>of vector [vorbis_mapping_mux]
</li>
<li
class="enumerate" id="x1-73004x2"><span
class="cmtt-12">[floor_number] </span>= element <span
-class="cmtt-12">[submap_number] </span>of vector [vorbis˙submap˙floor]
+class="cmtt-12">[submap_number] </span>of vector [vorbis_submap_floor]
</li>
<li
class="enumerate" id="x1-73006x3">if the floor type of this floor (vector
@@ -4755,7 +4755,7 @@
earlier.
<!--l. 576--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">4.3.8 </span> <a
- id="x1-790004.3.8"></a>overlap˙add</h5>
+ id="x1-790004.3.8"></a>overlap_add</h5>
<!--l. 578--><p class="noindent" >Windowed MDCT output is overlapped and added with the right hand data of the previous
window such that the 3/4 point of the previous window is aligned with the 1/4 point of the
current window (as illustrated in <a
@@ -4775,7 +4775,7 @@
id="x1-79002r1"></a><span
class="cmr-6">1</span><span
class="cmtt-8"> </span><span
-class="cmtt-8"> window_blocksize(previous_window)/4+window_blocksize(current_window)/4</span>
+class="cmtt-8"> window\_blocksize(previous\_window)/4+window\_blocksize(current\_window)/4</span>
</div>
<!--l. 596--><p class="noindent" >from the center (element windowsize/2) of the previous window to the center (element
windowsize/2-1, inclusive) of the current window.
@@ -4900,7 +4900,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
-class="cmtt-8"> [vendor_length]</span><span
+class="cmtt-8"> [vendor\_length]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> an</span><span
@@ -4916,14 +4916,14 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2)</span><span
-class="cmtt-8"> [vendor_string]</span><span
+class="cmtt-8"> [vendor\_string]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> a</span><span
class="cmtt-8"> UTF-8</span><span
class="cmtt-8"> vector</span><span
class="cmtt-8"> as</span><span
-class="cmtt-8"> [vendor_length]</span><span
+class="cmtt-8"> [vendor\_length]</span><span
class="cmtt-8"> octets</span>
<br class="fancyvrb" /><a
id="x1-84006r3"></a><span
@@ -4932,7 +4932,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3)</span><span
-class="cmtt-8"> [user_comment_list_length]</span><span
+class="cmtt-8"> [user\_comment\_list\_length]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> an</span><span
@@ -4949,7 +4949,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 4)</span><span
class="cmtt-8"> iterate</span><span
-class="cmtt-8"> [user_comment_list_length]</span><span
+class="cmtt-8"> [user\_comment\_list\_length]</span><span
class="cmtt-8"> times</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
@@ -5014,7 +5014,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 7)</span><span
-class="cmtt-8"> [framing_bit]</span><span
+class="cmtt-8"> [framing\_bit]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> a</span><span
@@ -5031,7 +5031,7 @@
class="cmtt-8"> 8)</span><span
class="cmtt-8"> if</span><span
class="cmtt-8"> (</span><span
-class="cmtt-8"> [framing_bit]</span><span
+class="cmtt-8"> [framing\_bit]</span><span
class="cmtt-8"> unset</span><span
class="cmtt-8"> or</span><span
class="cmtt-8"> end-of-packet</span><span
@@ -5132,7 +5132,7 @@
a license such as a Creative
Commons license (”www.creativecommons.org/blahblah/license.html”) or the EFF
Open Audio License (’distributed under the terms of the Open Audio License. see
- http://www.eff.org/IP/Open˙licenses/eff˙oal.html for details’), etc.
+ http://www.eff.org/IP/Open_licenses/eff_oal.html for details’), etc.
</dd><dt class="description">
<span
class="cmssbx-10x-x-120">ORGANIZATION</span> </dt><dd
@@ -6633,7 +6633,7 @@
<span
class="cmtt-12">[floor1_subclass_books] </span>scalar element greater than the highest numbered codebook
configured in this stream is an error condition that renders the stream undecodable. All vector
-[floor1˙x˙list] element values must be unique within the vector; a non-unique value renders the
+[floor1_x_list] element values must be unique within the vector; a non-unique value renders the
stream undecodable.
<!--l. 167--><p class="noindent" ><span class="paragraphHead"><a
id="x1-1000007.2.2"></a><span
@@ -8543,7 +8543,7 @@
class="cmtt-12">[floor1_X_list]</span>, <span
class="cmtt-12">[floor1_final_Y] </span>and <span
class="cmtt-12">[floor1_step2_flag] </span>vectors, as well as
- [floor1˙multiplier] and [floor1˙values] values.
+ [floor1_multiplier] and [floor1_values] values.
@@ -8559,8 +8559,8 @@
<span
class="cmtt-12">[floor1_X_list]</span>. That is, sort the values of <span
class="cmtt-12">[floor1_X_list] </span>and then apply the same
- permutation to elements of the other two vectors so that the X, Y and step2˙flag values still
- match.
+ permutation to elements of the other two vectors so that the X, Y and step2_flag values
+ still match.
<!--l. 355--><p class="noindent" >Then compute the final curve in one pass:
<!--l. 357--><p class="noindent" >
<div class="fancyvrb" id="fancyvrb32">
@@ -9002,20 +9002,26 @@
follows:
<ul class="itemize1">
<li class="itemize">Each vector is partitioned into multiple equal sized chunks according to configuration
- specified. If we have a vector size of <span
-class="cmti-12">n</span>, a partition size <span
-class="cmti-12">residue˙partition˙size</span>, and
- a total of <span
-class="cmti-12">ch </span>residue vectors, the total number of partitioned chunks coded is
+ specified. If we have a vector size of <span
+class="cmti-12">n</span>, a partition size <span
+class="cmti-12">residue</span><span
+class="cmti-12">_partition</span><span
+class="cmti-12">_size</span>,
+ and a total of <span
+class="cmti-12">ch </span>residue vectors, the total number of partitioned chunks coded
- <span
+ is <span
class="cmti-12">n</span>/<span
-class="cmti-12">residue˙partition˙size</span>*<span
-class="cmti-12">ch</span>. It is important to note that the integer division truncates.
- In the below example, we assume an example <span
-class="cmti-12">residue˙partition˙size </span>of 8.
+class="cmti-12">residue</span><span
+class="cmti-12">_partition</span><span
+class="cmti-12">_size</span>*<span
+class="cmti-12">ch</span>. It is important to note that the integer division
+ truncates. In the below example, we assume an example <span
+class="cmti-12">residue</span><span
+class="cmti-12">_partition</span><span
+class="cmti-12">_size </span>of 8.
</li>
<li class="itemize">Each partition in each vector has a classification number that specifies which of
multiple configured VQ codebook setups are used to decode that partition. The
@@ -9446,7 +9452,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
-class="cmtt-8"> [residue_begin]</span><span
+class="cmtt-8"> [residue\_begin]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> 24</span><span
@@ -9461,7 +9467,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2)</span><span
-class="cmtt-8"> [residue_end]</span><span
+class="cmtt-8"> [residue\_end]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> 24</span><span
@@ -9476,7 +9482,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3)</span><span
-class="cmtt-8"> [residue_partition_size]</span><span
+class="cmtt-8"> [residue\_partition\_size]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> 24</span><span
@@ -9494,7 +9500,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 4)</span><span
-class="cmtt-8"> [residue_classifications]</span><span
+class="cmtt-8"> [residue\_classifications]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> 6</span><span
@@ -9515,7 +9521,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 5)</span><span
-class="cmtt-8"> [residue_classbook]</span><span
+class="cmtt-8"> [residue\_classbook]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> 8</span><span
@@ -9570,7 +9576,7 @@
class="cmtt-8"> range</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
-class="cmtt-8"> [residue_classifications]-1</span><span
+class="cmtt-8"> [residue\_classifications]-1</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
id="x1-109014r2"></a><span
@@ -9589,7 +9595,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2)</span><span
-class="cmtt-8"> [high_bits]</span><span
+class="cmtt-8"> [high\_bits]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> 0</span>
<br class="fancyvrb" /><a
@@ -9604,7 +9610,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3)</span><span
-class="cmtt-8"> [low_bits]</span><span
+class="cmtt-8"> [low\_bits]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> 3</span><span
@@ -9650,7 +9656,7 @@
class="cmtt-8"> set</span><span
class="cmtt-8"> )</span><span
class="cmtt-8"> then</span><span
-class="cmtt-8"> [high_bits]</span><span
+class="cmtt-8"> [high\_bits]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> five</span><span
@@ -9671,15 +9677,15 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 6)</span><span
class="cmtt-8"> vector</span><span
-class="cmtt-8"> [residue_cascade]</span><span
+class="cmtt-8"> [residue\_cascade]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [high_bits]</span><span
+class="cmtt-8"> [high\_bits]</span><span
class="cmtt-8"> *</span><span
class="cmtt-8"> 8</span><span
class="cmtt-8"> +</span><span
-class="cmtt-8"> [low_bits]</span>
+class="cmtt-8"> [low\_bits]</span>
<br class="fancyvrb" /><a
id="x1-109026r8"></a><span
class="cmr-6">8</span><span
@@ -9719,7 +9725,7 @@
class="cmtt-8"> range</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
-class="cmtt-8"> [residue_classifications]-1</span><span
+class="cmtt-8"> [residue\_classifications]-1</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
id="x1-109032r2"></a><span
@@ -9772,7 +9778,7 @@
class="cmtt-8"> if</span><span
class="cmtt-8"> (</span><span
class="cmtt-8"> vector</span><span
-class="cmtt-8"> [residue_cascade]</span><span
+class="cmtt-8"> [residue\_cascade]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i]</span><span
class="cmtt-8"> bit</span><span
@@ -9809,7 +9815,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 4)</span><span
class="cmtt-8"> array</span><span
-class="cmtt-8"> [residue_books]</span><span
+class="cmtt-8"> [residue\_books]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i][j]</span><span
class="cmtt-8"> =</span><span
@@ -9877,7 +9883,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 5)</span><span
class="cmtt-8"> array</span><span
-class="cmtt-8"> [residue_books]</span><span
+class="cmtt-8"> [residue\_books]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [i][j]</span><span
class="cmtt-8"> =</span><span
@@ -9950,8 +9956,8 @@
<!--l. 231--><p class="noindent" >An end-of-packet condition at any point in header decode renders the stream undecodable.
In addition, any codebook number greater than the maximum numbered codebook
set up in this stream also renders the stream undecodable. All codebooks in array
-[residue˙books] are required to have a value mapping. The presence of codebook in array
-[residue˙books] without a value mapping (maptype equals zero) renders the stream
+[residue_books] are required to have a value mapping. The presence of codebook in array
+[residue_books] without a value mapping (maptype equals zero) renders the stream
undecodable.
<!--l. 241--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">8.6.2 </span> <a
@@ -9988,7 +9994,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
-class="cmtt-8"> [actual_size]</span><span
+class="cmtt-8"> [actual\_size]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> current</span><span
class="cmtt-8"> blocksize/2;</span>
@@ -10017,9 +10023,9 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3)</span><span
-class="cmtt-8"> [actual_size]</span><span
+class="cmtt-8"> [actual\_size]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [actual_size]</span><span
+class="cmtt-8"> [actual\_size]</span><span
class="cmtt-8"> *</span><span
class="cmtt-8"> [ch];</span>
@@ -10032,11 +10038,11 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 4)</span><span
-class="cmtt-8"> [limit_residue_begin]</span><span
+class="cmtt-8"> [limit\_residue\_begin]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> maximum</span><span
class="cmtt-8"> of</span><span
-class="cmtt-8"> ([residue_begin],[actual_size]);</span>
+class="cmtt-8"> ([residue\_begin],[actual\_size]);</span>
<br class="fancyvrb" /><a
id="x1-110010r5"></a><span
class="cmr-6">5</span><span
@@ -10044,11 +10050,11 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 5)</span><span
-class="cmtt-8"> [limit_residue_end]</span><span
+class="cmtt-8"> [limit\_residue\_end]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> maximum</span><span
class="cmtt-8"> of</span><span
-class="cmtt-8"> ([residue_end],[actual_size]);</span>
+class="cmtt-8"> ([residue\_end],[actual\_size]);</span>
</div>
<!--l. 277--><p class="noindent" >The following convenience values are conceptually useful to clarifying the decode process:
<!--l. 280--><p class="noindent" >
@@ -10060,13 +10066,13 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
-class="cmtt-8"> [classwords_per_codeword]</span><span
+class="cmtt-8"> [classwords\_per\_codeword]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [codebook_dimensions]</span><span
+class="cmtt-8"> [codebook\_dimensions]</span><span
class="cmtt-8"> value</span><span
class="cmtt-8"> of</span><span
class="cmtt-8"> codebook</span><span
-class="cmtt-8"> [residue_classbook]</span>
+class="cmtt-8"> [residue\_classbook]</span>
<br class="fancyvrb" /><a
id="x1-110014r2"></a><span
class="cmr-6">2</span><span
@@ -10074,11 +10080,11 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 2)</span><span
-class="cmtt-8"> [n_to_read]</span><span
+class="cmtt-8"> [n\_to\_read]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [limit_residue_end]</span><span
+class="cmtt-8"> [limit\_residue\_end]</span><span
class="cmtt-8"> -</span><span
-class="cmtt-8"> [limit_residue_begin]</span>
+class="cmtt-8"> [limit\_residue\_begin]</span>
<br class="fancyvrb" /><a
id="x1-110016r3"></a><span
class="cmr-6">3</span><span
@@ -10086,11 +10092,11 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 3)</span><span
-class="cmtt-8"> [partitions_to_read]</span><span
+class="cmtt-8"> [partitions\_to\_read]</span><span
class="cmtt-8"> =</span><span
-class="cmtt-8"> [n_to_read]</span><span
+class="cmtt-8"> [n\_to\_read]</span><span
class="cmtt-8"> /</span><span
-class="cmtt-8"> [residue_partition_size]</span>
+class="cmtt-8"> [residue\_partition\_size]</span>
</div>
<!--l. 286--><p class="noindent" >Packet decode proceeds as follows, matching the description offered earlier in the document.
<div class="fancyvrb" id="fancyvrb40">
@@ -10118,7 +10124,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 2)</span><span
class="cmtt-8"> if</span><span
-class="cmtt-8"> ([n_to_read]</span><span
+class="cmtt-8"> ([n\_to\_read]</span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> zero),</span><span
class="cmtt-8"> stop;</span><span
@@ -10161,7 +10167,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 4)</span><span
-class="cmtt-8"> [partition_count]</span><span
+class="cmtt-8"> [partition\_count]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> 0</span>
<br class="fancyvrb" /><a
@@ -10182,11 +10188,11 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 5)</span><span
class="cmtt-8"> while</span><span
-class="cmtt-8"> [partition_count]</span><span
+class="cmtt-8"> [partition\_count]</span><span
class="cmtt-8"> is</span><span
class="cmtt-8"> less</span><span
class="cmtt-8"> than</span><span
-class="cmtt-8"> [partitions_to_read]</span>
+class="cmtt-8"> [partitions\_to\_read]</span>
<br class="fancyvrb" /><a
id="x1-110032r8"></a><span
class="cmr-6">8</span><span
@@ -10336,7 +10342,7 @@
class="cmtt-8"> packet</span><span
class="cmtt-8"> using</span><span
class="cmtt-8"> codebook</span><span
-class="cmtt-8"> [residue_classbook]</span><span
+class="cmtt-8"> [residue\_classbook]</span><span
class="cmtt-8"> in</span><span
class="cmtt-8"> scalar</span><span
class="cmtt-8"> context</span>
@@ -10377,7 +10383,7 @@
class="cmtt-8"> over</span><span
class="cmtt-8"> the</span><span
class="cmtt-8"> range</span><span
-class="cmtt-8"> [classwords_per_codeword]-1</span><span
+class="cmtt-8"> [classwords\_per\_codeword]-1</span><span
class="cmtt-8"> ...</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> {</span>
@@ -10425,7 +10431,7 @@
class="cmtt-8"> array</span><span
class="cmtt-8"> [classifications]</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [j],([i]+[partition_count])</span><span
+class="cmtt-8"> [j],([i]+[partition\_count])</span><span
class="cmtt-8"> =</span>
<br class="fancyvrb" /><a
id="x1-110054r19"></a><span
@@ -10469,7 +10475,7 @@
class="cmtt-8"> [temp]</span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> modulo</span><span
-class="cmtt-8"> [residue_classifications]</span>
+class="cmtt-8"> [residue\_classifications]</span>
<br class="fancyvrb" /><a
id="x1-110056r20"></a><span
class="cmr-6">20</span><span
@@ -10510,7 +10516,7 @@
class="cmtt-8"> =</span><span
class="cmtt-8"> [temp]</span><span
class="cmtt-8"> /</span><span
-class="cmtt-8"> [residue_classifications]</span><span
+class="cmtt-8"> [residue\_classifications]</span><span
class="cmtt-8"> using</span><span
class="cmtt-8"> integer</span><span
class="cmtt-8"> division</span>
@@ -10672,11 +10678,11 @@
class="cmtt-8"> range</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ..</span><span
-class="cmtt-8"> ([classwords_per_codeword]</span><span
+class="cmtt-8"> ([classwords\_per\_codeword]</span><span
class="cmtt-8"> -</span><span
class="cmtt-8"> 1)</span><span
class="cmtt-8"> while</span><span
-class="cmtt-8"> [partition_count]</span>
+class="cmtt-8"> [partition\_count]</span>
<br class="fancyvrb" /><a
id="x1-110078r31"></a><span
class="cmr-6">31</span><span
@@ -10700,7 +10706,7 @@
class="cmtt-8"> also</span><span
class="cmtt-8"> less</span><span
class="cmtt-8"> than</span><span
-class="cmtt-8"> [partitions_to_read]</span><span
+class="cmtt-8"> [partitions\_to\_read]</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
id="x1-110080r32"></a><span
@@ -10822,7 +10828,7 @@
class="cmtt-8"> array</span><span
class="cmtt-8"> [classifications]</span><span
class="cmtt-8"> element</span><span
-class="cmtt-8"> [j],[partition_count]</span>
+class="cmtt-8"> [j],[partition\_count]</span>
<br class="fancyvrb" /><a
id="x1-110092r38"></a><span
class="cmr-6">38</span><span
@@ -10858,7 +10864,7 @@
class="cmtt-8"> [vqbook]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> array</span><span
-class="cmtt-8"> [residue_books]</span><span
+class="cmtt-8"> [residue\_books]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [vqclass],[pass]</span>
<br class="fancyvrb" /><a
@@ -10992,7 +10998,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> offset</span><span
-class="cmtt-8"> [limit_residue_begin]+[partition_count]*[residue_partition_size]</span><span
+class="cmtt-8"> [limit\_residue\_begin]+[partition\_count]*[residue\_partition\_size]</span><span
class="cmtt-8"> using</span>
<br class="fancyvrb" /><a
id="x1-110102r43"></a><span
@@ -11128,7 +11134,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 20)</span><span
class="cmtt-8"> increment</span><span
-class="cmtt-8"> [partition_count]</span><span
+class="cmtt-8"> [partition\_count]</span><span
class="cmtt-8"> by</span><span
class="cmtt-8"> one</span>
<br class="fancyvrb" /><a
@@ -11228,7 +11234,7 @@
class="cmtt-8"> =</span><span
class="cmtt-8"> [n]</span><span
class="cmtt-8"> /</span><span
-class="cmtt-8"> [codebook_dimensions]</span>
+class="cmtt-8"> [codebook\_dimensions]</span>
<br class="fancyvrb" /><a
id="x1-111004r2"></a><span
class="cmr-6">2</span><span
@@ -11261,7 +11267,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 3)</span><span
class="cmtt-8"> vector</span><span
-class="cmtt-8"> [entry_temp]</span><span
+class="cmtt-8"> [entry\_temp]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> vector</span><span
@@ -11291,7 +11297,7 @@
class="cmtt-8"> range</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
-class="cmtt-8"> [codebook_dimensions]-1</span><span
+class="cmtt-8"> [codebook\_dimensions]-1</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
id="x1-111012r6"></a><span
@@ -11357,7 +11363,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> vector</span><span
-class="cmtt-8"> [entry_temp]</span><span
+class="cmtt-8"> [entry\_temp]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [j]</span>
<br class="fancyvrb" /><a
@@ -11448,7 +11454,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 2)</span><span
class="cmtt-8"> vector</span><span
-class="cmtt-8"> [entry_temp]</span><span
+class="cmtt-8"> [entry\_temp]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> read</span><span
class="cmtt-8"> vector</span><span
@@ -11473,7 +11479,7 @@
class="cmtt-8"> range</span><span
class="cmtt-8"> 0</span><span
class="cmtt-8"> ...</span><span
-class="cmtt-8"> [codebook_dimensions]-1</span><span
+class="cmtt-8"> [codebook\_dimensions]-1</span><span
class="cmtt-8"> {</span>
<br class="fancyvrb" /><a
id="x1-112008r4"></a><span
@@ -11522,7 +11528,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> vector</span><span
-class="cmtt-8"> [entry_temp]</span><span
+class="cmtt-8"> [entry\_temp]</span><span
class="cmtt-8"> element</span><span
class="cmtt-8"> [j]</span>
<br class="fancyvrb" /><a
@@ -11782,7 +11788,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> </span><span
class="cmtt-8"> 1)</span><span
-class="cmtt-8"> [return_value]</span><span
+class="cmtt-8"> [return\_value]</span><span
class="cmtt-8"> =</span><span
class="cmtt-8"> 0;</span>
<br class="fancyvrb" /><a
@@ -11819,7 +11825,7 @@
class="cmtt-8"> </span><span
class="cmtt-8"> 3)</span><span
class="cmtt-8"> increment</span><span
-class="cmtt-8"> [return_value];</span>
+class="cmtt-8"> [return\_value];</span>
<br class="fancyvrb" /><a
id="x1-117010r5"></a><span
class="cmr-6">5</span><span
@@ -11911,8 +11917,8 @@
<li class="itemize">ilog(negative number) = 0;</li></ul>
<!--l. 48--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.2 </span> <a
- id="x1-1180009.2.2"></a>float32˙unpack</h5>
-<!--l. 50--><p class="noindent" >”float32˙unpack(x)” is intended to translate the packed binary representation of a Vorbis
+ id="x1-1180009.2.2"></a>float32_unpack</h5>
+<!--l. 50--><p class="noindent" >”float32_unpack(x)” is intended to translate the packed binary representation of a Vorbis
codebook float value into the representation used by the decoder for floating point numbers. For
purposes of this example, we will unpack a Vorbis float32 into a host-native floating point
number.
@@ -12009,10 +12015,11 @@
<!--l. 66--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.3 </span> <a
- id="x1-1190009.2.3"></a>lookup1˙values</h5>
-<!--l. 68--><p class="noindent" >”lookup1˙values(codebook˙entries,codebook˙dimensions)” is used to compute the correct length of
-the value index for a codebook VQ lookup table of lookup type 1. The values on this list are
-permuted to construct the VQ vector lookup table of size <span
+ id="x1-1190009.2.3"></a>lookup1_values</h5>
+<!--l. 68--><p class="noindent" >”lookup1_values(codebook_entries,codebook_dimensions)” is used to compute the
+correct length of the value index for a codebook VQ lookup table of lookup type 1.
+The values on this list are permuted to construct the VQ vector lookup table of size
+<span
class="cmtt-12">[codebook_entries]</span>.
<!--l. 74--><p class="noindent" >The return value for this function is defined to be ’the greatest integer value for which
<span
@@ -12022,8 +12029,8 @@
class="cmtt-12">[codebook_entries]</span>’.
<!--l. 81--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.4 </span> <a
- id="x1-1200009.2.4"></a>low˙neighbor</h5>
-<!--l. 83--><p class="noindent" >”low˙neighbor(v,x)” finds the position <span
+ id="x1-1200009.2.4"></a>low_neighbor</h5>
+<!--l. 83--><p class="noindent" >”low_neighbor(v,x)” finds the position <span
class="cmtt-12">n </span>in vector <span
class="cmtt-12">[v] </span>of the greatest value scalar element for
which <span
@@ -12036,8 +12043,8 @@
class="cmtt-12">[x]</span>.
<!--l. 88--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.5 </span> <a
- id="x1-1210009.2.5"></a>high˙neighbor</h5>
-<!--l. 90--><p class="noindent" >”high˙neighbor(v,x)” finds the position <span
+ id="x1-1210009.2.5"></a>high_neighbor</h5>
+<!--l. 90--><p class="noindent" >”high_neighbor(v,x)” finds the position <span
class="cmtt-12">n </span>in vector [v] of the lowest value scalar element for
which <span
class="cmtt-12">n </span>is less than <span
@@ -12049,14 +12056,14 @@
class="cmtt-12">[x]</span>.
<!--l. 97--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.6 </span> <a
- id="x1-1220009.2.6"></a>render˙point</h5>
-<!--l. 99--><p class="noindent" >”render˙point(x0,y0,x1,y1,X)” is used to find the Y value at point X along the line specified by
+ id="x1-1220009.2.6"></a>render_point</h5>
+<!--l. 99--><p class="noindent" >”render_point(x0,y0,x1,y1,X)” is used to find the Y value at point X along the line specified by
x0, x1, y0 and y1. This function uses an integer algorithm to solve for the point directly without
calculating intervening values along the line.
-<!--l. 104--><p class="noindent" >
+<!--l. 104--><p class="noindent" >
<div class="fancyvrb" id="fancyvrb46">
<a
id="x1-122002r1"></a><span
@@ -12233,8 +12240,8 @@
</div>
<!--l. 125--><p class="noindent" >
<h5 class="subsubsectionHead"><span class="titlemark">9.2.7 </span> <a
- id="x1-1230009.2.7"></a>render˙line</h5>
-<!--l. 127--><p class="noindent" >Floor decode type one uses the integer line drawing algorithm of ”render˙line(x0, y0, x1, y1, v)”
+ id="x1-1230009.2.7"></a>render_line</h5>
+<!--l. 127--><p class="noindent" >Floor decode type one uses the integer line drawing algorithm of ”render_line(x0, y0, x1, y1, v)”
to construct an integer floor curve for contiguous piecewise line segments. Note that it has not
been relevant elsewhere, but here we must define integer division as rounding division of both
positive and negative numbers toward zero.
@@ -12484,6 +12491,9 @@
class="cmtt-8"> ...</span><span
class="cmtt-8"> [x1]-1</span><span
class="cmtt-8"> {</span>
+
+
+
<br class="fancyvrb" /><a
id="x1-123046r23"></a><span
class="cmr-6">23</span><span
@@ -12506,9 +12516,6 @@
class="cmtt-8"> [err]</span><span
class="cmtt-8"> +</span><span
class="cmtt-8"> [ady];</span>
-
-
-
<br class="fancyvrb" /><a
id="x1-123050r25"></a><span
class="cmr-6">25</span><span
Modified: trunk/vorbis/doc/Vorbis_I_spec.pdf
===================================================================
(Binary files differ)
More information about the commits
mailing list