atrac3p:main_trees_list
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
atrac3p:main_trees_list [2009/12/06 00:02] – Insert all tree data megadiscman | atrac3p:main_trees_list [2009/12/20 16:31] – megadiscman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Main Spectral Data Encoding Trees ===== | ||
- | ==== General Intro ==== | ||
- | |||
- | The quantized values are encoded using a prefix free binary code. To make matters more complicated there are up to 16 encoding scheme per quantizer (because the symbol set depends on the quantizer). In many cases, the symbols are built from a group of two or four quantized values instead of just one quantized value. For groups of size two, the trees are shown as table, the first symbol choosing the row, the second value the column. | ||
- | |||
- | Another catch is that some of the encoding schemes encoded the signed quantized values, while others encode only the absolute values of the quantized values. If only the absolute values are encoded in a symbol, each symbol is followed by one bit per absolute value that is not zero. If that bit is set, the value is negative. | ||
- | |||
- | The trees can be calculated as [[canonical huffman trees]]. Note that unsigned sorting | ||
- | |||
< | < | ||
<!-- I know that CSS in the body violates the specs! --> | <!-- I know that CSS in the body violates the specs! --> | ||
Line 16: | Line 7: | ||
--></ | --></ | ||
</ | </ | ||
+ | |||
+ | ===== Main Spectral Data Encoding Trees ===== | ||
+ | ==== General Intro ==== | ||
+ | |||
+ | The quantized values are encoded using a prefix free binary code. To make matters more complicated there are up to 16 encoding scheme per quantizer (because the symbol set depends on the quantizer). In many cases, the symbols are built from a group of two or four quantized values instead of just one quantized value. For groups of size two, the trees are shown as table, the first symbol choosing the row, the second value the column. For groups of size four, the tables are organized so that the first symbol chooses the row block, the second symbol the exact row, the third symbol the column block and the fourth symbol the column. //I think about swapping second and third symbol, so be careful when coming back later!// | ||
+ | |||
+ | Another catch is that some of the encoding schemes encoded the signed quantized values, while others encode only the absolute values of the quantized values. If only the absolute values are encoded in a symbol, each symbol is followed by one bit per absolute value that is not zero. If that bit is set, the value is negative. | ||
+ | |||
+ | The trees can be calculated as [[canonical huffman trees]]. Note that unsigned sorting | ||
+ | |||
+ | ==== Examples ==== | ||
+ | |||
+ | === Interpreting a group-by-four block === | ||
+ | |||
+ | Let's take a look at Tree 1A. The shortest symbol is (0,0,0,0), encoded with one bit, and gets assigned the code '' | ||
+ | |||
+ | * (0,-1,0,0) | ||
+ | * (0,0,-1,0) | ||
+ | * (0,0,0,-1) | ||
+ | * (0,0,0,1) | ||
+ | * (0,0,1,0) | ||
+ | * (0,1,0,0) | ||
+ | * (1,0,0,0) | ||
+ | |||
+ | Now for sorting these symbols lexicographically, | ||
+ | * (0,0,0,1) -> '' | ||
+ | * (0,0,0,-1) -> '' | ||
+ | * (0,0,1,0) -> '' | ||
+ | * (0,0,-1,0) -> '' | ||
+ | * (0,1,0,0) -> '' | ||
+ | * (0,-1,0,0) -> '' | ||
+ | * (1,0,0,0) -> '' | ||
+ | |||
+ | === Interpreting absolute value encoding === | ||
+ | |||
+ | Now take a look at Tree 1H. In this coding scheme, the prefix free code is built from positive values only. Applying the algorithm to build the canonical code from the given lengths, one gets the following code assignment: | ||
+ | |||
+ | * (0,0) -> '' | ||
+ | * (1,0) -> '' | ||
+ | * (0,1) -> '' | ||
+ | * (1,1) -> '' | ||
+ | |||
+ | as the these codes are absolute value, they have to be interpreted as (0,0), (±1,0), (0,±1), (±1,±1) in fact, and the signs have to be specified afterwards. For each non-zero value from left to right, one bit being zero for positive and one for negative is appended to to the code, so you finally obtain | ||
+ | |||
+ | * (0,0) -> '' | ||
+ | * (+1,0) -> '' | ||
+ | * (0,+1) -> '' | ||
+ | * (+1,+1) -> '' | ||
+ | |||
==== Trees for Quantizer 1 ==== | ==== Trees for Quantizer 1 ==== | ||
(i.e. symbol set -1..+1) | (i.e. symbol set -1..+1) | ||
Line 1786: | Line 1826: | ||
* 28..30: 10 bits | * 28..30: 10 bits | ||
* 31: 11 bits | * 31: 11 bits | ||
+ | |||
+ | ===== Tree Sets ===== | ||
+ | |||
+ | This table shows the mapping of tree set IDs, tree IDs and quantizers to the code tables defined above. If the table says //n x Tree XX// it means that n symbols of that tree (which might groups of 1, 2 or 4 quantized coefficients) are clustered together. Each cluster is preceeded by an "data present" | ||
+ | |||
+ | The tree choice can be limited to a restricted tree set. The IDs inside the restricted tree set are in the range 0..3 instead of 0..7. They map to code sets also accessible using the full tree set. A code set that is accessible via the restricted tree set is indicate by **R//n//**, where //n// is the ID in the range 0..3 | ||
+ | |||
+ | ==== Tree Set A==== | ||
+ | |Quant\ID^ 0^ 1^ 2^ 3^ 4^ 5^ 6^ 7^ ^ R0^ R1^ R2^ R3^ | ||
+ | ^ 1| Tree 1A| 4 x Tree 1B| Tree 1C| Tree 1D| Tree 1E| Tree 1F| 2 x Tree 1G| Tree 1H| | Tree 1A| Tree 1F| Tree 1E| 4x Tree 1B| | ||
+ | ^ 2| Tree 2A| Tree 2B| Tree 2C| Tree 2D| Tree 2E| Tree 2F| Tree 2G| 2 x Tree 2H| | Tree 2A| Tree 2B| Tree 2C| Tree 2D| | ||
+ | ^ 3| Tree 3A| Tree 3B| Tree 3C| Tree 3D| Tree 3E| Tree 3F| Tree 3G| Tree 3H| | Tree 3D| Tree 3A| Tree 3E| Tree 3C| | ||
+ | ^ 4| Tree 4A| Tree 4B| Tree 4C| Tree 4D| Tree 4E| Tree 4F| Tree 4G| Tree 4H| | Tree 4E| Tree 4A| Tree 4B| Tree 4C| | ||
+ | ^ 5| Tree 5A| Tree 5B| Tree 5C| Tree 5D| Tree 5E| Tree 5F| Tree 5G| Tree 5H| | Tree 5B| Tree 5A| Tree 5E| Tree 5D| | ||
+ | ^ 6| Tree 6A| Tree 6B| Tree 6C| Tree 6D| Tree 6E| Tree 6F| Tree 6G| 2 x Tree 6H| | Tree 6D| Tree 6A| Tree 6C| Tree 6B| | ||
+ | ^ 7| Tree 7A| Tree 7B| Tree 7C| Tree 7D| Tree 7E| Tree 7F| Tree 7G| 4 x Tree 7A| | Tree 7A| Tree 7D| Tree 7B| Tree 7C| | ||
+ | |||
+ | ==== Tree Set B==== | ||
+ | |Quant\ID^ 0^ 1^ 2^ 3^ 4^ 5^ 6^ 7^ | ||
+ | ^ 1| 4 x Tree 1I **R1**| Tree 1C **R2**| | ||
+ | ^ 2| Tree 2I **R0**| Tree 2J **R3**| 4 x Tree 2D **R2**| Tree 2K **R1**| | ||
+ | ^ 3| 4 x Tree 3I **R0**| Tree 3B **R1**| Tree 3A **R2**| Tree 3J **R3**| Tree 3K| 4 x Tree 3L| Tree 3M| 4 x Tree 3N| | ||
+ | ^ 4| Tree 4I **R0**| Tree 4J **R1**| Tree 4E **R2**| 2 x Tree 4I| 4 x Tree 4J **R3**| Tree 4C| Tree 4K| Tree 4L| | ||
+ | ^ 5| Tree 5I **R0**| Tree 5B **R1**| 2 x Tree 5I **R2**| Tree 5J **R3**| Tree 5E| Tree5F| | ||
+ | ^ 6| Tree 6A **R3**| Tree 6I **R0**| | ||
+ | ^ 7| Tree 7H **R0**| Tree 7A **R1**| | ||
+ | |||
+ | |||
atrac3p/main_trees_list.txt · Last modified: 2010/07/23 17:41 by megadiscman