From: Monty Date: Fri, 19 Jul 2002 08:48:31 +0000 (+0000) Subject: Commit completed first-draft of Vorbis I spec. X-Git-Tag: v1.3.3~684 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b57eb1ae1f4852cff10322afd563c86c3dbec9f;p=platform%2Fupstream%2Flibvorbis.git Commit completed first-draft of Vorbis I spec. svn path=/trunk/vorbis/; revision=3682 --- diff --git a/doc/vorbis-spec-floor0.html b/doc/vorbis-spec-floor0.html index e01fa54..b2ecc15 100644 --- a/doc/vorbis-spec-floor0.html +++ b/doc/vorbis-spec-floor0.html @@ -6,7 +6,7 @@ Ogg Vorbis I format specification: floor type 0 setup and decode -Last update to this document: July 18, 2002
+Last update to this document: July 19, 2002

Overview

@@ -48,7 +48,8 @@ this stream undecodable. In addition, any element of the array number for this bitstream is an error condition that also renders the stream undecodable. -

packet decode

+ +

packet decode

Extracting a floor0 curve from an audio packet consists of first decoding the curve amplitude and [floor0_order] LSP @@ -103,7 +104,8 @@ condition, and care must be taken not to allow a buffer overflow in decode. The extra values are not used and may be ignored or discarded. -

curve computation

+ +

curve computation

Given an [amplitude] integer and [coefficients] vector from packet decode as well as the [floor0_order], diff --git a/doc/vorbis-spec-floor1.html b/doc/vorbis-spec-floor1.html index e513bf2..22d3fd9 100644 --- a/doc/vorbis-spec-floor1.html +++ b/doc/vorbis-spec-floor1.html @@ -6,7 +6,7 @@ Ogg Vorbis I format specification: floor type 1 setup and decode -Last update to this document: July 18, 2002
+Last update to this document: July 19, 2002

Overview

@@ -146,7 +146,8 @@ addition, a [floor1_class_masterbooks] or highest numbered codebook configured in this stream is an error condition that renders the stream undecodable.

-

packet decode

+ +

packet decode

Packet decode begins by checking the [nonzero] flag:

@@ -211,7 +212,8 @@ operation above, floor decode is to return 'unused' status as if the Vector [floor1_Y] contains the values from packet decode needed for floor 1 synthesis.

-

curve computation

+ +

curve computation

Curve computation is split into two logical steps; the first step derives final Y amplitude values from the encoded, wrapped difference diff --git a/doc/vorbis-spec-intro.html b/doc/vorbis-spec-intro.html index 5d948d9..b9aa759 100644 --- a/doc/vorbis-spec-intro.html +++ b/doc/vorbis-spec-intro.html @@ -329,7 +329,8 @@ as described earlier, all of which may be used in a given Vorbis stream. The mode is encoded as an integer used as a direct offset into the mode instance index.

-

Window shape decode [long windows only]

+ +

Window shape decode [long windows only]

Vorbis frames may be one of two PCM sample sizes specified during codec setup. In Vorbis I, legal frame sizes are powers of two from 64 @@ -369,7 +370,7 @@ can be found in the paper _The use of multirate filter banks for coding of high quality digital audio_, by T. Sporer, K. Brandenburg and B. Edler. Vorbis windows -all use the slope function y=sin(2PI*sin^2((x+.5)/n)).

+all use the slope function y=sin(2PI*sin^2(x/n)).

floor decode

@@ -429,9 +430,8 @@ This step is straightforward; for each output channel, the decoder multiplies the floor curve and residue vectors element by element, producing the finished audio spectrum of each channel.

-One point is worth mentioning about this dot product (the bit-level -specification document goes into more detail about this); a common -mistake in a fixed point implementation is to assume that a 32 bit +One point is worth mentioning about this dot product; a common mistake +in a fixed point implementation might be to assume that a 32 bit fixed-point representation for floor and residue and direct multiplication of the vectors is sufficient for acceptable spectral depth in all cases because it happens to mostly work with the current @@ -494,7 +494,7 @@ transform orthogonality. Pay attention however to returning the correct data range; the amount of data to be returned is:

