FFmpeg
aacdec_common.c
Go to the documentation of this file.
1 /*
2  * Common code and tables of the AAC fixed- and floating-point decoders
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  * Common code and tables of the AAC fixed- and floating-point decoders
26  */
27 
28 #include "aac.h"
29 #include "aacdectab.h"
30 #include "aacps.h"
31 #include "aactab.h"
32 #include "vlc.h"
33 
34 #include "libavutil/attributes.h"
35 #include "libavutil/thread.h"
36 
37 const int8_t ff_tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 5, 5, 16, 5, 0 };
38 
39 const uint8_t ff_aac_channel_layout_map[16][16][3] = {
40  { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, },
41  { { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, },
47  { { 0, } },
48  { { 0, } },
49  { { 0, } },
52  {
53  { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, // SCE1 = FC,
54  { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, // CPE1 = FLc and FRc,
55  { TYPE_CPE, 1, AAC_CHANNEL_FRONT }, // CPE2 = FL and FR,
56  { TYPE_CPE, 2, AAC_CHANNEL_BACK }, // CPE3 = SiL and SiR,
57  { TYPE_CPE, 3, AAC_CHANNEL_BACK }, // CPE4 = BL and BR,
58  { TYPE_SCE, 1, AAC_CHANNEL_BACK }, // SCE2 = BC,
59  { TYPE_LFE, 0, AAC_CHANNEL_LFE }, // LFE1 = LFE1,
60  { TYPE_LFE, 1, AAC_CHANNEL_LFE }, // LFE2 = LFE2,
61  { TYPE_SCE, 2, AAC_CHANNEL_FRONT }, // SCE3 = TpFC,
62  { TYPE_CPE, 4, AAC_CHANNEL_FRONT }, // CPE5 = TpFL and TpFR,
63  { TYPE_CPE, 5, AAC_CHANNEL_SIDE }, // CPE6 = TpSiL and TpSiR,
64  { TYPE_SCE, 3, AAC_CHANNEL_SIDE }, // SCE4 = TpC,
65  { TYPE_CPE, 6, AAC_CHANNEL_BACK }, // CPE7 = TpBL and TpBR,
66  { TYPE_SCE, 4, AAC_CHANNEL_BACK }, // SCE5 = TpBC,
67  { TYPE_SCE, 5, AAC_CHANNEL_FRONT }, // SCE6 = BtFC,
68  { TYPE_CPE, 7, AAC_CHANNEL_FRONT }, // CPE8 = BtFL and BtFR
69  },
71  { { 0, } },
72 };
73 
74 const int16_t ff_aac_channel_map[3][4][6] = {
75  {
80  },
81  {
86  },
87  {
92  },
93 };
94 
95 #if FF_API_OLD_CHANNEL_LAYOUT
96 const uint64_t ff_aac_channel_layout[] = {
108  0,
109 };
110 #endif
111 
124  { 0 },
125 };
126 
129 
130 /// Huffman tables for SBR
131 
132 static const uint8_t sbr_huffman_tab[][2] = {
133  /* t_huffman_env_1_5dB - 121 entries */
134  { 60, 2 }, { 59, 2 }, { 61, 3 }, { 58, 3 }, { 62, 4 },
135  { 57, 4 }, { 63, 5 }, { 56, 5 }, { 64, 6 }, { 55, 6 },
136  { 65, 7 }, { 54, 7 }, { 66, 8 }, { 53, 8 }, { 67, 9 },
137  { 52, 9 }, { 51, 10 }, { 68, 10 }, { 50, 11 }, { 69, 12 },
138  { 49, 12 }, { 70, 13 }, { 48, 13 }, { 47, 13 }, { 71, 14 },
139  { 46, 14 }, { 72, 14 }, { 45, 14 }, { 44, 15 }, { 73, 15 },
140  { 41, 16 }, { 42, 16 }, { 43, 16 }, { 74, 16 }, { 36, 16 },
141  { 40, 16 }, { 76, 16 }, { 34, 17 }, { 39, 17 }, { 75, 17 },
142  { 37, 17 }, { 35, 18 }, { 38, 18 }, { 0, 18 }, { 1, 18 },
143  { 2, 18 }, { 3, 18 }, { 4, 18 }, { 5, 18 }, { 6, 19 },
144  { 7, 19 }, { 8, 19 }, { 9, 19 }, { 10, 19 }, { 11, 19 },
145  { 12, 19 }, { 13, 19 }, { 14, 19 }, { 15, 19 }, { 16, 19 },
146  { 17, 19 }, { 18, 19 }, { 19, 19 }, { 20, 19 }, { 21, 19 },
147  { 22, 19 }, { 23, 19 }, { 24, 19 }, { 25, 19 }, { 26, 19 },
148  { 27, 19 }, { 28, 19 }, { 29, 19 }, { 30, 19 }, { 31, 19 },
149  { 32, 19 }, { 33, 19 }, { 77, 19 }, { 78, 19 }, { 79, 19 },
150  { 80, 19 }, { 81, 19 }, { 82, 19 }, { 83, 19 }, { 84, 19 },
151  { 85, 19 }, { 86, 19 }, { 87, 19 }, { 88, 19 }, { 89, 19 },
152  { 90, 19 }, { 91, 19 }, { 92, 19 }, { 93, 19 }, { 94, 19 },
153  { 95, 19 }, { 96, 19 }, { 97, 19 }, { 98, 19 }, { 99, 19 },
154  { 100, 19 }, { 101, 19 }, { 102, 19 }, { 103, 19 }, { 104, 19 },
155  { 105, 19 }, { 106, 19 }, { 107, 19 }, { 108, 19 }, { 109, 19 },
156  { 110, 19 }, { 111, 19 }, { 112, 19 }, { 113, 19 }, { 114, 19 },
157  { 115, 19 }, { 116, 19 }, { 117, 19 }, { 118, 19 }, { 119, 19 },
158  { 120, 19 },
159  /* f_huffman_env_1_5dB - 121 entries */
160  { 60, 2 }, { 59, 2 }, { 61, 3 }, { 58, 3 }, { 57, 4 },
161  { 62, 4 }, { 56, 5 }, { 63, 5 }, { 55, 6 }, { 64, 6 },
162  { 54, 7 }, { 65, 8 }, { 53, 8 }, { 66, 8 }, { 52, 9 },
163  { 67, 9 }, { 51, 9 }, { 68, 10 }, { 50, 10 }, { 69, 11 },
164  { 49, 11 }, { 70, 11 }, { 71, 11 }, { 48, 12 }, { 72, 12 },
165  { 47, 12 }, { 73, 12 }, { 74, 13 }, { 46, 13 }, { 45, 13 },
166  { 75, 13 }, { 76, 14 }, { 77, 14 }, { 44, 14 }, { 43, 15 },
167  { 42, 15 }, { 41, 16 }, { 78, 16 }, { 79, 16 }, { 40, 16 },
168  { 39, 16 }, { 80, 17 }, { 81, 17 }, { 36, 17 }, { 37, 17 },
169  { 38, 17 }, { 34, 17 }, { 32, 18 }, { 82, 18 }, { 83, 18 },
170  { 85, 18 }, { 19, 18 }, { 35, 18 }, { 86, 18 }, { 87, 18 },
171  { 30, 18 }, { 33, 18 }, { 84, 18 }, { 88, 18 }, { 104, 18 },
172  { 9, 19 }, { 14, 19 }, { 16, 19 }, { 17, 19 }, { 23, 19 },
173  { 27, 19 }, { 29, 19 }, { 31, 19 }, { 90, 19 }, { 97, 19 },
174  { 102, 19 }, { 107, 19 }, { 108, 19 }, { 0, 19 }, { 1, 19 },
175  { 2, 20 }, { 3, 20 }, { 4, 20 }, { 5, 20 }, { 6, 20 },
176  { 7, 20 }, { 8, 20 }, { 10, 20 }, { 11, 20 }, { 12, 20 },
177  { 13, 20 }, { 15, 20 }, { 18, 20 }, { 20, 20 }, { 21, 20 },
178  { 22, 20 }, { 24, 20 }, { 25, 20 }, { 26, 20 }, { 28, 20 },
179  { 89, 20 }, { 91, 20 }, { 92, 20 }, { 93, 20 }, { 94, 20 },
180  { 95, 20 }, { 96, 20 }, { 98, 20 }, { 99, 20 }, { 100, 20 },
181  { 101, 20 }, { 103, 20 }, { 105, 20 }, { 106, 20 }, { 109, 20 },
182  { 110, 20 }, { 111, 20 }, { 112, 20 }, { 113, 20 }, { 114, 20 },
183  { 115, 20 }, { 116, 20 }, { 117, 20 }, { 118, 20 }, { 119, 20 },
184  { 120, 20 },
185  /* t_huffman_env_bal_1_5dB - 49 entries */
186  { 24, 1 }, { 25, 2 }, { 23, 3 }, { 26, 4 }, { 22, 5 },
187  { 27, 6 }, { 21, 7 }, { 28, 8 }, { 20, 9 }, { 19, 11 },
188  { 29, 11 }, { 18, 12 }, { 30, 12 }, { 31, 15 }, { 17, 16 },
189  { 32, 16 }, { 0, 16 }, { 1, 16 }, { 2, 16 }, { 3, 16 },
190  { 4, 16 }, { 5, 16 }, { 6, 16 }, { 7, 16 }, { 8, 16 },
191  { 9, 16 }, { 10, 16 }, { 11, 16 }, { 12, 16 }, { 13, 16 },
192  { 14, 16 }, { 15, 16 }, { 16, 16 }, { 33, 16 }, { 34, 16 },
193  { 35, 16 }, { 36, 16 }, { 37, 16 }, { 38, 16 }, { 39, 17 },
194  { 40, 17 }, { 41, 17 }, { 42, 17 }, { 43, 17 }, { 44, 17 },
195  { 45, 17 }, { 46, 17 }, { 47, 17 }, { 48, 17 },
196  /* f_huffman_env_bal_1_5dB - 49 entries */
197  { 24, 1 }, { 23, 2 }, { 25, 3 }, { 22, 4 }, { 26, 5 },
198  { 27, 6 }, { 21, 7 }, { 20, 8 }, { 28, 9 }, { 19, 11 },
199  { 29, 11 }, { 18, 11 }, { 30, 12 }, { 17, 14 }, { 31, 15 },
200  { 32, 16 }, { 15, 16 }, { 16, 17 }, { 0, 18 }, { 1, 18 },
201  { 2, 18 }, { 3, 18 }, { 4, 18 }, { 5, 18 }, { 6, 18 },
202  { 7, 18 }, { 8, 18 }, { 9, 18 }, { 10, 18 }, { 11, 18 },
203  { 12, 18 }, { 13, 18 }, { 14, 18 }, { 33, 18 }, { 34, 18 },
204  { 35, 18 }, { 36, 18 }, { 37, 18 }, { 38, 18 }, { 39, 18 },
205  { 40, 18 }, { 41, 18 }, { 42, 18 }, { 43, 18 }, { 44, 18 },
206  { 45, 18 }, { 46, 18 }, { 47, 19 }, { 48, 19 },
207  /* t_huffman_env_3_0dB - 63 entries */
208  { 31, 1 }, { 30, 2 }, { 32, 3 }, { 29, 4 }, { 33, 5 },
209  { 28, 6 }, { 34, 7 }, { 27, 8 }, { 35, 9 }, { 26, 11 },
210  { 36, 11 }, { 25, 12 }, { 24, 13 }, { 37, 13 }, { 23, 14 },
211  { 38, 14 }, { 22, 14 }, { 21, 14 }, { 39, 14 }, { 40, 15 },
212  { 41, 16 }, { 18, 16 }, { 20, 16 }, { 19, 16 }, { 17, 17 },
213  { 42, 17 }, { 43, 18 }, { 0, 18 }, { 1, 18 }, { 2, 19 },
214  { 3, 19 }, { 4, 19 }, { 5, 19 }, { 6, 19 }, { 7, 19 },
215  { 8, 19 }, { 9, 19 }, { 10, 19 }, { 11, 19 }, { 12, 19 },
216  { 13, 19 }, { 14, 19 }, { 15, 19 }, { 16, 19 }, { 44, 19 },
217  { 45, 19 }, { 46, 19 }, { 47, 19 }, { 48, 19 }, { 49, 19 },
218  { 50, 19 }, { 51, 19 }, { 52, 19 }, { 53, 19 }, { 54, 19 },
219  { 55, 19 }, { 56, 19 }, { 57, 19 }, { 58, 19 }, { 59, 19 },
220  { 60, 19 }, { 61, 19 }, { 62, 19 },
221  /* f_huffman_env_3_0dB - 63 entries */
222  { 31, 1 }, { 30, 2 }, { 32, 3 }, { 29, 4 }, { 33, 5 },
223  { 28, 6 }, { 34, 8 }, { 27, 8 }, { 35, 9 }, { 26, 9 },
224  { 36, 10 }, { 25, 10 }, { 37, 11 }, { 24, 11 }, { 38, 12 },
225  { 23, 12 }, { 39, 13 }, { 40, 14 }, { 22, 14 }, { 21, 15 },
226  { 41, 15 }, { 42, 15 }, { 20, 16 }, { 19, 16 }, { 43, 16 },
227  { 44, 16 }, { 18, 17 }, { 16, 17 }, { 45, 17 }, { 46, 17 },
228  { 17, 18 }, { 49, 18 }, { 13, 18 }, { 7, 18 }, { 12, 18 },
229  { 47, 18 }, { 48, 18 }, { 9, 19 }, { 10, 19 }, { 15, 19 },
230  { 51, 19 }, { 52, 19 }, { 53, 19 }, { 56, 19 }, { 8, 19 },
231  { 11, 19 }, { 55, 19 }, { 0, 20 }, { 1, 20 }, { 2, 20 },
232  { 3, 20 }, { 4, 20 }, { 5, 20 }, { 6, 20 }, { 14, 20 },
233  { 50, 20 }, { 54, 20 }, { 57, 20 }, { 58, 20 }, { 59, 20 },
234  { 60, 20 }, { 61, 20 }, { 62, 20 },
235  /* t_huffman_env_bal_3_0dB - 25 entries */
236  { 12, 1 }, { 13, 2 }, { 11, 3 }, { 10, 4 }, { 14, 5 },
237  { 15, 6 }, { 9, 7 }, { 8, 8 }, { 16, 9 }, { 7, 12 },
238  { 0, 13 }, { 1, 13 }, { 2, 13 }, { 3, 13 }, { 4, 13 },
239  { 5, 13 }, { 6, 13 }, { 17, 13 }, { 18, 13 }, { 19, 13 },
240  { 20, 13 }, { 21, 13 }, { 22, 13 }, { 23, 14 }, { 24, 14 },
241  /* f_huffman_env_bal_3_0dB - 25 entries */
242  { 12, 1 }, { 11, 2 }, { 13, 3 }, { 10, 4 }, { 14, 5 },
243  { 15, 6 }, { 9, 7 }, { 8, 8 }, { 16, 9 }, { 7, 11 },
244  { 17, 12 }, { 18, 13 }, { 0, 13 }, { 1, 13 }, { 2, 13 },
245  { 3, 13 }, { 4, 13 }, { 5, 14 }, { 6, 14 }, { 19, 14 },
246  { 20, 14 }, { 21, 14 }, { 22, 14 }, { 23, 14 }, { 24, 14 },
247  /* t_huffman_noise_3_0dB - 63 entries */
248  { 31, 1 }, { 32, 2 }, { 30, 3 }, { 29, 4 }, { 33, 5 },
249  { 28, 6 }, { 34, 8 }, { 27, 8 }, { 35, 10 }, { 26, 11 },
250  { 36, 13 }, { 42, 13 }, { 0, 13 }, { 1, 13 }, { 2, 13 },
251  { 3, 13 }, { 4, 13 }, { 5, 13 }, { 6, 13 }, { 7, 13 },
252  { 8, 13 }, { 9, 13 }, { 10, 13 }, { 11, 13 }, { 12, 13 },
253  { 13, 13 }, { 14, 13 }, { 15, 13 }, { 16, 13 }, { 17, 13 },
254  { 18, 13 }, { 19, 13 }, { 20, 13 }, { 21, 13 }, { 22, 13 },
255  { 23, 13 }, { 24, 13 }, { 25, 13 }, { 37, 13 }, { 38, 13 },
256  { 39, 13 }, { 40, 13 }, { 41, 13 }, { 43, 13 }, { 44, 13 },
257  { 45, 13 }, { 46, 13 }, { 47, 13 }, { 48, 13 }, { 49, 13 },
258  { 50, 13 }, { 51, 13 }, { 52, 13 }, { 53, 13 }, { 54, 13 },
259  { 55, 13 }, { 56, 13 }, { 57, 13 }, { 58, 13 }, { 59, 13 },
260  { 60, 13 }, { 61, 14 }, { 62, 14 },
261  /* t_huffman_noise_bal_3_0dB - 25 entries */
262  { 12, 1 }, { 11, 2 }, { 13, 3 }, { 10, 5 }, { 14, 6 },
263  { 0, 8 }, { 1, 8 }, { 2, 8 }, { 3, 8 }, { 4, 8 },
264  { 5, 8 }, { 6, 8 }, { 7, 8 }, { 8, 8 }, { 9, 8 },
265  { 15, 8 }, { 16, 8 }, { 17, 8 }, { 18, 8 }, { 19, 8 },
266  { 20, 8 }, { 21, 8 }, { 22, 8 }, { 23, 8 }, { 24, 8 },
267 };
268 
269 static const uint8_t sbr_huffman_nb_codes[] = {
270  121, 121, 49, 49, 63, 63, 25, 25, 63, 25
271 };
272 
273 static const int8_t sbr_vlc_offsets[10] = {
274  -60, -60, -24, -24, -31, -31, -12, -12, -31, -12
275 };
276 
278 
279 static av_cold void aacdec_common_init(void)
280 {
281  static VLCElem vlc_buf[(304 + 270 + 550 + 300 + 328 +
282  294 + 306 + 268 + 510 + 366 + 462) +
283  (1098 + 1092 + 768 + 1026 + 1058 +
284  1052 + 544 + 544 + 592 + 512)];
285  VLCInitState state = VLC_INIT_STATE(vlc_buf);
286  const uint8_t (*tab)[2] = sbr_huffman_tab;
287 
288  for (unsigned i = 0; i < 11; i++) {
289 #define TAB_WRAP_SIZE(name) name[i], sizeof(name[i][0]), sizeof(name[i][0])
290  ff_vlc_spectral[i] =
295  0);
296  }
297 
301  sizeof(ff_aac_scalefactor_bits[0]),
302  sizeof(ff_aac_scalefactor_bits[0]),
304  sizeof(ff_aac_scalefactor_code[0]),
305  sizeof(ff_aac_scalefactor_code[0]), 0);
306 
307  // SBR VLC table initialization
308  for (int i = 0; i < FF_ARRAY_ELEMS(ff_aac_sbr_vlc); i++) {
309  ff_aac_sbr_vlc[i] =
311  &tab[0][1], 2,
312  &tab[0][0], 2, 1,
313  sbr_vlc_offsets[i], 0);
315  }
316 
318 }
319 
321 {
322  static AVOnce init_static_once = AV_ONCE_INIT;
323  ff_thread_once(&init_static_once, aacdec_common_init);
324 }
AAC_CHANNEL_BACK
@ AAC_CHANNEL_BACK
Definition: aac.h:97
AV_CH_LAYOUT_7POINT1_WIDE_BACK
#define AV_CH_LAYOUT_7POINT1_WIDE_BACK
Definition: channel_layout.h:239
AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_5POINT0_BACK
Definition: channel_layout.h:226
sbr_huffman_nb_codes
static const uint8_t sbr_huffman_nb_codes[]
Definition: aacdec_common.c:269
AV_CHANNEL_LAYOUT_STEREO
#define AV_CHANNEL_LAYOUT_STEREO
Definition: channel_layout.h:389
ff_aac_spectral_sizes
const uint16_t ff_aac_spectral_sizes[11]
Definition: aactab.c:492
thread.h
AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_MONO
Definition: channel_layout.h:214
ff_aac_codebook_vector_idx
const uint16_t *const ff_aac_codebook_vector_idx[]
Definition: aactab.c:1148
aacdectab.h
aacdec_common_init
static av_cold void aacdec_common_init(void)
Definition: aacdec_common.c:279
ff_vlc_spectral
const VLCElem * ff_vlc_spectral[11]
Definition: aacdec_common.c:128
aacps.h
AV_CHAN_TOP_BACK_RIGHT
@ AV_CHAN_TOP_BACK_RIGHT
Definition: channel_layout.h:67
state
static struct @377 state
TYPE_CPE
@ TYPE_CPE
Definition: aac.h:56
tab
static const struct twinvq_data tab
Definition: twinvq_data.h:10345
AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK
#define AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK
Definition: channel_layout.h:426
TAB_WRAP_SIZE
#define TAB_WRAP_SIZE(name)
AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_STEREO
Definition: channel_layout.h:215
AV_CHANNEL_LAYOUT_SURROUND
#define AV_CHANNEL_LAYOUT_SURROUND
Definition: channel_layout.h:392
ff_thread_once
static int ff_thread_once(char *control, void(*routine)(void))
Definition: thread.h:205
AV_CHAN_BOTTOM_FRONT_LEFT
@ AV_CHAN_BOTTOM_FRONT_LEFT
Definition: channel_layout.h:80
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
av_cold
#define av_cold
Definition: attributes.h:90
AV_CH_LAYOUT_22POINT2
#define AV_CH_LAYOUT_22POINT2
Definition: channel_layout.h:250
VLCInitState
For static VLCs, the number of bits can often be hardcoded at each get_vlc2() callsite.
Definition: vlc.h:209
AV_CHANNEL_LAYOUT_4POINT0
#define AV_CHANNEL_LAYOUT_4POINT0
Definition: channel_layout.h:394
AV_CHANNEL_LAYOUT_7POINT1
#define AV_CHANNEL_LAYOUT_7POINT1
Definition: channel_layout.h:411
ff_ps_init_common
void ff_ps_init_common(void)
Definition: aacps_common.c:280
AV_CHANNEL_LAYOUT_5POINT0_BACK
#define AV_CHANNEL_LAYOUT_5POINT0_BACK
Definition: channel_layout.h:400
AV_CHAN_SIDE_RIGHT
@ AV_CHAN_SIDE_RIGHT
Definition: channel_layout.h:60
ff_aac_ch_layout
const AVChannelLayout ff_aac_ch_layout[]
Definition: aacdec_common.c:112
AV_CHAN_TOP_SIDE_LEFT
@ AV_CHAN_TOP_SIDE_LEFT
Definition: channel_layout.h:77
AV_CHAN_TOP_SIDE_RIGHT
@ AV_CHAN_TOP_SIDE_RIGHT
Definition: channel_layout.h:78
AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK
Definition: channel_layout.h:413
AV_ONCE_INIT
#define AV_ONCE_INIT
Definition: thread.h:203
ff_tags_per_config
const int8_t ff_tags_per_config[16]
Definition: aacdec_common.c:37
AAC_CHANNEL_SIDE
@ AAC_CHANNEL_SIDE
Definition: aac.h:96
AV_CHAN_TOP_BACK_CENTER
@ AV_CHAN_TOP_BACK_CENTER
Definition: channel_layout.h:66
aac.h
aactab.h
AV_CHAN_BOTTOM_FRONT_RIGHT
@ AV_CHAN_BOTTOM_FRONT_RIGHT
Definition: channel_layout.h:81
AV_CHAN_TOP_CENTER
@ AV_CHAN_TOP_CENTER
Definition: channel_layout.h:61
AAC_CHANNEL_FRONT
@ AAC_CHANNEL_FRONT
Definition: aac.h:95
AVOnce
#define AVOnce
Definition: thread.h:202
AV_CHAN_FRONT_RIGHT_OF_CENTER
@ AV_CHAN_FRONT_RIGHT_OF_CENTER
Definition: channel_layout.h:57
AV_CHANNEL_LAYOUT_22POINT2
#define AV_CHANNEL_LAYOUT_22POINT2
Definition: channel_layout.h:424
AV_CHAN_FRONT_RIGHT
@ AV_CHAN_FRONT_RIGHT
Definition: channel_layout.h:51
AV_CHAN_FRONT_CENTER
@ AV_CHAN_FRONT_CENTER
Definition: channel_layout.h:52
ff_aac_scalefactor_bits
const uint8_t ff_aac_scalefactor_bits[121]
Definition: aactab.c:157
AVChannelLayout
An AVChannelLayout holds information about the channel layout of audio data.
Definition: channel_layout.h:313
ff_aac_channel_map
const int16_t ff_aac_channel_map[3][4][6]
Definition: aacdec_common.c:74
AV_CHAN_LOW_FREQUENCY
@ AV_CHAN_LOW_FREQUENCY
Definition: channel_layout.h:53
VLCElem
Definition: vlc.h:32
AV_CHAN_BACK_RIGHT
@ AV_CHAN_BACK_RIGHT
Definition: channel_layout.h:55
ff_aac_spectral_codes
const uint16_t *const ff_aac_spectral_codes[11]
Definition: aactab.c:482
AV_CHAN_SIDE_LEFT
@ AV_CHAN_SIDE_LEFT
Definition: channel_layout.h:59
ff_vlc_scalefactors
VLCElem ff_vlc_scalefactors[352]
Definition: aacdec_common.c:127
AV_CH_LAYOUT_5POINT1_BACK
#define AV_CH_LAYOUT_5POINT1_BACK
Definition: channel_layout.h:227
AV_CHAN_TOP_FRONT_RIGHT
@ AV_CHAN_TOP_FRONT_RIGHT
Definition: channel_layout.h:64
attributes.h
AV_CHAN_FRONT_LEFT_OF_CENTER
@ AV_CHAN_FRONT_LEFT_OF_CENTER
Definition: channel_layout.h:56
AV_CHAN_UNUSED
@ AV_CHAN_UNUSED
Channel is empty can be safely skipped.
Definition: channel_layout.h:84
sbr_huffman_tab
static const uint8_t sbr_huffman_tab[][2]
Huffman tables for SBR.
Definition: aacdec_common.c:132
AV_CHANNEL_LAYOUT_6POINT1_BACK
#define AV_CHANNEL_LAYOUT_6POINT1_BACK
Definition: channel_layout.h:407
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
AV_CH_LAYOUT_7POINT1
#define AV_CH_LAYOUT_7POINT1
Definition: channel_layout.h:237
TYPE_LFE
@ TYPE_LFE
Definition: aac.h:58
TYPE_SCE
@ TYPE_SCE
Definition: aac.h:55
ff_aac_channel_layout_map
const uint8_t ff_aac_channel_layout_map[16][16][3]
Definition: aacdec_common.c:39
AAC_CHANNEL_LFE
@ AAC_CHANNEL_LFE
Definition: aac.h:98
AV_CH_LAYOUT_SURROUND
#define AV_CH_LAYOUT_SURROUND
Definition: channel_layout.h:218
ff_aac_spectral_bits
const uint8_t *const ff_aac_spectral_bits[11]
Definition: aactab.c:487
sbr_vlc_offsets
static const int8_t sbr_vlc_offsets[10]
Definition: aacdec_common.c:273
AV_CHAN_BACK_CENTER
@ AV_CHAN_BACK_CENTER
Definition: channel_layout.h:58
AV_CHAN_NONE
@ AV_CHAN_NONE
Invalid channel index.
Definition: channel_layout.h:49
AV_CHAN_LOW_FREQUENCY_2
@ AV_CHAN_LOW_FREQUENCY_2
Definition: channel_layout.h:76
AV_CHAN_TOP_BACK_LEFT
@ AV_CHAN_TOP_BACK_LEFT
Definition: channel_layout.h:65
VLC_INIT_STATIC_TABLE
#define VLC_INIT_STATIC_TABLE(vlc_table, nb_bits, nb_codes, bits, bits_wrap, bits_size, codes, codes_wrap, codes_size, flags)
Definition: vlc.h:267
ff_aacdec_common_init_once
av_cold void ff_aacdec_common_init_once(void)
Definition: aacdec_common.c:320
AV_CHAN_BACK_LEFT
@ AV_CHAN_BACK_LEFT
Definition: channel_layout.h:54
ff_vlc_init_tables_sparse
const av_cold VLCElem * ff_vlc_init_tables_sparse(VLCInitState *state, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags)
Definition: vlc.c:400
AV_CHAN_BOTTOM_FRONT_CENTER
@ AV_CHAN_BOTTOM_FRONT_CENTER
Definition: channel_layout.h:79
ff_vlc_init_tables_from_lengths
const av_cold VLCElem * ff_vlc_init_tables_from_lengths(VLCInitState *state, int nb_bits, int nb_codes, const int8_t *lens, int lens_wrap, const void *symbols, int symbols_wrap, int symbols_size, int offset, int flags)
Definition: vlc.c:366
AV_CHAN_TOP_FRONT_CENTER
@ AV_CHAN_TOP_FRONT_CENTER
Definition: channel_layout.h:63
AV_CHANNEL_LAYOUT_MONO
#define AV_CHANNEL_LAYOUT_MONO
Definition: channel_layout.h:388
ff_aac_sbr_vlc
const VLCElem * ff_aac_sbr_vlc[10]
Definition: aacdec_common.c:277
VLC_INIT_STATE
#define VLC_INIT_STATE(_table)
Definition: vlc.h:214
AV_CHAN_TOP_FRONT_LEFT
@ AV_CHAN_TOP_FRONT_LEFT
Definition: channel_layout.h:62
vlc.h
AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_4POINT0
Definition: channel_layout.h:220
AV_CHANNEL_LAYOUT_5POINT1_BACK
#define AV_CHANNEL_LAYOUT_5POINT1_BACK
Definition: channel_layout.h:401
AV_CH_LAYOUT_6POINT1_BACK
#define AV_CH_LAYOUT_6POINT1_BACK
Definition: channel_layout.h:233
AV_CH_LAYOUT_7POINT1_TOP_BACK
#define AV_CH_LAYOUT_7POINT1_TOP_BACK
Definition: channel_layout.h:252
AV_CHAN_FRONT_LEFT
@ AV_CHAN_FRONT_LEFT
Definition: channel_layout.h:50
ff_aac_scalefactor_code
const uint32_t ff_aac_scalefactor_code[121]
Definition: aactab.c:138