Mercurial > libavcodec.hg
comparison ac3dec_data.c @ 8136:3085502c4f33 libavcodec
add support for spectral extension
| author | jbr |
|---|---|
| date | Thu, 13 Nov 2008 03:18:13 +0000 |
| parents | dc1a7a6ec58d |
| children | f17b1eb9ccd1 |
comparison
equal
deleted
inserted
replaced
| 8135:c82f8f5657ff | 8136:3085502c4f33 |
|---|---|
| 1125 * Table E2.16 Default Coupling Banding Structure | 1125 * Table E2.16 Default Coupling Banding Structure |
| 1126 */ | 1126 */ |
| 1127 const uint8_t ff_eac3_default_cpl_band_struct[18] = | 1127 const uint8_t ff_eac3_default_cpl_band_struct[18] = |
| 1128 { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1 }; | 1128 { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1 }; |
| 1129 | 1129 |
| 1130 /** | |
| 1131 * Table E2.15 Default Spectral Extension Banding Structure | |
| 1132 */ | |
| 1133 const uint8_t ff_eac3_default_spx_band_struct[17] = | |
| 1134 { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 }; | |
| 1135 | |
| 1136 /** | |
| 1137 * Table E.25: Spectral Extension Attenuation Table | |
| 1138 * 24-bit fixed-point version of the floating-point table in the specification. | |
| 1139 * ff_eac3_spx_atten_tab[code][bin]=lrint(pow(1<<(bin+1),(code+1)/-15.0)*(1<<23)); | |
| 1140 */ | |
| 1141 const int32_t ff_eac3_spx_atten_tab[32][3] = { | |
| 1142 { 8009792, 7648083, 7302707 }, | |
| 1143 { 7648083, 6972929, 6357376 }, | |
| 1144 { 7302707, 6357376, 5534417 }, | |
| 1145 { 6972929, 5796163, 4817990 }, | |
| 1146 { 6658043, 5284492, 4194304 }, | |
| 1147 { 6357376, 4817990, 3651354 }, | |
| 1148 { 6070287, 4392670, 3178688 }, | |
| 1149 { 5796163, 4004896, 2767209 }, | |
| 1150 { 5534417, 3651354, 2408995 }, | |
| 1151 { 5284492, 3329021, 2097152 }, | |
| 1152 { 5045853, 3035144, 1825677 }, | |
| 1153 { 4817990, 2767209, 1589344 }, | |
| 1154 { 4600417, 2522926, 1383604 }, | |
| 1155 { 4392670, 2300209, 1204498 }, | |
| 1156 { 4194304, 2097152, 1048576 }, | |
| 1157 { 4004896, 1912021, 912838 }, | |
| 1158 { 3824041, 1743232, 794672 }, | |
| 1159 { 3651354, 1589344, 691802 }, | |
| 1160 { 3486464, 1449041, 602249 }, | |
| 1161 { 3329021, 1321123, 524288 }, | |
| 1162 { 3178688, 1204498, 456419 }, | |
| 1163 { 3035144, 1098167, 397336 }, | |
| 1164 { 2898081, 1001224, 345901 }, | |
| 1165 { 2767209, 912838, 301124 }, | |
| 1166 { 2642246, 832255, 262144 }, | |
| 1167 { 2522926, 758786, 228210 }, | |
| 1168 { 2408995, 691802, 198668 }, | |
| 1169 { 2300209, 630732, 172951 }, | |
| 1170 { 2196335, 575052, 150562 }, | |
| 1171 { 2097152, 524288, 131072 }, | |
| 1172 { 2002448, 478005, 114105 }, | |
| 1173 { 1912021, 435808, 99334 } | |
| 1174 }; | |
| 1175 | |
| 1130 /** | 1176 /** |
| 1131 * Table of bin locations for rematrixing bands | 1177 * Table of bin locations for rematrixing bands |
| 1132 * reference: Section 7.5.2 Rematrixing : Frequency Band Definitions | 1178 * reference: Section 7.5.2 Rematrixing : Frequency Band Definitions |
| 1133 */ | 1179 */ |
| 1134 const uint8_t ff_ac3_rematrix_band_tab[5] = { 13, 25, 37, 61, 253 }; | 1180 const uint8_t ff_ac3_rematrix_band_tab[5] = { 13, 25, 37, 61, 253 }; |
