out.
svn path=/trunk/vorbis/; revision=6493
recommended (and Xiph.Org's Vorbis encoder follows this suggestion).</para>
<para>
-Our own design work indicates the the primary liability of the
+Our own design work indicates the primary liability of the
required header is in mindshare; it is an unusual design and thus
causes some amount of complaint among engineers as this runs against
current design trends (and also points out limitations in some
<varname>[left_window_end]</varname>-1, window(<varname>[i]</varname>) = sin(.5 * π * sin^2( (<varname>[i]</varname>-<varname>[left_window_start]</varname>+.5) / <varname>[left_n]</varname> * .5 * π) )</simpara></listitem>
<listitem><simpara> window from range <varname>[left_window_end]</varname> ... <varname>[right_window_start]</varname>-1
inclusive is one</simpara></listitem><listitem><simpara> for <varname>[i]</varname> in range <varname>[right_window_start]</varname> ... <varname>[right_window_end]</varname>-1, window(<varname>[i]</varname>) = sin(.5 * π * sin^2( (<varname>[i]</varname>-<varname>[right_window_start]</varname>+.5) / <varname>[right_n]</varname> * .5 * π + .5 * π) )</simpara></listitem>
-<listitem><simpara> window from range <varname>[rigth_window_start]</varname> ... <varname>[n]</varname>-1 is
+<listitem><simpara> window from range <varname>[right_window_start]</varname> ... <varname>[n]</varname>-1 is
zero</simpara></listitem>
</orderedlist>
<orderedlist>
<listitem><simpara>if either <varname>[no_residue]</varname> entry for channel
-(<varname>[vorbis_mapping_magnitude]</varname> element <varname>[i]</varname>) or (channel
-<varname>[vorbis_mapping_angle]</varname> element <varname>[i]</varname>) 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.</simpara></listitem>
+(<varname>[vorbis_mapping_magnitude]</varname> element <varname>[i]</varname>)
+or channel
+(<varname>[vorbis_mapping_angle]</varname> element <varname>[i]</varname>)
+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.</simpara></listitem>
</orderedlist>
</para>
4) [booknumber] = read an unsigned integer of <link linkend="vorbis-spec-ilog">ilog</link>( [floor0_number_of_books] ) bits
5) if ( [booknumber] is greater than the highest number decode codebook ) then packet is undecodable
- 6) [lastval] = zero;
+ 6) [last] = zero;
7) vector [temp_vector] = read vector from bitstream using codebook number [booknumber] in VQ context.
8) add the scalar value [last] to each scalar in vector [temp_vector]
9) [last] = the value of the last scalar in vector [temp_vector]
<listitem><simpara><varname>[iteration_condition]</varname> = map element <varname>[i]</varname></simpara></listitem>
<listitem><simpara><varname>[output]</varname> element <varname>[i]</varname> = <varname>[linear_floor_value]</varname></simpara></listitem>
<listitem><simpara>increment <varname>[i]</varname></simpara></listitem>
- <listitem><simpara>if ( map element <varname>[i]</varname> is equal to <varname>[iteration_condition]</varname> ) continue at step 7</simpara></listitem>
+ <listitem><simpara>if ( map element <varname>[i]</varname> is equal to <varname>[iteration_condition]</varname> ) continue at step 5</simpara></listitem>
<listitem><simpara>if ( <varname>[i]</varname> is less than <varname>[n]</varname> ) continue at step 2</simpara></listitem>
<listitem><simpara>done</simpara></listitem>
</orderedlist>
19) vector [floor1_step2_flag] element [i] = set
20) if ( [val] is greater than or equal to [room] ) {
- 21) if ( [hiroom] is greater than [lowroom] ) {
+ 21) if ( [highroom] is greater than [lowroom] ) {
22) vector [floor1_final_Y] element [i] = [val] - [lowroom] + [predicted]
- } else [hiroom] is not greater than [lowroom] {
+ } else [highroom] is not greater than [lowroom] {
- 23) vector [floor1_final_Y] element [i] = [predicted] - [val] + [hiroom] - 1
+ 23) vector [floor1_final_Y] element [i] = [predicted] - [val] + [highroom] - 1
}
<title>Residue format</title>
<para>
-Reside format partitions each vector in the vector bundle into chunks,
+Residue format partitions each vector in the vector bundle into chunks,
classifies each chunk, encodes the chunk classifications and finally
encodes the chunks themselves using the the specific VQ arrangement
-defined for each selected selected classification. The exact
-interleaving and partitioning vary by residue encoding number, however
-the high-level process used to classify and encode the residue vector
-is the same in all three variants.</para>
+defined for each selected classification.
+The exact interleaving and partitioning vary by residue encoding number,
+however the high-level process used to classify and encode the residue
+vector is the same in all three variants.</para>
<para>
A set of coded residue vectors are all of the same length. High level
2) vector [entry_temp] = read vector from packet using current codebook in VQ context
3) iterate [j] over the range 0 ... [codebook_dimensions]-1 {
- 5) vector [v] element ([offset]+[i]) =
+ 4) vector [v] element ([offset]+[i]) =
vector [v] element ([offset]+[i]) +
vector [entry_temp] element [j]
- 6) increment [i]
+ 5) increment [i]
}
- 4) if ( [i] is less than [n] ) continue at step 2
- 5) done
+ 6) if ( [i] is less than [n] ) continue at step 2
+ 7) done
</programlisting>
</section>
<section><title>format 2 specifics</title>
<para>
-Format 2 is reducible to format 1. It may be implemented as an additional stepprior to and an additional post-decode step after a normal format 1 decode.
+Format 2 is reducible to format 1. It may be implemented as an additional step prior to and an additional post-decode step after a normal format 1 decode.
</para>
<para>
14) [err] = [err] + [ady];
15) if ( [err] >= [adx] ) {
- 15) [err] = [err] - [adx]
- 16) [y] = [y] + [sy]
+ 16) [err] = [err] - [adx]
+ 17) [y] = [y] + [sy]
} else {
- 17) [y] = [y] + [base]
+ 18) [y] = [y] + [base]
}
- 18) vector [v] element [x] = [y]
+ 19) vector [v] element [x] = [y]
}
</programlisting>