This contains exactly 12 quantized subband samples for a channel and a subband.
After requantization and channel dematrixing this gives the input for the subband synthesizer.
Member of Audio Frame
Coding of the subband samples depends and only depends on the Allocation.
Samples are huffman coded by fixed huffman tables.
The following allocations are currently defined (allocations below 0 are not possible for subband 0):
All subband samples are 0.
int i; for ( i = 0; i < 36; i++ ) { sample [i] = 0; }
Subband samples has the range [-1,+1], 6 samples are grouped.
At most 2 samples per group can be nonzero.
static unsigned char tab [] = { 0x01,0x02,0x03,0x04,0x05, 0x12,0x13,0x14,0x15, 0x23,0x24,0x25, 0x34,0x35, 0x45 }; int code; int tmp; int i; for ( i = 0; i < 36; i += 6 ) { code = Decode_Huffman_Table (table_03) - 1; sample [i + 0] = sample [i + 1] = sample [i + 2] = sample [i + 3] = sample [i + 4] = sample [i + 5] = 0; if ( code >= 0 ) if ( code < 12 ) { sample [i + (code >> 1)] = code & 1 ? +1 : -1; } else { tmp = tab [(code - 12) >> 2]; sample [i + (tmp >> 4)] = code & 1 ? +1 : -1; sample [i + (tmp & 15)] = code & 2 ? +1 : -1; } }
Subband samples has the range [-1,+1], 4 samples are grouped.
int code; int i; for ( i = 0; i < 36; i += 4 ) { code = Decode_Huffman_Table (table_04); sample [i + 0] = code % 3 - 1; sample [i + 1] = code / 3 % 3 - 1; sample [i + 2] = code / 9 % 3 - 1; sample [i + 3] = code / 27 - 1; }
Subband samples has the range [-2,+2], 3 samples are grouped.
int code; int i; for ( i = 0; i < 36; i += 3 ) { code = Decode_Huffman_Table (table_06); sample [i + 0] = code % 5 - 2; sample [i + 1] = code / 5 % 5 - 2; sample [i + 2] = code / 25 - 2; }
Subband samples has the range [-3,+3], 2 samples are grouped.
int code; int i; for ( i = 0; i < 36; i += 2 ) { code = Decode_Huffman_Table (table_08); sample [i + 0] = code % 7 - 3; sample [i + 1] = code / 7 - 3; }
Subband samples has the range [-4,+4], 2 samples are grouped.
int code; int i; for ( i = 0; i < 36; i += 2 ) { code = Decode_Huffman_Table (table_09); sample [i + 0] = code % 9 - 4; sample [i + 1] = code / 9 - 4; }
Subband samples has the range [-5,+5], 2 samples are grouped.
int code; int i; for ( i = 0; i < 36; i += 2 ) { code = Decode_Huffman_Table (table_10); sample [i + 0] = code % 11 - 5; sample [i + 1] = code / 11 - 5; }
Subband samples are heavily shaped.
Allocation | linear bits |
7 | none |
8 | 1 |
9 | 2 |
10 | 3 |
11 | 4 |
12 | 5 |
13 | 6 |
14 | 8 |
15 | 11 |
int linear = ...; int code; int i; for ( i = 0; i < 36; i++ ) { code = Decode_Huffman_Table (table_01); sample [i] = (code << linear) + Read_Bits (linear); }
All subband samples are generated by a random generator.
int i; for ( i = 0; i < 36; i++ ) { sample [i] = rand () & 0x4000 ? +0.5 : -0.5; }