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 IMPD_DRC_PROCESS_AUDIO_H 21 #define IMPD_DRC_PROCESS_AUDIO_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 typedef struct { 28 WORD32 multiband_audio_sig_count; 29 WORD32 frame_size; 30 FLOAT32** non_interleaved_audio; 31 } ia_audio_band_buffer_struct; 32 33 typedef struct { 34 WORD32 audio_num_chan; 35 WORD32 frame_size; 36 WORD32 audio_sub_band_count; 37 WORD32 audio_sub_band_frame_size; 38 WORD32 audio_delay_samples; 39 WORD32 audio_delay_sub_band_samples; 40 FLOAT32** audio_io_buffer_delayed; 41 FLOAT32** audio_buffer_delayed_real; 42 FLOAT32** audio_buffer_delayed_imag; 43 FLOAT32** audio_in_out_buf; 44 FLOAT32** audio_real_buff; 45 FLOAT32** audio_imag_buff; 46 } ia_audio_in_out_buf; 47 48 WORD32 49 impd_apply_gains_subband(ia_drc_instructions_struct* pstr_drc_instruction_arr, 50 const WORD32 drc_instructions_index, 51 ia_drc_params_struct* ia_drc_params_struct, 52 ia_gain_buffer_struct* pstr_gain_buf, 53 ia_overlap_params_struct* pstr_overlap_params, 54 FLOAT32* deinterleaved_audio_delayed_re[], 55 FLOAT32* deinterleaved_audio_delayed_im[], 56 FLOAT32* deinterleaved_audio_re[], 57 FLOAT32* deinterleaved_audio_im[]); 58 59 WORD32 60 impd_filter_banks_process(ia_drc_instructions_struct* pstr_drc_instruction_arr, 61 const WORD32 drc_instructions_index, 62 ia_drc_params_struct* ia_drc_params_struct, 63 FLOAT32* audio_io_buf[], 64 ia_audio_band_buffer_struct* audio_band_buffer, 65 ia_filter_banks_struct* ia_filter_banks_struct, 66 const WORD32 passThru); 67 68 WORD32 69 impd_store_audio_io_buffer_time(FLOAT32* audio_in_out_buf[], 70 ia_audio_in_out_buf* audio_io_buf_internal); 71 72 WORD32 73 impd_store_audio_io_buffer_freq(FLOAT32* audio_real_buff[], 74 FLOAT32* audio_imag_buff[], 75 ia_audio_in_out_buf* audio_io_buf_internal); 76 77 WORD32 78 impd_retrieve_audio_io_buffer_time(FLOAT32* audio_in_out_buf[], 79 ia_audio_in_out_buf* audio_io_buf_internal); 80 81 WORD32 82 impd_retrieve_audio_buffer_freq(FLOAT32* audio_real_buff[], 83 FLOAT32* audio_imag_buff[], 84 ia_audio_in_out_buf* audio_io_buf_internal); 85 86 WORD32 87 impd_advance_audio_io_buffer_time(ia_audio_in_out_buf* audio_io_buf_internal); 88 89 WORD32 90 impd_advance_audio_buff_freq(ia_audio_in_out_buf* audio_io_buf_internal); 91 92 #ifdef __cplusplus 93 } 94 #endif 95 #endif 96