FFmpeg
aactab.h
Go to the documentation of this file.
1 /*
2  * AAC data declarations
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 declarations
26  * @author Oded Shimon ( ods15 ods15 dyndns org )
27  * @author Maxim Gavrilov ( maxim.gavrilov gmail com )
28  */
29 
30 #ifndef AVCODEC_AACTAB_H
31 #define AVCODEC_AACTAB_H
32 
33 #include "libavutil/mem_internal.h"
34 
35 #include <stdint.h>
36 
37 /* NOTE:
38  * Tables in this file are shared by the AAC decoders and encoder
39  */
40 
41 extern float ff_aac_pow2sf_tab[428];
42 extern float ff_aac_pow34sf_tab[428];
43 
44 /* @name ltp_coef
45  * Table of the LTP coefficients
46  */
47 extern const float ff_ltp_coef[8];
48 
49 /* @name tns_tmp2_map
50  * Tables of the tmp2[] arrays of LPC coefficients used for TNS.
51  * @{
52  */
53 extern const float *const ff_tns_tmp2_map[4];
54 // @}
55 
56 /* @name window coefficients
57  * @{
58  */
59 DECLARE_ALIGNED(32, extern float, ff_aac_kbd_long_1024)[1024];
60 DECLARE_ALIGNED(32, extern float, ff_aac_kbd_short_128)[128];
61 DECLARE_ALIGNED(32, extern const float, ff_aac_eld_window_512)[1920];
62 DECLARE_ALIGNED(32, extern const int, ff_aac_eld_window_512_fixed)[1920];
63 DECLARE_ALIGNED(32, extern const float, ff_aac_eld_window_480)[1800];
64 DECLARE_ALIGNED(32, extern const int, ff_aac_eld_window_480_fixed)[1800];
65 // @}
66 
67 extern const float ff_aac_deemph_weights[16];
68 
69 /* Initializes data shared between float decoder and encoder. */
70 void ff_aac_float_common_init(void);
71 
72 /* @name number of scalefactor window bands for long and short transform windows respectively
73  * @{
74  */
75 extern const uint8_t ff_aac_num_swb_1024[];
76 extern const uint8_t ff_aac_num_swb_960 [];
77 extern const uint8_t ff_aac_num_swb_768 [];
78 extern const uint8_t ff_aac_num_swb_512 [];
79 extern const uint8_t ff_aac_num_swb_480 [];
80 extern const uint8_t ff_aac_num_swb_128 [];
81 extern const uint8_t ff_aac_num_swb_120 [];
82 extern const uint8_t ff_aac_num_swb_96 [];
83 // @}
84 
85 extern const uint8_t ff_aac_pred_sfb_max [];
86 
87 extern const uint32_t ff_aac_scalefactor_code[121];
88 extern const uint8_t ff_aac_scalefactor_bits[121];
89 
90 extern const uint16_t * const ff_aac_spectral_codes[11];
91 extern const uint8_t * const ff_aac_spectral_bits [11];
92 extern const uint16_t ff_aac_spectral_sizes[11];
93 
94 extern const float *const ff_aac_codebook_vectors[];
95 extern const float *const ff_aac_codebook_vector_vals[];
96 extern const uint16_t *const ff_aac_codebook_vector_idx[];
97 
98 extern const uint16_t ff_aac_ac_msb_cdfs[64][17];
99 extern const uint16_t ff_aac_ac_lsb_cdfs[3][4];
100 extern const uint8_t ff_aac_ac_lookup_m[742];
101 extern const uint32_t ff_aac_ac_hash_m[742];
102 extern const uint16_t ff_aac_ac_cf_m[64][17];
103 
104 extern const uint16_t * const ff_swb_offset_1024[13];
105 extern const uint16_t * const ff_swb_offset_960 [13];
106 extern const uint16_t * const ff_swb_offset_768 [13];
107 extern const uint16_t * const ff_swb_offset_512 [13];
108 extern const uint16_t * const ff_swb_offset_480 [13];
109 extern const uint16_t * const ff_swb_offset_128 [13];
110 extern const uint16_t * const ff_swb_offset_120 [13];
111 extern const uint16_t * const ff_swb_offset_96 [13];
112 
113 extern const uint8_t ff_tns_max_bands_1024[13];
114 extern const uint8_t ff_tns_max_bands_512 [13];
115 extern const uint8_t ff_tns_max_bands_480 [13];
116 extern const uint8_t ff_tns_max_bands_128 [13];
117 
118 extern const uint8_t ff_tns_max_bands_usac_1024[13];
119 extern const uint8_t ff_tns_max_bands_usac_128[13];
120 
121 /* [x][y], x == 1 -> frame len is 768 frames, y == 1 -> is eight_short */
122 extern const uint8_t ff_usac_noise_fill_start_offset[2][2];
123 
124 extern const int ff_aac_usac_samplerate[32];
125 
126 /* Window type (only long+eight, start/stop/stopstart), sine+sine, kbd+kbd, sine+kbd, kbd+sine */
127 extern const float ff_aac_usac_mdst_filt_cur[4 /* Window */][4 /* Shape */][7];
128 /* Window type (everything/longstop+stopstart), sine or kbd */
129 extern const float ff_aac_usac_mdst_filt_prev[2 /* Window */][2 /* sine/kbd */][7];
130 
131 #endif /* AVCODEC_AACTAB_H */
ff_aac_pred_sfb_max
const uint8_t ff_aac_pred_sfb_max[]
Definition: aactab.c:181
ff_aac_kbd_short_128
float ff_aac_kbd_short_128[128]
mem_internal.h
ff_swb_offset_1024
const uint16_t *const ff_swb_offset_1024[13]
Definition: aactab.c:1910
ff_aac_ac_cf_m
const uint16_t ff_aac_ac_cf_m[64][17]
ff_aac_num_swb_960
const uint8_t ff_aac_num_swb_960[]
Definition: aactab.c:153
ff_aac_spectral_codes
const uint16_t *const ff_aac_spectral_codes[11]
Definition: aactab.c:529
ff_ltp_coef
const float ff_ltp_coef[8]
Definition: aactab.c:110
ff_aac_ac_lsb_cdfs
const uint16_t ff_aac_ac_lsb_cdfs[3][4]
Definition: aactab.c:1335
ff_usac_noise_fill_start_offset
const uint8_t ff_usac_noise_fill_start_offset[2][2]
Definition: aactab.c:2009
ff_tns_tmp2_map
const float *const ff_tns_tmp2_map[4]
Definition: aactab.c:142
ff_aac_eld_window_512_fixed
const int ff_aac_eld_window_512_fixed[1920]
Definition: aactab.c:2498
ff_aac_eld_window_512
const float ff_aac_eld_window_512[1920]
Definition: aactab.c:2014
ff_aac_spectral_sizes
const uint16_t ff_aac_spectral_sizes[11]
Definition: aactab.c:539
ff_aac_ac_msb_cdfs
const uint16_t ff_aac_ac_msb_cdfs[64][17]
Definition: aactab.c:1204
ff_aac_deemph_weights
const float ff_aac_deemph_weights[16]
Definition: aactab.c:3890
ff_tns_max_bands_usac_1024
const uint8_t ff_tns_max_bands_usac_1024[13]
Definition: aactab.c:1988
ff_aac_usac_mdst_filt_prev
const float ff_aac_usac_mdst_filt_prev[2][2][7]
Definition: aactab.c:3941
ff_swb_offset_960
const uint16_t *const ff_swb_offset_960[13]
Definition: aactab.c:1918
ff_aac_num_swb_768
const uint8_t ff_aac_num_swb_768[]
Definition: aactab.c:157
ff_swb_offset_768
const uint16_t *const ff_swb_offset_768[13]
Definition: aactab.c:1926
ff_aac_num_swb_480
const uint8_t ff_aac_num_swb_480[]
Definition: aactab.c:165
ff_aac_scalefactor_code
const uint32_t ff_aac_scalefactor_code[121]
Definition: aactab.c:185
ff_tns_max_bands_128
const uint8_t ff_tns_max_bands_128[13]
Definition: aactab.c:2000
ff_tns_max_bands_1024
const uint8_t ff_tns_max_bands_1024[13]
Definition: aactab.c:1984
ff_tns_max_bands_512
const uint8_t ff_tns_max_bands_512[13]
Definition: aactab.c:1992
ff_aac_usac_samplerate
const int ff_aac_usac_samplerate[32]
Definition: aactab.c:3912
ff_aac_num_swb_120
const uint8_t ff_aac_num_swb_120[]
Definition: aactab.c:173
ff_aac_eld_window_480_fixed
const int ff_aac_eld_window_480_fixed[1800]
Definition: aactab.c:3434
ff_aac_pow34sf_tab
float ff_aac_pow34sf_tab[428]
ff_tns_max_bands_480
const uint8_t ff_tns_max_bands_480[13]
Definition: aactab.c:1996
DECLARE_ALIGNED
#define DECLARE_ALIGNED(n, t, v)
Definition: mem_internal.h:104
ff_aac_float_common_init
void ff_aac_float_common_init(void)
ff_aac_codebook_vector_vals
const float *const ff_aac_codebook_vector_vals[]
Definition: aactab.c:1186
ff_aac_codebook_vectors
const float *const ff_aac_codebook_vectors[]
Definition: aactab.c:1030
ff_aac_scalefactor_bits
const uint8_t ff_aac_scalefactor_bits[121]
Definition: aactab.c:204
ff_aac_num_swb_128
const uint8_t ff_aac_num_swb_128[]
Definition: aactab.c:169
ff_aac_num_swb_96
const uint8_t ff_aac_num_swb_96[]
Definition: aactab.c:177
ff_aac_ac_hash_m
const uint32_t ff_aac_ac_hash_m[742]
Definition: aactab.c:1391
ff_swb_offset_128
const uint16_t *const ff_swb_offset_128[13]
Definition: aactab.c:1950
ff_aac_ac_lookup_m
const uint8_t ff_aac_ac_lookup_m[742]
Definition: aactab.c:1341
ff_aac_spectral_bits
const uint8_t *const ff_aac_spectral_bits[11]
Definition: aactab.c:534
ff_tns_max_bands_usac_128
const uint8_t ff_tns_max_bands_usac_128[13]
Definition: aactab.c:2004
ff_aac_usac_mdst_filt_cur
const float ff_aac_usac_mdst_filt_cur[4][4][7]
Definition: aactab.c:3920
ff_swb_offset_512
const uint16_t *const ff_swb_offset_512[13]
Definition: aactab.c:1934
ff_swb_offset_480
const uint16_t *const ff_swb_offset_480[13]
Definition: aactab.c:1942
ff_swb_offset_96
const uint16_t *const ff_swb_offset_96[13]
Definition: aactab.c:1968
ff_aac_kbd_long_1024
float ff_aac_kbd_long_1024[1024]
ff_aac_num_swb_512
const uint8_t ff_aac_num_swb_512[]
Definition: aactab.c:161
ff_swb_offset_120
const uint16_t *const ff_swb_offset_120[13]
Definition: aactab.c:1960
ff_aac_eld_window_480
const float ff_aac_eld_window_480[1800]
Definition: aactab.c:2981
ff_aac_num_swb_1024
const uint8_t ff_aac_num_swb_1024[]
Definition: aactab.c:149
ff_aac_pow2sf_tab
float ff_aac_pow2sf_tab[428]
ff_aac_codebook_vector_idx
const uint16_t *const ff_aac_codebook_vector_idx[]
Definition: aactab.c:1195