[xiph-commits] r10424 - trunk/vorbis/doc/xml
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Wed Nov 23 00:44:20 PST 2005
Author: xiphmont
Date: 2005-11-23 00:44:18 -0800 (Wed, 23 Nov 2005)
New Revision: 10424
Modified:
trunk/vorbis/doc/xml/06-floor0.xml
trunk/vorbis/doc/xml/07-floor1.xml
trunk/vorbis/doc/xml/08-residue.xml
Log:
Several logical fixes to the spec pseudocode as submitted by ods15.
Modified: trunk/vorbis/doc/xml/06-floor0.xml
===================================================================
--- trunk/vorbis/doc/xml/06-floor0.xml 2005-11-23 07:28:05 UTC (rev 10423)
+++ trunk/vorbis/doc/xml/06-floor0.xml 2005-11-23 08:44:18 UTC (rev 10424)
@@ -79,11 +79,10 @@
1) [amplitude] = read an unsigned integer of [floor0_amplitude_bits] bits
2) if ( [amplitude] is greater than zero ) {
3) [coefficients] is an empty, zero length vector
-
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) [last] = zero;
- 7) vector [temp_vector] = read vector from bitstream using codebook number [booknumber] in VQ context.
+ 7) vector [temp_vector] = read vector from bitstream using codebook number [floor0_book_list] element [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]
10) concatenate [temp_vector] onto the end of the [coefficients] vector
Modified: trunk/vorbis/doc/xml/07-floor1.xml
===================================================================
--- trunk/vorbis/doc/xml/07-floor1.xml 2005-11-23 07:28:05 UTC (rev 10423)
+++ trunk/vorbis/doc/xml/07-floor1.xml 2005-11-23 08:44:18 UTC (rev 10424)
@@ -182,7 +182,7 @@
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 ([j] + [floor1_values]) =
+ 21) vector [floor1_X_list] element ([floor1_values]) =
read [rangebits] bits as unsigned integer
22) increment [floor1_values] by one
}
@@ -326,7 +326,7 @@
} else [highroom] is not less than [lowroom] {
- 15) [root] = [lowroom] * 2
+ 15) [room] = [lowroom] * 2
}
@@ -409,7 +409,7 @@
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]' 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]
Modified: trunk/vorbis/doc/xml/08-residue.xml
===================================================================
--- trunk/vorbis/doc/xml/08-residue.xml 2005-11-23 07:28:05 UTC (rev 10423)
+++ trunk/vorbis/doc/xml/08-residue.xml 2005-11-23 08:44:18 UTC (rev 10424)
@@ -298,50 +298,53 @@
3) [partition_count] = 0
- 4) if ([pass] is zero) {
+ 4) while [partition_count] is less than [partitions_to_read]
+
+ 5) if ([pass] is zero) {
- 5) iterate [j] over the range 0 .. [ch]-1 {
+ 6) iterate [j] over the range 0 .. [ch]-1 {
- 6) if vector [j] is not marked 'do not decode' {
+ 7) if vector [j] is not marked 'do not decode' {
- 7) [temp] = read from packet using codebook [residue_classbook] in scalar context
- 8) iterate [i] descending over the range [classwords_per_codeword]-1 ... 0 {
+ 8) [temp] = read from packet using codebook [residue_classbook] in scalar context
+ 9) iterate [i] descending over the range [classwords_per_codeword]-1 ... 0 {
- 9) array [classifications] element [j],([i]+[partition_count]) =
- [temp] integer modulo [residue_classifications]
- 10) [temp] = [temp] / [residue_classifications] using integer division
+ 10) array [classifications] element [j],([i]+[partition_count]) =
+ [temp] integer modulo [residue_classifications]
+ 11) [temp] = [temp] / [residue_classifications] using integer division
+ }
+
}
-
+
}
-
+
}
-
- }
- 11) iterate [i] over the range 0 .. ([classwords_per_codeword] - 1) while [partition_count]
- is also less than [partitions_to_read] {
+ 12) iterate [i] over the range 0 .. ([classwords_per_codeword] - 1) while [partition_count]
+ is also less than [partitions_to_read] {
- 12) iterate [j] over the range 0 .. [ch]-1 {
+ 13) iterate [j] over the range 0 .. [ch]-1 {
- 13) if vector [j] is not marked 'do not decode' {
+ 14) if vector [j] is not marked 'do not decode' {
- 14) [vqclass] = array [classifications] element [j],[partition_count]
- 15) [vqbook] = array [residue_books] element [vqclass],[pass]
- 16) if ([vqbook] is not 'unused') {
+ 15) [vqclass] = array [classifications] element [j],[partition_count]
+ 16) [vqbook] = array [residue_books] element [vqclass],[pass]
+ 17) if ([vqbook] is not 'unused') {
- 17) decode partition into output vector number [j], starting at scalar
- offset [residue_begin]+[partition_count]*[residue_partition_size] using
- codebook number [vqbook] in VQ context
+ 18) decode partition into output vector number [j], starting at scalar
+ offset [residue_begin]+[partition_count]*[residue_partition_size] using
+ codebook number [vqbook] in VQ context
+ }
}
- }
- 18) increment [partition_count] by one
+ 19) increment [partition_count] by one
+ }
}
}
- 19) done
+ 20) done
</programlisting>
More information about the commits
mailing list