From e3c8a22349b4a2b40f91a4e5ebb513fe51716695 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Fri, 18 Oct 2002 00:43:00 +0000 Subject: [PATCH] Propagate documentation updates from the html version. svn path=/trunk/vorbis/; revision=4021 --- doc/xml/04-codec.xml | 78 ++++++++++++++++++++--------------------------- doc/xml/07-floor1.xml | 22 ++++++------- doc/xml/Vorbis_I_spec.xml | 2 +- 3 files changed, 45 insertions(+), 57 deletions(-) diff --git a/doc/xml/04-codec.xml b/doc/xml/04-codec.xml index d77447e..5fa0fc4 100644 --- a/doc/xml/04-codec.xml +++ b/doc/xml/04-codec.xml @@ -1,8 +1,8 @@
- $Id: 04-codec.xml,v 1.2 2002/10/14 23:47:54 giles Exp $ - Last update to this document: September 20, 2002 + $Id: 04-codec.xml,v 1.3 2002/10/18 00:43:00 giles Exp $ + Last update to this document: October 15, 2002 codec setup and packet decode @@ -220,53 +220,40 @@ of [vorbis_mapping_count] mapping numbers: if unset, [vorbis_mapping_submaps] = 1 - read 1 bit as a boolean flag; if set, square polar channel mapping is in use: - - [vorbis_mapping_coupling_steps]= read 8 bits as unsigned integer and add one - for [j] each of [vorbis_mapping_coupling_steps] -steps: - - vector [vorbis_mapping_magnitude] element -[j]= read ilog([audio_channels] - 1) bits as -unsigned integer - vector [vorbis_mapping_angle] element [j]= -read ilog([audio_channels] - 1) -bits as unsigned integer - 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 [audio_channels]-1, or the angle -channel is greater than [audio_channels]-1, the stream is undecodable. - - - + read 1 bit as a boolean flag + + if set, square polar channel mapping is in use: + + [vorbis_mapping_coupling_steps] = read 8 bits as unsigned integer and add one + for [j] each of [vorbis_mapping_coupling_steps] steps: + + vector [vorbis_mapping_magnitude] element [j]= read ilog([audio_channels] - 1) bits as unsigned integer + vector [vorbis_mapping_angle] element [j]= read ilog([audio_channels] - 1) bits as unsigned integer + 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 [audio_channels]-1, or the angle channel is greater than [audio_channels]-1, the stream is undecodable. + + + + + if unset, [vorbis_mapping_coupling_steps] = 0 + read 2 bits (reserved field); if the value is nonzero, the stream is undecodable - if [vorbis_mapping_submaps] is greater than one, we read channel multiplex -settings. For each [j] of [audio_channels] channels: + if [vorbis_mapping_submaps] is greater than one, we read channel multiplex settings. For each [j] of [audio_channels] channels: - vector [vorbis_mapping_mux] element [j] = read 4 bits as -unsigned integer - if the value is greater than the highest numbered submap -([vorbis_mapping_submaps] - 1), this in an error condition rendering the stream -undecodable + vector [vorbis_mapping_mux] element [j] = read 4 bits as unsigned integer + if the value is greater than the highest numbered submap ([vorbis_mapping_submaps] - 1), this in an error condition rendering the stream undecodable - for each submap [j] of [vorbis_mapping_submaps] submaps, read -the floor and residue numbers for use in decoding that submap: + for each submap [j] of [vorbis_mapping_submaps] submaps, read the floor and residue numbers for use in decoding that submap: read and discard 8 bits (the unused time configuration placeholder) - read 8 bits as unsigned integer for the floor number; save in vector -[vorbis_mapping_submap_floor] element [j] - verify the floor number is not greater than the highest number floor configured for the bitstream. -If it is, the bitstream is undecodable - read 8 bits as unsigned integer for the residue number; save in vector -[vorbis_mapping_submap_residue] element [j] - verify the residue number is not greater than the highest number residue configured for the -bitstream. If it is, the bitstream is undecodable + read 8 bits as unsigned integer for the floor number; save in vector [vorbis_mapping_submap_floor] element [j] + verify the floor number is not greater than the highest number floor configured for the bitstream. If it is, the bitstream is undecodable + read 8 bits as unsigned integer for the residue number; save in vector [vorbis_mapping_submap_residue] element [j] + verify the residue number is not greater than the highest number residue configured for the bitstream. If it is, the bitstream is undecodable - save this mapping configuration in slot [i] of the mapping configuration array -[vorbis_mapping_configurations]. + save this mapping configuration in slot [i] of the mapping configuration array [vorbis_mapping_configurations]. @@ -354,9 +341,10 @@ illustration of overlapping dissimilar -Vorbis windows all use the slope function y=sin(2*PI*sin^2(x/n)), -but dissimilar lapping requirements can affect overall shape. Window -generation proceeds as follows: +Vorbis windows all use the slope function y=sin(0.5 * π * sin^2((x+.5)/n * π)), +where n is window size and x ranges 0...n-1, but dissimilar +lapping requirements can affect overall shape. Window generation +proceeds as follows: [window_center] = [n] / 2 @@ -394,9 +382,9 @@ set) then window from range 0 ... [left_window_start]-1 inclusive is zero for [i] in range [left_window_start] ... -[left_window_end]-1, window([i]) = sin(2*PI*sin^2(([i]-[left_window_start]+.5)/[left_n]*PI/2)) +[left_window_end]-1, window([i]) = sin(.5 * π * sin^2( ([i]-[left_window_start]+.5) / [left_n] * .5 * π) ) window from range [left_window_end] ... [right_window_start]-1 -inclusive is one for [i] in range [right_window_start] ... [right_window_end]-1, window([i]) = sin(2*PI*sin^2(([i]-[right_window_start]+.5)/[right_n]*PI/2.+PI/2.)) +inclusive is one for [i] in range [right_window_start] ... [right_window_end]-1, window([i]) = sin(.5 * π * sin^2( ([i]-[right_window_start]+.5) / [right_n] * .5 * π/2. + .5 * π) ) window from range [rigth_window_start] ... [n]-1 is zero diff --git a/doc/xml/07-floor1.xml b/doc/xml/07-floor1.xml index ea45405..31b40ee 100644 --- a/doc/xml/07-floor1.xml +++ b/doc/xml/07-floor1.xml @@ -1,8 +1,8 @@
- $Id: 07-floor1.xml,v 1.1 2002/10/12 20:37:11 giles Exp $ - Last update to this document: September 19, 2002 + $Id: 07-floor1.xml,v 1.2 2002/10/18 00:43:00 giles Exp $ + Last update to this document: October 15, 2002 floor type 1 setup and decode @@ -308,8 +308,8 @@ Unwrap the always-positive-or-zero values read from the packet into 8) [high_neighbor_offset] = high_neighbor([floor1_X_list],[i]) 9) [predicted] = render_point( vector [floor1_X_list] element [low_neighbor_offset], - vector [floor1_X_list] element [high_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] ) @@ -339,7 +339,7 @@ Unwrap the always-positive-or-zero values read from the packet into } else [hiroom] is not greater than [lowroom] { - 23) vector [floor1_final_Y] element [i] = [predicted] - ([val] - [lowroom]) - 1 + 23) vector [floor1_final_Y] element [i] = [predicted] - [val] + [hiroom] - 1 } @@ -348,7 +348,7 @@ Unwrap the always-positive-or-zero values read from the packet into 24) if ([val] is odd) { 25) vector [floor1_final_Y] element [i] = - [predicted] - (([val] - 1) divided by 2 using integer division) + [predicted] - (([val] + 1) divided by 2 using integer division) } else [val] is even { @@ -409,22 +409,22 @@ Then compute the final curve in one pass: 6) [hy] = [floor1_final_Y]' element [i] * [floor1_multiplier] 7) [hx] = [floor1_X_list]' element [i] - 8) render_line( [lx], [hx], [ly], [hy], [floor] ) + 8) render_line( [lx], [ly], [hx], [hy], [floor] ) 9) [lx] = [hx] 10) [ly] = [hy] } + } - 11) if ( [hx] is less than [n] ) { + 11) if ( [hx] is less than [n] ) { - 12) render_line( [hx], [hy], [n], [hy], [floor] ) + 12) render_line( [hx], [hy], [n], [hy], [floor] ) - } + } - 13) if ( [hx] is greater than [n] ) { + 13) if ( [hx] is greater than [n] ) { 14) truncate vector [floor] to [n] elements - } } 15) for each scalar in vector [floor], perform a lookup substitution using diff --git a/doc/xml/Vorbis_I_spec.xml b/doc/xml/Vorbis_I_spec.xml index b4e47a0..8354c07 100644 --- a/doc/xml/Vorbis_I_spec.xml +++ b/doc/xml/Vorbis_I_spec.xml @@ -15,7 +15,7 @@ - + ]>
-- 2.7.4