FFmpeg coverage


Directory: ../../../ffmpeg/
File: src/libavcodec/aactab.c
Date: 2024-11-10 12:37:04
Exec Total Coverage
Lines: 27 27 100.0%
Functions: 3 3 100.0%
Branches: 6 6 100.0%

Line Branch Exec Source
1 /*
2 * AAC data
3 * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org )
4 * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com )
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 /**
24 * @file
25 * AAC data
26 * @author Oded Shimon ( ods15 ods15 dyndns org )
27 * @author Maxim Gavrilov ( maxim.gavrilov gmail com )
28 */
29
30 #include <stddef.h>
31 #include <stdint.h>
32
33 #include "config_components.h"
34 #include "libavutil/attributes.h"
35 #include "libavutil/mem_internal.h"
36 #include "libavutil/thread.h"
37 #include "aactab.h"
38
39 #if CONFIG_AAC_ENCODER || CONFIG_AAC_DECODER
40 #include "kbdwin.h"
41 #include "sinewin.h"
42
43 float ff_aac_pow2sf_tab[428];
44 float ff_aac_pow34sf_tab[428];
45
46 DECLARE_ALIGNED(32, float, ff_aac_kbd_long_1024)[1024];
47 DECLARE_ALIGNED(32, float, ff_aac_kbd_short_128)[128];
48
49 175 static av_cold void aac_tableinit(void)
50 {
51 /* 2^(i/16) for 0 <= i <= 15 */
52 static const float exp2_lut[] = {
53 1.00000000000000000000,
54 1.04427378242741384032,
55 1.09050773266525765921,
56 1.13878863475669165370,
57 1.18920711500272106672,
58 1.24185781207348404859,
59 1.29683955465100966593,
60 1.35425554693689272830,
61 1.41421356237309504880,
62 1.47682614593949931139,
63 1.54221082540794082361,
64 1.61049033194925430818,
65 1.68179283050742908606,
66 1.75625216037329948311,
67 1.83400808640934246349,
68 1.91520656139714729387,
69 };
70 175 float t1 = 8.8817841970012523233890533447265625e-16; // 2^(-50)
71 175 float t2 = 3.63797880709171295166015625e-12; // 2^(-38)
72 int t1_inc_cur, t2_inc_cur;
73 175 int t1_inc_prev = 0;
74 175 int t2_inc_prev = 8;
75
76
2/2
✓ Branch 0 taken 74900 times.
✓ Branch 1 taken 175 times.
75075 for (int i = 0; i < 428; i++) {
77 74900 t1_inc_cur = 4 * (i % 4);
78 74900 t2_inc_cur = (8 + 3*i) % 16;
79
2/2
✓ Branch 0 taken 18550 times.
✓ Branch 1 taken 56350 times.
74900 if (t1_inc_cur < t1_inc_prev)
80 18550 t1 *= 2;
81
2/2
✓ Branch 0 taken 14000 times.
✓ Branch 1 taken 60900 times.
74900 if (t2_inc_cur < t2_inc_prev)
82 14000 t2 *= 2;
83 // A much more efficient and accurate way of doing:
84 // ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.0);
85 // ff_aac_pow34sf_tab[i] = pow(ff_aac_pow2sf_tab[i], 3.0/4.0);
86 74900 ff_aac_pow2sf_tab[i] = t1 * exp2_lut[t1_inc_cur];
87 74900 ff_aac_pow34sf_tab[i] = t2 * exp2_lut[t2_inc_cur];
88 74900 t1_inc_prev = t1_inc_cur;
89 74900 t2_inc_prev = t2_inc_cur;
90 }
91 175 }
92
93 175 static av_cold void aac_float_common_init(void)
94 {
95 175 aac_tableinit();
96
97 175 ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
98 175 ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
99 175 ff_init_ff_sine_windows(10);
100 175 ff_init_ff_sine_windows(7);
101 175 }
102
103 176 av_cold void ff_aac_float_common_init(void)
104 {
105 static AVOnce init_static_once = AV_ONCE_INIT;
106 176 ff_thread_once(&init_static_once, aac_float_common_init);
107 176 }
108 #endif
109
110 const float ff_ltp_coef[8] = {
111 0.570829, 0.696616, 0.813004, 0.911304,
112 0.984900, 1.067894, 1.194601, 1.369533,
113 };
114
115 /* @name tns_tmp2_map
116 * Tables of the tmp2[] arrays of LPC coefficients used for TNS.
117 * The suffix _M_N[] indicate the values of coef_compress and coef_res
118 * respectively.
119 * @{
120 */
121 static const float tns_tmp2_map_1_3[4] = {
122 0.00000000, -0.43388373, 0.64278758, 0.34202015,
123 };
124
125 static const float tns_tmp2_map_0_3[8] = {
126 0.00000000, -0.43388373, -0.78183150, -0.97492790,
127 0.98480773, 0.86602539, 0.64278758, 0.34202015,
128 };
129
130 static const float tns_tmp2_map_1_4[8] = {
131 0.00000000, -0.20791170, -0.40673664, -0.58778524,
132 0.67369562, 0.52643216, 0.36124167, 0.18374951,
133 };
134
135 static const float tns_tmp2_map_0_4[16] = {
136 0.00000000, -0.20791170, -0.40673664, -0.58778524,
137 -0.74314481, -0.86602539, -0.95105654, -0.99452192,
138 0.99573416, 0.96182561, 0.89516330, 0.79801720,
139 0.67369562, 0.52643216, 0.36124167, 0.18374951,
140 };
141
142 const float * const ff_tns_tmp2_map[4] = {
143 tns_tmp2_map_0_3,
144 tns_tmp2_map_0_4,
145 tns_tmp2_map_1_3,
146 tns_tmp2_map_1_4
147 };
148
149 const uint8_t ff_aac_num_swb_1024[] = {
150 41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40, 40
151 };
152
153 const uint8_t ff_aac_num_swb_960[] = {
154 40, 40, 46, 49, 49, 49, 46, 46, 42, 42, 42, 40, 40
155 };
156
157 const uint8_t ff_aac_num_swb_768[] = {
158 37, 37, 41, 43, 43, 43, 43, 43, 39, 39, 39, 37, 37
159 };
160
161 const uint8_t ff_aac_num_swb_512[] = {
162 0, 0, 0, 36, 36, 37, 31, 31, 0, 0, 0, 0, 0
163 };
164
165 const uint8_t ff_aac_num_swb_480[] = {
166 0, 0, 0, 35, 35, 37, 30, 30, 0, 0, 0, 0, 0
167 };
168
169 const uint8_t ff_aac_num_swb_128[] = {
170 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15
171 };
172
173 const uint8_t ff_aac_num_swb_120[] = {
174 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15
175 };
176
177 const uint8_t ff_aac_num_swb_96[] = {
178 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14
179 };
180
181 const uint8_t ff_aac_pred_sfb_max[] = {
182 33, 33, 38, 40, 40, 40, 41, 41, 37, 37, 37, 34, 34
183 };
184
185 const uint32_t ff_aac_scalefactor_code[121] = {
186 0x3ffe8, 0x3ffe6, 0x3ffe7, 0x3ffe5, 0x7fff5, 0x7fff1, 0x7ffed, 0x7fff6,
187 0x7ffee, 0x7ffef, 0x7fff0, 0x7fffc, 0x7fffd, 0x7ffff, 0x7fffe, 0x7fff7,
188 0x7fff8, 0x7fffb, 0x7fff9, 0x3ffe4, 0x7fffa, 0x3ffe3, 0x1ffef, 0x1fff0,
189 0x0fff5, 0x1ffee, 0x0fff2, 0x0fff3, 0x0fff4, 0x0fff1, 0x07ff6, 0x07ff7,
190 0x03ff9, 0x03ff5, 0x03ff7, 0x03ff3, 0x03ff6, 0x03ff2, 0x01ff7, 0x01ff5,
191 0x00ff9, 0x00ff7, 0x00ff6, 0x007f9, 0x00ff4, 0x007f8, 0x003f9, 0x003f7,
192 0x003f5, 0x001f8, 0x001f7, 0x000fa, 0x000f8, 0x000f6, 0x00079, 0x0003a,
193 0x00038, 0x0001a, 0x0000b, 0x00004, 0x00000, 0x0000a, 0x0000c, 0x0001b,
194 0x00039, 0x0003b, 0x00078, 0x0007a, 0x000f7, 0x000f9, 0x001f6, 0x001f9,
195 0x003f4, 0x003f6, 0x003f8, 0x007f5, 0x007f4, 0x007f6, 0x007f7, 0x00ff5,
196 0x00ff8, 0x01ff4, 0x01ff6, 0x01ff8, 0x03ff8, 0x03ff4, 0x0fff0, 0x07ff4,
197 0x0fff6, 0x07ff5, 0x3ffe2, 0x7ffd9, 0x7ffda, 0x7ffdb, 0x7ffdc, 0x7ffdd,
198 0x7ffde, 0x7ffd8, 0x7ffd2, 0x7ffd3, 0x7ffd4, 0x7ffd5, 0x7ffd6, 0x7fff2,
199 0x7ffdf, 0x7ffe7, 0x7ffe8, 0x7ffe9, 0x7ffea, 0x7ffeb, 0x7ffe6, 0x7ffe0,
200 0x7ffe1, 0x7ffe2, 0x7ffe3, 0x7ffe4, 0x7ffe5, 0x7ffd7, 0x7ffec, 0x7fff4,
201 0x7fff3,
202 };
203
204 const uint8_t ff_aac_scalefactor_bits[121] = {
205 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
206 19, 19, 19, 18, 19, 18, 17, 17, 16, 17, 16, 16, 16, 16, 15, 15,
207 14, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 11, 12, 11, 10, 10,
208 10, 9, 9, 8, 8, 8, 7, 6, 6, 5, 4, 3, 1, 4, 4, 5,
209 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12,
210 12, 13, 13, 13, 14, 14, 16, 15, 16, 15, 18, 19, 19, 19, 19, 19,
211 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
212 19, 19, 19, 19, 19, 19, 19, 19, 19,
213 };
214
215 static const uint16_t codes1[81] = {
216 0x7f8, 0x1f1, 0x7fd, 0x3f5, 0x068, 0x3f0, 0x7f7, 0x1ec,
217 0x7f5, 0x3f1, 0x072, 0x3f4, 0x074, 0x011, 0x076, 0x1eb,
218 0x06c, 0x3f6, 0x7fc, 0x1e1, 0x7f1, 0x1f0, 0x061, 0x1f6,
219 0x7f2, 0x1ea, 0x7fb, 0x1f2, 0x069, 0x1ed, 0x077, 0x017,
220 0x06f, 0x1e6, 0x064, 0x1e5, 0x067, 0x015, 0x062, 0x012,
221 0x000, 0x014, 0x065, 0x016, 0x06d, 0x1e9, 0x063, 0x1e4,
222 0x06b, 0x013, 0x071, 0x1e3, 0x070, 0x1f3, 0x7fe, 0x1e7,
223 0x7f3, 0x1ef, 0x060, 0x1ee, 0x7f0, 0x1e2, 0x7fa, 0x3f3,
224 0x06a, 0x1e8, 0x075, 0x010, 0x073, 0x1f4, 0x06e, 0x3f7,
225 0x7f6, 0x1e0, 0x7f9, 0x3f2, 0x066, 0x1f5, 0x7ff, 0x1f7,
226 0x7f4,
227 };
228
229 static const uint8_t bits1[81] = {
230 11, 9, 11, 10, 7, 10, 11, 9, 11, 10, 7, 10, 7, 5, 7, 9,
231 7, 10, 11, 9, 11, 9, 7, 9, 11, 9, 11, 9, 7, 9, 7, 5,
232 7, 9, 7, 9, 7, 5, 7, 5, 1, 5, 7, 5, 7, 9, 7, 9,
233 7, 5, 7, 9, 7, 9, 11, 9, 11, 9, 7, 9, 11, 9, 11, 10,
234 7, 9, 7, 5, 7, 9, 7, 10, 11, 9, 11, 10, 7, 9, 11, 9,
235 11,
236 };
237
238 static const uint16_t codes2[81] = {
239 0x1f3, 0x06f, 0x1fd, 0x0eb, 0x023, 0x0ea, 0x1f7, 0x0e8,
240 0x1fa, 0x0f2, 0x02d, 0x070, 0x020, 0x006, 0x02b, 0x06e,
241 0x028, 0x0e9, 0x1f9, 0x066, 0x0f8, 0x0e7, 0x01b, 0x0f1,
242 0x1f4, 0x06b, 0x1f5, 0x0ec, 0x02a, 0x06c, 0x02c, 0x00a,
243 0x027, 0x067, 0x01a, 0x0f5, 0x024, 0x008, 0x01f, 0x009,
244 0x000, 0x007, 0x01d, 0x00b, 0x030, 0x0ef, 0x01c, 0x064,
245 0x01e, 0x00c, 0x029, 0x0f3, 0x02f, 0x0f0, 0x1fc, 0x071,
246 0x1f2, 0x0f4, 0x021, 0x0e6, 0x0f7, 0x068, 0x1f8, 0x0ee,
247 0x022, 0x065, 0x031, 0x002, 0x026, 0x0ed, 0x025, 0x06a,
248 0x1fb, 0x072, 0x1fe, 0x069, 0x02e, 0x0f6, 0x1ff, 0x06d,
249 0x1f6,
250 };
251
252 static const uint8_t bits2[81] = {
253 9, 7, 9, 8, 6, 8, 9, 8, 9, 8, 6, 7, 6, 5, 6, 7,
254 6, 8, 9, 7, 8, 8, 6, 8, 9, 7, 9, 8, 6, 7, 6, 5,
255 6, 7, 6, 8, 6, 5, 6, 5, 3, 5, 6, 5, 6, 8, 6, 7,
256 6, 5, 6, 8, 6, 8, 9, 7, 9, 8, 6, 8, 8, 7, 9, 8,
257 6, 7, 6, 4, 6, 8, 6, 7, 9, 7, 9, 7, 6, 8, 9, 7,
258 9,
259 };
260
261 static const uint16_t codes3[81] = {
262 0x0000, 0x0009, 0x00ef, 0x000b, 0x0019, 0x00f0, 0x01eb, 0x01e6,
263 0x03f2, 0x000a, 0x0035, 0x01ef, 0x0034, 0x0037, 0x01e9, 0x01ed,
264 0x01e7, 0x03f3, 0x01ee, 0x03ed, 0x1ffa, 0x01ec, 0x01f2, 0x07f9,
265 0x07f8, 0x03f8, 0x0ff8, 0x0008, 0x0038, 0x03f6, 0x0036, 0x0075,
266 0x03f1, 0x03eb, 0x03ec, 0x0ff4, 0x0018, 0x0076, 0x07f4, 0x0039,
267 0x0074, 0x03ef, 0x01f3, 0x01f4, 0x07f6, 0x01e8, 0x03ea, 0x1ffc,
268 0x00f2, 0x01f1, 0x0ffb, 0x03f5, 0x07f3, 0x0ffc, 0x00ee, 0x03f7,
269 0x7ffe, 0x01f0, 0x07f5, 0x7ffd, 0x1ffb, 0x3ffa, 0xffff, 0x00f1,
270 0x03f0, 0x3ffc, 0x01ea, 0x03ee, 0x3ffb, 0x0ff6, 0x0ffa, 0x7ffc,
271 0x07f2, 0x0ff5, 0xfffe, 0x03f4, 0x07f7, 0x7ffb, 0x0ff7, 0x0ff9,
272 0x7ffa,
273 };
274
275 static const uint8_t bits3[81] = {
276 1, 4, 8, 4, 5, 8, 9, 9, 10, 4, 6, 9, 6, 6, 9, 9,
277 9, 10, 9, 10, 13, 9, 9, 11, 11, 10, 12, 4, 6, 10, 6, 7,
278 10, 10, 10, 12, 5, 7, 11, 6, 7, 10, 9, 9, 11, 9, 10, 13,
279 8, 9, 12, 10, 11, 12, 8, 10, 15, 9, 11, 15, 13, 14, 16, 8,
280 10, 14, 9, 10, 14, 12, 12, 15, 11, 12, 16, 10, 11, 15, 12, 12,
281 15,
282 };
283
284 static const uint16_t codes4[81] = {
285 0x007, 0x016, 0x0f6, 0x018, 0x008, 0x0ef, 0x1ef, 0x0f3,
286 0x7f8, 0x019, 0x017, 0x0ed, 0x015, 0x001, 0x0e2, 0x0f0,
287 0x070, 0x3f0, 0x1ee, 0x0f1, 0x7fa, 0x0ee, 0x0e4, 0x3f2,
288 0x7f6, 0x3ef, 0x7fd, 0x005, 0x014, 0x0f2, 0x009, 0x004,
289 0x0e5, 0x0f4, 0x0e8, 0x3f4, 0x006, 0x002, 0x0e7, 0x003,
290 0x000, 0x06b, 0x0e3, 0x069, 0x1f3, 0x0eb, 0x0e6, 0x3f6,
291 0x06e, 0x06a, 0x1f4, 0x3ec, 0x1f0, 0x3f9, 0x0f5, 0x0ec,
292 0x7fb, 0x0ea, 0x06f, 0x3f7, 0x7f9, 0x3f3, 0xfff, 0x0e9,
293 0x06d, 0x3f8, 0x06c, 0x068, 0x1f5, 0x3ee, 0x1f2, 0x7f4,
294 0x7f7, 0x3f1, 0xffe, 0x3ed, 0x1f1, 0x7f5, 0x7fe, 0x3f5,
295 0x7fc,
296 };
297
298 static const uint8_t bits4[81] = {
299 4, 5, 8, 5, 4, 8, 9, 8, 11, 5, 5, 8, 5, 4, 8, 8,
300 7, 10, 9, 8, 11, 8, 8, 10, 11, 10, 11, 4, 5, 8, 4, 4,
301 8, 8, 8, 10, 4, 4, 8, 4, 4, 7, 8, 7, 9, 8, 8, 10,
302 7, 7, 9, 10, 9, 10, 8, 8, 11, 8, 7, 10, 11, 10, 12, 8,
303 7, 10, 7, 7, 9, 10, 9, 11, 11, 10, 12, 10, 9, 11, 11, 10,
304 11,
305 };
306
307 static const uint16_t codes5[81] = {
308 0x1fff, 0x0ff7, 0x07f4, 0x07e8, 0x03f1, 0x07ee, 0x07f9, 0x0ff8,
309 0x1ffd, 0x0ffd, 0x07f1, 0x03e8, 0x01e8, 0x00f0, 0x01ec, 0x03ee,
310 0x07f2, 0x0ffa, 0x0ff4, 0x03ef, 0x01f2, 0x00e8, 0x0070, 0x00ec,
311 0x01f0, 0x03ea, 0x07f3, 0x07eb, 0x01eb, 0x00ea, 0x001a, 0x0008,
312 0x0019, 0x00ee, 0x01ef, 0x07ed, 0x03f0, 0x00f2, 0x0073, 0x000b,
313 0x0000, 0x000a, 0x0071, 0x00f3, 0x07e9, 0x07ef, 0x01ee, 0x00ef,
314 0x0018, 0x0009, 0x001b, 0x00eb, 0x01e9, 0x07ec, 0x07f6, 0x03eb,
315 0x01f3, 0x00ed, 0x0072, 0x00e9, 0x01f1, 0x03ed, 0x07f7, 0x0ff6,
316 0x07f0, 0x03e9, 0x01ed, 0x00f1, 0x01ea, 0x03ec, 0x07f8, 0x0ff9,
317 0x1ffc, 0x0ffc, 0x0ff5, 0x07ea, 0x03f3, 0x03f2, 0x07f5, 0x0ffb,
318 0x1ffe,
319 };
320
321 static const uint8_t bits5[81] = {
322 13, 12, 11, 11, 10, 11, 11, 12, 13, 12, 11, 10, 9, 8, 9, 10,
323 11, 12, 12, 10, 9, 8, 7, 8, 9, 10, 11, 11, 9, 8, 5, 4,
324 5, 8, 9, 11, 10, 8, 7, 4, 1, 4, 7, 8, 11, 11, 9, 8,
325 5, 4, 5, 8, 9, 11, 11, 10, 9, 8, 7, 8, 9, 10, 11, 12,
326 11, 10, 9, 8, 9, 10, 11, 12, 13, 12, 12, 11, 10, 10, 11, 12,
327 13,
328 };
329
330 static const uint16_t codes6[81] = {
331 0x7fe, 0x3fd, 0x1f1, 0x1eb, 0x1f4, 0x1ea, 0x1f0, 0x3fc,
332 0x7fd, 0x3f6, 0x1e5, 0x0ea, 0x06c, 0x071, 0x068, 0x0f0,
333 0x1e6, 0x3f7, 0x1f3, 0x0ef, 0x032, 0x027, 0x028, 0x026,
334 0x031, 0x0eb, 0x1f7, 0x1e8, 0x06f, 0x02e, 0x008, 0x004,
335 0x006, 0x029, 0x06b, 0x1ee, 0x1ef, 0x072, 0x02d, 0x002,
336 0x000, 0x003, 0x02f, 0x073, 0x1fa, 0x1e7, 0x06e, 0x02b,
337 0x007, 0x001, 0x005, 0x02c, 0x06d, 0x1ec, 0x1f9, 0x0ee,
338 0x030, 0x024, 0x02a, 0x025, 0x033, 0x0ec, 0x1f2, 0x3f8,
339 0x1e4, 0x0ed, 0x06a, 0x070, 0x069, 0x074, 0x0f1, 0x3fa,
340 0x7ff, 0x3f9, 0x1f6, 0x1ed, 0x1f8, 0x1e9, 0x1f5, 0x3fb,
341 0x7fc,
342 };
343
344 static const uint8_t bits6[81] = {
345 11, 10, 9, 9, 9, 9, 9, 10, 11, 10, 9, 8, 7, 7, 7, 8,
346 9, 10, 9, 8, 6, 6, 6, 6, 6, 8, 9, 9, 7, 6, 4, 4,
347 4, 6, 7, 9, 9, 7, 6, 4, 4, 4, 6, 7, 9, 9, 7, 6,
348 4, 4, 4, 6, 7, 9, 9, 8, 6, 6, 6, 6, 6, 8, 9, 10,
349 9, 8, 7, 7, 7, 7, 8, 10, 11, 10, 9, 9, 9, 9, 9, 10,
350 11,
351 };
352
353 static const uint16_t codes7[64] = {
354 0x000, 0x005, 0x037, 0x074, 0x0f2, 0x1eb, 0x3ed, 0x7f7,
355 0x004, 0x00c, 0x035, 0x071, 0x0ec, 0x0ee, 0x1ee, 0x1f5,
356 0x036, 0x034, 0x072, 0x0ea, 0x0f1, 0x1e9, 0x1f3, 0x3f5,
357 0x073, 0x070, 0x0eb, 0x0f0, 0x1f1, 0x1f0, 0x3ec, 0x3fa,
358 0x0f3, 0x0ed, 0x1e8, 0x1ef, 0x3ef, 0x3f1, 0x3f9, 0x7fb,
359 0x1ed, 0x0ef, 0x1ea, 0x1f2, 0x3f3, 0x3f8, 0x7f9, 0x7fc,
360 0x3ee, 0x1ec, 0x1f4, 0x3f4, 0x3f7, 0x7f8, 0xffd, 0xffe,
361 0x7f6, 0x3f0, 0x3f2, 0x3f6, 0x7fa, 0x7fd, 0xffc, 0xfff,
362 };
363
364 static const uint8_t bits7[64] = {
365 1, 3, 6, 7, 8, 9, 10, 11, 3, 4, 6, 7, 8, 8, 9, 9,
366 6, 6, 7, 8, 8, 9, 9, 10, 7, 7, 8, 8, 9, 9, 10, 10,
367 8, 8, 9, 9, 10, 10, 10, 11, 9, 8, 9, 9, 10, 10, 11, 11,
368 10, 9, 9, 10, 10, 11, 12, 12, 11, 10, 10, 10, 11, 11, 12, 12,
369 };
370
371 static const uint16_t codes8[64] = {
372 0x00e, 0x005, 0x010, 0x030, 0x06f, 0x0f1, 0x1fa, 0x3fe,
373 0x003, 0x000, 0x004, 0x012, 0x02c, 0x06a, 0x075, 0x0f8,
374 0x00f, 0x002, 0x006, 0x014, 0x02e, 0x069, 0x072, 0x0f5,
375 0x02f, 0x011, 0x013, 0x02a, 0x032, 0x06c, 0x0ec, 0x0fa,
376 0x071, 0x02b, 0x02d, 0x031, 0x06d, 0x070, 0x0f2, 0x1f9,
377 0x0ef, 0x068, 0x033, 0x06b, 0x06e, 0x0ee, 0x0f9, 0x3fc,
378 0x1f8, 0x074, 0x073, 0x0ed, 0x0f0, 0x0f6, 0x1f6, 0x1fd,
379 0x3fd, 0x0f3, 0x0f4, 0x0f7, 0x1f7, 0x1fb, 0x1fc, 0x3ff,
380 };
381
382 static const uint8_t bits8[64] = {
383 5, 4, 5, 6, 7, 8, 9, 10, 4, 3, 4, 5, 6, 7, 7, 8,
384 5, 4, 4, 5, 6, 7, 7, 8, 6, 5, 5, 6, 6, 7, 8, 8,
385 7, 6, 6, 6, 7, 7, 8, 9, 8, 7, 6, 7, 7, 8, 8, 10,
386 9, 7, 7, 8, 8, 8, 9, 9, 10, 8, 8, 8, 9, 9, 9, 10,
387 };
388
389 static const uint16_t codes9[169] = {
390 0x0000, 0x0005, 0x0037, 0x00e7, 0x01de, 0x03ce, 0x03d9, 0x07c8,
391 0x07cd, 0x0fc8, 0x0fdd, 0x1fe4, 0x1fec, 0x0004, 0x000c, 0x0035,
392 0x0072, 0x00ea, 0x00ed, 0x01e2, 0x03d1, 0x03d3, 0x03e0, 0x07d8,
393 0x0fcf, 0x0fd5, 0x0036, 0x0034, 0x0071, 0x00e8, 0x00ec, 0x01e1,
394 0x03cf, 0x03dd, 0x03db, 0x07d0, 0x0fc7, 0x0fd4, 0x0fe4, 0x00e6,
395 0x0070, 0x00e9, 0x01dd, 0x01e3, 0x03d2, 0x03dc, 0x07cc, 0x07ca,
396 0x07de, 0x0fd8, 0x0fea, 0x1fdb, 0x01df, 0x00eb, 0x01dc, 0x01e6,
397 0x03d5, 0x03de, 0x07cb, 0x07dd, 0x07dc, 0x0fcd, 0x0fe2, 0x0fe7,
398 0x1fe1, 0x03d0, 0x01e0, 0x01e4, 0x03d6, 0x07c5, 0x07d1, 0x07db,
399 0x0fd2, 0x07e0, 0x0fd9, 0x0feb, 0x1fe3, 0x1fe9, 0x07c4, 0x01e5,
400 0x03d7, 0x07c6, 0x07cf, 0x07da, 0x0fcb, 0x0fda, 0x0fe3, 0x0fe9,
401 0x1fe6, 0x1ff3, 0x1ff7, 0x07d3, 0x03d8, 0x03e1, 0x07d4, 0x07d9,
402 0x0fd3, 0x0fde, 0x1fdd, 0x1fd9, 0x1fe2, 0x1fea, 0x1ff1, 0x1ff6,
403 0x07d2, 0x03d4, 0x03da, 0x07c7, 0x07d7, 0x07e2, 0x0fce, 0x0fdb,
404 0x1fd8, 0x1fee, 0x3ff0, 0x1ff4, 0x3ff2, 0x07e1, 0x03df, 0x07c9,
405 0x07d6, 0x0fca, 0x0fd0, 0x0fe5, 0x0fe6, 0x1feb, 0x1fef, 0x3ff3,
406 0x3ff4, 0x3ff5, 0x0fe0, 0x07ce, 0x07d5, 0x0fc6, 0x0fd1, 0x0fe1,
407 0x1fe0, 0x1fe8, 0x1ff0, 0x3ff1, 0x3ff8, 0x3ff6, 0x7ffc, 0x0fe8,
408 0x07df, 0x0fc9, 0x0fd7, 0x0fdc, 0x1fdc, 0x1fdf, 0x1fed, 0x1ff5,
409 0x3ff9, 0x3ffb, 0x7ffd, 0x7ffe, 0x1fe7, 0x0fcc, 0x0fd6, 0x0fdf,
410 0x1fde, 0x1fda, 0x1fe5, 0x1ff2, 0x3ffa, 0x3ff7, 0x3ffc, 0x3ffd,
411 0x7fff,
412 };
413
414 static const uint8_t bits9[169] = {
415 1, 3, 6, 8, 9, 10, 10, 11, 11, 12, 12, 13, 13, 3, 4, 6,
416 7, 8, 8, 9, 10, 10, 10, 11, 12, 12, 6, 6, 7, 8, 8, 9,
417 10, 10, 10, 11, 12, 12, 12, 8, 7, 8, 9, 9, 10, 10, 11, 11,
418 11, 12, 12, 13, 9, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 12,
419 13, 10, 9, 9, 10, 11, 11, 11, 12, 11, 12, 12, 13, 13, 11, 9,
420 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 11, 10, 10, 11, 11,
421 12, 12, 13, 13, 13, 13, 13, 13, 11, 10, 10, 11, 11, 11, 12, 12,
422 13, 13, 14, 13, 14, 11, 10, 11, 11, 12, 12, 12, 12, 13, 13, 14,
423 14, 14, 12, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 12,
424 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 15, 15, 13, 12, 12, 12,
425 13, 13, 13, 13, 14, 14, 14, 14, 15,
426 };
427
428 static const uint16_t codes10[169] = {
429 0x022, 0x008, 0x01d, 0x026, 0x05f, 0x0d3, 0x1cf, 0x3d0,
430 0x3d7, 0x3ed, 0x7f0, 0x7f6, 0xffd, 0x007, 0x000, 0x001,
431 0x009, 0x020, 0x054, 0x060, 0x0d5, 0x0dc, 0x1d4, 0x3cd,
432 0x3de, 0x7e7, 0x01c, 0x002, 0x006, 0x00c, 0x01e, 0x028,
433 0x05b, 0x0cd, 0x0d9, 0x1ce, 0x1dc, 0x3d9, 0x3f1, 0x025,
434 0x00b, 0x00a, 0x00d, 0x024, 0x057, 0x061, 0x0cc, 0x0dd,
435 0x1cc, 0x1de, 0x3d3, 0x3e7, 0x05d, 0x021, 0x01f, 0x023,
436 0x027, 0x059, 0x064, 0x0d8, 0x0df, 0x1d2, 0x1e2, 0x3dd,
437 0x3ee, 0x0d1, 0x055, 0x029, 0x056, 0x058, 0x062, 0x0ce,
438 0x0e0, 0x0e2, 0x1da, 0x3d4, 0x3e3, 0x7eb, 0x1c9, 0x05e,
439 0x05a, 0x05c, 0x063, 0x0ca, 0x0da, 0x1c7, 0x1ca, 0x1e0,
440 0x3db, 0x3e8, 0x7ec, 0x1e3, 0x0d2, 0x0cb, 0x0d0, 0x0d7,
441 0x0db, 0x1c6, 0x1d5, 0x1d8, 0x3ca, 0x3da, 0x7ea, 0x7f1,
442 0x1e1, 0x0d4, 0x0cf, 0x0d6, 0x0de, 0x0e1, 0x1d0, 0x1d6,
443 0x3d1, 0x3d5, 0x3f2, 0x7ee, 0x7fb, 0x3e9, 0x1cd, 0x1c8,
444 0x1cb, 0x1d1, 0x1d7, 0x1df, 0x3cf, 0x3e0, 0x3ef, 0x7e6,
445 0x7f8, 0xffa, 0x3eb, 0x1dd, 0x1d3, 0x1d9, 0x1db, 0x3d2,
446 0x3cc, 0x3dc, 0x3ea, 0x7ed, 0x7f3, 0x7f9, 0xff9, 0x7f2,
447 0x3ce, 0x1e4, 0x3cb, 0x3d8, 0x3d6, 0x3e2, 0x3e5, 0x7e8,
448 0x7f4, 0x7f5, 0x7f7, 0xffb, 0x7fa, 0x3ec, 0x3df, 0x3e1,
449 0x3e4, 0x3e6, 0x3f0, 0x7e9, 0x7ef, 0xff8, 0xffe, 0xffc,
450 0xfff,
451 };
452
453 static const uint8_t bits10[169] = {
454 6, 5, 6, 6, 7, 8, 9, 10, 10, 10, 11, 11, 12, 5, 4, 4,
455 5, 6, 7, 7, 8, 8, 9, 10, 10, 11, 6, 4, 5, 5, 6, 6,
456 7, 8, 8, 9, 9, 10, 10, 6, 5, 5, 5, 6, 7, 7, 8, 8,
457 9, 9, 10, 10, 7, 6, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10,
458 10, 8, 7, 6, 7, 7, 7, 8, 8, 8, 9, 10, 10, 11, 9, 7,
459 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 11, 9, 8, 8, 8, 8,
460 8, 9, 9, 9, 10, 10, 11, 11, 9, 8, 8, 8, 8, 8, 9, 9,
461 10, 10, 10, 11, 11, 10, 9, 9, 9, 9, 9, 9, 10, 10, 10, 11,
462 11, 12, 10, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 11,
463 10, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 11, 10, 10, 10,
464 10, 10, 10, 11, 11, 12, 12, 12, 12,
465 };
466
467 static const uint16_t codes11[289] = {
468 0x000, 0x006, 0x019, 0x03d, 0x09c, 0x0c6, 0x1a7, 0x390,
469 0x3c2, 0x3df, 0x7e6, 0x7f3, 0xffb, 0x7ec, 0xffa, 0xffe,
470 0x38e, 0x005, 0x001, 0x008, 0x014, 0x037, 0x042, 0x092,
471 0x0af, 0x191, 0x1a5, 0x1b5, 0x39e, 0x3c0, 0x3a2, 0x3cd,
472 0x7d6, 0x0ae, 0x017, 0x007, 0x009, 0x018, 0x039, 0x040,
473 0x08e, 0x0a3, 0x0b8, 0x199, 0x1ac, 0x1c1, 0x3b1, 0x396,
474 0x3be, 0x3ca, 0x09d, 0x03c, 0x015, 0x016, 0x01a, 0x03b,
475 0x044, 0x091, 0x0a5, 0x0be, 0x196, 0x1ae, 0x1b9, 0x3a1,
476 0x391, 0x3a5, 0x3d5, 0x094, 0x09a, 0x036, 0x038, 0x03a,
477 0x041, 0x08c, 0x09b, 0x0b0, 0x0c3, 0x19e, 0x1ab, 0x1bc,
478 0x39f, 0x38f, 0x3a9, 0x3cf, 0x093, 0x0bf, 0x03e, 0x03f,
479 0x043, 0x045, 0x09e, 0x0a7, 0x0b9, 0x194, 0x1a2, 0x1ba,
480 0x1c3, 0x3a6, 0x3a7, 0x3bb, 0x3d4, 0x09f, 0x1a0, 0x08f,
481 0x08d, 0x090, 0x098, 0x0a6, 0x0b6, 0x0c4, 0x19f, 0x1af,
482 0x1bf, 0x399, 0x3bf, 0x3b4, 0x3c9, 0x3e7, 0x0a8, 0x1b6,
483 0x0ab, 0x0a4, 0x0aa, 0x0b2, 0x0c2, 0x0c5, 0x198, 0x1a4,
484 0x1b8, 0x38c, 0x3a4, 0x3c4, 0x3c6, 0x3dd, 0x3e8, 0x0ad,
485 0x3af, 0x192, 0x0bd, 0x0bc, 0x18e, 0x197, 0x19a, 0x1a3,
486 0x1b1, 0x38d, 0x398, 0x3b7, 0x3d3, 0x3d1, 0x3db, 0x7dd,
487 0x0b4, 0x3de, 0x1a9, 0x19b, 0x19c, 0x1a1, 0x1aa, 0x1ad,
488 0x1b3, 0x38b, 0x3b2, 0x3b8, 0x3ce, 0x3e1, 0x3e0, 0x7d2,
489 0x7e5, 0x0b7, 0x7e3, 0x1bb, 0x1a8, 0x1a6, 0x1b0, 0x1b2,
490 0x1b7, 0x39b, 0x39a, 0x3ba, 0x3b5, 0x3d6, 0x7d7, 0x3e4,
491 0x7d8, 0x7ea, 0x0ba, 0x7e8, 0x3a0, 0x1bd, 0x1b4, 0x38a,
492 0x1c4, 0x392, 0x3aa, 0x3b0, 0x3bc, 0x3d7, 0x7d4, 0x7dc,
493 0x7db, 0x7d5, 0x7f0, 0x0c1, 0x7fb, 0x3c8, 0x3a3, 0x395,
494 0x39d, 0x3ac, 0x3ae, 0x3c5, 0x3d8, 0x3e2, 0x3e6, 0x7e4,
495 0x7e7, 0x7e0, 0x7e9, 0x7f7, 0x190, 0x7f2, 0x393, 0x1be,
496 0x1c0, 0x394, 0x397, 0x3ad, 0x3c3, 0x3c1, 0x3d2, 0x7da,
497 0x7d9, 0x7df, 0x7eb, 0x7f4, 0x7fa, 0x195, 0x7f8, 0x3bd,
498 0x39c, 0x3ab, 0x3a8, 0x3b3, 0x3b9, 0x3d0, 0x3e3, 0x3e5,
499 0x7e2, 0x7de, 0x7ed, 0x7f1, 0x7f9, 0x7fc, 0x193, 0xffd,
500 0x3dc, 0x3b6, 0x3c7, 0x3cc, 0x3cb, 0x3d9, 0x3da, 0x7d3,
501 0x7e1, 0x7ee, 0x7ef, 0x7f5, 0x7f6, 0xffc, 0xfff, 0x19d,
502 0x1c2, 0x0b5, 0x0a1, 0x096, 0x097, 0x095, 0x099, 0x0a0,
503 0x0a2, 0x0ac, 0x0a9, 0x0b1, 0x0b3, 0x0bb, 0x0c0, 0x18f,
504 0x004,
505 };
506
507 static const uint8_t bits11[289] = {
508 4, 5, 6, 7, 8, 8, 9, 10, 10, 10, 11, 11, 12, 11, 12, 12,
509 10, 5, 4, 5, 6, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 10,
510 11, 8, 6, 5, 5, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10,
511 10, 10, 8, 7, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10,
512 10, 10, 10, 8, 8, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9,
513 10, 10, 10, 10, 8, 8, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9,
514 9, 10, 10, 10, 10, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 9,
515 9, 10, 10, 10, 10, 10, 8, 9, 8, 8, 8, 8, 8, 8, 9, 9,
516 9, 10, 10, 10, 10, 10, 10, 8, 10, 9, 8, 8, 9, 9, 9, 9,
517 9, 10, 10, 10, 10, 10, 10, 11, 8, 10, 9, 9, 9, 9, 9, 9,
518 9, 10, 10, 10, 10, 10, 10, 11, 11, 8, 11, 9, 9, 9, 9, 9,
519 9, 10, 10, 10, 10, 10, 11, 10, 11, 11, 8, 11, 10, 9, 9, 10,
520 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 8, 11, 10, 10, 10,
521 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 9, 11, 10, 9,
522 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 9, 11, 10,
523 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 9, 12,
524 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 9,
525 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9,
526 5,
527 };
528
529 const uint16_t * const ff_aac_spectral_codes[11] = {
530 codes1, codes2, codes3, codes4, codes5, codes6, codes7, codes8,
531 codes9, codes10, codes11,
532 };
533
534 const uint8_t * const ff_aac_spectral_bits[11] = {
535 bits1, bits2, bits3, bits4, bits5, bits6, bits7, bits8,
536 bits9, bits10, bits11,
537 };
538
539 const uint16_t ff_aac_spectral_sizes[11] = {
540 81, 81, 81, 81, 81, 81, 64, 64, 169, 169, 289,
541 };
542
543 /* NOTE:
544 * 64.0f is a special value indicating the existence of an escape code in the
545 * bitstream.
546 */
547 static const DECLARE_ALIGNED(16, float, codebook_vector0)[324] = {
548 -1.0000000, -1.0000000, -1.0000000, -1.0000000,
549 -1.0000000, -1.0000000, -1.0000000, 0.0000000,
550 -1.0000000, -1.0000000, -1.0000000, 1.0000000,
551 -1.0000000, -1.0000000, 0.0000000, -1.0000000,
552 -1.0000000, -1.0000000, 0.0000000, 0.0000000,
553 -1.0000000, -1.0000000, 0.0000000, 1.0000000,
554 -1.0000000, -1.0000000, 1.0000000, -1.0000000,
555 -1.0000000, -1.0000000, 1.0000000, 0.0000000,
556 -1.0000000, -1.0000000, 1.0000000, 1.0000000,
557 -1.0000000, 0.0000000, -1.0000000, -1.0000000,
558 -1.0000000, 0.0000000, -1.0000000, 0.0000000,
559 -1.0000000, 0.0000000, -1.0000000, 1.0000000,
560 -1.0000000, 0.0000000, 0.0000000, -1.0000000,
561 -1.0000000, 0.0000000, 0.0000000, 0.0000000,
562 -1.0000000, 0.0000000, 0.0000000, 1.0000000,
563 -1.0000000, 0.0000000, 1.0000000, -1.0000000,
564 -1.0000000, 0.0000000, 1.0000000, 0.0000000,
565 -1.0000000, 0.0000000, 1.0000000, 1.0000000,
566 -1.0000000, 1.0000000, -1.0000000, -1.0000000,
567 -1.0000000, 1.0000000, -1.0000000, 0.0000000,
568 -1.0000000, 1.0000000, -1.0000000, 1.0000000,
569 -1.0000000, 1.0000000, 0.0000000, -1.0000000,
570 -1.0000000, 1.0000000, 0.0000000, 0.0000000,
571 -1.0000000, 1.0000000, 0.0000000, 1.0000000,
572 -1.0000000, 1.0000000, 1.0000000, -1.0000000,
573 -1.0000000, 1.0000000, 1.0000000, 0.0000000,
574 -1.0000000, 1.0000000, 1.0000000, 1.0000000,
575 0.0000000, -1.0000000, -1.0000000, -1.0000000,
576 0.0000000, -1.0000000, -1.0000000, 0.0000000,
577 0.0000000, -1.0000000, -1.0000000, 1.0000000,
578 0.0000000, -1.0000000, 0.0000000, -1.0000000,
579 0.0000000, -1.0000000, 0.0000000, 0.0000000,
580 0.0000000, -1.0000000, 0.0000000, 1.0000000,
581 0.0000000, -1.0000000, 1.0000000, -1.0000000,
582 0.0000000, -1.0000000, 1.0000000, 0.0000000,
583 0.0000000, -1.0000000, 1.0000000, 1.0000000,
584 0.0000000, 0.0000000, -1.0000000, -1.0000000,
585 0.0000000, 0.0000000, -1.0000000, 0.0000000,
586 0.0000000, 0.0000000, -1.0000000, 1.0000000,
587 0.0000000, 0.0000000, 0.0000000, -1.0000000,
588 0.0000000, 0.0000000, 0.0000000, 0.0000000,
589 0.0000000, 0.0000000, 0.0000000, 1.0000000,
590 0.0000000, 0.0000000, 1.0000000, -1.0000000,
591 0.0000000, 0.0000000, 1.0000000, 0.0000000,
592 0.0000000, 0.0000000, 1.0000000, 1.0000000,
593 0.0000000, 1.0000000, -1.0000000, -1.0000000,
594 0.0000000, 1.0000000, -1.0000000, 0.0000000,
595 0.0000000, 1.0000000, -1.0000000, 1.0000000,
596 0.0000000, 1.0000000, 0.0000000, -1.0000000,
597 0.0000000, 1.0000000, 0.0000000, 0.0000000,
598 0.0000000, 1.0000000, 0.0000000, 1.0000000,
599 0.0000000, 1.0000000, 1.0000000, -1.0000000,
600 0.0000000, 1.0000000, 1.0000000, 0.0000000,
601 0.0000000, 1.0000000, 1.0000000, 1.0000000,
602 1.0000000, -1.0000000, -1.0000000, -1.0000000,
603 1.0000000, -1.0000000, -1.0000000, 0.0000000,
604 1.0000000, -1.0000000, -1.0000000, 1.0000000,
605 1.0000000, -1.0000000, 0.0000000, -1.0000000,
606 1.0000000, -1.0000000, 0.0000000, 0.0000000,
607 1.0000000, -1.0000000, 0.0000000, 1.0000000,
608 1.0000000, -1.0000000, 1.0000000, -1.0000000,
609 1.0000000, -1.0000000, 1.0000000, 0.0000000,
610 1.0000000, -1.0000000, 1.0000000, 1.0000000,
611 1.0000000, 0.0000000, -1.0000000, -1.0000000,
612 1.0000000, 0.0000000, -1.0000000, 0.0000000,
613 1.0000000, 0.0000000, -1.0000000, 1.0000000,
614 1.0000000, 0.0000000, 0.0000000, -1.0000000,
615 1.0000000, 0.0000000, 0.0000000, 0.0000000,
616 1.0000000, 0.0000000, 0.0000000, 1.0000000,
617 1.0000000, 0.0000000, 1.0000000, -1.0000000,
618 1.0000000, 0.0000000, 1.0000000, 0.0000000,
619 1.0000000, 0.0000000, 1.0000000, 1.0000000,
620 1.0000000, 1.0000000, -1.0000000, -1.0000000,
621 1.0000000, 1.0000000, -1.0000000, 0.0000000,
622 1.0000000, 1.0000000, -1.0000000, 1.0000000,
623 1.0000000, 1.0000000, 0.0000000, -1.0000000,
624 1.0000000, 1.0000000, 0.0000000, 0.0000000,
625 1.0000000, 1.0000000, 0.0000000, 1.0000000,
626 1.0000000, 1.0000000, 1.0000000, -1.0000000,
627 1.0000000, 1.0000000, 1.0000000, 0.0000000,
628 1.0000000, 1.0000000, 1.0000000, 1.0000000,
629 };
630
631 static const DECLARE_ALIGNED(16, float, codebook_vector2)[324] = {
632 0.0000000, 0.0000000, 0.0000000, 0.0000000,
633 0.0000000, 0.0000000, 0.0000000, 1.0000000,
634 0.0000000, 0.0000000, 0.0000000, 2.5198421,
635 0.0000000, 0.0000000, 1.0000000, 0.0000000,
636 0.0000000, 0.0000000, 1.0000000, 1.0000000,
637 0.0000000, 0.0000000, 1.0000000, 2.5198421,
638 0.0000000, 0.0000000, 2.5198421, 0.0000000,
639 0.0000000, 0.0000000, 2.5198421, 1.0000000,
640 0.0000000, 0.0000000, 2.5198421, 2.5198421,
641 0.0000000, 1.0000000, 0.0000000, 0.0000000,
642 0.0000000, 1.0000000, 0.0000000, 1.0000000,
643 0.0000000, 1.0000000, 0.0000000, 2.5198421,
644 0.0000000, 1.0000000, 1.0000000, 0.0000000,
645 0.0000000, 1.0000000, 1.0000000, 1.0000000,
646 0.0000000, 1.0000000, 1.0000000, 2.5198421,
647 0.0000000, 1.0000000, 2.5198421, 0.0000000,
648 0.0000000, 1.0000000, 2.5198421, 1.0000000,
649 0.0000000, 1.0000000, 2.5198421, 2.5198421,
650 0.0000000, 2.5198421, 0.0000000, 0.0000000,
651 0.0000000, 2.5198421, 0.0000000, 1.0000000,
652 0.0000000, 2.5198421, 0.0000000, 2.5198421,
653 0.0000000, 2.5198421, 1.0000000, 0.0000000,
654 0.0000000, 2.5198421, 1.0000000, 1.0000000,
655 0.0000000, 2.5198421, 1.0000000, 2.5198421,
656 0.0000000, 2.5198421, 2.5198421, 0.0000000,
657 0.0000000, 2.5198421, 2.5198421, 1.0000000,
658 0.0000000, 2.5198421, 2.5198421, 2.5198421,
659 1.0000000, 0.0000000, 0.0000000, 0.0000000,
660 1.0000000, 0.0000000, 0.0000000, 1.0000000,
661 1.0000000, 0.0000000, 0.0000000, 2.5198421,
662 1.0000000, 0.0000000, 1.0000000, 0.0000000,
663 1.0000000, 0.0000000, 1.0000000, 1.0000000,
664 1.0000000, 0.0000000, 1.0000000, 2.5198421,
665 1.0000000, 0.0000000, 2.5198421, 0.0000000,
666 1.0000000, 0.0000000, 2.5198421, 1.0000000,
667 1.0000000, 0.0000000, 2.5198421, 2.5198421,
668 1.0000000, 1.0000000, 0.0000000, 0.0000000,
669 1.0000000, 1.0000000, 0.0000000, 1.0000000,
670 1.0000000, 1.0000000, 0.0000000, 2.5198421,
671 1.0000000, 1.0000000, 1.0000000, 0.0000000,
672 1.0000000, 1.0000000, 1.0000000, 1.0000000,
673 1.0000000, 1.0000000, 1.0000000, 2.5198421,
674 1.0000000, 1.0000000, 2.5198421, 0.0000000,
675 1.0000000, 1.0000000, 2.5198421, 1.0000000,
676 1.0000000, 1.0000000, 2.5198421, 2.5198421,
677 1.0000000, 2.5198421, 0.0000000, 0.0000000,
678 1.0000000, 2.5198421, 0.0000000, 1.0000000,
679 1.0000000, 2.5198421, 0.0000000, 2.5198421,
680 1.0000000, 2.5198421, 1.0000000, 0.0000000,
681 1.0000000, 2.5198421, 1.0000000, 1.0000000,
682 1.0000000, 2.5198421, 1.0000000, 2.5198421,
683 1.0000000, 2.5198421, 2.5198421, 0.0000000,
684 1.0000000, 2.5198421, 2.5198421, 1.0000000,
685 1.0000000, 2.5198421, 2.5198421, 2.5198421,
686 2.5198421, 0.0000000, 0.0000000, 0.0000000,
687 2.5198421, 0.0000000, 0.0000000, 1.0000000,
688 2.5198421, 0.0000000, 0.0000000, 2.5198421,
689 2.5198421, 0.0000000, 1.0000000, 0.0000000,
690 2.5198421, 0.0000000, 1.0000000, 1.0000000,
691 2.5198421, 0.0000000, 1.0000000, 2.5198421,
692 2.5198421, 0.0000000, 2.5198421, 0.0000000,
693 2.5198421, 0.0000000, 2.5198421, 1.0000000,
694 2.5198421, 0.0000000, 2.5198421, 2.5198421,
695 2.5198421, 1.0000000, 0.0000000, 0.0000000,
696 2.5198421, 1.0000000, 0.0000000, 1.0000000,
697 2.5198421, 1.0000000, 0.0000000, 2.5198421,
698 2.5198421, 1.0000000, 1.0000000, 0.0000000,
699 2.5198421, 1.0000000, 1.0000000, 1.0000000,
700 2.5198421, 1.0000000, 1.0000000, 2.5198421,
701 2.5198421, 1.0000000, 2.5198421, 0.0000000,
702 2.5198421, 1.0000000, 2.5198421, 1.0000000,
703 2.5198421, 1.0000000, 2.5198421, 2.5198421,
704 2.5198421, 2.5198421, 0.0000000, 0.0000000,
705 2.5198421, 2.5198421, 0.0000000, 1.0000000,
706 2.5198421, 2.5198421, 0.0000000, 2.5198421,
707 2.5198421, 2.5198421, 1.0000000, 0.0000000,
708 2.5198421, 2.5198421, 1.0000000, 1.0000000,
709 2.5198421, 2.5198421, 1.0000000, 2.5198421,
710 2.5198421, 2.5198421, 2.5198421, 0.0000000,
711 2.5198421, 2.5198421, 2.5198421, 1.0000000,
712 2.5198421, 2.5198421, 2.5198421, 2.5198421,
713 };
714
715 static const DECLARE_ALIGNED(16, float, codebook_vector4)[162] = {
716 -6.3496042, -6.3496042, -6.3496042, -4.3267487,
717 -6.3496042, -2.5198421, -6.3496042, -1.0000000,
718 -6.3496042, 0.0000000, -6.3496042, 1.0000000,
719 -6.3496042, 2.5198421, -6.3496042, 4.3267487,
720 -6.3496042, 6.3496042, -4.3267487, -6.3496042,
721 -4.3267487, -4.3267487, -4.3267487, -2.5198421,
722 -4.3267487, -1.0000000, -4.3267487, 0.0000000,
723 -4.3267487, 1.0000000, -4.3267487, 2.5198421,
724 -4.3267487, 4.3267487, -4.3267487, 6.3496042,
725 -2.5198421, -6.3496042, -2.5198421, -4.3267487,
726 -2.5198421, -2.5198421, -2.5198421, -1.0000000,
727 -2.5198421, 0.0000000, -2.5198421, 1.0000000,
728 -2.5198421, 2.5198421, -2.5198421, 4.3267487,
729 -2.5198421, 6.3496042, -1.0000000, -6.3496042,
730 -1.0000000, -4.3267487, -1.0000000, -2.5198421,
731 -1.0000000, -1.0000000, -1.0000000, 0.0000000,
732 -1.0000000, 1.0000000, -1.0000000, 2.5198421,
733 -1.0000000, 4.3267487, -1.0000000, 6.3496042,
734 0.0000000, -6.3496042, 0.0000000, -4.3267487,
735 0.0000000, -2.5198421, 0.0000000, -1.0000000,
736 0.0000000, 0.0000000, 0.0000000, 1.0000000,
737 0.0000000, 2.5198421, 0.0000000, 4.3267487,
738 0.0000000, 6.3496042, 1.0000000, -6.3496042,
739 1.0000000, -4.3267487, 1.0000000, -2.5198421,
740 1.0000000, -1.0000000, 1.0000000, 0.0000000,
741 1.0000000, 1.0000000, 1.0000000, 2.5198421,
742 1.0000000, 4.3267487, 1.0000000, 6.3496042,
743 2.5198421, -6.3496042, 2.5198421, -4.3267487,
744 2.5198421, -2.5198421, 2.5198421, -1.0000000,
745 2.5198421, 0.0000000, 2.5198421, 1.0000000,
746 2.5198421, 2.5198421, 2.5198421, 4.3267487,
747 2.5198421, 6.3496042, 4.3267487, -6.3496042,
748 4.3267487, -4.3267487, 4.3267487, -2.5198421,
749 4.3267487, -1.0000000, 4.3267487, 0.0000000,
750 4.3267487, 1.0000000, 4.3267487, 2.5198421,
751 4.3267487, 4.3267487, 4.3267487, 6.3496042,
752 6.3496042, -6.3496042, 6.3496042, -4.3267487,
753 6.3496042, -2.5198421, 6.3496042, -1.0000000,
754 6.3496042, 0.0000000, 6.3496042, 1.0000000,
755 6.3496042, 2.5198421, 6.3496042, 4.3267487,
756 6.3496042, 6.3496042,
757 };
758
759 static const DECLARE_ALIGNED(16, float, codebook_vector6)[128] = {
760 0.0000000, 0.0000000, 0.0000000, 1.0000000,
761 0.0000000, 2.5198421, 0.0000000, 4.3267487,
762 0.0000000, 6.3496042, 0.0000000, 8.5498797,
763 0.0000000, 10.9027236, 0.0000000, 13.3905183,
764 1.0000000, 0.0000000, 1.0000000, 1.0000000,
765 1.0000000, 2.5198421, 1.0000000, 4.3267487,
766 1.0000000, 6.3496042, 1.0000000, 8.5498797,
767 1.0000000, 10.9027236, 1.0000000, 13.3905183,
768 2.5198421, 0.0000000, 2.5198421, 1.0000000,
769 2.5198421, 2.5198421, 2.5198421, 4.3267487,
770 2.5198421, 6.3496042, 2.5198421, 8.5498797,
771 2.5198421, 10.9027236, 2.5198421, 13.3905183,
772 4.3267487, 0.0000000, 4.3267487, 1.0000000,
773 4.3267487, 2.5198421, 4.3267487, 4.3267487,
774 4.3267487, 6.3496042, 4.3267487, 8.5498797,
775 4.3267487, 10.9027236, 4.3267487, 13.3905183,
776 6.3496042, 0.0000000, 6.3496042, 1.0000000,
777 6.3496042, 2.5198421, 6.3496042, 4.3267487,
778 6.3496042, 6.3496042, 6.3496042, 8.5498797,
779 6.3496042, 10.9027236, 6.3496042, 13.3905183,
780 8.5498797, 0.0000000, 8.5498797, 1.0000000,
781 8.5498797, 2.5198421, 8.5498797, 4.3267487,
782 8.5498797, 6.3496042, 8.5498797, 8.5498797,
783 8.5498797, 10.9027236, 8.5498797, 13.3905183,
784 10.9027236, 0.0000000, 10.9027236, 1.0000000,
785 10.9027236, 2.5198421, 10.9027236, 4.3267487,
786 10.9027236, 6.3496042, 10.9027236, 8.5498797,
787 10.9027236, 10.9027236, 10.9027236, 13.3905183,
788 13.3905183, 0.0000000, 13.3905183, 1.0000000,
789 13.3905183, 2.5198421, 13.3905183, 4.3267487,
790 13.3905183, 6.3496042, 13.3905183, 8.5498797,
791 13.3905183, 10.9027236, 13.3905183, 13.3905183,
792 };
793
794 static const DECLARE_ALIGNED(16, float, codebook_vector8)[338] = {
795 0.0000000, 0.0000000, 0.0000000, 1.0000000,
796 0.0000000, 2.5198421, 0.0000000, 4.3267487,
797 0.0000000, 6.3496042, 0.0000000, 8.5498797,
798 0.0000000, 10.9027236, 0.0000000, 13.3905183,
799 0.0000000, 16.0000000, 0.0000000, 18.7207544,
800 0.0000000, 21.5443469, 0.0000000, 24.4637810,
801 0.0000000, 27.4731418, 1.0000000, 0.0000000,
802 1.0000000, 1.0000000, 1.0000000, 2.5198421,
803 1.0000000, 4.3267487, 1.0000000, 6.3496042,
804 1.0000000, 8.5498797, 1.0000000, 10.9027236,
805 1.0000000, 13.3905183, 1.0000000, 16.0000000,
806 1.0000000, 18.7207544, 1.0000000, 21.5443469,
807 1.0000000, 24.4637810, 1.0000000, 27.4731418,
808 2.5198421, 0.0000000, 2.5198421, 1.0000000,
809 2.5198421, 2.5198421, 2.5198421, 4.3267487,
810 2.5198421, 6.3496042, 2.5198421, 8.5498797,
811 2.5198421, 10.9027236, 2.5198421, 13.3905183,
812 2.5198421, 16.0000000, 2.5198421, 18.7207544,
813 2.5198421, 21.5443469, 2.5198421, 24.4637810,
814 2.5198421, 27.4731418, 4.3267487, 0.0000000,
815 4.3267487, 1.0000000, 4.3267487, 2.5198421,
816 4.3267487, 4.3267487, 4.3267487, 6.3496042,
817 4.3267487, 8.5498797, 4.3267487, 10.9027236,
818 4.3267487, 13.3905183, 4.3267487, 16.0000000,
819 4.3267487, 18.7207544, 4.3267487, 21.5443469,
820 4.3267487, 24.4637810, 4.3267487, 27.4731418,
821 6.3496042, 0.0000000, 6.3496042, 1.0000000,
822 6.3496042, 2.5198421, 6.3496042, 4.3267487,
823 6.3496042, 6.3496042, 6.3496042, 8.5498797,
824 6.3496042, 10.9027236, 6.3496042, 13.3905183,
825 6.3496042, 16.0000000, 6.3496042, 18.7207544,
826 6.3496042, 21.5443469, 6.3496042, 24.4637810,
827 6.3496042, 27.4731418, 8.5498797, 0.0000000,
828 8.5498797, 1.0000000, 8.5498797, 2.5198421,
829 8.5498797, 4.3267487, 8.5498797, 6.3496042,
830 8.5498797, 8.5498797, 8.5498797, 10.9027236,
831 8.5498797, 13.3905183, 8.5498797, 16.0000000,
832 8.5498797, 18.7207544, 8.5498797, 21.5443469,
833 8.5498797, 24.4637810, 8.5498797, 27.4731418,
834 10.9027236, 0.0000000, 10.9027236, 1.0000000,
835 10.9027236, 2.5198421, 10.9027236, 4.3267487,
836 10.9027236, 6.3496042, 10.9027236, 8.5498797,
837 10.9027236, 10.9027236, 10.9027236, 13.3905183,
838 10.9027236, 16.0000000, 10.9027236, 18.7207544,
839 10.9027236, 21.5443469, 10.9027236, 24.4637810,
840 10.9027236, 27.4731418, 13.3905183, 0.0000000,
841 13.3905183, 1.0000000, 13.3905183, 2.5198421,
842 13.3905183, 4.3267487, 13.3905183, 6.3496042,
843 13.3905183, 8.5498797, 13.3905183, 10.9027236,
844 13.3905183, 13.3905183, 13.3905183, 16.0000000,
845 13.3905183, 18.7207544, 13.3905183, 21.5443469,
846 13.3905183, 24.4637810, 13.3905183, 27.4731418,
847 16.0000000, 0.0000000, 16.0000000, 1.0000000,
848 16.0000000, 2.5198421, 16.0000000, 4.3267487,
849 16.0000000, 6.3496042, 16.0000000, 8.5498797,
850 16.0000000, 10.9027236, 16.0000000, 13.3905183,
851 16.0000000, 16.0000000, 16.0000000, 18.7207544,
852 16.0000000, 21.5443469, 16.0000000, 24.4637810,
853 16.0000000, 27.4731418, 18.7207544, 0.0000000,
854 18.7207544, 1.0000000, 18.7207544, 2.5198421,
855 18.7207544, 4.3267487, 18.7207544, 6.3496042,
856 18.7207544, 8.5498797, 18.7207544, 10.9027236,
857 18.7207544, 13.3905183, 18.7207544, 16.0000000,
858 18.7207544, 18.7207544, 18.7207544, 21.5443469,
859 18.7207544, 24.4637810, 18.7207544, 27.4731418,
860 21.5443469, 0.0000000, 21.5443469, 1.0000000,
861 21.5443469, 2.5198421, 21.5443469, 4.3267487,
862 21.5443469, 6.3496042, 21.5443469, 8.5498797,
863 21.5443469, 10.9027236, 21.5443469, 13.3905183,
864 21.5443469, 16.0000000, 21.5443469, 18.7207544,
865 21.5443469, 21.5443469, 21.5443469, 24.4637810,
866 21.5443469, 27.4731418, 24.4637810, 0.0000000,
867 24.4637810, 1.0000000, 24.4637810, 2.5198421,
868 24.4637810, 4.3267487, 24.4637810, 6.3496042,
869 24.4637810, 8.5498797, 24.4637810, 10.9027236,
870 24.4637810, 13.3905183, 24.4637810, 16.0000000,
871 24.4637810, 18.7207544, 24.4637810, 21.5443469,
872 24.4637810, 24.4637810, 24.4637810, 27.4731418,
873 27.4731418, 0.0000000, 27.4731418, 1.0000000,
874 27.4731418, 2.5198421, 27.4731418, 4.3267487,
875 27.4731418, 6.3496042, 27.4731418, 8.5498797,
876 27.4731418, 10.9027236, 27.4731418, 13.3905183,
877 27.4731418, 16.0000000, 27.4731418, 18.7207544,
878 27.4731418, 21.5443469, 27.4731418, 24.4637810,
879 27.4731418, 27.4731418,
880 };
881
882 static const DECLARE_ALIGNED(16, float, codebook_vector10)[578] = {
883 0.0000000, 0.0000000, 0.0000000, 1.0000000,
884 0.0000000, 2.5198421, 0.0000000, 4.3267487,
885 0.0000000, 6.3496042, 0.0000000, 8.5498797,
886 0.0000000, 10.9027236, 0.0000000, 13.3905183,
887 0.0000000, 16.0000000, 0.0000000, 18.7207544,
888 0.0000000, 21.5443469, 0.0000000, 24.4637810,
889 0.0000000, 27.4731418, 0.0000000, 30.5673509,
890 0.0000000, 33.7419917, 0.0000000, 36.9931811,
891 0.0000000, 64.0f, 1.0000000, 0.0000000,
892 1.0000000, 1.0000000, 1.0000000, 2.5198421,
893 1.0000000, 4.3267487, 1.0000000, 6.3496042,
894 1.0000000, 8.5498797, 1.0000000, 10.9027236,
895 1.0000000, 13.3905183, 1.0000000, 16.0000000,
896 1.0000000, 18.7207544, 1.0000000, 21.5443469,
897 1.0000000, 24.4637810, 1.0000000, 27.4731418,
898 1.0000000, 30.5673509, 1.0000000, 33.7419917,
899 1.0000000, 36.9931811, 1.0000000, 64.0f,
900 2.5198421, 0.0000000, 2.5198421, 1.0000000,
901 2.5198421, 2.5198421, 2.5198421, 4.3267487,
902 2.5198421, 6.3496042, 2.5198421, 8.5498797,
903 2.5198421, 10.9027236, 2.5198421, 13.3905183,
904 2.5198421, 16.0000000, 2.5198421, 18.7207544,
905 2.5198421, 21.5443469, 2.5198421, 24.4637810,
906 2.5198421, 27.4731418, 2.5198421, 30.5673509,
907 2.5198421, 33.7419917, 2.5198421, 36.9931811,
908 2.5198421, 64.0f, 4.3267487, 0.0000000,
909 4.3267487, 1.0000000, 4.3267487, 2.5198421,
910 4.3267487, 4.3267487, 4.3267487, 6.3496042,
911 4.3267487, 8.5498797, 4.3267487, 10.9027236,
912 4.3267487, 13.3905183, 4.3267487, 16.0000000,
913 4.3267487, 18.7207544, 4.3267487, 21.5443469,
914 4.3267487, 24.4637810, 4.3267487, 27.4731418,
915 4.3267487, 30.5673509, 4.3267487, 33.7419917,
916 4.3267487, 36.9931811, 4.3267487, 64.0f,
917 6.3496042, 0.0000000, 6.3496042, 1.0000000,
918 6.3496042, 2.5198421, 6.3496042, 4.3267487,
919 6.3496042, 6.3496042, 6.3496042, 8.5498797,
920 6.3496042, 10.9027236, 6.3496042, 13.3905183,
921 6.3496042, 16.0000000, 6.3496042, 18.7207544,
922 6.3496042, 21.5443469, 6.3496042, 24.4637810,
923 6.3496042, 27.4731418, 6.3496042, 30.5673509,
924 6.3496042, 33.7419917, 6.3496042, 36.9931811,
925 6.3496042, 64.0f, 8.5498797, 0.0000000,
926 8.5498797, 1.0000000, 8.5498797, 2.5198421,
927 8.5498797, 4.3267487, 8.5498797, 6.3496042,
928 8.5498797, 8.5498797, 8.5498797, 10.9027236,
929 8.5498797, 13.3905183, 8.5498797, 16.0000000,
930 8.5498797, 18.7207544, 8.5498797, 21.5443469,
931 8.5498797, 24.4637810, 8.5498797, 27.4731418,
932 8.5498797, 30.5673509, 8.5498797, 33.7419917,
933 8.5498797, 36.9931811, 8.5498797, 64.0f,
934 10.9027236, 0.0000000, 10.9027236, 1.0000000,
935 10.9027236, 2.5198421, 10.9027236, 4.3267487,
936 10.9027236, 6.3496042, 10.9027236, 8.5498797,
937 10.9027236, 10.9027236, 10.9027236, 13.3905183,
938 10.9027236, 16.0000000, 10.9027236, 18.7207544,
939 10.9027236, 21.5443469, 10.9027236, 24.4637810,
940 10.9027236, 27.4731418, 10.9027236, 30.5673509,
941 10.9027236, 33.7419917, 10.9027236, 36.9931811,
942 10.9027236, 64.0f, 13.3905183, 0.0000000,
943 13.3905183, 1.0000000, 13.3905183, 2.5198421,
944 13.3905183, 4.3267487, 13.3905183, 6.3496042,
945 13.3905183, 8.5498797, 13.3905183, 10.9027236,
946 13.3905183, 13.3905183, 13.3905183, 16.0000000,
947 13.3905183, 18.7207544, 13.3905183, 21.5443469,
948 13.3905183, 24.4637810, 13.3905183, 27.4731418,
949 13.3905183, 30.5673509, 13.3905183, 33.7419917,
950 13.3905183, 36.9931811, 13.3905183, 64.0f,
951 16.0000000, 0.0000000, 16.0000000, 1.0000000,
952 16.0000000, 2.5198421, 16.0000000, 4.3267487,
953 16.0000000, 6.3496042, 16.0000000, 8.5498797,
954 16.0000000, 10.9027236, 16.0000000, 13.3905183,
955 16.0000000, 16.0000000, 16.0000000, 18.7207544,
956 16.0000000, 21.5443469, 16.0000000, 24.4637810,
957 16.0000000, 27.4731418, 16.0000000, 30.5673509,
958 16.0000000, 33.7419917, 16.0000000, 36.9931811,
959 16.0000000, 64.0f, 18.7207544, 0.0000000,
960 18.7207544, 1.0000000, 18.7207544, 2.5198421,
961 18.7207544, 4.3267487, 18.7207544, 6.3496042,
962 18.7207544, 8.5498797, 18.7207544, 10.9027236,
963 18.7207544, 13.3905183, 18.7207544, 16.0000000,
964 18.7207544, 18.7207544, 18.7207544, 21.5443469,
965 18.7207544, 24.4637810, 18.7207544, 27.4731418,
966 18.7207544, 30.5673509, 18.7207544, 33.7419917,
967 18.7207544, 36.9931811, 18.7207544, 64.0f,
968 21.5443469, 0.0000000, 21.5443469, 1.0000000,
969 21.5443469, 2.5198421, 21.5443469, 4.3267487,
970 21.5443469, 6.3496042, 21.5443469, 8.5498797,
971 21.5443469, 10.9027236, 21.5443469, 13.3905183,
972 21.5443469, 16.0000000, 21.5443469, 18.7207544,
973 21.5443469, 21.5443469, 21.5443469, 24.4637810,
974 21.5443469, 27.4731418, 21.5443469, 30.5673509,
975 21.5443469, 33.7419917, 21.5443469, 36.9931811,
976 21.5443469, 64.0f, 24.4637810, 0.0000000,
977 24.4637810, 1.0000000, 24.4637810, 2.5198421,
978 24.4637810, 4.3267487, 24.4637810, 6.3496042,
979 24.4637810, 8.5498797, 24.4637810, 10.9027236,
980 24.4637810, 13.3905183, 24.4637810, 16.0000000,
981 24.4637810, 18.7207544, 24.4637810, 21.5443469,
982 24.4637810, 24.4637810, 24.4637810, 27.4731418,
983 24.4637810, 30.5673509, 24.4637810, 33.7419917,
984 24.4637810, 36.9931811, 24.4637810, 64.0f,
985 27.4731418, 0.0000000, 27.4731418, 1.0000000,
986 27.4731418, 2.5198421, 27.4731418, 4.3267487,
987 27.4731418, 6.3496042, 27.4731418, 8.5498797,
988 27.4731418, 10.9027236, 27.4731418, 13.3905183,
989 27.4731418, 16.0000000, 27.4731418, 18.7207544,
990 27.4731418, 21.5443469, 27.4731418, 24.4637810,
991 27.4731418, 27.4731418, 27.4731418, 30.5673509,
992 27.4731418, 33.7419917, 27.4731418, 36.9931811,
993 27.4731418, 64.0f, 30.5673509, 0.0000000,
994 30.5673509, 1.0000000, 30.5673509, 2.5198421,
995 30.5673509, 4.3267487, 30.5673509, 6.3496042,
996 30.5673509, 8.5498797, 30.5673509, 10.9027236,
997 30.5673509, 13.3905183, 30.5673509, 16.0000000,
998 30.5673509, 18.7207544, 30.5673509, 21.5443469,
999 30.5673509, 24.4637810, 30.5673509, 27.4731418,
1000 30.5673509, 30.5673509, 30.5673509, 33.7419917,
1001 30.5673509, 36.9931811, 30.5673509, 64.0f,
1002 33.7419917, 0.0000000, 33.7419917, 1.0000000,
1003 33.7419917, 2.5198421, 33.7419917, 4.3267487,
1004 33.7419917, 6.3496042, 33.7419917, 8.5498797,
1005 33.7419917, 10.9027236, 33.7419917, 13.3905183,
1006 33.7419917, 16.0000000, 33.7419917, 18.7207544,
1007 33.7419917, 21.5443469, 33.7419917, 24.4637810,
1008 33.7419917, 27.4731418, 33.7419917, 30.5673509,
1009 33.7419917, 33.7419917, 33.7419917, 36.9931811,
1010 33.7419917, 64.0f, 36.9931811, 0.0000000,
1011 36.9931811, 1.0000000, 36.9931811, 2.5198421,
1012 36.9931811, 4.3267487, 36.9931811, 6.3496042,
1013 36.9931811, 8.5498797, 36.9931811, 10.9027236,
1014 36.9931811, 13.3905183, 36.9931811, 16.0000000,
1015 36.9931811, 18.7207544, 36.9931811, 21.5443469,
1016 36.9931811, 24.4637810, 36.9931811, 27.4731418,
1017 36.9931811, 30.5673509, 36.9931811, 33.7419917,
1018 36.9931811, 36.9931811, 36.9931811, 64.0f,
1019 64.0f, 0.0000000, 64.0f, 1.0000000,
1020 64.0f, 2.5198421, 64.0f, 4.3267487,
1021 64.0f, 6.3496042, 64.0f, 8.5498797,
1022 64.0f, 10.9027236, 64.0f, 13.3905183,
1023 64.0f, 16.0000000, 64.0f, 18.7207544,
1024 64.0f, 21.5443469, 64.0f, 24.4637810,
1025 64.0f, 27.4731418, 64.0f, 30.5673509,
1026 64.0f, 33.7419917, 64.0f, 36.9931811,
1027 64.0f, 64.0f,
1028 };
1029
1030 const float * const ff_aac_codebook_vectors[] = {
1031 codebook_vector0, codebook_vector0, codebook_vector2,
1032 codebook_vector2, codebook_vector4, codebook_vector4,
1033 codebook_vector6, codebook_vector6, codebook_vector8,
1034 codebook_vector8, codebook_vector10,
1035 };
1036
1037 static const float codebook_vector0_vals[] = {
1038 -1.0000000, 0.0000000, 1.0000000
1039 };
1040
1041 /*
1042 * bits 0:1, 2:3, 4:5, 6:7 index into _vals array
1043 * 8:11 number of non-zero values
1044 * 12:15 bit mask of non-zero values
1045 */
1046 static const uint16_t codebook_vector02_idx[] = {
1047 0x0000, 0x8140, 0x8180, 0x4110, 0xc250, 0xc290, 0x4120, 0xc260, 0xc2a0,
1048 0x2104, 0xa244, 0xa284, 0x6214, 0xe354, 0xe394, 0x6224, 0xe364, 0xe3a4,
1049 0x2108, 0xa248, 0xa288, 0x6218, 0xe358, 0xe398, 0x6228, 0xe368, 0xe3a8,
1050 0x1101, 0x9241, 0x9281, 0x5211, 0xd351, 0xd391, 0x5221, 0xd361, 0xd3a1,
1051 0x3205, 0xb345, 0xb385, 0x7315, 0xf455, 0xf495, 0x7325, 0xf465, 0xf4a5,
1052 0x3209, 0xb349, 0xb389, 0x7319, 0xf459, 0xf499, 0x7329, 0xf469, 0xf4a9,
1053 0x1102, 0x9242, 0x9282, 0x5212, 0xd352, 0xd392, 0x5222, 0xd362, 0xd3a2,
1054 0x3206, 0xb346, 0xb386, 0x7316, 0xf456, 0xf496, 0x7326, 0xf466, 0xf4a6,
1055 0x320a, 0xb34a, 0xb38a, 0x731a, 0xf45a, 0xf49a, 0x732a, 0xf46a, 0xf4aa,
1056 };
1057
1058 static const float codebook_vector4_vals[] = {
1059 -6.3496042, -4.3267487,
1060 -2.5198421, -1.0000000,
1061 0.0000000, 1.0000000,
1062 2.5198421, 4.3267487,
1063 6.3496042,
1064 };
1065
1066 /*
1067 * bits 0:3, 4:7 index into _vals array
1068 */
1069 static const uint16_t codebook_vector4_idx[] = {
1070 0x0000, 0x0010, 0x0020, 0x0030, 0x0040, 0x0050, 0x0060, 0x0070, 0x0080,
1071 0x0001, 0x0011, 0x0021, 0x0031, 0x0041, 0x0051, 0x0061, 0x0071, 0x0081,
1072 0x0002, 0x0012, 0x0022, 0x0032, 0x0042, 0x0052, 0x0062, 0x0072, 0x0082,
1073 0x0003, 0x0013, 0x0023, 0x0033, 0x0043, 0x0053, 0x0063, 0x0073, 0x0083,
1074 0x0004, 0x0014, 0x0024, 0x0034, 0x0044, 0x0054, 0x0064, 0x0074, 0x0084,
1075 0x0005, 0x0015, 0x0025, 0x0035, 0x0045, 0x0055, 0x0065, 0x0075, 0x0085,
1076 0x0006, 0x0016, 0x0026, 0x0036, 0x0046, 0x0056, 0x0066, 0x0076, 0x0086,
1077 0x0007, 0x0017, 0x0027, 0x0037, 0x0047, 0x0057, 0x0067, 0x0077, 0x0087,
1078 0x0008, 0x0018, 0x0028, 0x0038, 0x0048, 0x0058, 0x0068, 0x0078, 0x0088,
1079 };
1080
1081 /*
1082 * bits 0:3, 4:7 index into _vals array
1083 * 8:11 number of non-zero values
1084 * 12:15 1: only second value non-zero
1085 * 0: other cases
1086 */
1087 static const uint16_t codebook_vector6_idx[] = {
1088 0x0000, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160, 0x0170,
1089 0x1101, 0x0211, 0x0221, 0x0231, 0x0241, 0x0251, 0x0261, 0x0271,
1090 0x1102, 0x0212, 0x0222, 0x0232, 0x0242, 0x0252, 0x0262, 0x0272,
1091 0x1103, 0x0213, 0x0223, 0x0233, 0x0243, 0x0253, 0x0263, 0x0273,
1092 0x1104, 0x0214, 0x0224, 0x0234, 0x0244, 0x0254, 0x0264, 0x0274,
1093 0x1105, 0x0215, 0x0225, 0x0235, 0x0245, 0x0255, 0x0265, 0x0275,
1094 0x1106, 0x0216, 0x0226, 0x0236, 0x0246, 0x0256, 0x0266, 0x0276,
1095 0x1107, 0x0217, 0x0227, 0x0237, 0x0247, 0x0257, 0x0267, 0x0277,
1096 };
1097
1098 /*
1099 * bits 0:3, 4:7 index into _vals array
1100 * 8:11 number of non-zero values
1101 * 12:15 1: only second value non-zero
1102 * 0: other cases
1103 */
1104 static const uint16_t codebook_vector8_idx[] = {
1105 0x0000, 0x0110, 0x0120, 0x0130, 0x0140, 0x0150, 0x0160,
1106 0x0170, 0x0180, 0x0190, 0x01a0, 0x01b0, 0x01c0,
1107 0x1101, 0x0211, 0x0221, 0x0231, 0x0241, 0x0251, 0x0261,
1108 0x0271, 0x0281, 0x0291, 0x02a1, 0x02b1, 0x02c1,
1109 0x1102, 0x0212, 0x0222, 0x0232, 0x0242, 0x0252, 0x0262,
1110 0x0272, 0x0282, 0x0292, 0x02a2, 0x02b2, 0x02c2,
1111 0x1103, 0x0213, 0x0223, 0x0233, 0x0243, 0x0253, 0x0263,
1112 0x0273, 0x0283, 0x0293, 0x02a3, 0x02b3, 0x02c3,
1113 0x1104, 0x0214, 0x0224, 0x0234, 0x0244, 0x0254, 0x0264,
1114 0x0274, 0x0284, 0x0294, 0x02a4, 0x02b4, 0x02c4,
1115 0x1105, 0x0215, 0x0225, 0x0235, 0x0245, 0x0255, 0x0265,
1116 0x0275, 0x0285, 0x0295, 0x02a5, 0x02b5, 0x02c5,
1117 0x1106, 0x0216, 0x0226, 0x0236, 0x0246, 0x0256, 0x0266,
1118 0x0276, 0x0286, 0x0296, 0x02a6, 0x02b6, 0x02c6,
1119 0x1107, 0x0217, 0x0227, 0x0237, 0x0247, 0x0257, 0x0267,
1120 0x0277, 0x0287, 0x0297, 0x02a7, 0x02b7, 0x02c7,
1121 0x1108, 0x0218, 0x0228, 0x0238, 0x0248, 0x0258, 0x0268,
1122 0x0278, 0x0288, 0x0298, 0x02a8, 0x02b8, 0x02c8,
1123 0x1109, 0x0219, 0x0229, 0x0239, 0x0249, 0x0259, 0x0269,
1124 0x0279, 0x0289, 0x0299, 0x02a9, 0x02b9, 0x02c9,
1125 0x110a, 0x021a, 0x022a, 0x023a, 0x024a, 0x025a, 0x026a,
1126 0x027a, 0x028a, 0x029a, 0x02aa, 0x02ba, 0x02ca,
1127 0x110b, 0x021b, 0x022b, 0x023b, 0x024b, 0x025b, 0x026b,
1128 0x027b, 0x028b, 0x029b, 0x02ab, 0x02bb, 0x02cb,
1129 0x110c, 0x021c, 0x022c, 0x023c, 0x024c, 0x025c, 0x026c,
1130 0x027c, 0x028c, 0x029c, 0x02ac, 0x02bc, 0x02cc,
1131 };
1132
1133 static const float codebook_vector10_vals[] = {
1134 0.0000000, 1.0000000,
1135 2.5198421, 4.3267487,
1136 6.3496042, 8.5498797,
1137 10.9027236, 13.3905183,
1138 16.0000000, 18.7207544,
1139 21.5443469, 24.4637810,
1140 27.4731418, 30.5673509,
1141 33.7419917, 36.9931811,
1142 };
1143
1144 /*
1145 * bits 0:3, 4:7 index into _vals array
1146 * 8:9 bit mask of escape-coded entries
1147 * 12:15 number of non-zero values
1148 */
1149 static const uint16_t codebook_vector10_idx[] = {
1150 0x0000, 0x1010, 0x1020, 0x1030, 0x1040, 0x1050, 0x1060, 0x1070,
1151 0x1080, 0x1090, 0x10a0, 0x10b0, 0x10c0, 0x10d0, 0x10e0, 0x10f0, 0x1200,
1152 0x1001, 0x2011, 0x2021, 0x2031, 0x2041, 0x2051, 0x2061, 0x2071,
1153 0x2081, 0x2091, 0x20a1, 0x20b1, 0x20c1, 0x20d1, 0x20e1, 0x20f1, 0x2201,
1154 0x1002, 0x2012, 0x2022, 0x2032, 0x2042, 0x2052, 0x2062, 0x2072,
1155 0x2082, 0x2092, 0x20a2, 0x20b2, 0x20c2, 0x20d2, 0x20e2, 0x20f2, 0x2202,
1156 0x1003, 0x2013, 0x2023, 0x2033, 0x2043, 0x2053, 0x2063, 0x2073,
1157 0x2083, 0x2093, 0x20a3, 0x20b3, 0x20c3, 0x20d3, 0x20e3, 0x20f3, 0x2203,
1158 0x1004, 0x2014, 0x2024, 0x2034, 0x2044, 0x2054, 0x2064, 0x2074,
1159 0x2084, 0x2094, 0x20a4, 0x20b4, 0x20c4, 0x20d4, 0x20e4, 0x20f4, 0x2204,
1160 0x1005, 0x2015, 0x2025, 0x2035, 0x2045, 0x2055, 0x2065, 0x2075,
1161 0x2085, 0x2095, 0x20a5, 0x20b5, 0x20c5, 0x20d5, 0x20e5, 0x20f5, 0x2205,
1162 0x1006, 0x2016, 0x2026, 0x2036, 0x2046, 0x2056, 0x2066, 0x2076,
1163 0x2086, 0x2096, 0x20a6, 0x20b6, 0x20c6, 0x20d6, 0x20e6, 0x20f6, 0x2206,
1164 0x1007, 0x2017, 0x2027, 0x2037, 0x2047, 0x2057, 0x2067, 0x2077,
1165 0x2087, 0x2097, 0x20a7, 0x20b7, 0x20c7, 0x20d7, 0x20e7, 0x20f7, 0x2207,
1166 0x1008, 0x2018, 0x2028, 0x2038, 0x2048, 0x2058, 0x2068, 0x2078,
1167 0x2088, 0x2098, 0x20a8, 0x20b8, 0x20c8, 0x20d8, 0x20e8, 0x20f8, 0x2208,
1168 0x1009, 0x2019, 0x2029, 0x2039, 0x2049, 0x2059, 0x2069, 0x2079,
1169 0x2089, 0x2099, 0x20a9, 0x20b9, 0x20c9, 0x20d9, 0x20e9, 0x20f9, 0x2209,
1170 0x100a, 0x201a, 0x202a, 0x203a, 0x204a, 0x205a, 0x206a, 0x207a,
1171 0x208a, 0x209a, 0x20aa, 0x20ba, 0x20ca, 0x20da, 0x20ea, 0x20fa, 0x220a,
1172 0x100b, 0x201b, 0x202b, 0x203b, 0x204b, 0x205b, 0x206b, 0x207b,
1173 0x208b, 0x209b, 0x20ab, 0x20bb, 0x20cb, 0x20db, 0x20eb, 0x20fb, 0x220b,
1174 0x100c, 0x201c, 0x202c, 0x203c, 0x204c, 0x205c, 0x206c, 0x207c,
1175 0x208c, 0x209c, 0x20ac, 0x20bc, 0x20cc, 0x20dc, 0x20ec, 0x20fc, 0x220c,
1176 0x100d, 0x201d, 0x202d, 0x203d, 0x204d, 0x205d, 0x206d, 0x207d,
1177 0x208d, 0x209d, 0x20ad, 0x20bd, 0x20cd, 0x20dd, 0x20ed, 0x20fd, 0x220d,
1178 0x100e, 0x201e, 0x202e, 0x203e, 0x204e, 0x205e, 0x206e, 0x207e,
1179 0x208e, 0x209e, 0x20ae, 0x20be, 0x20ce, 0x20de, 0x20ee, 0x20fe, 0x220e,
1180 0x100f, 0x201f, 0x202f, 0x203f, 0x204f, 0x205f, 0x206f, 0x207f,
1181 0x208f, 0x209f, 0x20af, 0x20bf, 0x20cf, 0x20df, 0x20ef, 0x20ff, 0x220f,
1182 0x1100, 0x2110, 0x2120, 0x2130, 0x2140, 0x2150, 0x2160, 0x2170,
1183 0x2180, 0x2190, 0x21a0, 0x21b0, 0x21c0, 0x21d0, 0x21e0, 0x21f0, 0x2300,
1184 };
1185
1186 const float *const ff_aac_codebook_vector_vals[] = {
1187 codebook_vector0_vals, codebook_vector0_vals,
1188 codebook_vector10_vals, codebook_vector10_vals,
1189 codebook_vector4_vals, codebook_vector4_vals,
1190 codebook_vector10_vals, codebook_vector10_vals,
1191 codebook_vector10_vals, codebook_vector10_vals,
1192 codebook_vector10_vals,
1193 };
1194
1195 const uint16_t *const ff_aac_codebook_vector_idx[] = {
1196 codebook_vector02_idx, codebook_vector02_idx,
1197 codebook_vector02_idx, codebook_vector02_idx,
1198 codebook_vector4_idx, codebook_vector4_idx,
1199 codebook_vector6_idx, codebook_vector6_idx,
1200 codebook_vector8_idx, codebook_vector8_idx,
1201 codebook_vector10_idx,
1202 };
1203
1204 const uint16_t ff_aac_ac_msb_cdfs[64][17] = {
1205 { 708, 706, 579, 569, 568, 567, 479, 469,
1206 297, 138, 97, 91, 72, 52, 38, 34, 0, },
1207 { 7619, 6917, 6519, 6412, 5514, 5003, 4683, 4563,
1208 3907, 3297, 3125, 3060, 2904, 2718, 2631, 2590, 0, },
1209 { 7263, 4888, 4810, 4803, 1889, 415, 335, 327,
1210 195, 72, 52, 49, 36, 20, 15, 14, 0, },
1211 { 3626, 2197, 2188, 2187, 582, 57, 47, 46,
1212 30, 12, 9, 8, 6, 4, 3, 2, 0, },
1213 { 7806, 5541, 5451, 5441, 2720, 834, 691, 674,
1214 487, 243, 179, 167, 139, 98, 77, 70, 0, },
1215 { 6684, 4101, 4058, 4055, 1748, 426, 368, 364,
1216 322, 257, 235, 232, 228, 222, 217, 215, 0, },
1217 { 9162, 5964, 5831, 5819, 3269, 866, 658, 638,
1218 535, 348, 258, 244, 234, 214, 195, 186, 0, },
1219 { 10638, 8491, 8365, 8351, 4418, 2067, 1859, 1834,
1220 1190, 601, 495, 478, 356, 217, 174, 164, 0, },
1221 { 13389, 10514, 10032, 9961, 7166, 3488, 2655, 2524,
1222 2015, 1140, 760, 672, 585, 426, 325, 283, 0, },
1223 { 14861, 12788, 12115, 11952, 9987, 6657, 5323, 4984,
1224 4324, 3001, 2205, 1943, 1764, 1394, 1115, 978, 0, },
1225 { 12876, 10004, 9661, 9610, 7107, 3435, 2711, 2595,
1226 2257, 1508, 1059, 952, 893, 753, 609, 538, 0, },
1227 { 15125, 13591, 13049, 12874, 11192, 8543, 7406, 7023,
1228 6291, 4922, 4104, 3769, 3465, 2890, 2486, 2275, 0, },
1229 { 14574, 13106, 12731, 12638, 10453, 7947, 7233, 7037,
1230 6031, 4618, 4081, 3906, 3465, 2802, 2476, 2349, 0, },
1231 { 15070, 13179, 12517, 12351, 10742, 7657, 6200, 5825,
1232 5264, 3998, 3014, 2662, 2510, 2153, 1799, 1564, 0, },
1233 { 15542, 14466, 14007, 13844, 12489, 10409, 9481, 9132,
1234 8305, 6940, 6193, 5867, 5458, 4743, 4291, 4047, 0, },
1235 { 15165, 14384, 14084, 13934, 12911, 11485, 10844, 10513,
1236 10002, 8993, 8380, 8051, 7711, 7036, 6514, 6233, 0, },
1237 { 15642, 14279, 13625, 13393, 12348, 9971, 8405, 7858,
1238 7335, 6119, 4918, 4376, 4185, 3719, 3231, 2860, 0, },
1239 { 13408, 13407, 11471, 11218, 11217, 11216, 9473, 9216,
1240 6480, 3689, 2857, 2690, 2256, 1732, 1405, 1302, 0, },
1241 { 16098, 15584, 15191, 14931, 14514, 13578, 12703, 12103,
1242 11830, 11172, 10475, 9867, 9695, 9281, 8825, 8389, 0, },
1243 { 15844, 14873, 14277, 13996, 13230, 11535, 10205, 9543,
1244 9107, 8086, 7085, 6419, 6214, 5713, 5195, 4731, 0, },
1245 { 16131, 15720, 15443, 15276, 14848, 13971, 13314, 12910,
1246 12591, 11874, 11225, 10788, 10573, 10077, 9585, 9209, 0, },
1247 { 16331, 16330, 12283, 11435, 11434, 11433, 8725, 8049,
1248 6065, 4138, 3187, 2842, 2529, 2171, 1907, 1745, 0, },
1249 { 16011, 15292, 14782, 14528, 14008, 12767, 11556, 10921,
1250 10591, 9759, 8813, 8043, 7855, 7383, 6863, 6282, 0, },
1251 { 16380, 16379, 15159, 14610, 14609, 14608, 12859, 12111,
1252 11046, 9536, 8348, 7713, 7216, 6533, 5964, 5546, 0, },
1253 { 16367, 16333, 16294, 16253, 16222, 16143, 16048, 15947,
1254 15915, 15832, 15731, 15619, 15589, 15512, 15416, 15310, 0, },
1255 { 15967, 15319, 14937, 14753, 14010, 12638, 11787, 11360,
1256 10805, 9706, 8934, 8515, 8166, 7456, 6911, 6575, 0, },
1257 { 4906, 3005, 2985, 2984, 875, 102, 83, 81,
1258 47, 17, 12, 11, 8, 5, 4, 3, 0, },
1259 { 7217, 4346, 4269, 4264, 1924, 428, 340, 332,
1260 280, 203, 179, 175, 171, 164, 159, 157, 0, },
1261 { 16010, 15415, 15032, 14805, 14228, 13043, 12168, 11634,
1262 11265, 10419, 9645, 9110, 8892, 8378, 7850, 7437, 0, },
1263 { 8573, 5218, 5046, 5032, 2787, 771, 555, 533,
1264 443, 286, 218, 205, 197, 181, 168, 162, 0, },
1265 { 11474, 8095, 7822, 7796, 4632, 1443, 1046, 1004,
1266 748, 351, 218, 194, 167, 121, 93, 83, 0, },
1267 { 16152, 15764, 15463, 15264, 14925, 14189, 13536, 13070,
1268 12846, 12314, 11763, 11277, 11131, 10777, 10383, 10011, 0, },
1269 { 14187, 11654, 11043, 10919, 8498, 4885, 3778, 3552,
1270 2947, 1835, 1283, 1134, 998, 749, 585, 514, 0, },
1271 { 14162, 11527, 10759, 10557, 8601, 5417, 4105, 3753,
1272 3286, 2353, 1708, 1473, 1370, 1148, 959, 840, 0, },
1273 { 16205, 15902, 15669, 15498, 15213, 14601, 14068, 13674,
1274 13463, 12970, 12471, 12061, 11916, 11564, 11183, 10841, 0, },
1275 { 15043, 12972, 12092, 11792, 10265, 7446, 5934, 5379,
1276 4883, 3825, 3036, 2647, 2507, 2185, 1901, 1699, 0, },
1277 { 15320, 13694, 12782, 12352, 11191, 8936, 7433, 6671,
1278 6255, 5366, 4622, 4158, 4020, 3712, 3420, 3198, 0, },
1279 { 16255, 16020, 15768, 15600, 15416, 14963, 14440, 14006,
1280 13875, 13534, 13137, 12697, 12602, 12364, 12084, 11781, 0, },
1281 { 15627, 14503, 13906, 13622, 12557, 10527, 9269, 8661,
1282 8117, 6933, 5994, 5474, 5222, 4664, 4166, 3841, 0, },
1283 { 16366, 16365, 14547, 14160, 14159, 14158, 11969, 11473,
1284 8735, 6147, 4911, 4530, 3865, 3180, 2710, 2473, 0, },
1285 { 16257, 16038, 15871, 15754, 15536, 15071, 14673, 14390,
1286 14230, 13842, 13452, 13136, 13021, 12745, 12434, 12154, 0, },
1287 { 15855, 14971, 14338, 13939, 13239, 11782, 10585, 9805,
1288 9444, 8623, 7846, 7254, 7079, 6673, 6262, 5923, 0, },
1289 { 9492, 6318, 6197, 6189, 3004, 652, 489, 477,
1290 333, 143, 96, 90, 78, 60, 50, 47, 0, },
1291 { 16313, 16191, 16063, 15968, 15851, 15590, 15303, 15082,
1292 14968, 14704, 14427, 14177, 14095, 13899, 13674, 13457, 0, },
1293 { 8485, 5473, 5389, 5383, 2411, 494, 386, 377,
1294 278, 150, 117, 112, 103, 89, 81, 78, 0, },
1295 { 10497, 7154, 6959, 6943, 3788, 1004, 734, 709,
1296 517, 238, 152, 138, 120, 90, 72, 66, 0, },
1297 { 16317, 16226, 16127, 16040, 15955, 15762, 15547, 15345,
1298 15277, 15111, 14922, 14723, 14671, 14546, 14396, 14239, 0, },
1299 { 16382, 16381, 15858, 15540, 15539, 15538, 14704, 14168,
1300 13768, 13092, 12452, 11925, 11683, 11268, 10841, 10460, 0, },
1301 { 5974, 3798, 3758, 3755, 1275, 205, 166, 162,
1302 95, 35, 26, 24, 18, 11, 8, 7, 0, },
1303 { 3532, 2258, 2246, 2244, 731, 135, 118, 115,
1304 87, 45, 36, 34, 29, 21, 17, 16, 0, },
1305 { 7466, 4882, 4821, 4811, 2476, 886, 788, 771,
1306 688, 531, 469, 457, 437, 400, 369, 361, 0, },
1307 { 9580, 5772, 5291, 5216, 3444, 1496, 1025, 928,
1308 806, 578, 433, 384, 366, 331, 296, 273, 0, },
1309 { 10692, 7730, 7543, 7521, 4679, 1746, 1391, 1346,
1310 1128, 692, 495, 458, 424, 353, 291, 268, 0, },
1311 { 11040, 7132, 6549, 6452, 4377, 1875, 1253, 1130,
1312 958, 631, 431, 370, 346, 296, 253, 227, 0, },
1313 { 12687, 9332, 8701, 8585, 6266, 3093, 2182, 2004,
1314 1683, 1072, 712, 608, 559, 458, 373, 323, 0, },
1315 { 13429, 9853, 8860, 8584, 6806, 4039, 2862, 2478,
1316 2239, 1764, 1409, 1224, 1178, 1077, 979, 903, 0, },
1317 { 14685, 12163, 11061, 10668, 9101, 6345, 4871, 4263,
1318 3908, 3200, 2668, 2368, 2285, 2106, 1942, 1819, 0, },
1319 { 13295, 11302, 10999, 10945, 7947, 5036, 4490, 4385,
1320 3391, 2185, 1836, 1757, 1424, 998, 833, 785, 0, },
1321 { 4992, 2993, 2972, 2970, 1269, 575, 552, 549,
1322 530, 505, 497, 495, 493, 489, 486, 485, 0, },
1323 { 15419, 13862, 13104, 12819, 11429, 8753, 7220, 6651,
1324 6020, 4667, 3663, 3220, 2995, 2511, 2107, 1871, 0, },
1325 { 12468, 9263, 8912, 8873, 5758, 2193, 1625, 1556,
1326 1187, 589, 371, 330, 283, 200, 149, 131, 0, },
1327 { 15870, 15076, 14615, 14369, 13586, 12034, 10990, 10423,
1328 9953, 8908, 8031, 7488, 7233, 6648, 6101, 5712, 0, },
1329 { 1693, 978, 976, 975, 194, 18, 16, 15,
1330 11, 7, 6, 5, 4, 3, 2, 1, 0, },
1331 { 7992, 5218, 5147, 5143, 2152, 366, 282, 276,
1332 173, 59, 38, 35, 27, 16, 11, 10, 0, }
1333 };
1334
1335 const uint16_t ff_aac_ac_lsb_cdfs[3][4] = {
1336 { 12571, 10569, 3696, 0 },
1337 { 12661, 5700, 3751, 0 },
1338 { 10827, 6884, 2929, 0 }
1339 };
1340
1341 const uint8_t ff_aac_ac_lookup_m[742] = {
1342 0x01, 0x34, 0x0D, 0x13, 0x12, 0x25, 0x00, 0x3A, 0x05, 0x00, 0x21, 0x13, 0x1F, 0x1A, 0x1D, 0x36,
1343 0x24, 0x2B, 0x1B, 0x33, 0x37, 0x29, 0x1D, 0x33, 0x37, 0x33, 0x37, 0x33, 0x37, 0x33, 0x2C, 0x00,
1344 0x21, 0x13, 0x25, 0x2A, 0x00, 0x21, 0x24, 0x12, 0x2C, 0x1E, 0x37, 0x24, 0x1F, 0x35, 0x37, 0x24,
1345 0x35, 0x37, 0x35, 0x37, 0x38, 0x2D, 0x21, 0x29, 0x1E, 0x21, 0x13, 0x2D, 0x36, 0x38, 0x29, 0x36,
1346 0x37, 0x24, 0x36, 0x38, 0x37, 0x38, 0x00, 0x20, 0x23, 0x20, 0x23, 0x36, 0x38, 0x24, 0x3B, 0x24,
1347 0x26, 0x29, 0x1F, 0x30, 0x2D, 0x0D, 0x12, 0x3F, 0x2D, 0x21, 0x1C, 0x2A, 0x00, 0x21, 0x12, 0x1E,
1348 0x36, 0x38, 0x36, 0x37, 0x3F, 0x1E, 0x0D, 0x1F, 0x2A, 0x1E, 0x21, 0x24, 0x12, 0x2A, 0x3C, 0x21,
1349 0x24, 0x1F, 0x3C, 0x21, 0x29, 0x36, 0x38, 0x36, 0x37, 0x38, 0x21, 0x1E, 0x00, 0x3B, 0x25, 0x1E,
1350 0x20, 0x10, 0x1F, 0x3C, 0x20, 0x23, 0x29, 0x08, 0x23, 0x12, 0x08, 0x23, 0x21, 0x38, 0x00, 0x20,
1351 0x13, 0x20, 0x3B, 0x1C, 0x20, 0x3B, 0x29, 0x20, 0x23, 0x24, 0x21, 0x24, 0x21, 0x24, 0x3B, 0x13,
1352 0x23, 0x26, 0x23, 0x13, 0x21, 0x24, 0x26, 0x29, 0x12, 0x22, 0x2B, 0x02, 0x1E, 0x0D, 0x1F, 0x2D,
1353 0x00, 0x0D, 0x12, 0x00, 0x3C, 0x21, 0x29, 0x3C, 0x21, 0x2A, 0x3C, 0x3B, 0x22, 0x1E, 0x20, 0x10,
1354 0x1F, 0x3C, 0x0D, 0x29, 0x3C, 0x21, 0x24, 0x08, 0x23, 0x20, 0x38, 0x39, 0x3C, 0x20, 0x13, 0x3C,
1355 0x00, 0x0D, 0x13, 0x1F, 0x3C, 0x09, 0x26, 0x1F, 0x08, 0x09, 0x26, 0x12, 0x08, 0x23, 0x29, 0x20,
1356 0x23, 0x21, 0x24, 0x20, 0x13, 0x20, 0x3B, 0x16, 0x20, 0x3B, 0x29, 0x20, 0x3B, 0x29, 0x20, 0x3B,
1357 0x13, 0x21, 0x24, 0x29, 0x0B, 0x13, 0x09, 0x3B, 0x13, 0x09, 0x3B, 0x13, 0x21, 0x3B, 0x13, 0x0D,
1358 0x26, 0x29, 0x26, 0x29, 0x3D, 0x12, 0x22, 0x28, 0x2E, 0x04, 0x08, 0x13, 0x3C, 0x3B, 0x3C, 0x20,
1359 0x10, 0x3C, 0x21, 0x07, 0x08, 0x10, 0x00, 0x08, 0x0D, 0x29, 0x08, 0x0D, 0x29, 0x08, 0x09, 0x13,
1360 0x20, 0x23, 0x39, 0x08, 0x09, 0x13, 0x08, 0x09, 0x16, 0x08, 0x09, 0x10, 0x12, 0x20, 0x3B, 0x3D,
1361 0x09, 0x26, 0x20, 0x3B, 0x24, 0x39, 0x09, 0x26, 0x20, 0x0D, 0x13, 0x00, 0x09, 0x13, 0x20, 0x0D,
1362 0x26, 0x12, 0x20, 0x3B, 0x13, 0x21, 0x26, 0x0B, 0x12, 0x09, 0x3B, 0x16, 0x09, 0x3B, 0x3D, 0x09,
1363 0x26, 0x0D, 0x13, 0x26, 0x3D, 0x1C, 0x12, 0x1F, 0x28, 0x2E, 0x07, 0x0B, 0x08, 0x09, 0x00, 0x39,
1364 0x0B, 0x08, 0x26, 0x08, 0x09, 0x13, 0x20, 0x0B, 0x39, 0x10, 0x39, 0x0D, 0x13, 0x20, 0x10, 0x12,
1365 0x09, 0x13, 0x20, 0x3B, 0x13, 0x09, 0x26, 0x0B, 0x09, 0x3B, 0x1C, 0x09, 0x3B, 0x13, 0x20, 0x3B,
1366 0x13, 0x09, 0x26, 0x0B, 0x16, 0x0D, 0x13, 0x09, 0x13, 0x09, 0x13, 0x26, 0x3D, 0x1C, 0x1F, 0x28,
1367 0x2E, 0x07, 0x10, 0x39, 0x0B, 0x39, 0x39, 0x13, 0x39, 0x0B, 0x39, 0x0B, 0x39, 0x26, 0x39, 0x10,
1368 0x20, 0x3B, 0x16, 0x20, 0x10, 0x09, 0x26, 0x0B, 0x13, 0x09, 0x13, 0x26, 0x1C, 0x0B, 0x3D, 0x1C,
1369 0x1F, 0x28, 0x2B, 0x07, 0x0C, 0x39, 0x0B, 0x39, 0x0B, 0x0C, 0x0B, 0x26, 0x0B, 0x26, 0x3D, 0x0D,
1370 0x1C, 0x14, 0x28, 0x2B, 0x39, 0x0B, 0x0C, 0x0E, 0x3D, 0x1C, 0x0D, 0x12, 0x22, 0x2B, 0x07, 0x0C,
1371 0x0E, 0x3D, 0x1C, 0x10, 0x1F, 0x2B, 0x0C, 0x0E, 0x19, 0x14, 0x10, 0x1F, 0x28, 0x0C, 0x0E, 0x19,
1372 0x14, 0x26, 0x22, 0x2B, 0x0C, 0x0E, 0x19, 0x14, 0x26, 0x28, 0x0E, 0x19, 0x14, 0x26, 0x28, 0x0E,
1373 0x19, 0x14, 0x28, 0x0E, 0x19, 0x14, 0x22, 0x28, 0x2B, 0x0E, 0x14, 0x2B, 0x31, 0x00, 0x3A, 0x3A,
1374 0x05, 0x05, 0x1B, 0x1D, 0x33, 0x06, 0x35, 0x35, 0x20, 0x21, 0x37, 0x21, 0x24, 0x05, 0x1B, 0x2C,
1375 0x2C, 0x2C, 0x06, 0x34, 0x1E, 0x34, 0x00, 0x08, 0x36, 0x09, 0x21, 0x26, 0x1C, 0x2C, 0x00, 0x02,
1376 0x02, 0x02, 0x3F, 0x04, 0x04, 0x04, 0x34, 0x39, 0x20, 0x0A, 0x0C, 0x39, 0x0B, 0x0F, 0x07, 0x07,
1377 0x07, 0x07, 0x34, 0x39, 0x39, 0x0A, 0x0C, 0x39, 0x0C, 0x0F, 0x07, 0x07, 0x07, 0x00, 0x39, 0x39,
1378 0x0C, 0x0F, 0x07, 0x07, 0x39, 0x0C, 0x0F, 0x07, 0x39, 0x0C, 0x0F, 0x39, 0x39, 0x0C, 0x0F, 0x39,
1379 0x0C, 0x39, 0x0C, 0x0F, 0x00, 0x11, 0x27, 0x17, 0x2F, 0x27, 0x00, 0x27, 0x17, 0x00, 0x11, 0x17,
1380 0x00, 0x11, 0x17, 0x11, 0x00, 0x27, 0x15, 0x11, 0x17, 0x01, 0x15, 0x11, 0x15, 0x11, 0x15, 0x15,
1381 0x17, 0x00, 0x27, 0x01, 0x27, 0x27, 0x15, 0x00, 0x27, 0x11, 0x27, 0x15, 0x15, 0x15, 0x27, 0x15,
1382 0x15, 0x15, 0x15, 0x17, 0x2F, 0x11, 0x17, 0x27, 0x27, 0x27, 0x11, 0x27, 0x15, 0x27, 0x27, 0x15,
1383 0x15, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F,
1384 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27,
1385 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x17, 0x2F, 0x2B, 0x00, 0x27, 0x00, 0x00, 0x11,
1386 0x15, 0x00, 0x11, 0x11, 0x27, 0x27, 0x15, 0x17, 0x15, 0x17, 0x15, 0x17, 0x27, 0x17, 0x27, 0x17,
1387 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17,
1388 0x27, 0x15, 0x27, 0x27, 0x15, 0x27
1389 };
1390
1391 const uint32_t ff_aac_ac_hash_m[742] = {
1392 0x00000104, 0x0000030A, 0x00000510, 0x00000716,
1393 0x00000A1F, 0x00000F2E, 0x00011100, 0x00111103,
1394 0x00111306, 0x00111436, 0x00111623, 0x00111929,
1395 0x00111F2E, 0x0011221B, 0x00112435, 0x00112621,
1396 0x00112D12, 0x00113130, 0x0011331D, 0x00113535,
1397 0x00113938, 0x0011411B, 0x00114433, 0x00114635,
1398 0x00114F29, 0x00116635, 0x00116F24, 0x00117433,
1399 0x0011FF0F, 0x00121102, 0x0012132D, 0x00121436,
1400 0x00121623, 0x00121912, 0x0012213F, 0x0012232D,
1401 0x00122436, 0x00122638, 0x00122A29, 0x00122F2B,
1402 0x0012322D, 0x00123436, 0x00123738, 0x00123B29,
1403 0x0012411D, 0x00124536, 0x00124938, 0x00124F12,
1404 0x00125535, 0x00125F29, 0x00126535, 0x0012B837,
1405 0x0013112A, 0x0013131E, 0x0013163B, 0x0013212D,
1406 0x0013233C, 0x00132623, 0x00132F2E, 0x0013321E,
1407 0x00133521, 0x00133824, 0x0013411E, 0x00134336,
1408 0x00134838, 0x00135135, 0x00135537, 0x00135F12,
1409 0x00137637, 0x0013FF29, 0x00140024, 0x00142321,
1410 0x00143136, 0x00143321, 0x00143F25, 0x00144321,
1411 0x00148638, 0x0014FF29, 0x00154323, 0x0015FF12,
1412 0x0016F20C, 0x0018A529, 0x00210031, 0x0021122C,
1413 0x00211408, 0x00211713, 0x00211F2E, 0x0021222A,
1414 0x00212408, 0x00212710, 0x00212F2E, 0x0021331E,
1415 0x00213436, 0x00213824, 0x0021412D, 0x0021431E,
1416 0x00214536, 0x00214F1F, 0x00216637, 0x00220004,
1417 0x0022122A, 0x00221420, 0x00221829, 0x00221F2E,
1418 0x0022222D, 0x00222408, 0x00222623, 0x00222929,
1419 0x00222F2B, 0x0022321E, 0x00223408, 0x00223724,
1420 0x00223A29, 0x0022411E, 0x00224436, 0x00224823,
1421 0x00225134, 0x00225621, 0x00225F12, 0x00226336,
1422 0x00227637, 0x0022FF29, 0x0023112D, 0x0023133C,
1423 0x00231420, 0x00231916, 0x0023212D, 0x0023233C,
1424 0x00232509, 0x00232929, 0x0023312D, 0x00233308,
1425 0x00233509, 0x00233724, 0x0023413C, 0x00234421,
1426 0x00234A13, 0x0023513C, 0x00235421, 0x00235F1F,
1427 0x00236421, 0x0023FF29, 0x00240024, 0x0024153B,
1428 0x00242108, 0x00242409, 0x00242726, 0x00243108,
1429 0x00243409, 0x00243610, 0x00244136, 0x00244321,
1430 0x00244523, 0x00244F1F, 0x00245423, 0x0024610A,
1431 0x00246423, 0x0024FF29, 0x00252510, 0x00253121,
1432 0x0025343B, 0x00254121, 0x00254510, 0x00254F25,
1433 0x00255221, 0x0025FF12, 0x00266513, 0x0027F529,
1434 0x0029F101, 0x002CF224, 0x00310030, 0x0031122A,
1435 0x00311420, 0x00311816, 0x0031212C, 0x0031231E,
1436 0x00312408, 0x00312710, 0x0031312A, 0x0031321E,
1437 0x00313408, 0x00313623, 0x0031411E, 0x0031433C,
1438 0x00320007, 0x0032122D, 0x00321420, 0x00321816,
1439 0x0032212D, 0x0032233C, 0x00322509, 0x00322916,
1440 0x0032312D, 0x00323420, 0x00323710, 0x00323F2B,
1441 0x00324308, 0x00324623, 0x00324F25, 0x00325421,
1442 0x00325F1F, 0x00326421, 0x0032FF29, 0x00331107,
1443 0x00331308, 0x0033150D, 0x0033211E, 0x00332308,
1444 0x00332420, 0x00332610, 0x00332929, 0x0033311E,
1445 0x00333308, 0x0033363B, 0x00333A29, 0x0033413C,
1446 0x00334320, 0x0033463B, 0x00334A29, 0x0033510A,
1447 0x00335320, 0x00335824, 0x0033610A, 0x00336321,
1448 0x00336F12, 0x00337623, 0x00341139, 0x0034153B,
1449 0x00342108, 0x00342409, 0x00342610, 0x00343108,
1450 0x00343409, 0x00343610, 0x00344108, 0x0034440D,
1451 0x00344610, 0x0034510A, 0x00345309, 0x0034553B,
1452 0x0034610A, 0x00346309, 0x0034F824, 0x00350029,
1453 0x00352510, 0x00353120, 0x0035330D, 0x00353510,
1454 0x00354120, 0x0035430D, 0x00354510, 0x00354F28,
1455 0x0035530D, 0x00355510, 0x00355F1F, 0x00356410,
1456 0x00359626, 0x0035FF12, 0x00366426, 0x0036FF12,
1457 0x0037F426, 0x0039D712, 0x003BF612, 0x003DF81F,
1458 0x00410004, 0x00411207, 0x0041150D, 0x0041212A,
1459 0x00412420, 0x0041311E, 0x00413308, 0x00413509,
1460 0x00413F2B, 0x00414208, 0x00420007, 0x0042123C,
1461 0x00421409, 0x00422107, 0x0042223C, 0x00422409,
1462 0x00422610, 0x0042313C, 0x00423409, 0x0042363B,
1463 0x0042413C, 0x00424320, 0x0042463B, 0x00425108,
1464 0x00425409, 0x0042FF29, 0x00431107, 0x00431320,
1465 0x0043153B, 0x0043213C, 0x00432320, 0x00432610,
1466 0x0043313C, 0x00433320, 0x0043353B, 0x00433813,
1467 0x00434108, 0x00434409, 0x00434610, 0x00435108,
1468 0x0043553B, 0x00435F25, 0x00436309, 0x0043753B,
1469 0x0043FF29, 0x00441239, 0x0044143B, 0x00442139,
1470 0x00442309, 0x0044253B, 0x00443108, 0x00443220,
1471 0x0044353B, 0x0044410A, 0x00444309, 0x0044453B,
1472 0x00444813, 0x0044510A, 0x00445309, 0x00445510,
1473 0x00445F25, 0x0044630D, 0x00450026, 0x00452713,
1474 0x00453120, 0x0045330D, 0x00453510, 0x00454120,
1475 0x0045430D, 0x00454510, 0x00455120, 0x0045530D,
1476 0x00456209, 0x00456410, 0x0045FF12, 0x00466513,
1477 0x0047FF22, 0x0048FF25, 0x0049F43D, 0x004BFB25,
1478 0x004EF825, 0x004FFF18, 0x00511339, 0x00512107,
1479 0x00513409, 0x00520007, 0x00521107, 0x00521320,
1480 0x00522107, 0x00522409, 0x0052313C, 0x00523320,
1481 0x0052353B, 0x00524108, 0x00524320, 0x00531139,
1482 0x00531309, 0x00532139, 0x00532309, 0x0053253B,
1483 0x00533108, 0x0053340D, 0x00533713, 0x00534108,
1484 0x0053453B, 0x00534F2B, 0x00535309, 0x00535610,
1485 0x00535F25, 0x0053643B, 0x00541139, 0x00542139,
1486 0x00542309, 0x00542613, 0x00543139, 0x00543309,
1487 0x00543510, 0x00543F2B, 0x00544309, 0x00544510,
1488 0x00544F28, 0x0054530D, 0x0054FF12, 0x00553613,
1489 0x00553F2B, 0x00554410, 0x0055510A, 0x0055543B,
1490 0x00555F25, 0x0055633B, 0x0055FF12, 0x00566513,
1491 0x00577413, 0x0059FF28, 0x005CC33D, 0x005EFB28,
1492 0x005FFF18, 0x00611339, 0x00612107, 0x00613320,
1493 0x0061A724, 0x00621107, 0x0062140B, 0x00622107,
1494 0x00622320, 0x00623139, 0x00623320, 0x00631139,
1495 0x0063130C, 0x00632139, 0x00632309, 0x00633139,
1496 0x00633309, 0x00633626, 0x00633F2B, 0x00634309,
1497 0x00634F2B, 0x0063543B, 0x0063FF12, 0x0064343B,
1498 0x00643F2B, 0x0064443B, 0x00645209, 0x00665513,
1499 0x0066610A, 0x00666526, 0x0067A616, 0x0069843D,
1500 0x006CF612, 0x006EF326, 0x006FFF18, 0x0071130C,
1501 0x00721107, 0x00722239, 0x0072291C, 0x0072340B,
1502 0x00731139, 0x00732239, 0x0073630B, 0x0073FF12,
1503 0x0074430B, 0x00755426, 0x00776F28, 0x00777410,
1504 0x0078843D, 0x007CF416, 0x007EF326, 0x007FFF18,
1505 0x00822239, 0x00831139, 0x0083430B, 0x0084530B,
1506 0x0087561C, 0x00887F25, 0x00888426, 0x008AF61C,
1507 0x008F0018, 0x008FFF18, 0x00911107, 0x0093230B,
1508 0x0094530B, 0x0097743D, 0x00998C25, 0x00999616,
1509 0x009EF825, 0x009FFF18, 0x00A3430B, 0x00A4530B,
1510 0x00A7743D, 0x00AA9F2B, 0x00AAA616, 0x00ABD61F,
1511 0x00AFFF18, 0x00B3330B, 0x00B44426, 0x00B7643D,
1512 0x00BB971F, 0x00BBB53D, 0x00BEF512, 0x00BFFF18,
1513 0x00C22139, 0x00C5330E, 0x00C7633D, 0x00CCAF2E,
1514 0x00CCC616, 0x00CFFF18, 0x00D4440E, 0x00D6420E,
1515 0x00DDCF2E, 0x00DDD516, 0x00DFFF18, 0x00E4330E,
1516 0x00E6841C, 0x00EEE61C, 0x00EFFF18, 0x00F3320E,
1517 0x00F55319, 0x00F8F41C, 0x00FAFF2E, 0x00FF002E,
1518 0x00FFF10C, 0x00FFF33D, 0x00FFF722, 0x00FFFF18,
1519 0x01000232, 0x0111113E, 0x01112103, 0x0111311A,
1520 0x0112111A, 0x01122130, 0x01123130, 0x0112411D,
1521 0x01131102, 0x01132102, 0x01133102, 0x01141108,
1522 0x01142136, 0x01143136, 0x01144135, 0x0115223B,
1523 0x01211103, 0x0121211A, 0x01213130, 0x01221130,
1524 0x01222130, 0x01223102, 0x01231104, 0x01232104,
1525 0x01233104, 0x01241139, 0x01241220, 0x01242220,
1526 0x01251109, 0x0125223B, 0x0125810A, 0x01283212,
1527 0x0131111A, 0x01312130, 0x0131222C, 0x0131322A,
1528 0x0132122A, 0x0132222D, 0x0132322D, 0x01331207,
1529 0x01332234, 0x01333234, 0x01341139, 0x01343134,
1530 0x01344134, 0x01348134, 0x0135220B, 0x0136110B,
1531 0x01365224, 0x01411102, 0x01412104, 0x01431239,
1532 0x01432239, 0x0143320A, 0x01435134, 0x01443107,
1533 0x01444134, 0x01446134, 0x0145220E, 0x01455134,
1534 0x0147110E, 0x01511102, 0x01521239, 0x01531239,
1535 0x01532239, 0x01533107, 0x0155220E, 0x01555134,
1536 0x0157110E, 0x01611107, 0x01621239, 0x01631239,
1537 0x01661139, 0x01666134, 0x01711107, 0x01721239,
1538 0x01745107, 0x0177110C, 0x01811107, 0x01821107,
1539 0x0185110C, 0x0188210C, 0x01911107, 0x01933139,
1540 0x01A11107, 0x01A31139, 0x01F5220E, 0x02000001,
1541 0x02000127, 0x02000427, 0x02000727, 0x02000E2F,
1542 0x02110000, 0x02111200, 0x02111411, 0x02111827,
1543 0x02111F2F, 0x02112411, 0x02112715, 0x02113200,
1544 0x02113411, 0x02113715, 0x02114200, 0x02121200,
1545 0x02121301, 0x02121F2F, 0x02122200, 0x02122615,
1546 0x02122F2F, 0x02123311, 0x02123F2F, 0x02124411,
1547 0x02131211, 0x02132311, 0x02133211, 0x02184415,
1548 0x02211200, 0x02211311, 0x02211F2F, 0x02212311,
1549 0x02212F2F, 0x02213211, 0x02221201, 0x02221311,
1550 0x02221F2F, 0x02222311, 0x02222F2F, 0x02223211,
1551 0x02223F2F, 0x02231211, 0x02232211, 0x02232F2F,
1552 0x02233211, 0x02233F2F, 0x02287515, 0x022DAB17,
1553 0x02311211, 0x02311527, 0x02312211, 0x02321211,
1554 0x02322211, 0x02322F2F, 0x02323311, 0x02323F2F,
1555 0x02331211, 0x02332211, 0x02332F2F, 0x02333F2F,
1556 0x0237FF17, 0x02385615, 0x023D9517, 0x02410027,
1557 0x02487827, 0x024E3117, 0x024FFF2F, 0x02598627,
1558 0x025DFF2F, 0x025FFF2F, 0x02687827, 0x026DFA17,
1559 0x026FFF2F, 0x02796427, 0x027E4217, 0x027FFF2F,
1560 0x02888727, 0x028EFF2F, 0x028FFF2F, 0x02984327,
1561 0x029F112F, 0x029FFF2F, 0x02A76527, 0x02AEF717,
1562 0x02AFFF2F, 0x02B7C827, 0x02BEF917, 0x02BFFF2F,
1563 0x02C66527, 0x02CD5517, 0x02CFFF2F, 0x02D63227,
1564 0x02DDD527, 0x02DFFF2B, 0x02E84717, 0x02EEE327,
1565 0x02EFFF2F, 0x02F54527, 0x02FCF817, 0x02FFEF2B,
1566 0x02FFFA2F, 0x02FFFE2F, 0x03000127, 0x03000201,
1567 0x03111200, 0x03122115, 0x03123200, 0x03133211,
1568 0x03211200, 0x03213127, 0x03221200, 0x03345215,
1569 0x04000F17, 0x04122F17, 0x043F6515, 0x043FFF17,
1570 0x044F5527, 0x044FFF17, 0x045F0017, 0x045FFF17,
1571 0x046F6517, 0x04710027, 0x047F4427, 0x04810027,
1572 0x048EFA15, 0x048FFF2F, 0x049F4427, 0x049FFF2F,
1573 0x04AEA727, 0x04AFFF2F, 0x04BE9C15, 0x04BFFF2F,
1574 0x04CE5427, 0x04CFFF2F, 0x04DE3527, 0x04DFFF17,
1575 0x04EE4627, 0x04EFFF17, 0x04FEF327, 0x04FFFF2F,
1576 0x06000F27, 0x069FFF17, 0x06FFFF17, 0x08110017,
1577 0x08EFFF15, 0xFFFFFF00
1578 };
1579
1580 /* @name swb_offsets
1581 * Sample offset into the window indicating the beginning of a scalefactor
1582 * window band
1583 *
1584 * scalefactor window band - term for scalefactor bands within a window,
1585 * given in Table 4.110 to Table 4.128.
1586 *
1587 * scalefactor band - a set of spectral coefficients which are scaled by one
1588 * scalefactor. In case of EIGHT_SHORT_SEQUENCE and grouping a scalefactor band
1589 * may contain several scalefactor window bands of corresponding frequency. For
1590 * all other window_sequences scalefactor bands and scalefactor window bands are
1591 * identical.
1592 * @{
1593 */
1594
1595 static const uint16_t swb_offset_1024_96[] = {
1596 0, 4, 8, 12, 16, 20, 24, 28,
1597 32, 36, 40, 44, 48, 52, 56, 64,
1598 72, 80, 88, 96, 108, 120, 132, 144,
1599 156, 172, 188, 212, 240, 276, 320, 384,
1600 448, 512, 576, 640, 704, 768, 832, 896,
1601 960, 1024
1602 };
1603
1604 static const uint16_t swb_offset_128_96[] = {
1605 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128
1606 };
1607
1608 static const uint16_t swb_offset_1024_64[] = {
1609 0, 4, 8, 12, 16, 20, 24, 28,
1610 32, 36, 40, 44, 48, 52, 56, 64,
1611 72, 80, 88, 100, 112, 124, 140, 156,
1612 172, 192, 216, 240, 268, 304, 344, 384,
1613 424, 464, 504, 544, 584, 624, 664, 704,
1614 744, 784, 824, 864, 904, 944, 984, 1024
1615 };
1616
1617 static const uint16_t swb_offset_1024_48[] = {
1618 0, 4, 8, 12, 16, 20, 24, 28,
1619 32, 36, 40, 48, 56, 64, 72, 80,
1620 88, 96, 108, 120, 132, 144, 160, 176,
1621 196, 216, 240, 264, 292, 320, 352, 384,
1622 416, 448, 480, 512, 544, 576, 608, 640,
1623 672, 704, 736, 768, 800, 832, 864, 896,
1624 928, 1024
1625 };
1626
1627 static const uint16_t swb_offset_512_48[] = {
1628 0, 4, 8, 12, 16, 20, 24, 28,
1629 32, 36, 40, 44, 48, 52, 56, 60,
1630 68, 76, 84, 92, 100, 112, 124, 136,
1631 148, 164, 184, 208, 236, 268, 300, 332,
1632 364, 396, 428, 460, 512
1633 };
1634
1635 static const uint16_t swb_offset_480_48[] = {
1636 0, 4, 8, 12, 16, 20, 24, 28,
1637 32, 36, 40, 44, 48, 52, 56, 64,
1638 72, 80, 88, 96, 108, 120, 132, 144,