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_CALC_M1M2_COMMON_H 21 #define IXHEAACD_MPS_CALC_M1M2_COMMON_H 22 23 VOID ixheaacd_param_2_umx_ps(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 *h11, WORD32 *h12, 24 WORD32 *h21, WORD32 *h22, WORD32 *h12_res, WORD32 *h22_res, 25 WORD16 *c_l, WORD16 *c_r, WORD32 ott_box_indx, 26 WORD32 parameter_set_indx, WORD32 res_bands); 27 28 VOID ixheaacd_get_matrix_inversion_weights( 29 WORD32 iid_lf_ls_idx, WORD32 iid_rf_rs_idx, WORD32 prediction_mode, WORD32 c1, WORD32 c2, 30 WORD32 *weight1, WORD32 *weight2, ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr); 31 32 VOID ixheaacd_invert_matrix(WORD32 weight1, WORD32 weight2, WORD32 h_real[][2], 33 WORD32 h_imag[][2], 34 const ia_mps_dec_common_tables_struct *common_tab_ptr); 35 36 VOID ixheaacd_calculate_arb_dmx_mtx(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, 37 WORD32 pb, WORD32 g_real[]); 38 39 VOID ixheaacd_param_2_umx_ps_core_tables( 40 WORD32 *cld, WORD32 *icc, WORD32 num_ott_bands, WORD32 res_bands, WORD32 *h11, WORD32 *h12, 41 WORD32 *h21, WORD32 *h22, WORD32 *h12_res, WORD32 *h22_res, WORD16 *c_l, WORD16 *c_r, 42 const ia_mps_dec_m1_m2_tables_struct *ixheaacd_mps_dec_m1_m2_tables); 43 44 VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 pb, 45 WORD32 ttt_mode, WORD32 m_ttt[][3]); 46 47 VOID ixheaacd_calculate_mtx_inv(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 pb, 48 WORD32 mode, WORD32 h_real[][2], WORD32 h_imag[][2]); 49 50 WORD32 ixheaacd_quantize(WORD32 cld); 51 52 #endif /* IXHEAACD_MPS_CALC_M1M2_COMMON_H */ 53