atrac3p:level_delta_encoding_huffman_tree
Table of Contents
Level difference encoding Huffman trees
There are two sets of trees. The 6-bit-trees and the 4-bit-trees. The four-bit trees encode values betwenn -7 and 7 in 4-bit-twos-complement representation (so 0..7 and 9..15), while the 6 bit trees store values between 0 and 63 and are used modulo 64 in most contexts anyway, so signed/unsigned doesn't matter. These trees are built as canonical huffman trees from the given length tables.
6-bit trees
Tree 0
- 0: 2 Bit
- 1: 3 Bit
- 2: 4 Bit
- 3-6: 8 Bit
- 7-56: 9 Bit
- 57-59: 8 Bit
- 60: 4 Bit
- 61-63: 3 Bit
Tree 1
- 0: 2 Bit
- 1-2: 3 Bit
- 3: 4 Bit
- 4-6: 8 Bit
- 7-56: 9 Bit
- 57-60: 8 Bit
- 61: 4 Bit
- 62-63: 3 Bit
Tree 2
- 0: 1 Bit
- 1: 3 Bit
- 2-3: 5 Bit
- 4: 7 Bit
- 5-58: 9 Bit
- 59: 8 Bit
- 60: 7 Bit
- 61-62: 5 Bit
- 63: 3 Bit
Tree 3
- 0: 2 Bit
- 1-2: 3 Bit
- 3-4: 5 Bit
- 5: 7 Bit
- 6-57: 9 Bit
- 58-59: 7 Bit
- 60-61: 5 Bit
- 62-63: 3 Bit
4-bit trees
Tree 0
- 0: 2 Bit
- 1: 3 Bit
- 2: 4 Bit
- 3-7: 6 Bit
- 9-11: 6 Bit
- 12: 4 Bit
- 13-15: 3 Bit
Tree 1
- 0: 2 Bit
- 1-2: 3 Bit
- 3: 4 Bit
- 4-7: 6 Bit
- 9-12: 6 Bit
- 13: 4 Bit
- 14-15: 3 Bit
Tree 2
- 0: 1 Bit
- 1: 3 Bit
- 2: 4 Bit
- 3: 5 Bit
- 4-7: 7 Bit
- 9-12: 7 Bit
- 13: 5 Bit
- 14: 4 Bit
- 15: 3 Bit
Tree 3
- 0: 2 Bit
- 1-2: 3 Bit
- 3: 4 Bit
- 4: 5 Bit
- 5: 6 Bit
- 6-7: 7 Bit
- 9-10: 7 Bit
- 11: 6 Bit
- 12: 5 Bit
- 13: 4 Bit
- 14-15: 3 Bit
atrac3p/level_delta_encoding_huffman_tree.txt · Last modified: 2009/11/21 20:56 by megadiscman