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 21 #pragma once 22 typedef struct { 23 ixheaace_psy_configuration_long psy_conf_long; 24 ixheaace_psy_configuration_short psy_conf_short; 25 ixheaace_psy_data *psy_data[IXHEAACE_MAX_CH_IN_BS_ELE]; 26 ixheaace_temporal_noise_shaping_data *temporal_noise_shaping_data[IXHEAACE_MAX_CH_IN_BS_ELE]; 27 FLOAT32 *p_scratch_tns_float; 28 } ixheaace_psy_kernel; 29 30 WORD32 ia_enhaacplus_enc_psy_new(ixheaace_psy_kernel *pstr_h_psy, WORD32 num_chan, 31 WORD32 *ptr_shared_buffer_2, WORD32 frame_len_long); 32 33 IA_ERRORCODE ia_enhaacplus_enc_psy_main_init(ixheaace_psy_kernel *pstr_h_psy, WORD32 sample_rate, 34 WORD32 bit_rate, WORD32 channels, WORD32 tns_mask, 35 WORD32 bandwidth, WORD32 aot, 36 ixheaace_aac_tables *pstr_aac_tables, 37 WORD32 frame_length); 38 39 IA_ERRORCODE ia_enhaacplus_enc_psy_main( 40 WORD32 time_sn_stride, /* total number of channels */ 41 ixheaace_element_info *pstr_elem_info, const FLOAT32 *ptr_time_signal, WORD32 aot, 42 ixheaace_psy_data **psy_data, 43 ixheaace_temporal_noise_shaping_data **tns_data, 44 ixheaace_psy_configuration_long *pstr_psy_conf_long, 45 ixheaace_psy_configuration_short *pstr_psy_conf_short, 46 ixheaace_psy_out_channel **psy_out_ch, 47 ixheaace_psy_out_element *pstr_psy_out_element, FLOAT32 *ptr_scratch_tns, 48 FLOAT32 *ptr_shared_buffer1, WORD8 *ptr_shared_buffer5, ixheaace_aac_tables *pstr_aac_tables, 49 WORD32 frame_len_long); 50