• 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 AAC_NF_NO_RANDOM_VAL 512
24 #define MAX_CB_SIZE 13
25 
26 typedef struct {
27   WORD32 ixheaacd_pow_table_Q13[129];
28   WORD32 scale_table[4];
29   WORD8 tns_max_bands_tbl[12][2];
30   WORD16 tns_coeff3_16[8];
31   WORD16 tns_coeff4_16[16];
32   WORD32 scale_mant_tab[4];
33 
34   WORD32 tns_coeff3[8];
35   WORD32 tns_coeff4[16];
36 
37   WORD32 tns_coeff3_32[8];
38   WORD32 tns_coeff4_32[16];
39   WORD32 tns_max_bands_tbl_usac[16][2];
40 
41   WORD8 tns_max_bands_tbl_ld[12];
42   WORD8 tns_max_bands_tbl_480[12];
43 
44 } ia_aac_dec_block_tables_struct;
45 
46 extern const ia_aac_dec_block_tables_struct ixheaacd_aac_block_tables;
47 
48 typedef struct {
49   WORD8 ixheaacd_sfb_96_1024[43];
50   WORD8 ixheaacd_sfb_96_128[14];
51   WORD8 ixheaacd_sfb_64_1024[49];
52   WORD8 ixheaacd_sfb_48_1024[51];
53   WORD8 ixheaacd_sfb_48_128[16];
54   WORD8 ixheaacd_sfb_32_1024[53];
55   WORD8 ixheaacd_sfb_24_1024[49];
56   WORD8 ixheaacd_sfb_24_128[17];
57   WORD8 ixheaacd_sfb_16_1024[45];
58   WORD8 ixheaacd_sfb_16_128[17];
59   WORD8 ixheaacd_sfb_8_1024[42];
60   WORD8 ixheaacd_sfb_8_128[17];
61 
62   ia_sampling_rate_info_struct str_sample_rate_info[13];
63 
64   UWORD32 idx_table_hf11[21];
65   UWORD32 idx_table_hf10[20];
66   UWORD32 idx_table_hf9[23];
67   UWORD32 idx_table_hf8[17];
68   UWORD32 idx_table_hf7[18];
69   UWORD32 idx_table_hf6[17];
70   UWORD32 idx_table_hf5[19];
71   UWORD32 idx_table_hf4[19];
72   UWORD32 idx_table_hf3[27];
73   UWORD32 idx_table_hf2[16];
74   UWORD32 idx_table_hf1[12];
75 
76   UWORD16 input_table_cb11[290];
77   UWORD16 input_table_cb10[170];
78   UWORD16 input_table_cb9[170];
79   UWORD16 input_table_cb8[65];
80   UWORD16 input_table_cb7[65];
81   UWORD16 input_table_cb6[82];
82   UWORD16 input_table_cb5[82];
83   UWORD16 input_table_cb4[82];
84   UWORD16 input_table_cb3[82];
85   UWORD16 input_table_cb2[82];
86   UWORD16 input_table_cb1[82];
87   UWORD16 huffman_code_book_scl[122];
88   UWORD32 huffman_code_book_scl_index[33];
89 
90   WORD8 ixheaacd_sfb_48_512[37];
91   WORD8 ixheaacd_sfb_32_512[38];
92   WORD8 ixheaacd_sfb_24_512[32];
93 
94   WORD8 ixheaacd_sfb_48_480[36];
95   WORD8 ixheaacd_sfb_32_480[38];
96   WORD8 ixheaacd_sfb_24_480[31];
97 
98 } ia_aac_dec_huffman_tables_struct;
99 
100 extern const ia_aac_dec_huffman_tables_struct ixheaacd_aac_huffmann_tables;
101 
102 typedef struct {
103   WORD16 cosine_array_2048_256[514];
104   WORD8 dig_rev_table8_long[64];
105   WORD8 dig_rev_table8_short[8];
106   WORD32 fft_twiddle[64 * 7];
107 
108   WORD16 only_long_window_sine[1024];
109   WORD16 only_long_window_kbd[1024];
110   WORD16 only_short_window_sine[128];
111   WORD16 only_short_window_kbd[128];
112 
113   WORD16 cosine_array_2048_256p[514];
114   WORD32 w1024[768];
115   UWORD8 bit_rev_1024[256];
116   UWORD8 bit_rev_512[64];
117   UWORD8 bit_rev_128[16];
118   UWORD8 bit_rev_32[4];
119   WORD32 w_256[504];
120   WORD32 low_overlap_win[512];
121   WORD32 window_sine_512[512];
122   WORD32 cosine_array_1024[512];
123 
124   WORD32 low_overlap_win_480[480];
125   WORD32 window_sine_480[480];
126 
127   UWORD8 re_arr_tab_16[240];
128   UWORD8 re_arr_tab_sml_240[240];
129 
130   WORD32 cosine_array_960[480];
131   WORD32 w_16[24];
132 
133   WORD16 window_sine_480_eld[1920];
134   WORD16 window_sine_512_eld[2048];
135 
136 } ia_aac_dec_imdct_tables_struct;
137 
138 extern const ia_aac_dec_imdct_tables_struct ixheaacd_imdct_tables;
139 
140 typedef struct {
141   WORD16 *sfb_index;
142   WORD8 *sfb_width;
143 
144 } ia_aac_sfb_info;
145 
146 typedef struct {
147   ia_aac_dec_block_tables_struct *pstr_block_tables;
148   ia_aac_dec_huffman_tables_struct *pstr_huffmann_tables;
149   ia_aac_dec_imdct_tables_struct *pstr_imdct_tables;
150 
151   ia_aac_sfb_info str_aac_sfb_info[4];
152   WORD8 *scale_factor_bands_long[12];
153   WORD8 *scale_factor_bands_short[12];
154   WORD16 sfb_long_table[52];
155   WORD16 sfb_short_table[16];
156 
157   UWORD16 *code_book[MAX_CB_SIZE];
158   UWORD32 *index_table[MAX_CB_SIZE];
159 
160   WORD8 *scale_fac_bands_512[16];
161   WORD8 *scale_fac_bands_480[16];
162 
163 } ia_aac_dec_tables_struct;
164 
165 #define ixheaacd_huff_cb_0 0
166 #define ixheaacd_huff_cb_1 1
167 #define ixheaacd_huff_cb_2 2
168 #define ixheaacd_huff_cb_3 3
169 #define ixheaacd_huff_cb_4 4
170 #define ixheaacd_huff_cb_5 5
171 #define ixheaacd_huff_cb_6 6
172 #define ixheaacd_huff_cb_7 7
173 
174 #endif /* #ifndef IXHEAACD_AAC_ROM_H */
175