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_BIT_EXTRACT_H 21 #define IXHEAACD_BIT_EXTRACT_H 22 23 typedef struct { 24 WORD32 core_mode[2]; 25 WORD32 common_tw; 26 WORD32 common_window; 27 WORD32 tns_data_present[2]; 28 WORD32 tns_active; 29 WORD32 common_tns; 30 WORD32 tns_on_lr; 31 WORD32 tns_present_both; 32 WORD32 common_max_sfb; 33 UWORD8 max_sfb[2]; 34 WORD32 max_sfb_ste; 35 WORD32 pred_dir; 36 WORD32 complex_coef; 37 WORD32 use_prev_frame; 38 UWORD8 ms_mask_present[2]; 39 40 } ia_usac_tmp_core_coder_struct; 41 42 WORD32 ixheaacd_ics_info(ia_usac_data_struct *usac_data, WORD32 widx, 43 UWORD8 *max_sfb, ia_bit_buf_struct *it_bit_buff, 44 WORD32 window_sequence_last); 45 46 VOID ixheaacd_calc_grp_offset(ia_sfb_info_struct *pstr_sfb_info, UWORD8 *group); 47 48 VOID ixheaacd_read_tns_u(ia_sfb_info_struct *pstr_sfb_info, 49 ia_tns_frame_info_struct *pstr_tns_frame_info, 50 ia_bit_buf_struct *it_bit_buff); 51 52 WORD32 ixheaacd_core_coder_data(WORD32 id, ia_usac_data_struct *usac_data, 53 WORD32 elem_idx, WORD32 chan_offset, 54 ia_bit_buf_struct *it_bit_buff, 55 WORD32 nr_core_coder_channels); 56 57 WORD32 ixheaacd_lpd_channel_stream(ia_usac_data_struct *usac_data, 58 ia_td_frame_data_struct *pstr_td_frame_data, 59 ia_bit_buf_struct *it_bit_buff, 60 FLOAT32 *synth); 61 62 VOID ixheaacd_acelp_decoding(WORD32 k, ia_usac_data_struct *usac_data, 63 ia_td_frame_data_struct *pstr_td_frame_data, 64 ia_bit_buf_struct *it_bit_buff, WORD32 chan); 65 66 VOID ixheaacd_tcx_coding(ia_usac_data_struct *usac_data, WORD32 *quant, 67 WORD32 k, WORD32 first_tcx_flag, 68 ia_td_frame_data_struct *pstr_td_frame_data, 69 ia_bit_buf_struct *it_bit_buff); 70 71 WORD32 ixheaacd_win_seq_select(WORD32 window_sequence_curr, 72 WORD32 window_sequence_last); 73 74 WORD32 ixheaacd_fd_channel_stream( 75 ia_usac_data_struct *usac_data, 76 ia_usac_tmp_core_coder_struct *pstr_core_coder, UWORD8 *max_sfb, 77 WORD32 window_sequence_last, WORD32 chn, WORD32 noise_filling_config, 78 WORD32 ch, ia_bit_buf_struct *it_bit_buff); 79 80 VOID ixheaacd_read_fac_data(WORD32 lfac, WORD32 *fac_data, 81 ia_bit_buf_struct *it_bit_buff); 82 83 #endif /* IXHEAACD_BIT_EXTRACT_H */ 84