User Tools

Site Tools


atrac3p:serialized_quantization_unit_levels

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
atrac3p:serialized_quantization_unit_levels [2010/07/23 17:27] megadiscmanatrac3p:serialized_quantization_unit_levels [2010/10/25 13:01] (current) – Explain signs of level prediction vectors correctly. megadiscman
Line 2: Line 2:
 The quantization unit levels are logarithmically scaled scale factor for the band coefficients. An increase of three in the quantization unit level value gives rise to an factor of two in the scaling value. The range of the level values is between 1 and 63. There are four level encoding modes, and all but mode 0 are different for the master and the slave channel. The quantization unit levels are logarithmically scaled scale factor for the band coefficients. An increase of three in the quantization unit level value gives rise to an factor of two in the scaling value. The range of the level values is between 1 and 63. There are four level encoding modes, and all but mode 0 are different for the master and the slave channel.
  
-Trailing bands with a quantizer of zero (i.e. no data) are trimmed, i.e. no data for these quantization units are encoded. This does not apply to quantization units with a quantizer of zero in between non-zero quantization units.+Trailing bands with a quantization precision of zero (i.e. no data) are trimmed, i.e. no data for these quantization units are encoded. This does not apply to quantization units with a precision of zero in between non-zero quantization units.
  
 ==== Prediction Vectors ==== ==== Prediction Vectors ====
-The prediction vectors (common distributions) of the levels fall into two classes. Three [[basic level prediction vectors]] (one of them completely zero) and 64 different [[extended level prediction vectors]]. The base tables are used in all non-primitive master encoding modes. While modes basing on the extended tables generally wrap around, modes based on the basic tables do not. The base table for the levels are different from the quantizer base tables in that they are subtracted and not added to the data, so the no-wraparound condition means that encoding a delta of 6 (i.e. +6) while the base table says 8 (i.e. -8) is an error.+The prediction vectors (common distributions) of the levels fall into two classes. Three [[basic level prediction vectors]] (one of them completely zero) and 64 different [[extended level prediction vectors]]. The prediction vectors are used in all non-primitive master encoding modes. While modes basing on the extended tables generally wrap around, modes based on the basic tables do not.
  
-If an extended base table is selected, the entries from the extended base table is offset by a 6-bit value stored directly adjacent to the extended base table number. While the base table itself is (see above) to be interpreted negatively, the offset is positive.+For the basic vectors only, the prediction vectors are to be subtracted from the data instead of added,so the no-wraparound condition means that encoding a delta of 6 (i.e. +6) while the prediction vector says 8 (i.e. -8) is an error. 
 + 
 +If an extended prediction vector is selected, the entries from the extended prediction vector are offset by a 6-bit value stored directly adjacent to the extended prediction vector number. The extended vector is taken positive unlike the basic vectors.
  
 ==== Encoding Modes ==== ==== Encoding Modes ====
Line 14: Line 16:
  
 === 1 (on master channel): Direct encoded delta === === 1 (on master channel): Direct encoded delta ===
