• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *                                                                            *
3  * Copyright (C) 2018 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20 #ifndef IXHEAACD_AAC_ROM_H
21 #define IXHEAACD_AAC_ROM_H
22 
23 #define MAX_CB_SIZE 13
24 
25 typedef struct {
26   WORD32 ixheaacd_pow_table_Q13[129];
27   WORD32 scale_table[4];
28   WORD8 tns_max_bands_tbl[12][2];
29   WORD16 tns_coeff3_16[8];
30   WORD16 tns_coeff4_16[16];
31   WORD32 scale_mant_tab[4];
32 
33   WORD32 tns_coeff3[8];
34   WORD32 tns_coeff4[16];
35 
36   WORD32 tns_coeff3_32[8];
37   WORD32 tns_coeff4_32[16];
38   WORD32 tns_max_bands_tbl_usac[16][2];
39 
40   WORD8 tns_max_bands_tbl_ld[12];
41   WORD8 tns_max_bands_tbl_480[12];
42   WORD32 scale_table_960[4];
43 } ia_aac_dec_block_tables_struct;
44 
45 extern const ia_aac_dec_block_tables_struct ixheaacd_aac_block_tables;
46 
47 typedef struct {
48   WORD8 ixheaacd_sfb_96_1024[43];
49   WORD8 ixheaacd_sfb_96_128[14];
50   WORD8 ixheaacd_sfb_64_1024[49];
51   WORD8 ixheaacd_sfb_48_1024[51];
52   WORD8 ixheaacd_sfb_48_128[16];
53   WORD8 ixheaacd_sfb_32_1024[53];
54   WORD8 ixheaacd_sfb_24_1024[49];
55   WORD8 ixheaacd_sfb_24_128[17];
56   WORD8 ixheaacd_sfb_16_1024[45];
57   WORD8 ixheaacd_sfb_16_128[17];
58   WORD8 ixheaacd_sfb_8_1024[42];
59   WORD8 ixheaacd_sfb_8_128[17];
60 
61   ia_sampling_rate_info_struct str_sample_rate_info[13];
62 
63   UWORD32 idx_table_hf11[21];
64   UWORD32 idx_table_hf10[20];
65   UWORD32 idx_table_hf9[23];
66   UWORD32 idx_table_hf8[17];
67   UWORD32 idx_table_hf7[18];
68   UWORD32 idx_table_hf6[17];
69   UWORD32 idx_table_hf5[19];
70   UWORD32 idx_table_hf4[19];
71   UWORD32 idx_table_hf3[27];
72   UWORD32 idx_table_hf2[16];
73   UWORD32 idx_table_hf1[12];
74 
75   UWORD16 input_table_cb11[290];
76   UWORD16 input_table_cb10[170];
77   UWORD16 input_table_cb9[170];
78   UWORD16 input_table_cb8[65];
79   UWORD16 input_table_cb7[65];
80   UWORD16 input_table_cb6[82];
81   UWORD16 input_table_cb5[82];
82   UWORD16 input_table_cb4[82];
83   UWORD16 input_table_cb3[82];
84   UWORD16 input_table_cb2[82];
85   UWORD16 input_table_cb1[82];
86   UWORD16 huffman_code_book_scl[122];
87   UWORD32 huffman_code_book_scl_index[33];
88 
89   WORD8 ixheaacd_sfb_48_512[37];
90   WORD8 ixheaacd_sfb_32_512[38];
91   WORD8 ixheaacd_sfb_24_512[32];
92 
93   WORD8 ixheaacd_sfb_48_480[36];
94   WORD8 ixheaacd_sfb_32_480[38];
95   WORD8 ixheaacd_sfb_24_480[31];
96 
97   WORD8 ixheaacd_sfb_96_960[41];
98   WORD8 ixheaacd_sfb_96_120[13];
99   WORD8 ixheaacd_sfb_64_960[47];
100   WORD8 ixheaacd_sfb_48_960[50];
101   WORD8 ixheaacd_sfb_48_120[15];
102   WORD8 ixheaacd_sfb_24_960[47];
103   WORD8 ixheaacd_sfb_24_120[16];
104   WORD8 ixheaacd_sfb_16_960[43];
105   WORD8 ixheaacd_sfb_16_120[16];
106   WORD8 ixheaacd_sfb_8_960[41];
107   WORD8 ixheaacd_sfb_8_120[16];
108 } ia_aac_dec_huffman_tables_struct;
109 
110 extern const ia_aac_dec_huffman_tables_struct ixheaacd_aac_huffmann_tables;
111 
112 typedef struct {
113   WORD16 cosine_array_2048_256[514];
114   WORD8 dig_rev_table8_long[64];
115   WORD8 dig_rev_table8_short[8];
116   WORD32 fft_twiddle[64 * 7];
117 
118   WORD16 only_long_window_sine[1024];
119   WORD16 only_long_window_kbd[1024];
120   WORD16 only_short_window_sine[128];
121   WORD16 only_short_window_kbd[128];
122 
123   WORD16 cosine_array_2048_256p[514];
124   WORD32 w1024[768];
125   UWORD8 bit_rev_1024[256];
126   UWORD8 bit_rev_512[64];
127   UWORD8 bit_rev_128[16];
128   UWORD8 bit_rev_32[4];
129   WORD32 w_256[504];
130   WORD32 low_overlap_win[512];
131   WORD32 window_sine_512[512];
132   WORD32 cosine_array_1024[512];
133 
134   WORD32 low_overlap_win_480[480];
135   WORD32 window_sine_480[480];
136 
137   UWORD8 re_arr_tab_16[240];
138   UWORD8 re_arr_tab_sml_240[240];
139 
140   WORD32 cosine_array_960[480];
141   WORD32 w_16[24];
142 
143   WORD16 window_sine_480_eld[1920];
144   WORD16 window_sine_512_eld[2048];
145 
146   WORD16 only_long_window_sine_960[960];
147   WORD16 only_long_window_kbd_960[960];
148   WORD16 only_short_window_sine_120[120];
149   WORD16 only_short_window_kbd_120[120];
150 
151   WORD16 re_arr_tab_32[480];
152   WORD16 re_arr_tab_sml[16];
153   WORD16 re_arr_tab_4[60];
154   WORD16 re_arr_tab_15_4[60];
155   WORD16 re_arr_tab_120[60];
156   WORD16 re_arr_tab_5[16];
157   WORD16 re_arr_tab_3[16];
158 
159   WORD16 re_arr_tab_sml_480[480];
160 
161   WORD32 cosine_array_1920[960];
162 
163   WORD16 w_512[2 * 510];
164   WORD16 w_32[60];
165   WORD16 cosine_array_240[120];
166 } ia_aac_dec_imdct_tables_struct;
167 
168 extern const ia_aac_dec_imdct_tables_struct ixheaacd_imdct_tables;
169 
170 typedef struct {
171   WORD16 *sfb_index;
172   WORD8 *sfb_width;
173 
174 } ia_aac_sfb_info;
175 
176 typedef struct {
177   ia_aac_dec_block_tables_struct *pstr_block_tables;
178   ia_aac_dec_huffman_tables_struct *pstr_huffmann_tables;
179   ia_aac_dec_imdct_tables_struct *pstr_imdct_tables;
180 
181   ia_aac_sfb_info str_aac_sfb_info[4];
182   WORD8 *scale_factor_bands_long[24];
183   WORD8 *scale_factor_bands_short[24];
184   WORD16 sfb_long_table[52];
185   WORD16 sfb_short_table[16];
186 
187   UWORD16 *code_book[MAX_CB_SIZE];
188   UWORD32 *index_table[MAX_CB_SIZE];
189 
190   WORD8 *scale_fac_bands_512[16];
191   WORD8 *scale_fac_bands_480[16];
192 
193 } ia_aac_dec_tables_struct;
194 
195 #define ixheaacd_huff_cb_0 0
196 #define ixheaacd_huff_cb_1 1
197 #define ixheaacd_huff_cb_2 2
198 #define ixheaacd_huff_cb_3 3
199 #define ixheaacd_huff_cb_4 4
200 #define ixheaacd_huff_cb_5 5
201 #define ixheaacd_huff_cb_6 6
202 #define ixheaacd_huff_cb_7 7
203 
204 #endif /* #ifndef IXHEAACD_AAC_ROM_H */
205