1*15dc779aSAndroid Build Coastguard Worker /****************************************************************************** 2*15dc779aSAndroid Build Coastguard Worker * * 3*15dc779aSAndroid Build Coastguard Worker * Copyright (C) 2018 The Android Open Source Project 4*15dc779aSAndroid Build Coastguard Worker * 5*15dc779aSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 6*15dc779aSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 7*15dc779aSAndroid Build Coastguard Worker * You may obtain a copy of the License at: 8*15dc779aSAndroid Build Coastguard Worker * 9*15dc779aSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 10*15dc779aSAndroid Build Coastguard Worker * 11*15dc779aSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 12*15dc779aSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 13*15dc779aSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14*15dc779aSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 15*15dc779aSAndroid Build Coastguard Worker * limitations under the License. 16*15dc779aSAndroid Build Coastguard Worker * 17*15dc779aSAndroid Build Coastguard Worker ***************************************************************************** 18*15dc779aSAndroid Build Coastguard Worker * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19*15dc779aSAndroid Build Coastguard Worker */ 20*15dc779aSAndroid Build Coastguard Worker #ifndef IXHEAACD_HEADERDECODE_H 21*15dc779aSAndroid Build Coastguard Worker #define IXHEAACD_HEADERDECODE_H 22*15dc779aSAndroid Build Coastguard Worker 23*15dc779aSAndroid Build Coastguard Worker typedef struct { 24*15dc779aSAndroid Build Coastguard Worker WORD32 bit_stream_type; 25*15dc779aSAndroid Build Coastguard Worker WORD32 prog_config_present; 26*15dc779aSAndroid Build Coastguard Worker ia_program_config_struct str_prog_config; 27*15dc779aSAndroid Build Coastguard Worker } ia_adif_header_struct; 28*15dc779aSAndroid Build Coastguard Worker 29*15dc779aSAndroid Build Coastguard Worker WORD32 ixheaacd_aac_headerdecode( 30*15dc779aSAndroid Build Coastguard Worker ia_exhaacplus_dec_api_struct *p_obj_enhaacplus_dec, UWORD8 *buffer, 31*15dc779aSAndroid Build Coastguard Worker WORD32 *bytes_consumed, 32*15dc779aSAndroid Build Coastguard Worker const ia_aac_dec_huffman_tables_struct *ptr_huffmann_tables); 33*15dc779aSAndroid Build Coastguard Worker 34*15dc779aSAndroid Build Coastguard Worker ia_aac_decoder_struct *ixheaacd_aac_decoder_init( 35*15dc779aSAndroid Build Coastguard Worker ia_aac_dec_state_struct *p_state_enhaacplus_dec, 36*15dc779aSAndroid Build Coastguard Worker ia_aac_dec_sbr_bitstream_struct *ptr_sbr_bitstream, WORD channels, 37*15dc779aSAndroid Build Coastguard Worker VOID *aac_persistent_mem_v, WORD32 frame_length); 38*15dc779aSAndroid Build Coastguard Worker 39*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_fill_prog_config_slots( 40*15dc779aSAndroid Build Coastguard Worker ia_aac_dec_state_struct *p_state_enhaacplus_dec); 41*15dc779aSAndroid Build Coastguard Worker 42*15dc779aSAndroid Build Coastguard Worker WORD ixheaacd_decode_pce(struct ia_bit_buf_struct *it_bit_buff, 43*15dc779aSAndroid Build Coastguard Worker UWORD32 *ui_pce_found_in_hdr, 44*15dc779aSAndroid Build Coastguard Worker ia_program_config_struct *pce_t); 45*15dc779aSAndroid Build Coastguard Worker 46*15dc779aSAndroid Build Coastguard Worker WORD32 ixheaacd_ga_hdr_dec(ia_aac_dec_state_struct *pstate_aac_dec, 47*15dc779aSAndroid Build Coastguard Worker WORD32 header_len, WORD32 *bytes_consumed, 48*15dc779aSAndroid Build Coastguard Worker ia_sampling_rate_info_struct *pstr_samp_rate_info, 49*15dc779aSAndroid Build Coastguard Worker struct ia_bit_buf_struct *it_bit_buff); 50*15dc779aSAndroid Build Coastguard Worker 51*15dc779aSAndroid Build Coastguard Worker WORD32 ixheaacd_latm_audio_mux_element( 52*15dc779aSAndroid Build Coastguard Worker struct ia_bit_buf_struct *it_bit_buff, ixheaacd_latm_struct *latm_element, 53*15dc779aSAndroid Build Coastguard Worker ia_aac_dec_state_struct *aac_state_struct, 54*15dc779aSAndroid Build Coastguard Worker ia_sampling_rate_info_struct *sample_rate_info); 55*15dc779aSAndroid Build Coastguard Worker 56*15dc779aSAndroid Build Coastguard Worker WORD32 ixheaacd_get_element_index_tag( 57*15dc779aSAndroid Build Coastguard Worker ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec, WORD ch_idx1, 58*15dc779aSAndroid Build Coastguard Worker WORD *ch_idx, WORD *channel, WORD *element_index_order, WORD total_elements, 59*15dc779aSAndroid Build Coastguard Worker WORD8 *element_used, WORD total_channels, ia_drc_dec_struct *pstr_drc_dec, 60*15dc779aSAndroid Build Coastguard Worker ia_drc_dec_struct *drc_dummy 61*15dc779aSAndroid Build Coastguard Worker , 62*15dc779aSAndroid Build Coastguard Worker UWORD8 *mps_buffer, 63*15dc779aSAndroid Build Coastguard Worker WORD32 *mps_header, 64*15dc779aSAndroid Build Coastguard Worker WORD32 *mps_bytes 65*15dc779aSAndroid Build Coastguard Worker ); 66*15dc779aSAndroid Build Coastguard Worker 67*15dc779aSAndroid Build Coastguard Worker WORD32 ixheaacd_latm_audio_mux_element( 68*15dc779aSAndroid Build Coastguard Worker struct ia_bit_buf_struct *it_bit_buff, ixheaacd_latm_struct *latm_element, 69*15dc779aSAndroid Build Coastguard Worker ia_aac_dec_state_struct *aac_state_struct, 70*15dc779aSAndroid Build Coastguard Worker ia_sampling_rate_info_struct *ptr_samp_rate_info); 71*15dc779aSAndroid Build Coastguard Worker 72*15dc779aSAndroid Build Coastguard Worker VOID ixheaacd_set_sbr_persistent_table_pointer( 73*15dc779aSAndroid Build Coastguard Worker VOID *sbr_persistent_mem_v, ia_sbr_tables_struct *ptr_sbr_tables, 74*15dc779aSAndroid Build Coastguard Worker ixheaacd_misc_tables *ptr_common_tables); 75*15dc779aSAndroid Build Coastguard Worker 76*15dc779aSAndroid Build Coastguard Worker #endif /* IXHEAACD_HEADERDECODE_H */ 77