-base table is selected, and for each quantization unit a difference (delta) is stored. If a basic base table is used, for the first (//n// quantization units) a full 6-bit delta is stored (but still note the no-wraparound restriction), for the later quantization units a reduced delta value with only //b// bits is obtained, which is added to a baseline constant //c//. If extended an extended base table is used, deltas are generally just 4 bits instead of 6 bits, interpreted with an offset of 7, so the bit sequence "0000" means -7 and "1100" means +5. For the reduced-precision deltas, the -7 offset is applied only to the base value. The reduced-precision deltas themselves are always non-negative.+prediction vector is selected, and for each quantization unit a difference (delta) is stored. If a basic vector is used, for the first (//n// quantization units) a full 6-bit delta is stored (but still note the no-wraparound restriction), for the later quantization units a reduced delta value with only //b// bits is obtained, which is added to a baseline constant //c//. If extended an extended prediction vector is used, deltas are generally just 4 bits instead of 6 bits, interpreted with an offset of 7, so the bit sequence "0000" means -7 and "1100" means +5. For the reduced-precision deltas, the -7 offset is applied only to the base value. The reduced-precision deltas themselves are always non-negative.
  
 === 1 (on slave channel): Diffence to master === === 1 (on slave channel): Diffence to master ===
Line 20: Line 22:
  
 === 2 (on master channel): Huffman-encoded delta === === 2 (on master channel): Huffman-encoded delta ===
-base table from the extended base tables is chosen (primitive base tables are not possible in this mode). For each quantization unit, a 4-bit-delta value is stored as a huffman code in the selected 4-bit-tree. The difference is applied with sign expansion (so the tree codes are -7 to 7) and wrap-around.+vector from the extended prediction vectors is chosen (basic vectors are not accessible in this mode). For each quantization unit, a 4-bit-delta value is stored as a huffman code in the selected 4-bit-tree. The difference is applied with sign expansion (so the tree codes are -7 to 7) and wrap-around.
  
 === 2 (on slave channel): Delta-encoded difference to master === === 2 (on slave channel): Delta-encoded difference to master ===
Line 26: Line 28:
  
 === 3 (on master channel): Delta-encoded deltas to base === === 3 (on master channel): Delta-encoded deltas to base ===
-base table (either primitive or extended) is chosen. For primitive the base table: a 6-bit Huffman tree is selected. The level delta for the first quantization unit is directly encoded, the difference between the deltas of each other band to its previous band is encoded by the given Huffman tree. For extended base table: a 4-bit Huffman tree is selected, the base table includes a 6-bit-offset (as extended base tables always do), the delta for quantization unit 0 is a plain 4 bit number, the deltas for the following quantization units are encoded by the difference to the previous one, represented as Huffman code.+prediction vector (either basic or extended) is chosen. For primitive the vector: a 6-bit Huffman tree is selected. The level delta for the first quantization unit is directly encoded, the difference between the deltas of each other band to its previous band is encoded by the given Huffman tree. For an extended vector: a 4-bit Huffman tree is selected, the vector selection comes with a 6-bit-offset (as extended vectors always do), the delta for quantization unit 0 is a plain 4 bit number, the deltas for the following quantization units are encoded by the difference to the previous one, represented as Huffman code.
  
 === 3 (on slave channel): Copy from master channel === === 3 (on slave channel): Copy from master channel ===
Line 40: Line 42:
 === Coding mode 1 on master channel: base + direct delta === === Coding mode 1 on master channel: base + direct delta ===
   * 2 bit: selection of [[basic level prediction vectors|basic level prediction vector]], 3 meaning choose from big list   * 2 bit: selection of [[basic level prediction vectors|basic level prediction vector]], 3 meaning choose from big list
-  * if not choosing from big list+  * if using a basic prediction vector
     * 5 bit: number of quantization units with full precision level delta (//n//)     * 5 bit: number of quantization units with full precision level delta (//n//)
     * 3 bit: bits of non-full-precision deltas (//b//), 7 being invalid     * 3 bit: bits of non-full-precision deltas (//b//), 7 being invalid
Line 48: Line 50:
     * for each reduced-precision quantization unit     * for each reduced-precision quantization unit
        * //b// bits of level.        * //b// bits of level.
-  * if choosing from big list+  * if using an extended prediction vector
     * 6 bit: level of quantization unit 0/1/2 for base     * 6 bit: level of quantization unit 0/1/2 for base
     * 6 bit: selection of level table from [[extended level prediction vectors]]     * 6 bit: selection of level table from [[extended level prediction vectors]]
Line 62: Line 64:
   * 2 bit: selection of [[level delta encoding huffman tree]], 6-bit-tree used   * 2 bit: selection of [[level delta encoding huffman tree]], 6-bit-tree used
   * for each quantization unit:   * for each quantization unit:
-     * huffman code for delta (gets added to master channel quantizer, wrapping around)+     * huffman code for delta (gets added to master channel level, wrapping around)
  
-=== Coding mode 2 on master channel: from big base table list + huffman delta ===+=== Coding mode 2 on master channel: extended prediction vector + huffman delta ===
   * 2 bit: selection of 4-bit [[level delta encoding huffman tree]]   * 2 bit: selection of 4-bit [[level delta encoding huffman tree]]
   * 6 bit: level of quantization unit 0/1/2 for base   * 6 bit: level of quantization unit 0/1/2 for base
Line 77: Line 79:
 === Coding mode 3 on master channel: base + walking delta === === Coding mode 3 on master channel: base + walking delta ===
   * 2 bit: selection of [[basic level prediction vectors|basic level prediction vector]], 3 meaning choose from big table   * 2 bit: selection of [[basic level prediction vectors|basic level prediction vector]], 3 meaning choose from big table
-  * if using a primary base table+  * if using a basic prediction vector
      * 2 bit: selection of 6-bit [[level delta encoding huffman tree]]      * 2 bit: selection of 6-bit [[level delta encoding huffman tree]]
      * 6 bit: level delta for quantization unit 0      * 6 bit: level delta for quantization unit 0
      * for remaining quantization units      * for remaining quantization units
         * huffman code representing delta between previous and this level         * huffman code representing delta between previous and this level
-  * if using data from an extended base table+  * if using an extended prediction vector
      * 2 bit: selection of 4-bit [[level delta encoding huffman tree]]      * 2 bit: selection of 4-bit [[level delta encoding huffman tree]]
      * 6 bit: level of quantization unit 0/1/2 for base      * 6 bit: level of quantization unit 0/1/2 for base
-     * 6 bit: selection of level table from [[extended level prediction vector]] +     * 6 bit: selection of level table from [[extended level prediction vectors]] 
-     * 4 bit: level delta for quantization unit 0+     * 4 bit: level delta for quantization unit 0, offset by 8 (so -8..7 are possible)
      * for remaining quantization units      * for remaining quantization units
         * huffman code representing delta between previous and this level (sign expanded)         * huffman code representing delta between previous and this level (sign expanded)
atrac3p/serialized_quantization_unit_levels.1279906034.txt.gz · Last modified: 2010/07/23 17:27 by megadiscman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki