This contains exactly 36 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 [-1,+1], 3 samples are grouped.

int code; int i; for ( i = 0; i < 36; i += 3 ) { code = Decode_Huffman_Table (table_05); sample [i + 0] = code % 3 - 1; sample [i + 1] = code / 3 % 3 - 1; sample [i + 2] = code / 9 - 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 [-2,+2], 2 samples are grouped.

int code; int i; for ( i = 0; i < 36; i += 2 ) { code = Decode_Huffman_Table (table_07); sample [i + 0] = code % 5 - 2; sample [i + 1] = code / 5 - 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 |

10 | none |

12 | 1 |

14 | 2 |

16 | 3 |

18 | 4 |

20 | 5 |

22 | 6 |

24 | 7 |

25 | 8 |

26 | 9 |

27 | 10 |

28 | 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); }

Subband samples are lightly shaped.

Allocation | linear bits |

11 | none |

13 | 1 |

15 | 2 |

17 | 3 |

19 | 4 |

21 | 5 |

int linear = ...; int code; int i; for ( i = 0; i < 36; i++ ) { code = Decode_Huffman_Table (table_02); 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] = gaussian_distribution (0.0, 0.5); // 1st momentum 0, 2nd momentum 0.5 }

If this resolution occures, all following subbands are also encoded with this resolution.

For Allocation 0 this means all following bands are zero.

For allocation -17...-10 this means all following subbands are using Intensity stereo with 8...1 vector bits as long as the corresponding base channel contains signal.