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_HEADERDECODE_H 21 #define IXHEAACD_HEADERDECODE_H 22 23 typedef struct { 24 WORD32 bit_stream_type; 25 WORD32 prog_config_present; 26 ia_program_config_struct str_prog_config; 27 } ia_adif_header_struct; 28 29 WORD32 ixheaacd_aac_headerdecode( 30 ia_exhaacplus_dec_api_struct *p_obj_enhaacplus_dec, UWORD8 *buffer, 31 WORD32 *bytes_consumed, 32 const ia_aac_dec_huffman_tables_struct *ptr_huffmann_tables); 33 34 ia_aac_decoder_struct *ixheaacd_aac_decoder_init( 35 ia_aac_dec_state_struct *p_state_enhaacplus_dec, 36 ia_aac_dec_sbr_bitstream_struct *ptr_sbr_bitstream, WORD channels, 37 VOID *aac_persistent_mem_v, WORD32 frame_length); 38 39 VOID ixheaacd_fill_prog_config_slots( 40 ia_aac_dec_state_struct *p_state_enhaacplus_dec); 41 42 WORD ixheaacd_decode_pce(struct ia_bit_buf_struct *it_bit_buff, 43 UWORD32 *ui_pce_found_in_hdr, 44 ia_program_config_struct *pce_t); 45 46 WORD32 ixheaacd_ga_hdr_dec(ia_aac_dec_state_struct *pstate_aac_dec, 47 WORD32 header_len, WORD32 *bytes_consumed, 48 ia_sampling_rate_info_struct *pstr_samp_rate_info, 49 struct ia_bit_buf_struct *it_bit_buff); 50 51 WORD32 ixheaacd_latm_audio_mux_element( 52 struct ia_bit_buf_struct *it_bit_buff, ixheaacd_latm_struct *latm_element, 53 ia_aac_dec_state_struct *aac_state_struct, 54 ia_sampling_rate_info_struct *sample_rate_info); 55 56 WORD32 ixheaacd_get_element_index_tag( 57 ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec, WORD ch_idx1, 58 WORD *ch_idx, WORD *channel, WORD *element_index_order, WORD total_elements, 59 WORD8 *element_used, WORD total_channels, ia_drc_dec_struct *pstr_drc_dec, 60 ia_drc_dec_struct *drc_dummy 61 , 62 UWORD8 *mps_buffer, 63 WORD32 *mps_header, 64 WORD32 *mps_bytes 65 ); 66 67 WORD32 ixheaacd_latm_audio_mux_element( 68 struct ia_bit_buf_struct *it_bit_buff, ixheaacd_latm_struct *latm_element, 69 ia_aac_dec_state_struct *aac_state_struct, 70 ia_sampling_rate_info_struct *ptr_samp_rate_info); 71 72 VOID ixheaacd_set_sbr_persistent_table_pointer( 73 VOID *sbr_persistent_mem_v, ia_sbr_tables_struct *ptr_sbr_tables, 74 ixheaacd_misc_tables *ptr_common_tables); 75 76 #endif /* IXHEAACD_HEADERDECODE_H */ 77