1 /****************************************************************************** 2 * 3 * Copyright (C) 2023 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_MPS_STRUCT_DEF_H 21 #define IXHEAACD_MPS_STRUCT_DEF_H 22 23 typedef struct { 24 const WORD32 *p_filter_ana; 25 const WORD32 *ref_co_eff_ptr_l; 26 const WORD32 *ref_co_eff_ptr_r; 27 WORD32 offset_l; 28 WORD32 offset_r; 29 WORD32 *qmf_states_buffer; 30 WORD16 flag; 31 WORD16 offset; 32 WORD32 *qmf_states_curr_pos; 33 } ia_mps_dec_qmf_ana_filter_bank; 34 35 typedef struct { 36 const WORD32 *p_filter_syn; 37 WORD32 *sbr_qmf_states_synthesis; 38 } ia_mps_dec_qmf_syn_filter_bank; 39 40 typedef struct { 41 WORD32 ia_mps_enc_qmf_64_640[650]; 42 WORD16 sbr_alt_sin_twiddle[33]; 43 WORD16 sbr_cos_twiddle[32]; 44 WORD16 sbr_sin_twiddle[32]; 45 WORD16 fft_c[4]; 46 WORD16 ia_qmf_anl_addt_cos[32]; 47 WORD16 ia_qmf_anl_addt_sin[32]; 48 } ia_mps_dec_qmf_tables_struct; 49 50 typedef struct { WORD32 sqrt_tab[513]; } ia_mps_dec_common_tables_struct; 51 52 typedef struct { 53 WORD16 p8_13[19]; 54 WORD16 p2_6[6]; 55 WORD32 sine_array[2048]; 56 WORD32 cosine_array[2048]; 57 } ia_mps_dec_hybrid_tables_struct; 58 59 typedef struct { 60 WORD32 row_2_channel_stp[7][8]; 61 WORD32 row_2_channel_ges[7][8]; 62 WORD32 row_2_residual[7][8]; 63 } ia_mps_dec_index_tables_struct; 64 65 typedef struct { 66 ia_mps_dec_index_tables_struct idx_table; 67 WORD32 hybrid_2_param_28[71]; 68 WORD32 r1_matrix_l[31]; 69 WORD32 ten_cld_by_10[31]; 70 WORD32 w00_cld2_15[31]; 71 WORD32 table_kappa[8]; 72 WORD32 dec_pow[31]; 73 WORD32 cld_tab_1[31]; 74 WORD32 cld_tab_2[31]; 75 WORD32 cld_tab_3[31]; 76 WORD32 reciprocal[576]; 77 WORD32 c_l_table[31]; 78 WORD32 cos_table[16][31]; 79 WORD32 sin_table[8][31]; 80 } ia_mps_dec_m1_m2_tables_struct; 81 82 typedef struct { 83 WORD32 rev_delay[4][10]; 84 WORD32 rev_split_freq_0[4]; 85 WORD32 rev_split_freq_1[4]; 86 WORD32 rev_split_freq_2[4]; 87 } ia_mps_dec_rev_tables_struct; 88 89 typedef struct { 90 ia_mps_dec_rev_tables_struct rev_table; 91 WORD32 lattice_coeff_0[10][20]; 92 WORD32 lattice_coeff_1[10][15]; 93 WORD32 lattice_coeff_2[10][6]; 94 WORD32 lattice_coeff_3[10][3]; 95 WORD32 den_coef_0[10][21]; 96 WORD32 den_coef_1[10][16]; 97 WORD32 den_coef_2[10][7]; 98 WORD32 den_coef_3[10][4]; 99 WORD32 lattice_delta_phi[10][20]; 100 } ia_mps_dec_decorr_tables_struct; 101 102 typedef struct { 103 WORD32 bp[25]; 104 WORD32 bpxgf[25]; 105 WORD32 bp2xgf2[25]; 106 WORD32 ia_mps_dec_qmf_64_640[325]; 107 WORD32 time_out_idx_5xxx[6]; 108 WORD32 time_out_idx_7xxx[8]; 109 } ia_mps_dec_tp_process_tables_struct; 110 111 typedef struct { 112 WORD32 wf_02[02]; 113 WORD32 wf_03[03]; 114 WORD32 wf_04[04]; 115 WORD32 wf_15[15]; 116 WORD32 wf_16[16]; 117 WORD32 wf_18[18]; 118 WORD32 wf_24[24]; 119 WORD32 wf_30[30]; 120 WORD32 wf_32[32]; 121 } ia_mps_dec_wf_tables_struct; 122 123 typedef struct { const WORD32 *wf[32]; } ia_mps_dec_wf_ptr_table_struct; 124 125 typedef struct { 126 WORD32 twi_post_cos[64]; 127 WORD32 twi_post_sin[64]; 128 WORD32 hybrid_2_qmf[71]; 129 WORD32 local_sin_4[4]; 130 WORD32 local_sin_15[16]; 131 WORD32 local_sin_16[16]; 132 WORD32 local_sin_18[18]; 133 WORD32 local_sin_24[24]; 134 WORD32 local_sin_30[30]; 135 WORD32 local_sin_32[32]; 136 } ia_mps_dec_mdct2qmf_table_struct; 137 138 typedef struct { 139 WORD16 gmax_fix[72]; 140 WORD32 dwin_fix[72]; 141 WORD32 nstart_fix[5][72]; 142 WORD32 dfrac_fix[5][56]; 143 WORD32 part4[4]; 144 WORD32 part5[5]; 145 WORD32 part7[7]; 146 WORD32 part10[10]; 147 WORD32 part14[14]; 148 WORD32 part20[20]; 149 WORD32 part28[28]; 150 WORD32 part40[40]; 151 WORD32 w_real[16]; 152 WORD32 w_imag[16]; 153 WORD32 bitrev[16]; 154 } ia_mps_dec_tonality_tables_struct; 155 156 typedef struct { 157 WORD32 kernels_4_to_71[71]; 158 WORD32 kernels_5_to_71[71]; 159 WORD32 kernels_7_to_71[71]; 160 WORD32 kernels_10_to_71[71]; 161 WORD32 kernels_14_to_71[71]; 162 WORD32 kernels_20_to_71[71]; 163 WORD32 kernels_28_to_71[71]; 164 WORD32 bb_env_kernels[71]; 165 } ia_mps_dec_kernels_table_struct; 166 167 typedef struct { 168 WORD32 mapping_4_to_28[28]; 169 WORD32 mapping_5_to_28[28]; 170 WORD32 mapping_7_to_28[28]; 171 WORD32 mapping_10_to_28[28]; 172 WORD32 mapping_14_to_28[28]; 173 WORD32 mapping_20_to_28[28]; 174 } ia_mps_dec_mapping_table_struct; 175 176 typedef struct { 177 WORD32 num_input_channels; 178 WORD32 num_output_channels; 179 WORD32 num_ott_boxes; 180 WORD32 num_ttt_boxes; 181 WORD32 ott_mode_lfe[5]; 182 } ia_mps_dec_tree_properties_struct; 183 184 typedef struct { 185 ia_mps_dec_kernels_table_struct kernel_table; 186 ia_mps_dec_mapping_table_struct map_table; 187 ia_mps_dec_tree_properties_struct tree_property_table[7]; 188 WORD32 sampling_freq_table[15]; 189 WORD32 freq_res_table[8]; 190 WORD32 temp_shape_chan_table[2][7]; 191 WORD32 surround_gain_table[5]; 192 WORD32 lfe_gain_table[5]; 193 WORD32 clip_gain_table[8]; 194 WORD32 pb_stride_table[4]; 195 WORD32 smg_time_table[4]; 196 WORD32 dequant_cld[31]; 197 WORD32 dequant_cld_coarse[15]; 198 WORD32 dequant_cpc[52]; 199 WORD32 dequant_cpc_coarse[26]; 200 WORD32 dequant_icc[8]; 201 WORD32 factor_cld_tab_1[31]; 202 WORD32 hrtf_power[64]; 203 WORD32 envshape_data[2][5]; 204 WORD32 pcm_chnksz_level_3[5]; 205 WORD32 pcm_chnksz_level_4; 206 WORD32 pcm_chnksz_level_7[6]; 207 WORD32 pcm_chnksz_level_8; 208 WORD32 pcm_chnksz_level_11[2]; 209 WORD32 pcm_chnksz_level_13[4]; 210 WORD32 pcm_chnksz_level_15; 211 WORD32 pcm_chnksz_level_19[4]; 212 WORD32 pcm_chnksz_level_25[3]; 213 WORD32 pcm_chnksz_level_26; 214 WORD32 pcm_chnksz_level_31; 215 WORD32 pcm_chnksz_level_51[4]; 216 } ia_mps_dec_bitdec_tables_struct; 217 218 typedef struct { 219 WORD32 blind_cld_mesh[31][21]; 220 WORD32 blind_icc_mesh[31][21]; 221 WORD32 blind_cpc_1_mesh[31][21]; 222 WORD32 blind_cpc_2_mesh[31][21]; 223 } ia_mps_dec_mesh_tables_struct; 224 225 typedef struct { 226 ia_mps_dec_mesh_tables_struct mesh_table; 227 WORD32 exp_1[13]; 228 WORD32 exp_2[13]; 229 WORD32 exp_4[13]; 230 WORD32 exp_8[13]; 231 WORD32 exp_16[13]; 232 WORD32 exp_32[13]; 233 WORD32 exp_64[13]; 234 WORD32 exp_128[13]; 235 } ia_mps_dec_blind_tables_struct; 236 237 typedef struct { 238 WORD16 *cos_table_long[64]; 239 WORD16 *cos_table_short[10]; 240 } ia_mps_dec_mdct2qmf_cos_table_struct; 241 242 typedef struct { 243 WORD16 cos_table_long_32_00[32]; 244 WORD16 cos_table_long_32_01[32]; 245 WORD16 cos_table_long_32_02[32]; 246 WORD16 cos_table_long_32_03[32]; 247 WORD16 cos_table_long_32_04[32]; 248 WORD16 cos_table_long_32_05[32]; 249 WORD16 cos_table_long_32_06[32]; 250 WORD16 cos_table_long_32_07[32]; 251 WORD16 cos_table_long_32_08[32]; 252 WORD16 cos_table_long_32_09[32]; 253 WORD16 cos_table_long_32_10[32]; 254 WORD16 cos_table_long_32_11[32]; 255 WORD16 cos_table_long_32_12[32]; 256 WORD16 cos_table_long_32_13[32]; 257 WORD16 cos_table_long_32_14[32]; 258 WORD16 cos_table_long_32_15[32]; 259 WORD16 cos_table_long_32_16[32]; 260 WORD16 cos_table_long_32_17[32]; 261 WORD16 cos_table_long_32_18[32]; 262 WORD16 cos_table_long_32_19[32]; 263 WORD16 cos_table_long_32_20[32]; 264 WORD16 cos_table_long_32_21[32]; 265 WORD16 cos_table_long_32_22[32]; 266 WORD16 cos_table_long_32_23[32]; 267 WORD16 cos_table_long_32_24[32]; 268 WORD16 cos_table_long_32_25[32]; 269 WORD16 cos_table_long_32_26[32]; 270 WORD16 cos_table_long_32_27[32]; 271 WORD16 cos_table_long_32_28[32]; 272 WORD16 cos_table_long_32_29[32]; 273 WORD16 cos_table_long_32_30[32]; 274 WORD16 cos_table_long_32_31[32]; 275 276 WORD16 cos_table_long_30_00[30]; 277 WORD16 cos_table_long_30_01[30]; 278 WORD16 cos_table_long_30_02[30]; 279 WORD16 cos_table_long_30_03[30]; 280 WORD16 cos_table_long_30_04[30]; 281 WORD16 cos_table_long_30_05[30]; 282 WORD16 cos_table_long_30_06[30]; 283 WORD16 cos_table_long_30_07[30]; 284 WORD16 cos_table_long_30_08[30]; 285 WORD16 cos_table_long_30_09[30]; 286 WORD16 cos_table_long_30_10[30]; 287 WORD16 cos_table_long_30_11[30]; 288 WORD16 cos_table_long_30_12[30]; 289 WORD16 cos_table_long_30_13[30]; 290 WORD16 cos_table_long_30_14[30]; 291 WORD16 cos_table_long_30_15[30]; 292 WORD16 cos_table_long_30_16[30]; 293 WORD16 cos_table_long_30_17[30]; 294 WORD16 cos_table_long_30_18[30]; 295 WORD16 cos_table_long_30_19[30]; 296 WORD16 cos_table_long_30_20[30]; 297 WORD16 cos_table_long_30_21[30]; 298 WORD16 cos_table_long_30_22[30]; 299 WORD16 cos_table_long_30_23[30]; 300 WORD16 cos_table_long_30_24[30]; 301 WORD16 cos_table_long_30_25[30]; 302 WORD16 cos_table_long_30_26[30]; 303 WORD16 cos_table_long_30_27[30]; 304 WORD16 cos_table_long_30_28[30]; 305 WORD16 cos_table_long_30_29[30]; 306 307 WORD16 cos_table_long_24_00[24]; 308 WORD16 cos_table_long_24_01[24]; 309 WORD16 cos_table_long_24_02[24]; 310 WORD16 cos_table_long_24_03[24]; 311 WORD16 cos_table_long_24_04[24]; 312 WORD16 cos_table_long_24_05[24]; 313 WORD16 cos_table_long_24_06[24]; 314 WORD16 cos_table_long_24_07[24]; 315 WORD16 cos_table_long_24_08[24]; 316 WORD16 cos_table_long_24_09[24]; 317 WORD16 cos_table_long_24_10[24]; 318 WORD16 cos_table_long_24_11[24]; 319 WORD16 cos_table_long_24_12[24]; 320 WORD16 cos_table_long_24_13[24]; 321 WORD16 cos_table_long_24_14[24]; 322 WORD16 cos_table_long_24_15[24]; 323 WORD16 cos_table_long_24_16[24]; 324 WORD16 cos_table_long_24_17[24]; 325 WORD16 cos_table_long_24_18[24]; 326 WORD16 cos_table_long_24_19[24]; 327 WORD16 cos_table_long_24_20[24]; 328 WORD16 cos_table_long_24_21[24]; 329 WORD16 cos_table_long_24_22[24]; 330 WORD16 cos_table_long_24_23[24]; 331 332 WORD16 cos_table_long_18_00[18]; 333 WORD16 cos_table_long_18_01[18]; 334 WORD16 cos_table_long_18_02[18]; 335 WORD16 cos_table_long_18_03[18]; 336 WORD16 cos_table_long_18_04[18]; 337 WORD16 cos_table_long_18_05[18]; 338 WORD16 cos_table_long_18_06[18]; 339 WORD16 cos_table_long_18_07[18]; 340 WORD16 cos_table_long_18_08[18]; 341 WORD16 cos_table_long_18_09[18]; 342 WORD16 cos_table_long_18_10[18]; 343 WORD16 cos_table_long_18_11[18]; 344 WORD16 cos_table_long_18_12[18]; 345 WORD16 cos_table_long_18_13[18]; 346 WORD16 cos_table_long_18_14[18]; 347 WORD16 cos_table_long_18_15[18]; 348 WORD16 cos_table_long_18_16[18]; 349 WORD16 cos_table_long_18_17[18]; 350 351 WORD16 cos_table_long_16_00[16]; 352 WORD16 cos_table_long_16_01[16]; 353 WORD16 cos_table_long_16_02[16]; 354 WORD16 cos_table_long_16_03[16]; 355 WORD16 cos_table_long_16_04[16]; 356 WORD16 cos_table_long_16_05[16]; 357 WORD16 cos_table_long_16_06[16]; 358 WORD16 cos_table_long_16_07[16]; 359 WORD16 cos_table_long_16_08[16]; 360 WORD16 cos_table_long_16_09[16]; 361 WORD16 cos_table_long_16_10[16]; 362 WORD16 cos_table_long_16_11[16]; 363 WORD16 cos_table_long_16_12[16]; 364 WORD16 cos_table_long_16_13[16]; 365 WORD16 cos_table_long_16_14[16]; 366 WORD16 cos_table_long_16_15[16]; 367 368 WORD16 cos_table_long_15_00[15]; 369 WORD16 cos_table_long_15_01[15]; 370 WORD16 cos_table_long_15_02[15]; 371 WORD16 cos_table_long_15_03[15]; 372 WORD16 cos_table_long_15_04[15]; 373 WORD16 cos_table_long_15_05[15]; 374 WORD16 cos_table_long_15_06[15]; 375 WORD16 cos_table_long_15_07[15]; 376 WORD16 cos_table_long_15_08[15]; 377 WORD16 cos_table_long_15_09[15]; 378 WORD16 cos_table_long_15_10[15]; 379 WORD16 cos_table_long_15_11[15]; 380 WORD16 cos_table_long_15_12[15]; 381 WORD16 cos_table_long_15_13[15]; 382 WORD16 cos_table_long_15_14[15]; 383 384 WORD16 cos_table_short_4_00[4]; 385 WORD16 cos_table_short_4_01[4]; 386 WORD16 cos_table_short_4_02[4]; 387 WORD16 cos_table_short_4_03[4]; 388 389 WORD16 cos_table_short_3_00[3]; 390 WORD16 cos_table_short_3_01[3]; 391 WORD16 cos_table_short_3_02[3]; 392 393 WORD16 cos_table_short_2_00[2]; 394 WORD16 cos_table_short_2_01[2]; 395 } ia_mps_dec_mdct2qmf_tables_struct; 396 397 #endif /* IXHEAACD_MPS_STRUCT_DEF_H */ 398