FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
eac3_data.c
Go to the documentation of this file.
1 /*
2  * E-AC-3 tables
3  * Copyright (c) 2007 Bartlomiej Wolowiec <bartek.wolowiec@gmail.com>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 /**
23  * @file
24  * Tables taken directly from the E-AC-3 spec.
25  */
26 
27 #include "eac3_data.h"
28 #include "ac3.h"
29 
31  0, 2, 3, 4, 5, 7, 8, 9, 3, 4,
32  5, 6, 7, 8, 9, 10, 11, 12, 14, 16,
33 };
34 
35 /**
36  * Table E3.6, Gk=1
37  * No gain (Gk=1) inverse quantization, remapping scale factors
38  * ff_eac3_gaq_remap[hebap+8]
39  */
40 const int16_t ff_eac3_gaq_remap_1[12] = {
41  4681, 2185, 1057, 520, 258, 129, 64, 32, 16, 8, 2, 0
42 };
43 
44 /**
45  * Table E3.6, Gk=2 & Gk=4, A
46  * Large mantissa inverse quantization, remapping scale factors
47  * ff_eac3_gaq_remap_2_4_a[hebap-8][Gk=2,4]
48  */
49 const int16_t ff_eac3_gaq_remap_2_4_a[9][2] = {
50  { -10923, -4681 },
51  { -14043, -6554 },
52  { -15292, -7399 },
53  { -15855, -7802 },
54  { -16124, -7998 },
55  { -16255, -8096 },
56  { -16320, -8144 },
57  { -16352, -8168 },
58  { -16368, -8180 }
59 };
60 
61 /**
62  * Table E3.6, Gk=2 & Gk=4, B
63  * Large mantissa inverse quantization, negative mantissa remapping offsets
64  * ff_eac3_gaq_remap_3_4_b[hebap-8][Gk=2,4]
65  */
66 const int16_t ff_eac3_gaq_remap_2_4_b[9][2] = {
67  { -5461, -1170 },
68  { -11703, -4915 },
69  { -14199, -6606 },
70  { -15327, -7412 },
71  { -15864, -7805 },
72  { -16126, -7999 },
73  { -16255, -8096 },
74  { -16320, -8144 },
75  { -16352, -8168 }
76 };
77 
78 static const int16_t vq_hebap1[4][6] = {
79 { 7167, 4739, 1106, 4269, 10412, 4820},
80 { -5702, -3187, -14483, -1392, -2027, 849},
81 { 633, 6199, 7009, -12779, -2306, -2636},
82 { -1468, -7031, 7592, 10617, -5946, -3062},
83 };
84 static const int16_t vq_hebap2[8][6] = {
85 { -12073, 608, -7019, 590, 4000, 869},
86 { 6692, 15689, -6178, -9239, -74, 133},
87 { 1855, -989, 20596, -2920, -4475, 225},
88 { -1194, -3901, -821, -6566, -875, -20298},
89 { -2762, -3181, -4094, -5623, -16945, 9765},
90 { 1547, 6839, 1980, 20233, -1071, -4986},
91 { 6221, -17915, -5516, 6266, 358, 1162},
92 { 3753, -1066, 4283, -3227, 15928, 10186},
93 };
94 static const int16_t vq_hebap3[16][6] = {
95 { -10028, 20779, 10982, -4560, 798, -68},
96 { 11050, 20490, -6617, -5342, -1797, -1631},
97 { 3977, -542, 7118, -1166, 18844, 14678},
98 { -4320, -96, -7295, -492, -22050, -4277},
99 { 2692, 5856, 5530, 21862, -7212, -5325},
100 { -135, -23391, 962, 8115, -644, 382},
101 { -1563, 3400, -3299, 4693, -6892, 22398},
102 { 3535, 3030, 7296, 6214, 20476, -12099},
103 { 57, -6823, 1848, -22349, -5919, 6823},
104 { -821, -3655, -387, -6253, -1735, -22373},
105 { -6046, 1586, -18890, -14392, 9214, 705},
106 { -5716, 264, -17964, 14618, 7921, -337},
107 { -110, 108, 8, 74, -89, -50},
108 { 6612, -1517, 21687, -1658, -7949, -246},
109 { 21667, -6335, -8290, -101, -1349, -22},
110 { -22003, -6476, 7974, 648, 2054, -331},
111 };
112 static const int16_t vq_hebap4[32][6] = {
113 { 6636, -4593, 14173, -17297, -16523, 864},
114 { 3658, 22540, 104, -1763, -84, 6},
115 { 21580, -17815, -7282, -1575, -2078, -320},
116 { -2233, 10017, -2728, 14938, -13640, -17659},
117 { -1564, -17738, -19161, 13735, 2757, 2951},
118 { 4520, 5510, 7393, 10799, 19231, -13770},
119 { 399, 2976, -1099, 5013, -1159, 22095},
120 { 3624, -2359, 4680, -2238, 22702, 3765},
121 { -4201, -8285, -6810, -12390, -18414, 15382},
122 { -5198, -6869, -10047, -8364, -16022, -20562},
123 { -142, -22671, -368, 4391, -464, -13},
124 { 814, -1118, -1089, -22019, 74, 1553},
125 { -1618, 19222, -17642, -13490, 842, -2309},
126 { 4689, 16490, 20813, -15387, -4164, -3968},
127 { -3308, 11214, -13542, 13599, -19473, 13770},
128 { 1817, 854, 21225, -966, -1643, -268},
129 { -2587, -107, -20154, 376, 1174, -304},
130 { -2919, 453, -5390, 750, -22034, -978},
131 { -19012, 16839, 10000, -3580, 2211, 1459},
132 { 1363, -2658, -33, -4067, 1165, -21985},
133 { -8592, -2760, -17520, -15985, 14897, 1323},
134 { 652, -9331, 3253, -14622, 12181, 19692},
135 { -6361, 5773, -15395, 17291, 16590, -2922},
136 { -661, -601, 1609, 22610, 992, -1045},
137 { 4961, 9107, 11225, 7829, 16320, 18627},
138 { -21872, -1433, 138, 1470, -1891, -196},
139 { -19499, -18203, 11056, -516, 2543, -2249},
140 { -1196, -17574, 20150, 11462, -401, 2619},
141 { 4638, -8154, 11891, -15759, 17615, -14955},
142 { -83, 278, 323, 55, -154, 232},
143 { 7788, 1462, 18395, 15296, -15763, -1131},
144 };
145 static const int16_t vq_hebap5[128][6] = {
146 { -3394, -19730, 2963, 9590, 4660, 19673},
147 { -15665, -6405, 17671, 3860, -8232, -19429},
148 { 4467, 412, -17873, -8037, 691, -17307},
149 { 3580, 2363, 6886, 3763, 6379, -20522},
150 { -17230, -14133, -1396, -23939, 8373, -12537},
151 { -8073, -21469, -15638, 3214, 8105, -5965},
152 { 4343, 5169, 2683, -16822, -5146, -16558},
153 { 6348, -10668, 12995, -25500, -22090, 4091},
154 { -2880, -8366, -5968, -17158, -2638, 23132},
155 { -5095, -14281, -22371, 21741, 3689, 2961},
156 { -2443, -17739, 25155, 2707, 1594, 7},
157 { -18379, 9010, 4270, 731, -426, -640},
158 { -23695, 24732, 5642, 612, -308, -964},
159 { -767, 1268, 225, 1635, 173, 916},
160 { 5455, 6493, 4902, 10560, 23041, -17140},
161 { 17219, -21054, -18716, 4936, -3420, 3357},
162 { -1390, 15488, -21946, -14611, 1339, 542},
163 { -6866, -2254, -12070, -3075, -19981, -20622},
164 { -1803, 11775, 1343, 8917, 693, 24497},
165 { -21610, 9462, 4681, 9254, -7815, 15904},
166 { -5559, -3018, -9169, -1347, -22547, 12868},
167 { -366, 5076, -1727, 20427, -283, -2923},
168 { -1886, -6313, -939, -2081, -1399, 3513},
169 { -3161, -537, -5075, 11268, 19396, 989},
170 { 2345, 4153, 5769, -4273, 233, -399},
171 { -21894, -1138, -16474, 5902, 5488, -3211},
172 { 10007, -12530, 18829, 20932, -1158, 1790},
173 { -1165, 5014, -1199, 6415, -8418, -21038},
174 { 1892, -3534, 3815, -5846, 16427, 20288},
175 { -2664, -11627, -4147, -18311, -22710, 14848},
176 { 17256, 10419, 7764, 12040, 18956, 2525},
177 { -21419, -18685, -10897, 4368, -7051, 4539},
178 { -1574, 2050, 5760, 24756, 15983, 17678},
179 { -538, -22867, 11067, 10301, 385, 528},
180 { -8465, -3025, -16357, -23237, 16491, 3654},
181 { 5840, 575, 11890, 1947, 25157, 6653},
182 { 6625, -3516, -1964, 3850, -390, -116},
183 { 18005, 20900, 14323, -7621, -10922, 11802},
184 { -4857, -2932, -13334, -7815, 21622, 2267},
185 { -579, -9431, -748, -21321, 12367, 8265},
186 { -8317, 1375, -17847, 2921, 9062, 22046},
187 { 18398, 8635, -1503, -2418, -18295, -14734},
188 { -2987, 15129, -3331, 22300, 13878, -13639},
189 { 5874, -19026, 15587, 11350, -20738, 1971},
190 { 1581, -6955, -21440, 2455, 65, 414},
191 { 515, -4468, -665, -4672, 125, -19222},
192 { 21495, -20301, -1872, -1926, -211, -1022},
193 { 5189, -12250, -1775, -23550, -4546, 5813},
194 { 321, -6331, 14646, 6975, -1773, 867},
195 { -13814, 3180, 7927, 444, 19552, 3146},
196 { -6660, 12252, -1972, 17408, -24280, -12956},
197 { -745, 14356, -1107, 23742, -9631, -18344},
198 { 18284, -7909, -7531, 19118, 7721, -12659},
199 { 1926, 15101, -12848, 2153, 21631, 1864},
200 { -2130, 23416, 17056, -15597, -1544, 87},
201 { 8314, -11824, 14581, -20591, 7891, -2099},
202 { 19600, 22814, -17304, -2040, 285, -3863},
203 { -8214, -18322, 10724, -13744, -13469, -1666},
204 { 14351, 4880, -20034, 964, -4221, -180},
205 { -24598, -16635, 19724, 5925, 4777, 4414},
206 { -2495, 23493, -16141, 2918, -1038, -2010},
207 { 18974, -2540, 13343, 1405, -6194, -1136},
208 { 2489, 13670, 22638, -7311, -129, -2792},
209 { -13962, 16775, 23012, 728, 3397, 162},
210 { 3038, 993, 8774, -21969, -6609, 910},
211 { -12444, -22386, -2626, -5295, 19520, 9872},
212 { -1911, -18274, -18506, -14962, 4760, 7119},
213 { 8298, -2978, 25886, 7660, -7897, 1020},
214 { 6132, 15127, 18757, -24370, -6529, -6627},
215 { 7924, 12125, -9459, -23962, 5502, 937},
216 { -17056, -5373, 2522, 327, 1129, -390},
217 { 15774, 19955, -10380, 11172, -3107, 14853},
218 { -11904, -8091, -17928, -22287, -17237, -6803},
219 { -12862, -2172, -6509, 5927, 12458, -22355},
220 { -497, 322, 1038, -6643, -5404, 20311},
221 { 1083, -22984, -8494, 12130, -762, 2623},
222 { 5067, 19712, -1901, -30, -325, 85},
223 { 987, -5830, 4212, -9030, 9121, -25038},
224 { -7868, 7284, -12292, 12914, -21592, 20941},
225 { -1630, -7694, -2187, -8525, -5604, -25196},
226 { -6668, 388, -22535, 1526, 9082, 193},
227 { -7867, -22308, 5163, 362, 944, -259},
228 { 3824, -11850, 7591, -23176, 25342, 23771},
229 { -10504, 4123, -21111, 21173, 22439, -838},
230 { -4723, 21795, 6184, -122, 1642, -717},
231 { 24504, 19887, -2043, 986, 7, -55},
232 { -27313, -135, 2437, 259, 89, 307},
233 { 24446, -3873, -5391, -820, -2387, 361},
234 { 5529, 5784, 18682, 242, -21896, -4003},
235 { 22304, 4483, 722, -12242, 7570, 15448},
236 { 8673, 3009, 20437, 21108, -21100, -3080},
237 { -1132, 2705, -1825, 5420, -785, 18532},
238 { 16932, -13517, -16509, -14858, -20327, -14221},
239 { 2219, 1380, 21474, -1128, 327, 83},
240 { -2177, 21517, -3856, -14180, -204, -2191},
241 { 953, -9426, 15874, -10710, -3231, 21030},
242 { -421, -1377, 640, -8239, -20976, 2174},
243 { 4309, 18514, -9100, -18319, -15518, 3704},
244 { -5943, 449, -8387, 1075, -22210, -4992},
245 { 2953, 12788, 18285, 1430, 14937, 21731},
246 { -2913, 401, -4739, -20105, 1699, -1147},
247 { 3449, 5241, 8853, 22134, -7547, 1451},
248 { -2154, 8584, 18120, -15614, 19319, -5991},
249 { 3501, 2841, 5897, 6397, 8630, 23018},
250 { 2467, 2956, 379, 5703, -22047, -2189},
251 { -16963, -594, 18822, -5295, 1640, 774},
252 { 2896, -1424, 3586, -2292, 19910, -1822},
253 { -18575, 21219, -14001, -12573, 16466, 635},
254 { -1998, -19314, -16527, 12208, -16576, -7854},
255 { -9674, 1012, -21645, 2883, -12712, 2321},
256 { -1005, 471, -3629, 8045, -11087, 25533},
257 { 4141, -21472, -2673, 756, -663, -523},
258 { 6490, 8531, 19289, 18949, 6092, -9347},
259 { 16965, 24599, 14024, 10072, -536, -10438},
260 { -8147, 2145, -23028, -17073, 5451, -4401},
261 { -14873, 20520, -18303, -9717, -11885, -17831},
262 { -2290, -14120, 2070, 22467, 1671, 725},
263 { -8538, 14629, 3521, -20577, 6673, 8200},
264 { 20248, 4410, -1366, -585, 1229, -2449},
265 { 7467, -7148, 13667, -8246, 22392, -17320},
266 { -1932, 3875, -9064, -3812, 958, 265},
267 { -4399, 2959, -15911, 19598, 4954, -1105},
268 { 18009, -9923, -18137, -3862, 11178, 5821},
269 { -14596, -1227, 9660, 21619, 11228, -11721},
270 { -721, -1700, 109, -2142, 61, -6772},
271 { -24619, -22520, 5608, -1957, -1761, -1012},
272 { -23728, -4451, -2688, -14679, -4266, 9919},
273 { 8495, -894, 20438, -13820, -17267, 139},
274 };
275 static const int16_t vq_hebap6[256][6] = {
276 { 10154, 7365, 16861, 18681, -22893, -3636},
277 { -2619, -3788, -5529, -5192, -9009, -20298},
278 { -5583, -22800, 21297, 7012, 745, 720},
279 { 428, -1459, 109, -3082, 361, -8403},
280 { 8161, 22401, 241, 1755, -874, -2824},
281 { 1140, 12643, 2306, 22263, -25146, -17557},
282 { -2609, 3379, 10337, -19730, -15468, -23944},
283 { -4040, -12796, -25772, 13096, 3905, 1315},
284 { 4624, -23799, 13608, 25317, -1175, 2173},
285 { -97, 13747, -5122, 23255, 4214, -22145},
286 { 6878, -322, 18264, -854, -11916, -733},
287 { 17280, -12669, -9693, 23563, -16240, -1309},
288 { 5802, -4968, 19526, -21194, -24622, -183},
289 { 5851, -16137, 15229, -9496, -1538, 377},
290 { 14096, 25057, 13419, 8290, 23320, 16818},
291 { -7261, 118, -15867, 19097, 9781, -277},
292 { -4288, 21589, -13288, -16259, 16633, -4862},
293 { 4909, -19217, 23411, 14705, -722, 125},
294 { 19462, -4732, -1928, -11527, 20770, 5425},
295 { -27562, -2881, -4331, 384, -2103, 1367},
296 { -266, -9175, 5441, 26333, -1924, 4221},
297 { -2970, -20170, -21816, 5450, -7426, 5344},
298 { -221, -6696, 603, -9140, 1308, -27506},
299 { 9621, -8380, -1967, 9403, -1651, 22817},
300 { 7566, -5250, -4165, 1385, -990, 560},
301 { -1262, 24738, -19057, 10741, 7585, -7098},
302 { 451, 20130, -9949, -6015, -2188, -1458},
303 { 22249, 9380, 9096, 10959, -2365, -3724},
304 { 18668, -650, -1234, 11092, 7678, 5969},
305 { 19207, -1485, -1076, -731, -684, 43},
306 { -4973, 13430, 20139, 60, 476, -935},
307 { -20029, 8710, 2499, 1016, -1158, 335},
308 { -26413, 18598, -2201, -669, 3409, 793},
309 { -4726, 8875, -24607, -9646, 3643, -283},
310 { 13303, -21404, -3691, -1184, -1970, 1612},
311 { 173, 60, 919, 1229, 6942, -665},
312 { 16377, 16991, 5341, -14015, -2304, -20390},
313 { 25334, -10609, 11947, -7653, -6363, 14058},
314 { 23929, -13259, -7226, -937, 234, -187},
315 { 6311, -1877, 12506, -1879, 18751, -23341},
316 { 621, 6445, 3354, -24274, 8406, 5315},
317 { -3297, -5034, -4704, -5080, -25730, 5347},
318 { -1275, -13295, -965, -23318, 1214, 26259},
319 { -6252, 10035, -20105, 15301, -16073, 5136},
320 { 9562, -3911, -19510, 4745, 22270, -4171},
321 { 7978, -19600, 14024, -5745, -20855, 8939},
322 { 7, -4039, 991, -6065, 52, -19423},
323 { 3485, 2969, 7732, 7786, 25312, 6206},
324 { -959, -12812, -1840, -22743, 7324, 10830},
325 { -4686, 1678, -10172, -5205, 4294, -1271},
326 { 3889, 1302, 7450, 638, 20374, -3133},
327 { -12496, -9123, 18463, -12343, -7238, 18552},
328 { -6185, 8649, -6903, -895, 17109, 16604},
329 { -9896, 28579, 2845, 1640, 2925, -298},
330 { 14968, -25988, 14878, -24012, 1815, -6474},
331 { 26107, 5166, 21225, 15873, 21617, 14825},
332 { -21684, 16438, 20504, -14346, -7114, -4162},
333 { 28647, 90, -1572, 789, -902, -75},
334 { -1479, 2471, -4061, 3612, -2240, 10914},
335 { 8616, 17491, 17255, -17456, 17022, -16357},
336 { -20722, -18597, 25274, 17720, -3573, 1695},
337 { -997, 6129, -6303, 11250, -11359, -19739},
338 { -74, -4001, -1584, 13384, 162, -144},
339 { -529, 21068, 7923, -11396, 422, -26},
340 { 7102, -13531, -20055, 2629, -178, -429},
341 { 9201, 1368, -22238, 2623, -20499, 24889},
342 { -432, 6675, -266, 8723, 80, 28024},
343 { 19493, -3108, -9261, 1910, -21777, 5345},
344 { 14079, -11489, 12604, 6079, 19877, 1315},
345 { 10947, 9837, -18612, 15742, 4792, 605},
346 { -1777, 3758, -4087, 21696, 6024, -576},
347 { 3567, -3578, 16379, 2680, -1752, 716},
348 { -5049, -1399, -4550, -652, -17721, -3366},
349 { -3635, -4372, -6522, -22152, 7382, 1458},
350 { 12242, 19190, 5646, -7815, -20289, 21344},
351 { -7508, 19952, 23542, -9753, 5669, -1990},
352 { -2275, 15438, 10907, -17879, 6497, 13582},
353 { -15894, -15646, -4716, 6019, 24250, -6179},
354 { -2049, -6856, -1208, 918, 17735, -69},
355 { -3721, 9099, -16065, -23621, 5981, -2344},
356 { 7862, -8918, 24033, 25508, -11033, -741},
357 { -12588, 19468, 14649, 15451, -21226, 1171},
358 { 2102, 1147, 2789, 4096, 2179, 8750},
359 { -18214, -17758, -10366, -5203, -1066, -3541},
360 { -2819, -19958, -11921, 6032, 8315, 10374},
361 { -9078, -2100, 19431, -17, 732, -689},
362 { -14512, -19224, -7095, 18727, 1870, 22906},
363 { 3912, 659, 25597, -4006, 9619, 877},
364 { 2616, 22695, -5770, 17920, 3812, 20220},
365 { 2561, 26847, -5245, -10908, 2256, -517},
366 { -4974, 198, -21983, -3608, 22174, -18924},
367 { 21308, -1211, 19144, 16691, -1588, 11390},
368 { -1790, 3959, -3488, 7003, -7107, 20877},
369 { -6108, -17955, -18722, 24763, 16508, 3211},
370 { 20462, -24987, -20361, 4484, -5111, -478},
371 { -6378, -1998, -10229, -561, -22039, -22339},
372 { 3047, -18850, 7586, 14743, -19862, 6351},
373 { -5047, 1405, -9672, 1055, -21881, 11170},
374 { 3481, -9699, 6526, -16655, 22813, 21907},
375 { -18570, 17501, 14664, 1291, 5026, 19676},
376 { 16134, -19810, -16956, -17939, -16933, 5800},
377 { -8224, 4908, 8935, 2272, -1140, -23217},
378 { 1572, 2753, -1598, 2143, -3346, -21926},
379 { -9832, -1060, -27818, 1214, 7289, 150},
380 { 98, 1538, 535, 17429, -23198, -901},
381 { 21340, -20146, 3297, -1744, -8207, -21462},
382 { -4166, -4633, -17902, 5478, 1285, 136},
383 { 18713, 21003, 24818, 11421, 1282, -4618},
384 { -3535, 7636, -265, 2141, -829, -2035},
385 { -3184, 19713, 2775, -2, 1090, 104},
386 { -6771, -20185, 2938, -2125, -36, 1268},
387 { 9560, 9430, 9586, 22100, 13827, 6296},
388 { -535, -20018, 4276, -1868, -448, -17183},
389 { -24352, 14244, -13647, -21040, 2271, 11555},
390 { -2646, 15437, -4589, 18638, -4299, -622},
391 { -20064, 4169, 18115, -1404, 13722, -1825},
392 { -16359, 9080, 744, 22021, 125, 10794},
393 { 9644, -14607, -18479, -14714, 11174, -20754},
394 { -326, -23762, 6144, 7909, 602, 1540},
395 { -6650, 6634, -12683, 21396, 20785, -6839},
396 { 4252, -21043, 5628, 18687, 23860, 8328},
397 { 17986, 5704, -5245, -18093, -555, 3219},
398 { 6091, 14232, -5117, -17456, -19452, -11649},
399 { -21586, 11302, 15434, 25590, 6777, -26683},
400 { 21355, -8244, 5877, -3540, 6079, -2567},
401 { 2603, -2455, 5421, -12286, -19100, 5574},
402 { -1721, -26393, -23664, 22904, -349, 3787},
403 { 2189, -1203, 5340, 3249, -22617, 104},
404 { -1664, -11020, -2857, -20723, -24049, 19900},
405 { 22873, -7345, -18481, -14616, -8400, -12965},
406 { 3777, 3958, 8239, 20494, -6991, -1201},
407 { -160, -1613, -793, -8681, 573, 776},
408 { 4297, -3786, 20373, 6082, -5321, -18400},
409 { 18745, 2463, 12546, -7749, -7734, -2183},
410 { 11074, -4720, 22119, 1825, -24351, 4080},
411 { 1503, -19178, -1569, 13, -313, 375},
412 { 318, -575, 2544, 178, 102, 40},
413 { -15996, -26897, 5008, 3320, 686, 1159},
414 { 25755, 26886, 574, -5930, -3916, 1407},
415 { -9148, -7665, -2875, -8384, -18663, 26400},
416 { -7445, -18040, -18396, 8802, -2252, -21886},
417 { 7851, 11773, 27485, -12847, -1410, 19590},
418 { 2240, 5947, 11247, 15980, -6499, 24280},
419 { 21673, -18515, 9771, 6550, -2730, 334},
420 { -4149, 1576, -11010, 89, -24429, -5710},
421 { 7720, 1478, 21412, -25025, -8385, 9},
422 { -2448, 10218, -12756, -16079, 1161, -21284},
423 { -8757, -14429, -22918, -14812, 2629, 13844},
424 { -7252, 2843, -9639, 2882, -14625, 24497},
425 { -674, -6530, 414, -23333, -21343, 454},
426 { 2104, -6312, 10887, 18087, -1199, 175},
427 { -493, -562, -2739, 118, -1074, 93},
428 { -10011, -4075, -28071, 22180, 15077, -636},
429 { -4637, -16408, -9003, -20418, -11608, -20932},
430 { 4815, 15892, 24238, -13634, -3074, -1059},
431 { -6724, 4610, -18772, -15283, -16685, 23988},
432 { 15349, -674, -3682, 21679, 4475, -12088},
433 { 4756, 2593, 5354, 6001, 15063, 26490},
434 { -23815, -17251, 6944, 378, 694, 670},
435 { 23392, -8839, -14713, 7544, -876, 11088},
436 { 3640, 3336, 22593, -3495, -2328, -113},
437 { 284, 6914, 3097, 10171, 6638, -18621},
438 { 2472, 5976, 11054, -11936, -603, -663},
439 { 16175, 16441, 13164, -4043, 4667, 7431},
440 { 19338, 15534, -6533, 1681, -4857, 17048},
441 { 17027, 532, -19064, -1441, -5130, 1085},
442 { -12617, -17609, 2062, -25332, 19009, -16121},
443 { 10056, -21000, -13634, -2949, 15367, 19934},
444 { -648, -1605, 10046, -1592, 13296, 19808},
445 { -1054, 10744, 538, 24938, 9630, -9052},
446 { -10099, 3042, -25076, -24052, 13971, 100},
447 { 6547, 6907, 7031, 10348, 23775, -17886},
448 { -22793, -1984, -1393, -3330, 9267, 14317},
449 { -14346, -3967, 3042, 16254, -17303, 9646},
450 { -21393, 23628, 16773, 716, 2663, 114},
451 { -19016, -3038, 1574, -245, 1463, -793},
452 { 22410, 23441, -14637, -530, 17310, 13617},
453 { -11582, 7935, -13954, 23465, -24628, 26550},
454 { -1045, 3679, -2218, 10572, 20999, -3702},
455 { -15513, 197, 16718, -24603, 4945, 5},
456 { 10781, 4335, 26790, -9059, -16152, -2840},
457 { 16075, -24100, -3933, -6833, 12645, -7029},
458 { 2096, -25572, -8370, 6814, 11, 1178},
459 { -11848, -583, -8889, -20543, -10471, -380},
460 { -2487, 24777, -21639, -19341, 1660, -732},
461 { 2313, 13679, 4085, 24549, 24691, -21179},
462 { -2366, -504, -4130, -10570, 23668, 1961},
463 { 20379, 17809, -9506, 3733, -18954, -6292},
464 { -3856, 16802, -929, -20310, -17739, 6797},
465 { 12431, 6078, -11272, -14450, 6913, 23476},
466 { 7636, -1655, 23017, 10719, -8292, 838},
467 { -8559, -1235, -18096, 3897, 16093, 1490},
468 { -3586, 8276, 15165, -3791, -21149, 1741},
469 { -4497, 21739, 2366, -278, -4792, 15549},
470 { -23122, -13708, 7668, 16232, 24120, 15025},
471 { -20043, 12821, -20160, 16691, -11655, -16081},
472 { -12601, 20239, 3496, -2549, -6745, -11850},
473 { 4441, 7812, 20783, 17080, 11523, -9643},
474 { 24766, 8494, -23298, -3262, 11101, -7120},
475 { -10107, -7623, -22152, -18303, 26645, 9550},
476 { -25549, 477, 7874, -1538, 1123, -168},
477 { 470, 9834, -347, 23945, -10381, -9467},
478 { -4096, -9702, -6856, -21544, 20845, 7174},
479 { 5370, 9748, -23765, -1190, 512, -1538},
480 { -1006, -10046, -12649, 19234, -1790, -890},
481 { 15108, 23620, -15646, -2522, -1203, -1325},
482 { -7406, -2605, 1095, -247, -473, 177},
483 { 8089, 4, 12424, -22284, 10405, -7728},
484 { 22196, 10775, -5043, 690, 534, -212},
485 { -3153, -1418, -16835, 18426, 15821, 22956},
486 { 5681, -2229, 3196, -3414, -21817, -14807},
487 { 19, 787, 1032, 170, -8295, -645},
488 { -882, -2319, -27105, 432, -4392, 1499},
489 { -1354, -11819, -76, -20380, -10293, 11328},
490 { 211, -4753, -4675, -6933, -13538, 14479},
491 { 6043, 5260, -459, -462, 143, -65},
492 { -2572, 7256, -3317, 9212, -23184, -9990},
493 { -24882, -9532, 18874, 6101, 2429, -14482},
494 { 8314, 2277, 14192, 3512, 25881, 22000},
495 { 208, 20218, -281, -24778, -63, -1183},
496 { 1095, -6034, 2706, -21935, -2655, 563},
497 { 23, -5930, 243, -8989, 5345, 20558},
498 { -15466, 12699, 4160, 11087, 20621, -10416},
499 { 20995, -85, -8468, 194, 1003, -9515},
500 { -19637, -3335, -14081, 3574, -23381, -667},
501 { -2076, 3489, -3192, -19367, 539, -1530},
502 { 7352, -15213, 22596, 19369, 1043, 16627},
503 { -1872, -413, 1235, -5276, -3550, 21903},
504 { 7931, -2008, 16968, -6799, 29393, -2475},
505 { -13589, 8389, -23636, -22091, -14178, -14297},
506 { -11575, -20090, 16056, -1848, 15721, 4500},
507 { 3849, -16581, 20161, -21155, 7778, 11864},
508 { -6547, -1273, -18837, -11218, 11636, 1044},
509 { 2528, -6691, -17917, -11362, -4894, -1008},
510 { 1241, 4260, 2319, 6111, 3485, 20209},
511 { 3014, -3048, 5316, -4539, 20831, 8702},
512 { -1790, -14683, 278, 13956, -10065, -10547},
513 { -22732, -7957, -1154, 13821, -1484, -1247},
514 { -7317, -615, 13094, 18927, 9897, 1452},
515 { 2552, -2338, 3424, -4630, 11124, -19584},
516 { -11125, -20553, -10855, -10783, -20767, 6833},
517 { 984, -15095, 5775, 25125, 5377, -19799},
518 { 517, 13272, -7458, -1711, 20612, -6013},
519 { -21417, 13251, -20795, 13449, 17281, 13104},
520 { -15811, -16248, 23093, -4037, -8195, 871},
521 { 582, 12571, -21129, -14766, -9187, 5685},
522 { 4318, -1776, 11425, -17763, -9921, 577},
523 { 6013, 16830, 17655, -25766, -4400, -3550},
524 { -13744, -16541, 3636, -3330, -21091, -15886},
525 { 6565, -11147, 8649, -13114, 23345, -13565},
526 { -2542, -9046, -7558, 29240, 3701, -383},
527 { -10612, 24995, 1893, -8210, 20920, -16210},
528 { 5276, 16726, 10659, 19940, -4799, -19324},
529 { -532, -9300, 27856, 4965, -241, 536},
530 { -765, -20706, -3412, 18870, 2765, 1420},
531 { -3059, 2708, -19022, -331, 3537, 116},
532 };
533 static const int16_t vq_hebap7[512][6] = {
534 { -21173, 21893, 10390, 13646, 10718, -9177},
535 { -22519, -8193, 18328, -6629, 25518, -10848},
536 { 6800, -13758, -13278, 22418, 14667, -20938},
537 { 2347, 10516, 1125, -3455, 5569, 27136},
538 { -6617, 11851, -24524, 22937, 20362, -6019},
539 { -21768, 10681, -19615, -15021, -8478, -2081},
540 { -2745, 8684, -4895, 27739, 7554, -11961},
541 { -1020, 2460, -954, 4754, -627, -16368},
542 { -19702, 23097, 75, -13684, -2644, 2108},
543 { 4049, -2872, 5851, -4459, 22150, 12560},
544 { -21304, -17129, -730, 7419, -11658, -10523},
545 { 11332, 1792, 26666, 23518, -19561, -491},
546 { -17827, -16777, -13606, -14389, -22029, -2464},
547 { 1091, -5967, -7975, -16977, -20432, -21931},
548 { 18388, -1103, 1933, 13342, -17463, 18114},
549 { 22646, 17345, -9966, 17919, 18274, 698},
550 { 1484, 20297, -5754, -26515, 4941, -22263},
551 { -2603, 4587, -5842, 18464, 8767, -2568},
552 { -2797, -1602, 21713, 3099, -25683, 3224},
553 { -19027, 4693, -5007, 6060, 1972, -15095},
554 { -2189, 9516, -530, 20669, -4662, -8301},
555 { -22325, -8887, 2529, -11352, 5476, 998},
556 { 22100, -5052, 1651, -2657, 4615, 2319},
557 { 20855, -3078, -3330, 4105, 13470, 3069},
558 { 85, 17289, 10264, -14752, 214, 90},
559 { -26365, -18849, -19352, 19244, -10218, 9909},
560 { -9739, 20497, -6579, -6983, 2891, -738},
561 { 20575, -15860, -22913, 6870, 76, 327},
562 { 8744, -12877, -22945, -2372, -19424, -9771},
563 { -12886, 16183, 21084, 3821, 749, -13792},
564 { -15995, 18399, 2391, -17661, 19484, -6018},
565 { 1423, 11734, 4051, 19290, 6857, -19681},
566 { -5200, 9766, 18246, 2463, 18764, -4852},
567 { -597, 19498, 1323, -9096, -308, -1104},
568 { -3099, -25731, -15665, 25332, 4634, 2635},
569 { 19623, -2384, -7913, 11796, -9333, -14084},
570 { 2642, 26453, -21091, -10354, -1693, -1711},
571 { 22031, 21625, 11580, -22915, -4141, 129},
572 { -6122, 3542, 915, -261, -17, -383},
573 { 1696, 6704, -1425, 20838, 857, -4416},
574 { 1423, -15280, -8550, -9667, 5210, 5687},
575 { -4520, -613, -11683, 5618, 4230, 619},
576 { 937, -4963, -14102, -17104, -6906, -5952},
577 { -15068, -481, -7237, -14894, 18876, 21673},
578 { -25658, 2910, 1143, -327, -458, -995},
579 { -9656, -819, -24900, 2804, 20225, 1083},
580 { -1111, -3682, -1788, -19492, 966, 821},
581 { 7293, -21759, 10790, -7059, -23293, -1723},
582 { -282, -11093, 170, -20950, -28926, 12615},
583 { 17938, 3713, -1563, 885, 5, 564},
584 { 6116, 22696, 2242, -6951, 9975, -6132},
585 { 4338, 26808, -3705, 1976, -1079, -2570},
586 { -661, -7901, -2668, -15194, 17722, 4375},
587 { -4174, -11053, 717, -22506, 1562, 12252},
588 { -6405, 18334, 6103, 6983, 5956, 18195},
589 { 9851, 5370, 23604, -6861, -6569, -62},
590 { 21964, 13359, -683, 3785, 2168, 209},
591 { -3569, -1127, -19724, -1544, 1308, -803},
592 { -3083, 16049, -13791, -3077, 4294, 23713},
593 { -9999, 9943, -15872, 12934, -23631, 21699},
594 { 9722, 22837, 12192, 15091, 5533, 4837},
595 { 2243, 2099, 1243, 4089, 4748, 12956},
596 { 4007, -2468, 3353, -3092, 8843, 17024},
597 { 4330, 6127, 5549, 9249, 11226, 28592},
598 { -9586, -8825, 236, 1009, 455, -964},
599 { 6829, 19290, -1018, 200, 1821, 578},
600 { 5196, 957, 10372, 3330, -12800, -127},
601 { -3022, -8193, -14557, 22061, 5920, 1053},
602 { 10982, 25942, -24546, -23278, -11905, -6789},
603 { 22667, -11010, 5736, 2567, 23705, -10253},
604 { -3343, -4233, -5458, 20667, -10843, -3605},
605 { -4131, -3612, 4575, -829, -350, -847},
606 { -3303, 3451, -7398, -11604, 3023, 455},
607 { 3200, -9547, 3202, -22893, 11184, -26466},
608 { -14093, -4117, 15382, 14295, -10915, -20377},
609 { 3807, -11016, 22052, 14370, -15328, -7733},
610 { -6291, -17719, -1560, 12048, -19805, -443},
611 { -6147, -4234, -160, 8363, 22638, 11911},
612 { 19197, 1175, 7422, -9875, -4136, 4704},
613 { -72, -7652, -112, -11955, -3230, 27175},
614 { 3274, 5963, 7501, -17019, 866, -25452},
615 { 737, 1861, 1833, 2022, 2384, 4755},
616 { -5217, 7512, 3323, 2715, 3065, -1606},
617 { 4247, 565, 5629, 2497, 18019, -4920},
618 { -2833, -17920, -8062, 15738, -1018, 2136},
619 { 3050, -19483, 16930, 29835, -10222, 15153},
620 { -11346, 118, -25796, -13761, 15320, -468},
621 { -4824, 4960, -4263, 1575, -10593, 19561},
622 { -8203, -1409, -763, -1139, -607, 1408},
623 { -2203, -11415, 2021, -6388, -2600, 711},
624 { -413, -2511, -216, -3519, -28267, 1719},
625 { -14446, 17050, 13917, 13499, -25762, -16121},
626 { 19228, 7341, -12301, 682, -3791, -199},
627 { -4193, 20746, -15651, 11349, 5860, -824},
628 { -21490, -3546, -3, -1705, -3959, 9213},
629 { 15445, -1876, 2012, -19627, 16228, -4845},
630 { -2867, -3733, -7354, -175, -20119, 11174},
631 { -3571, -24587, 19700, 6654, 979, -654},
632 { 21820, -7430, -6639, -10767, -8362, 15543},
633 { 14827, 17977, -7204, -3409, 1906, -17288},
634 { 3525, -3947, -1415, -2798, 17648, 2082},
635 { -6580, -15255, -17913, 1337, 15338, 21158},
636 { 6210, 9698, 15155, -24666, -22507, -3999},
637 { -1740, -593, 1095, -7779, 25058, 5601},
638 { 21415, -432, -1658, -6898, -1438, -14454},
639 { -6943, 700, -12139, -745, -24187, 22466},
640 { 6287, 3283, 11006, 3844, 19184, 14781},
641 { -22502, 15274, 5443, -2808, -970, -3343},
642 { 3257, -3708, 4744, -8301, 22814, -10208},
643 { 24346, -20970, 19846, 987, -11958, -6277},
644 { 3906, -19701, 13060, -1609, 18641, 7466},
645 { -26409, -22549, 16305, 2014, 10975, 18032},
646 { -7039, 4655, -14818, 18739, 15789, 1296},
647 { 9310, -1681, 14667, -3326, 26535, -11853},
648 { 5728, 5917, 13400, 10020, -2236, -24704},
649 { 1741, -6727, 12695, -22009, 4080, 5450},
650 { -2621, 9393, 21143, -25938, -3162, -2529},
651 { 20672, 18894, -13939, 6990, -8260, 15811},
652 { -23818, 11183, -13639, 11868, 16045, 2630},
653 { 18361, -10220, 829, 856, -1010, 157},
654 { 14400, -4678, 5153, -13290, -27434, -11028},
655 { 21613, 11256, 17453, 7604, 13130, -484},
656 { 7, 1236, 573, 4214, 5576, -3081},
657 { 916, -9092, 1285, -8958, 1185, -28699},
658 { 21587, 23695, 19116, -2885, -14282, -8438},
659 { 23414, -6161, 12978, 3061, -9351, 2236},
660 { -3070, -7344, -20140, 5788, 582, -551},
661 { -3993, 315, -7773, 8224, -28082, -12465},
662 { 13766, -15357, 19205, -20624, 13043, -19247},
663 { 3777, -177, 8029, -1001, 17812, 5162},
664 { -7308, -4327, -18096, -620, -1350, 14932},
665 { 14756, -1221, -12819, -14922, -547, 27125},
666 { 2234, 1708, 2764, 5416, 7986, -25163},
667 { 2873, 3636, 3992, 5344, 10142, 21259},
668 { 1158, 5379, 508, -10514, 290, -1615},
669 { 1114, 24789, 16575, -25168, -298, -2832},
670 { -1107, -6144, -1918, -7791, -2971, -23276},
671 { 4016, 10793, 17317, -4342, -20982, -3383},
672 { -4494, -207, -9951, -3575, 7947, 1154},
673 { -7576, 8117, -14047, 16982, -26457, -27540},
674 { -15164, 16096, -16844, -8886, -23720, 15906},
675 { 24922, 5680, -1874, 420, 132, 117},
676 { -506, -19310, -198, 412, -311, 752},
677 { -1906, 3981, -7688, 16566, -19291, -14722},
678 { -399, -729, -3807, -4196, -12395, 7639},
679 { 3368, 2330, 9092, 23686, -10290, -1705},
680 { -3148, 2596, -7986, 14602, -4807, 16627},
681 { 8057, 1481, 49, 17205, 24869, 7474},
682 { -19304, -513, 11905, 2346, 5588, 3365},
683 { -5063, -21812, 11370, 10896, 4881, 261},
684 { 4794, 20577, 5109, -6025, -8049, -1521},
685 { 8125, -14756, 20639, -14918, 23941, -3650},
686 { 12451, 1381, 3613, 8687, -24002, 4848},
687 { 6726, 10643, 10086, 25217, -25159, -1065},
688 { 6561, 13977, 2911, 21737, 16465, -26050},
689 { -1776, 2575, -19606, -16800, 3032, 6679},
690 { 15012, -17910, -8438, -21554, -27111, 11808},
691 { 3448, -924, -15913, -1135, 5126, -20613},
692 { 7720, 2226, 17463, 5434, 28942, 17552},
693 { 1246, 15614, -11743, 24618, -17539, 3272},
694 { 3215, 17950, 2783, -722, -22672, 5979},
695 { -5678, -3184, -26087, 26034, 6583, 3302},
696 { 20310, -3555, -2715, -444, -1487, 1526},
697 { -20640, -21970, -12207, -25793, 8863, -1036},
698 { 17888, 570, -16102, 8329, -2553, 15275},
699 { -2677, 9950, -1879, 16477, -12762, -29007},
700 { -120, -2221, 219, 97, 365, 35},
701 { 1270, -718, 1480, -2689, 1930, -7527},
702 { 1896, 8750, 1906, 18235, -12692, -6174},
703 { -3733, 13713, -9882, -15960, -1376, -7146},
704 { -10600, 8496, 15967, -8792, 7532, 20439},
705 { 3041, -13457, 1032, -26952, 5787, 24984},
706 { -4590, -8220, -9322, -6112, -17243, 25745},
707 { -17808, 6970, 3752, 626, -114, 2178},
708 { 4449, -4862, 7054, -5404, 4738, -2827},
709 { 4922, -651, 18939, -9866, 848, 1886},
710 { -336, -5410, 7234, 20444, -9583, -600},
711 { 781, -19474, -12648, 6634, 1414, 450},
712 { -3399, -16770, 11107, 13200, -5498, 21663},
713 { -3265, 4859, -5961, 7530, -10837, 28086},
714 { 10350, -12901, 25699, 25640, -639, 351},
715 { 1163, 18763, -5466, -15087, -145, -1377},
716 { -14477, 27229, -31383, -32653, 21439, -2894},
717 { 15420, 18823, 22128, 19398, 22583, 13587},
718 { -10674, 10710, 5089, -4756, 909, -20760},
719 { -12948, -20660, 7410, 2722, 3427, 11585},
720 { -1105, 18374, 19731, -9650, 22442, 19634},
721 { -296, -6798, -14677, 21603, 19796, 21399},
722 { -19350, -7501, 25446, 13144, 8588, -25298},
723 { 3092, -10618, 20896, 9249, -3326, 1796},
724 { -811, 1449, 3106, 4748, 12073, -14262},
725 { -20720, 14275, -4332, -25838, -5781, -21149},
726 { -5132, 10554, -14020, -22150, 2840, -554},
727 { 25533, 17648, 14886, -21074, 2459, 25142},
728 { -9370, -1788, -12862, -5870, -25811, -11023},
729 { 6698, 819, 10313, 166, 27581, 523},
730 { 101, -19388, 3413, 9638, 64, 806},
731 { -2742, -17931, -2576, 22818, 8553, 1126},
732 { 2972, 15203, 1792, 25434, -5728, -17265},
733 { -1419, 1604, 4398, 11452, 1731, 23787},
734 { -5136, 4625, -10653, 27981, 9897, -2510},
735 { -10528, -28033, 2999, -1530, -832, -830},
736 { -11133, -12511, 22206, -7243, -23578, -21698},
737 { 16935, -21892, 1861, -9606, 9432, 19026},
738 { 10277, 9516, 26815, 2010, -4943, -9080},
739 { 5547, -2210, 14270, -15300, -19316, 1822},
740 { -4850, -783, -8959, -3076, -20056, -3197},
741 { 8232, -2794, -17752, 13308, 3229, -991},
742 { -12237, -6581, 10315, -9552, 2260, -20648},
743 { -7000, 5529, -7553, -7490, -10342, -10266},
744 { 3641, 19479, -5972, -19097, -18570, 12805},
745 { 1283, -4164, 4198, -28473, -2498, 1866},
746 { 16047, 26826, -13053, -6316, 985, -1597},
747 { -403, 13680, 6457, 25070, 27124, -20710},
748 { -18070, -1790, -24986, 5953, -954, 26600},
749 { -24224, -15383, 24788, 1953, -1136, 187},
750 { -2289, 12505, -20738, -904, 18324, 21258},
751 { 2658, -6140, 16179, 22276, -556, 2154},
752 { -6087, 13950, -25682, -27713, 4049, -4795},
753 { -21452, 26473, 19435, -9124, 895, 303},
754 { -22200, -26177, -6026, 24729, -22926, -9030},
755 { -14276, -15982, 23732, -22851, 9268, -3841},
756 { 29482, 21923, -6213, 1679, -2059, -1120},
757 { -435, 9802, -3891, 12359, -4288, -18971},
758 { 19768, -86, 2467, 1990, -1021, -5354},
759 { 20986, -8783, -5329, -23562, -4730, 2673},
760 { -5095, 5605, -4629, 19150, 26037, -12259},
761 { 972, 6858, 4551, 27949, -4025, -2272},
762 { 6075, -3260, -4989, -373, -1571, -3730},
763 { -7256, -12992, -8820, -5109, 23054, 5054},
764 { 920, 2615, 7912, -7353, -4905, 20186},
765 { -250, 5454, 3140, 6928, -18723, -2051},
766 { -10299, -4372, 19608, 4879, -661, -1885},
767 { 14816, -8603, -19815, 6135, -21210, 14108},
768 { -11945, -2223, 5018, 11892, 22741, 406},
769 { -13184, -2613, -13256, -22433, -12482, -8380},
770 { 17066, 25267, -2273, 5056, -342, 145},
771 { 8401, -17683, 19112, 10615, -19453, 17083},
772 { 20821, -5700, 12298, -25598, 10391, 7692},
773 { 4550, 15779, 17338, -19379, -4768, 1206},
774 { -7723, 10836, -27164, -11439, 6835, -1776},
775 { 2542, 3199, 4442, 17513, -3711, -914},
776 { 20960, -16774, -5814, 11087, -70, 22961},
777 { 3305, 2919, 6256, -4800, -20966, -3230},
778 { 5924, -16547, 2183, 2733, 3446, -23306},
779 { -6061, -194, -13852, -10971, 19488, 1029},
780 { 4467, -5964, -19004, 1519, -359, 855},
781 { -1581, -7607, 22070, -11580, -10032, 17102},
782 { -12412, 2553, 4324, 22500, 5751, 12170},
783 { -25127, 17996, -6384, 1180, 1182, 9622},
784 { 23462, -8471, -4392, -2669, 7638, -16835},
785 { -5511, -2887, -10757, -20883, 7246, 1053},
786 { 2703, -20602, -7554, 7516, -7740, 5868},
787 { 20670, 21901, 457, 14969, -17657, -11921},
788 { 3603, -1595, -2177, -157, -43, 605},
789 { 2513, 8954, 10527, 22559, -16100, -16041},
790 { 6002, 4951, 6795, -4862, -22400, 18849},
791 { 7590, -1693, -24688, -3404, 14169, 1214},
792 { -4398, -6663, -6870, -10083, -24596, 9253},
793 { 10468, 17751, -7748, 147, -6314, 4419},
794 { 16187, -16557, -4119, 4302, 7625, 5409},
795 { 3303, 2735, 7458, -19902, -2254, -3702},
796 { -2077, 21609, 14870, 12545, -6081, -1764},
797 { 4678, 11740, 2859, 6953, 1919, -3871},
798 { 3522, -21853, -2469, -10453, 18893, -10742},
799 { 3759, -10191, -4866, -2659, -17831, -1242},
800 { 14991, 9351, 11870, -1573, -4848, 22549},
801 { 9509, -27152, 10734, 20851, -26185, -17878},
802 { -7170, -1392, -19495, 12746, 8198, -1988},
803 { 1883, 28158, -846, -7235, 249, 233},
804 { -7200, 669, -371, -2948, 23234, -5635},
805 { 3141, 288, 3223, -1258, -98, -27607},
806 { 17373, -23235, 5110, -11199, -2574, -11487},
807 { -4928, 1518, -5456, 670, -18278, 1951},
808 { 10334, -19865, -4649, 361, -160, -923},
809 { 18732, 14264, -3155, -7485, -3328, 5959},
810 { -3614, 21077, 7276, 3536, 8121, -1528},
811 { -8422, 500, -19182, 18929, 26392, -1039},
812 { 15639, 25668, 8375, 1903, 1945, -11979},
813 { -2716, 3389, 26850, -4587, 1803, 22},
814 { 1177, -655, 1233, -2128, 7844, 1767},
815 { -761, 8209, -19290, -4593, 1923, -343},
816 { -689, -3530, -3267, -3804, -2753, 18566},
817 { -2110, 1962, -1353, 16643, 2765, -23102},
818 { -433, 4905, 302, 13016, 15933, -5905},
819 { 3203, 4126, 11181, -5496, -2529, -1160},
820 { -1091, -6469, -1415, 5682, -268, 583},
821 { -9405, -19572, 6216, 1658, 993, -75},
822 { -1695, -4504, -2289, -4088, -6556, -16577},
823 { 4760, -892, -10902, 6516, 24199, -6011},
824 { -253, 1000, 63, -81, -115, -382},
825 { -1333, 24224, -698, -4667, -2801, -19144},
826 { -876, -28866, -21873, 12677, -6344, 3235},
827 { 16847, 21145, -26172, -3183, -396, 230},
828 { 18296, -7790, -12857, -679, -1473, 5},
829 { -10488, 11429, 25805, -1122, 1401, -438},
830 { 3782, -7429, 26720, 17567, 19257, 12542},
831 { 6332, -746, 12789, 9316, -22542, -5354},
832 { 3418, -22728, 26978, 18303, 1076, 956},
833 { -27315, -2988, 920, 235, 2233, 81},
834 { 6199, 5296, 16093, 14768, -8429, -1112},
835 { -6432, 19244, 9921, -3253, 1278, -954},
836 { 24213, 2049, -22931, 2585, -2410, -4216},
837 { 9286, 14282, -19735, -3985, -2344, 1028},
838 { -20128, 17993, -9458, 23012, -16983, 8625},
839 { -6896, -20730, 3762, 17415, 22341, 19024},
840 { 842, 24181, 25062, -5839, -78, 937},
841 { -621, 19722, -24204, -1962, -14854, -56},
842 { 22766, -5119, 17365, 23868, -19480, -6558},
843 { -2158, 17490, -21435, 3340, -12819, -20295},
844 { -9621, 17325, 715, 2265, -4123, -492},
845 { 9156, 12947, 27303, -21175, -6072, -9457},
846 { -13164, -23269, -14006, -4184, 6978, 2},
847 { 938, -13381, 3520, -24297, 22902, 19589},
848 { -4911, -19774, 19764, -9310, -12650, 3819},
849 { -5462, -4249, -6987, -6260, -13943, -25150},
850 { 9341, 10369, -13862, -6704, 22556, -519},
851 { 6651, 18768, -4855, 12570, 14730, -10209},
852 { -823, 18119, 398, -1582, -116, -363},
853 { -6935, -12694, -28392, 8552, 6961, -239},
854 { -2602, -4704, -1021, 2015, 5129, 23670},
855 { -12559, -8190, -25028, 18544, 14179, 1663},
856 { 3813, 21036, -9620, -5051, -1800, -1087},
857 { -22057, 16675, 14960, 9459, 2786, 16991},
858 { -26040, -19318, -6414, 1104, 5798, -18039},
859 { -1737, 24825, 10417, -11087, 896, -5273},
860 { -1855, 11661, -2803, 24809, -21435, -19792},
861 { -23473, -16729, -5782, 5643, 2636, 4940},
862 { -1724, 4388, -26673, -13695, 10570, -25895},
863 { 15358, -19496, 26242, -18493, 1736, 8054},
864 { 5684, 20890, 4091, -19100, -14588, -10468},
865 { 17260, -16291, 14859, -17711, -19174, 12435},
866 { -27185, -12573, 6743, -562, 976, -257},
867 { 12395, -8618, -22248, -19843, 11013, 7762},
868 { 3799, 11853, -27622, -8473, 1089, -1495},
869 { 4141, -2182, -26720, -735, -774, 1469},
870 { 3125, 13762, 4606, 29257, 18771, -9958},
871 { -17465, -9445, -17562, -2530, -6435, -3726},
872 { -1742, 4351, -6841, -19773, 9627, -10654},
873 { 7251, 3525, 10835, 5601, 25198, -23348},
874 { -10300, -17830, 631, 11640, 2044, -20878},
875 { -873, -8502, -1063, -15674, -10693, 14934},
876 { -15957, 28137, 5268, 477, -1053, 1158},
877 { -1495, -8814, -5764, -24965, 25988, 7907},
878 { -1038, -114, -2308, -1319, -6480, 1472},
879 { 4895, -17897, -25850, 5301, -188, 1581},
880 { 3200, 17225, 4346, 22101, -18543, 22028},
881 { -10250, 545, -10932, 2276, -28070, 8118},
882 { 15343, 2329, 9316, 20537, 14908, 21021},
883 { 6329, 6130, -24508, 837, -8637, -5844},
884 { 7386, -501, 10503, 20131, 11435, -4755},
885 { -2745, 24174, -9274, 15273, -8389, -5835},
886 { 2992, -2864, 6048, -7473, 11687, -19996},
887 { -883, -11954, -9976, -21829, -4436, -27178},
888 { 3458, 19626, 1280, 2597, 19849, 5255},
889 { -5315, 19133, -14518, -8946, 13749, -1352},
890 { 18642, 17655, 11001, 6817, -18418, 6336},
891 { -1697, 2244, -4640, 3948, -12890, -5273},
892 { 20428, 10542, 4170, -1012, 19439, 21691},
893 { -2943, -19735, -4208, 1320, 909, -8897},
894 { 9351, -8066, -2618, -12933, 26582, 3507},
895 { 9705, -22628, 8311, 8167, -13293, 5608},
896 { 3222, 3749, -1508, 165, -52, -196},
897 { 102, -22744, -8832, 903, -11421, -14662},
898 { -120, 5998, 19765, 13401, 3628, 5197},
899 { 8528, 5827, -1066, 774, -39, -166},
900 { 9411, -9476, 9581, -13004, 24456, 24900},
901 { 17878, 2235, -21639, 20478, 4716, -7190},
902 { -2482, 9511, 1611, -21943, 14230, -1289},
903 { 9288, -2291, 23215, -3452, -10842, 11},
904 { 9496, 3041, 5130, -3890, -21219, -22589},
905 { 14262, -9838, 20195, 14019, 91, -17200},
906 { -18591, 980, 17, 821, 120, -574},
907 { 12285, -19269, 13742, 16373, -161, 6025},
908 { -3364, 1530, -4005, 2454, -10872, -23839},
909 { 105, 5085, -260, 5790, -588, 19170},
910 { 4121, 4169, 13439, 14644, 20899, 7434},
911 { -175, 13101, -3704, 23233, 3907, 10106},
912 { -6101, 23467, 5204, -1341, 1599, 13174},
913 { -3217, -3494, 15117, -8387, -11762, -4750},
914 { 1146, 4675, -19378, 14917, -5091, 249},
915 { -21506, 10136, -16473, -13305, 18382, -8601},
916 { 628, 2447, 3344, 3130, -5115, 119},
917 { 17900, -22422, -17633, 21967, -16293, -7676},
918 { 16863, 24214, 5612, -3858, -809, 3822},
919 { -2291, 10091, -2360, -25109, -1226, 312},
920 { 2957, 11256, 26745, -13266, -3455, -1128},
921 { -19762, -2708, 4604, 6355, 1638, 25501},
922 { -19593, -7753, 3159, -85, -489, -1855},
923 { 814, 12510, 19077, -4681, -2610, -1474},
924 { -23408, -19027, 8137, 19878, 7912, -282},
925 { 839, -19652, 11927, 27278, -3211, 2266},
926 { 4020, -1110, 8226, -1274, 20922, 25060},
927 { 26576, 325, -8693, -232, -2218, -699},
928 { -11293, -4200, 1805, -6673, -22940, -1339},
929 { -2005, -15886, -1047, -27687, -13235, 14370},
930 { -22073, 1949, 13175, -15656, -1846, 8055},
931 { 3039, 12025, 7132, -24632, 413, -2347},
932 { -24048, -206, 12459, -6654, -417, -10091},
933 { 18179, -23688, -20515, -16396, 7230, 763},
934 { 5659, -5085, 13878, -23729, -11077, -19587},
935 { 11340, 501, 25040, 7616, -19658, 1605},
936 { -26650, 8878, 10544, 417, 1299, 261},
937 { 14460, 11369, -3263, 9990, 8194, 18111},
938 { 1355, -20838, -9196, -16060, -8559, -730},
939 { -1918, -20937, -18293, -2461, -2651, 4316},
940 { -2810, 24521, -10996, -25721, 308, -1234},
941 { -9075, -17280, -1833, -29342, -24213, -16631},
942 { -2843, 10165, -5339, -2888, 21858, -21340},
943 { -15832, 14849, -23780, 5184, 10113, -20639},
944 { -19535, -11361, 8413, 1486, -23658, -5759},
945 { -7512, 1027, -20794, 13732, 19892, -21934},
946 { -12132, -7022, -19175, -8840, 22125, -16490},
947 { 1937, 5210, -6318, -23788, 13141, 11082},
948 { -205, 6036, -380, 8658, -233, 28020},
949 { -5523, 7477, 7635, 23595, 9763, -2590},
950 { 21658, -28313, -3086, -300, -1032, 1744},
951 { -22352, 16646, 208, 6665, -17400, -3028},
952 { 18482, 9336, -2737, -19372, 407, -4389},
953 { -4913, -17370, 18819, -17654, 13416, 15232},
954 { 7749, 6368, 23135, -18174, 7584, -4248},
955 { -1489, -6523, 586, -10157, 14964, 25568},
956 { 3844, -6156, 4897, -13045, -22526, 5647},
957 { -8491, -2105, -24774, 905, -9326, 1456},
958 { -3040, -1476, 1166, -4428, 11236, 9204},
959 { 3397, -1451, 13598, -15841, 24540, 5819},
960 { 8483, -2993, 21547, -16916, 7741, 24018},
961 { -14932, -23758, -5332, -6664, -4497, 13267},
962 { 19379, 12916, -2142, -737, 21100, -22101},
963 { 3393, -4629, 5735, -18913, -6969, 2687},
964 { 1148, -16147, -21433, -28095, -630, -14449},
965 { 7300, 672, 18530, -17452, -10149, 351},
966 { 11356, -10974, 17212, 4624, 145, 17791},
967 { -711, -3479, -2238, 15887, 2027, 0},
968 { -28048, 1794, -593, -2758, -21852, 11535},
969 { -19683, 4937, 22004, 21523, -3148, 1790},
970 { 813, 8231, 2633, 11981, -3043, 22201},
971 { 8952, -24760, -690, 14873, -2366, -5372},
972 { 8406, -5439, -274, -642, -145, 778},
973 { -6605, 7258, 20780, -23507, -18625, 22782},
974 { -22896, -25488, 10020, -1614, 1508, -1393},
975 { 7607, 407, -24678, -16385, -1804, -4699},
976 { -10592, -19139, 10462, -3747, 8721, -6919},
977 { 13010, 5292, -6230, -4884, -20904, -1797},
978 { 16891, -13770, -465, 19343, -10741, -12959},
979 { 25193, -14799, -5681, -521, -321, -1211},
980 { 6917, -3093, 20183, -26903, -12026, 1295},
981 { 305, 1992, 19457, -985, 25, -521},
982 { 6707, -3698, 8365, -8687, 21921, -27166},
983 { 4668, 5997, 7117, 11696, 24401, -10794},
984 { 744, -9416, 19893, 1963, 7922, -9824},
985 { 3430, 21282, -1736, 10844, 8821, 27015},
986 { -8813, 1521, -24038, 1651, 7838, -1208},
987 { 3911, -11221, 3273, -12541, 7168, 18402},
988 { 21642, 9117, -11536, -5256, 7077, 2382},
989 { 100, 3817, -6713, 1244, 1518, -321},
990 { 7946, -18670, 10667, -4866, 727, 776},
991 { -15883, -8150, -2087, 22739, 1567, -3482},
992 { 4380, -2735, 8469, -7025, -11424, 1317},
993 { 26970, 4393, 7665, 17561, -714, 650},
994 { -16191, -835, 8365, 1795, -14314, 16297},
995 { 4504, -10048, 7662, -26690, -17428, 2580},
996 { 48, -3984, 564, -5871, 2658, -18658},
997 { 12579, -26016, -15642, 2672, -1347, -887},
998 { -4950, 4208, -6811, 2569, -20621, -8658},
999 { -1836, -14818, -5571, -23322, -14800, 25867},
1000 { 5434, -28139, -2357, -2883, -570, 2431},
1001 { 13096, -2771, 24994, -12496, -24723, -1025},
1002 { -5676, -4339, 1908, 18628, -21323, 17366},
1003 { 27660, -27897, -15409, 1436, -7112, -2241},
1004 { 8019, 3847, 24568, -469, 9674, 10683},
1005 { -903, -10149, 1801, -21260, 4795, -8751},
1006 { 1122, -9582, 2625, 22791, 956, 882},
1007 { 7876, 19075, -9900, -24266, 7496, 9277},
1008 { 980, -26764, -5386, 5396, 1086, 1648},
1009 { 28838, -1270, -447, 5, -429, -20},
1010 { -15283, 6132, 22812, 1252, -9963, 511},
1011 { 851, 7925, -457, -12210, 4261, 7579},
1012 { -4530, 8452, -1246, 14501, -24951, -5760},
1013 { -17814, -10727, 9887, -23929, -13432, 1878},
1014 { -15049, 10165, 16491, -14603, -11712, -21156},
1015 { -3317, 840, -5683, 22413, 1994, 586},
1016 { 23158, -5788, -15043, -10372, -9271, -13523},
1017 { -773, -9509, -3993, -24264, 8463, 5804},
1018 { -8545, -703, -12440, -3985, -25122, -28147},
1019 { -16659, 16001, 2746, 1611, 5097, -1043},
1020 { 41, -7181, 19903, 31555, -32237, 13927},
1021 { -5658, 845, -12774, 5705, 16695, -86},
1022 { 5282, 14875, 27026, 21124, 15776, -10477},
1023 { 14712, 19648, -11487, -13361, -20196, -15229},
1024 { 8597, -9138, -626, 10891, -6015, 6346},
1025 { -1488, -1272, -1479, -1303, -3704, -5485},
1026 { -3370, 17871, -6604, 24930, 25886, -3127},
1027 { 8416, 27783, -1385, 5350, -4260, 19993},
1028 { 5688, 362, 17246, 3809, -3246, 1088},
1029 { -105, -29607, 2747, 15223, -167, 3722},
1030 { 3502, -3195, 8602, 7772, -1566, -915},
1031 { -491, 3257, -2423, 5522, 20606, -100},
1032 { -13948, -11368, -15375, -21866, -8520, 12221},
1033 { -616, 2424, -2023, 4398, -3805, 8108},
1034 { -7204, 21043, 21211, -9395, -19391, 896},
1035 { -5737, -15160, -21298, 17066, -1006, -366},
1036 { 6261, 3240, -11937, -16213, -15820, 6581},
1037 { -3155, 24796, 2733, -1257, -875, -1597},
1038 { -20469, 11094, 24071, -8987, 14136, 2220},
1039 { -14106, 11959, -22495, 4135, -1055, -5420},
1040 { 801, -2655, 60, -5324, -790, 5937},
1041 { -7372, -1764, -22433, -26060, 21707, 4178},
1042 { -5715, -6648, -14908, 1325, -24044, 1493},
1043 { -6024, -12488, 23930, 2950, 1601, 1173},
1044 { 19067, 17630, 17929, -10654, 10928, -4958},
1045 { 3231, -3284, 27336, 4174, -1683, 497},
1046 };
1047 
1048 const int16_t (* const ff_eac3_mantissa_vq[8])[6] = {
1049  NULL,
1050  vq_hebap1,
1051  vq_hebap2,
1052  vq_hebap3,
1053  vq_hebap4,
1054  vq_hebap5,
1055  vq_hebap6,
1056  vq_hebap7,
1057 };
1058 
1059 /**
1060  * Table E2.14 Frame Exponent Strategy Combinations
1061  */
1062 const uint8_t ff_eac3_frm_expstr[32][6] = {
1063 { EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE},
1065 { EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE},
1066 { EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D45},
1067 { EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_REUSE},
1069 { EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE},
1070 { EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D45, EXP_D45},
1071 { EXP_D25, EXP_REUSE, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE},
1073 { EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE},
1074 { EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_D45, EXP_D45},
1075 { EXP_D25, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE},
1076 { EXP_D25, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE, EXP_D45},
1077 { EXP_D25, EXP_REUSE, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE},
1078 { EXP_D25, EXP_REUSE, EXP_D45, EXP_D45, EXP_D45, EXP_D45},
1079 { EXP_D45, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE, EXP_REUSE},
1081 { EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D25, EXP_REUSE},
1082 { EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45, EXP_D45},
1083 { EXP_D45, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE, EXP_REUSE},
1085 { EXP_D45, EXP_D25, EXP_REUSE, EXP_D45, EXP_D25, EXP_REUSE},
1086 { EXP_D45, EXP_D25, EXP_REUSE, EXP_D45, EXP_D45, EXP_D45},
1087 { EXP_D45, EXP_D45, EXP_D15, EXP_REUSE, EXP_REUSE, EXP_REUSE},
1088 { EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE, EXP_D45},
1089 { EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_D25, EXP_REUSE},
1090 { EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_D45, EXP_D45},
1091 { EXP_D45, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_REUSE},
1092 { EXP_D45, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE, EXP_D45},
1094 { EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D45},
1095 };
1096 
1097 /**
1098  * Table E.25: Spectral Extension Attenuation Table
1099  * ff_eac3_spx_atten_tab[code][bin]=pow(2.0,(bin+1)*(code+1)/-15.0);
1100  */
1101 const float ff_eac3_spx_atten_tab[32][3] = {
1102  { 0.954841603910416503f, 0.911722488558216804f, 0.870550563296124125f },
1103  { 0.911722488558216804f, 0.831237896142787758f, 0.757858283255198995f },
1104  { 0.870550563296124125f, 0.757858283255198995f, 0.659753955386447100f },
1105  { 0.831237896142787758f, 0.690956439983888004f, 0.574349177498517438f },
1106  { 0.793700525984099792f, 0.629960524947436595f, 0.500000000000000000f },
1107  { 0.757858283255198995f, 0.574349177498517438f, 0.435275281648062062f },
1108  { 0.723634618720189082f, 0.523647061410313364f, 0.378929141627599553f },
1109  { 0.690956439983888004f, 0.477420801955208307f, 0.329876977693223550f },
1110  { 0.659753955386447100f, 0.435275281648062062f, 0.287174588749258719f },
1111  { 0.629960524947436595f, 0.396850262992049896f, 0.250000000000000000f },
1112  { 0.601512518041058319f, 0.361817309360094541f, 0.217637640824031003f },
1113  { 0.574349177498517438f, 0.329876977693223550f, 0.189464570813799776f },
1114  { 0.548412489847312945f, 0.300756259020529160f, 0.164938488846611775f },
1115  { 0.523647061410313364f, 0.274206244923656473f, 0.143587294374629387f },
1116  { 0.500000000000000000f, 0.250000000000000000f, 0.125000000000000000f },
1117  { 0.477420801955208307f, 0.227930622139554201f, 0.108818820412015502f },
1118  { 0.455861244279108402f, 0.207809474035696939f, 0.094732285406899888f },
1119  { 0.435275281648062062f, 0.189464570813799776f, 0.082469244423305887f },
1120  { 0.415618948071393879f, 0.172739109995972029f, 0.071793647187314694f },
1121  { 0.396850262992049896f, 0.157490131236859149f, 0.062500000000000000f },
1122  { 0.378929141627599553f, 0.143587294374629387f, 0.054409410206007751f },
1123  { 0.361817309360094541f, 0.130911765352578369f, 0.047366142703449930f },
1124  { 0.345478219991944002f, 0.119355200488802049f, 0.041234622211652958f },
1125  { 0.329876977693223550f, 0.108818820412015502f, 0.035896823593657347f },
1126  { 0.314980262473718298f, 0.099212565748012460f, 0.031250000000000000f },
1127  { 0.300756259020529160f, 0.090454327340023621f, 0.027204705103003875f },
1128  { 0.287174588749258719f, 0.082469244423305887f, 0.023683071351724965f },
1129  { 0.274206244923656473f, 0.075189064755132290f, 0.020617311105826479f },
1130  { 0.261823530705156682f, 0.068551561230914118f, 0.017948411796828673f },
1131  { 0.250000000000000000f, 0.062500000000000000f, 0.015625000000000000f },
1132  { 0.238710400977604098f, 0.056982655534888536f, 0.013602352551501938f },
1133  { 0.227930622139554201f, 0.051952368508924235f, 0.011841535675862483f }
1134 };