window_blocksize(previous_window)/4+window_blocksize(current_window)/4 from the center of the previous window to the center of the current -window..

+window.

Data is not returned from the first frame; it must be used to 'prime' the decode engine. The encoder accounts for this priming when diff --git a/doc/vorbis-spec-ref.html b/doc/vorbis-spec-ref.html index 60d97e2..cff82de 100644 --- a/doc/vorbis-spec-ref.html +++ b/doc/vorbis-spec-ref.html @@ -46,7 +46,7 @@ identification, comment, setup.

Identification Header

The identification header is a short header of only a few fields used -to declare the stream definitively as Vorbis, and provide a externally +to declare the stream definitively as Vorbis, and provide a few externally relevant pieces of information about the audio stream. The identification header is coded as follows:

@@ -54,22 +54,32 @@ identification header is coded as follows:

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 unsigned integer - 5) [bitrate_nominal] = read 32 bits as unsigned integer - 6) [bitrate_lower] = 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_lower] = 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 -[vorbis_version] is to read '0' in order to be compatable -with this docuement. Both [audio_channels] and +[vorbis_version] is to read '0' in order to be compatible +with this document. Both [audio_channels] and [audio_rate] must read greater than zero. Allowed final blocksize values are 64, 128, 256, 512, 1024, 2048, 4096 and 8192 in Vorbis I. [blocksize_0] must be less than or equal to [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 +field especially may be considerably off in purely VBR streams. The +fields are meaningful only when greater than zero.

+

+ +

Comment Header

Comment header decode and data specification is covered in @@ -108,12 +118,12 @@ sync.

  1. [vorbis_time_count] = read 6 bits as unsigned integer and add one -
  2. read [vorbis_time_count] 16 bit values; each value should be zero. If any othe values is nonzero, this is an error condition and the stream is undecodable. +
  3. read [vorbis_time_count] 16 bit values; each value should be zero. If any other values is nonzero, this is an error condition and the stream is undecodable.

floors

-Vorbis uses two floor type; header decode is handed to the decode +Vorbis uses two floor types; header decode is handed to the decode abstraction of the appropriate type.
    @@ -159,12 +169,12 @@ uses a single mapping type (0), with implicit PCM channel mappings.

  1. if unset, [vorbis_mapping_submaps] = 1

  • read 1 bit as a boolean flag; if set, square polar channel mapping is in use:

    -

    1. [vorbis_mapping_coupling_steps]= read 8 bits as unsigned int and add one

      +

      1. [vorbis_mapping_coupling_steps]= read 8 bits as unsigned integer and add one

      2. for [j] each of [vorbis_mapping_coupling_steps] steps:

          -
        1. vector [vorbis_mapping_magnitude] element [j]= read ilog([audio_channels]) bits as unsiged integer

          -

        2. vector [vorbis_mapping_angle] element [j]= read ilog([audio_channels]) bits as unsiged integer

          -

        3. 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 any of angle channel equals magnitud channel, magnitude channel is greater than [audio_channels]-1, or angle channel is greater than [audio_channels]-1, the stream is undecodable.

          +

        4. vector [vorbis_mapping_magnitude] element [j]= read ilog([audio_channels]) bits as unsigned integer

          +

        5. vector [vorbis_mapping_angle] element [j]= read ilog([audio_channels]) bits as unsigned integer

          +

        6. 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 any of angle channel equals magnitude channel, magnitude channel is greater than [audio_channels]-1, or angle channel is greater than [audio_channels]-1, the stream is undecodable.

    2. read 2 bits (reserved field); if the value is nonzero, the stream is undecodable

      @@ -176,7 +186,7 @@ uses a single mapping type (0), with implicit PCM channel mappings.

      1. read and discard 8 bits (the unused time configuration placeholder)

      2. read 8 bits as unsigned integer for the floor number; save in vector [vorbis_mapping_submap_floor] element [j]

      3. verify the floor number is not greater than the highest number floor configured for the bitstream. If it is, the bitstream is undecodable

        -

      4. read 8 bits as unsigned integer for the residue number; save in vector [vorbis_mapping_submapping_residue] element [j]

        +

      5. read 8 bits as unsigned integer for the residue number; save in vector [vorbis_mapping_submap_residue] element [j]

      6. verify the residue number is not greater than the highest number residue configured for the bitstream. If it is, the bitstream is undecodable

      @@ -190,14 +200,16 @@ uses a single mapping type (0), with implicit PCM channel mappings.

      modes

        -
      1. [vorbis_mode_count] = read 6 bits as unsigned integer and add one -
      2. For each of [vorbis_mode_count] mode numbers: +
      3. [vorbis_mode_count] = read 6 bits as unsigned integer and add oneFor each of [vorbis_mode_count] mode numbers:

        1. [vorbis_mode_blockflag] = read 1 bit

        2. [vorbis_mode_windowtype] = read 16 bits as unsigned integer

        3. [vorbis_mode_transformtype] = read 16 bits as unsigned integer

        4. [vorbis_mode_mapping] = read 8 bits as unsigned integer

        5. verify ranges; zero is the only legal value in Vorbis I for [vorbis_mode_windowtype] and [vorbis_mode_transformtype]. [vorbis_mode_mapping] must not be greater than the highest number mapping in use. Any illegal values render the stream undecodable.

          +

        6. save this mode configuration in slot [i] of the mode configuration array [vorbis_mode_configurations].

          +

      4. read 1 bit as a framing flag. If unset, a framing error occurred and the stream is not decodable. @@ -205,12 +217,287 @@ uses a single mapping type (0), with implicit PCM channel mappings.

        After reading mode descriptions, setup header decode is complete.

        -

        Packet decode

        +

        Audio packet decode and synthesis

        +Following the three header packets, all packets in a Vorbis I stream +are audio. The first step of audio packet decode is to read and +verify the packet type; a non-audio packet when audio is expected +indicates stream corruption or a non-compliant stream. The decoder +must ignore the packet and not attempt decoding it to audio. + +

        packet type, mode and window decode

        + +
          +
        1. read 1 bit [packet_type]; check that packet type is 0 (audio)

          +

        2. read ilog([vorbis_mode_count]-1) bits [mode_number]

          +

        3. decode blocksize [n] is equal to [blocksize_0] if [vorbis_mode_blockflag] is 0, else [n] is equal to [blocksize_1]perform window selection and setup; this window is used later by the inverse MDCT:

          +

          1. if this is a long window (the [vorbis_mode_blockflag] flag of this mode is set):

            +

              +
            1. read 1 bit for [previous_window_flag]

              +

            2. read 1 bit for [next_window_flag]

              + +

            3. if [previous_window_flag] is not set, the left half + of the window will be a hybrid window for lapping with a + short block. See the + 'Window' subheading of the specification introduction + document for an illustration of overlapping dissimilar + windows. Else, the left half window will have normal long + shape.

              + +

            4. if [next_window_flag] is not set, the right half of + the window will be a hybrid window for lapping with a short + block. See the + 'Window' subheading of the specification introduction + document for an illustration of overlapping dissimilar + windows. Else, the left right window will have normal long + shape.

              +

            +
          2. if this is a short window, the window is always the same + short-window shape.

            -

            channel order

            +
          +
        + +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:

        + +

          +
        1. [window_center] = [n] / 2 +
        2. [left_window_start] +
        3. if ([vorbis_mode_blockflag] is set and [previous_window_flag] is not set) then +
          1. [left_window_start] = [n]/4 - [blocksize_0]/4 +
          2. [left_window_end] = [n]/4 + [blocksize_0]/4 +
          3. [left_n] = [blocksize_0]/2 +
          + else +
          1. [left_window_start] = 0 +
          2. [left_window_end] = [window_center] +
          3. [left_n] = [n]/2 +
          + +
        4. if ([vorbis_mode_blockflag] is set and [next_window_flag] is not set) then +
          1. [right_window_start] = [n]*3/4 - [blocksize_0]/4 +
          2. [right_window_end] = [n]*3/4 + [blocksize_0]/4 +
          3. [right_n] = [blocksize_0]/2 +
          + else +
          1. [right_window_start] = [window_center] +
          2. [right_window_end] = [n] +
          3. [right_n] = [n]/2 +
          +
        5. window from range 0 ... [left_window_start]-1 inclusive is zero + +
        6. 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)) + + +
        7. window from range [left_window_end] ... [right_window_start]-1 inclusive is one + +
        8. 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.)) + +
        9. window from range [rigth_window_start] ... [n]-1 is zero + +

        + +An end-of-packet condition up to this point should be considered an +error that discards this packet from the stream. An end of packet +condition past this point is to be considered a possible nominal +occurrence.

        + + +

        floor curve decode

        + +From this point on, we assume out decode context is using mode number +[mode_number] from configuration array +[vorbis_mode_configurations] and the map number +[vorbis_mode_mapping] (specified by the current mode) taken +from the mapping configuration array +[vorbis_mapping_configurations].

        + +Floor curves are decoded one-by-one in channel order.

        + +For each floor [i] of [audio_channels] +

        1. [submap_number] = element [i] of vector [vorbis_mapping_mux]

          + +

        2. [floor_number] = element [submap_number] of vector [vorbis_submap_floor]

          +

        3. if the floor type of this floor (vector [vorbis_floor_types] element [floor_number]) is zero then decode the floor for channel [i] according to the floor 0 decode algorithm

          +

        4. if the type of this floor is one then decode the floor for channel [i] according to the floor 1 decode algorithm

          +

        5. save the needed decoded floor information for channel for later synthesis

          +

        6. if the decoded floor returned 'unused', set vector [no_residue] element [i] to true, else set vector [no_residue] element [i] to false

          +

        -In mapping type 0, channel mapping is implicitly defined as follows for standard audio applications:

        +An end-of-packet condition during floor decode shall result in packet +decode zeroing all channel output vectors and skipping to the +add/overlap output stage.

        + +

        nonzero vector propagate

        + +A possible result of floor decode is that a specific vector is marked +'unused' which indicates that that final output vector is all-zero +values (and the floor is zero). The residue for that vector is not +coded in the stream, save for one complication. If some vectors are +used and some are not, channel coupling could result in mixing a +zeroed and nonzeroed vector to produce two nonzeroed vectors.

        + +for each [i] from 0 ... [vorbis_mapping_coupling_steps]-1 + +

        1. if either [no_residue] entry for channel +([vorbis_mapping_magnitude] element [i]) or (channel +[vorbis_mapping_angle] element [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. +
        + +

        residue decode

        + +Unlike floors, which are decoded in channel order, the residue vectors +are decoded in submap order.

        + +for each submap [i] in order from 0 ... [vorbis_mapping_submaps]-1

        +

        1. [ch] = 0

          +

        2. for each channel [j] in order from 0 ... [audio_channels]

          +

          1. if channel [j] is in submap [i] (vector [vorbis_mapping_mux] element [j] is equal to [i])

            +

            1. if vector [no_residue] element [j] is true

              +

              1. vector [do_not_decode_flag] element [channels_in_bundle] is set

                +

              else
              1. vector [do_not_decode_flag] element [channels_in_bundle] is unset

                +

              +
            2. increment [ch]

              +

            +
          +
        3. [residue_number] = vector [vorbis_mapping_submap_residue] element [i]

          + +

        4. [residue_type] = vector [vorbis_residue_types] element [residue_number]

          +

        5. decode [ch] vectors using residue [residue_number], according to type [residue_type], also passing vector [do_not_decode_flag] to indicate which vectors in the bundle should not be decoded. Correct per-vector decode length is [n]/2.

          + +

        6. [ch] = 0

          +

        7. for each channel [j] in order from 0 ... [audio_channels]

          +

          1. if channel [j] is in submap [i] (vector [vorbis_mapping_mux] element [j] is equal to [i])

            +

            1. residue vector for channel [j] is set to decoded residue vector [ch]

              +

            2. increment [ch] +
            +
          +
        + +

        inverse coupling

        + +for each [i] from [vorbis_mapping_coupling_steps]-1 descending to 0 + +
          + +
        1. [magnitude_vector] = the residue vector for channel +(vector [vorbis_mapping_magnitude] element [i]) + +
        2. [angle_vector] = the residue vector for channel (vector +[vorbis_mapping_angle] element [i]) + +
        3. for each scalar value [M] in vector [magnitude_vector] and the corresponding scalar value [A] in vector [angle_vector]: +
          1. if ([M] is greater than zero) +
            1. if ([A] is greater than zero) +
                +
              1. [new_M] = [M] +
              2. [new_A] = [M]-[A] +
              + else +
                +
              1. [new_A] = [M] +
              2. [new_M] = [M]+[A] +
              +
            + else +
            1. if ([A] is greater than zero) +
                +
              1. [new_M] = [M] +
              2. [new_A] = [M]+[A] +
              + else +
                +
              1. [new_A] = [M] +
              2. [new_M] = [M]-[A] +
              +

            + +

          2. set scalar value [M] in vector [magnitude_vector] to [new_M] +
          3. set scalar value [A] in vector [angle_vector] to [new_A] +
          +
        + +

        dot product

        + +For each channel, synthesize the floor curve from the decoded floor +information, according to packet type. Note that the vector synthesis +length for floor computation is [n]/2.

        + +For each channel, multiply each element of the floor curve by each +element of that channel's residue vector. The result is the dot +product the floor and residue vectors for each channel; the produced +vectors are the length [n]/2 audio spectrum for each +channel.

        + +One point is worth mentioning about this dot product; a common mistake +in a fixed point implementation might be to assume that a 32 bit +fixed-point representation for floor and residue and direct +multiplication of the vectors is sufficient for acceptable spectral +depth in all cases because it happens to mostly work with the current +Xiph.Org reference encoder.

        + +However, floor vector values can span ~140dB (~24 bits unsigned), and +the audio spectrum vector should represent a minimum of 120dB (~21 +bits with sign), even when output is to a 16 bit PCM device. For the +residue vector to represent full scale if the floor is nailed to +-140dB, it must be able to span 0 to +140dB. For the residue vector +to reach full scale if the floor is nailed at 0dB, it must be able to +represent -140dB to +0dB. Thus, in order to handle full range +dynamics, a residue vector may span -140dB to +140dB entirely within +spec. A 280dB range is approximately 48 bits with sign; thus the +residue vector must be able to represent a 48 bit range and the dot +product must be able to handle an effective 48 bit times 24 bit +multiplication. This range may be achieved using large (64 bit or +larger) integers, or implementing a movable binary point +representation.

        + +

        inverse MDCT

        + +Convert the audio spectrum vector of each channel back into time +domain PCM audio via an inverse Modified Discrete Cosine Transform +(MDCT). A detailed description of the MDCT is available in the paper +_The +use of multirate filter banks for coding of high quality digital +audio_, by T. Sporer, K. Brandenburg and B. Edler. The window +function used for the MDCT is the window determined earlier.

        + +

        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 +is aligned with the 1/4 point of the current window (as illustrated in +the 'Window' portion of the +specification introduction document. The overlapped portion +produced from overlapping the previous and current frame data is +finished data to be returned by the decoder. This data spans from the +center of the previous window to the center of the current window. In +the case of same-sized windows, the amount of data to return is +one-half block consisting of and only of the overlapped portions. When +overlapping a short and long window, much of the returned range is not +actually overlap. This does not damage transform orthogonality. Pay +attention however to returning the correct data range; the amount of +data to be returned is:

        +window_blocksize(previous_window)/4+window_blocksize(current_window)/4 +from the center (element windowsize/2) of the previous window to the +center (element windowsize/2-1, inclusive) of the current window.

        + +Data is not returned from the first frame; it must be used to 'prime' +the decode engine. The encoder accounts for this priming when +calculating PCM offsets; after the first frame, the proper PCM output +offset is '0' (as no data has been returned yet).

        + +

        output channel order

        + +Vorbis I specifies only a channel mapping type 0. In mapping type 0, +channel mapping is implicitly defined as follows for standard audio +applications:

        one channel:
        the stream is monophonic @@ -219,16 +506,13 @@ In mapping type 0, channel mapping is implicitly defined as follows for standard
        four channels:
        the stream is quadraphonic surround. channel order: front left, front right, rear left, rear right
        five channels:
        the stream is five-channel surround. channel order: front left, front center, front right, rear left, rear right
        six channels:
        the stream is 5,1 surround. channel order: front left, front center, front right, rear left, rear right, LFE -
        greter than six channels:
        channel use and order is defined by the application +
        greater than six channels:
        channel use and order is defined by the application
        -Applications using vorbis for dedicated purposes may define channel +Applications using Vorbis for dedicated purposes may define channel mapping as seen fit. Future channel mappings (such as three and four channel Ambisonics) will make -use of channel mappings other than mapping 0. - - - +use of channel mappings other than mapping 0.


        diff --git a/doc/vorbis-spec-res.html b/doc/vorbis-spec-res.html index 9e957af..1500843 100644 --- a/doc/vorbis-spec-res.html +++ b/doc/vorbis-spec-res.html @@ -6,7 +6,7 @@ Ogg Vorbis I format specification: residue setup and decode -Last update to this document: July 18, 2002
        +Last update to this document: July 19, 2002

        Overview

        @@ -221,6 +221,13 @@ partition interleave. Format 2 packet decode can be built out of the format 1 decode process. Thus we describe first the decode infrastructure identical to all three formats.

        +In addition to configuration information, the residue decode process +is passed the number of vectors in the submap bundle and a vector of +flags indicating if any of the vectors are not to be decoded. If the +passed in number of vectors is 3 and vector number 1 is marked 'do not +decode', decode skips vector 1 during the decode loop. However, even +'do not decode' vectors are allocated and zeroed.

        + The following convenience values are conceptually useful to clarifying the decode process:

        @@ -240,40 +247,49 @@ Packet decode proceeds as follows, matching the description offered earlier in t 5) iterate [j] over the range 0 .. [ch]-1 { - 6) [temp] = read from packet using codebook [residue_classbook] in scalar context - 7) iterate [k] descending over the range [classvals_per_codeword]-1 ... 0 { + 6) if vector [j] is not marked 'do not decode' { + + 7) [temp] = read from packet using codebook [residue_classbook] in scalar context + 8) iterate [k] descending over the range [classvals_per_codeword]-1 ... 0 { - 8) array [classifications] element [j],([partition_count]+[k]) = - [temp] integer modulo [residue_classifications] - 9) [temp] = [temp] / [residue_classifications] using integer division + 9) array [classifications] element [j],([partition_count]+[k]) = + [temp] integer modulo [residue_classifications] + 10) [temp] = [temp] / [residue_classifications] using integer division + } + } - - } + } + } - 10) [classword_count] = 0 - 11) iterate [j] over the range 0 .. [ch]-1 { + 11) [classword_count] = 0 + 12) iterate [j] over the range 0 .. [ch]-1 { - 12) [vqclass] = array [classifications] element [j],([partition_count]+[classword_count]) - 13) [vqbook] = array [residue_books] element [vqclass],[pass] - 14) if ([vqbook] is not 'unused') { + 13) if vector [j] is not marked 'do not decode' { + + + 14) [vqclass] = array [classifications] element [j],([partition_count]+[classword_count]) + 15) [vqbook] = array [residue_books] element [vqclass],[pass] + 16) 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 + } + } - 15) 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 - } } - 16) increment [classword_count] - 17) increment [partition_count] - 18) if ([classword_count] is less than [classvals_per_codeword]) AND + 18) increment [classword_count] + 19) increment [partition_count] + 20) if ([classword_count] is less than [classvals_per_codeword]) AND ([partition_count] is less than [partitions_to_read) then continue at step 11 - 19) if ([partition_count] is less than [partitions_to_read) then continue at step 4 + 21) if ([partition_count] is less than [partitions_to_read) then continue at step 4 } - 20) done + 22) done @@ -368,6 +384,11 @@ Format 2 is reducible to format 1 through the following steps, performed in orde

      +Format 2 handles 'do not decode' vectors differently that residue 0 or +1; if all vectors are marked 'do not decode', no decode occurrs. +However, if at least one vector is to be decoded, all the vectors are +decoded.

      +