• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_filter_banks_process(ia_drc_instructions_struct* pstr_drc_instruction_arr,
50                           const WORD32 drc_instructions_index,
51                           ia_drc_params_struct* ia_drc_params_struct,
52                           FLOAT32* audio_io_buf[],
53                           ia_audio_band_buffer_struct* audio_band_buffer,
54                           ia_filter_banks_struct* ia_filter_banks_struct,
55                           const WORD32 passThru);
56 
57 VOID impd_store_audio_io_buffer_time(
58     FLOAT32* audio_in_out_buf[], ia_audio_in_out_buf* audio_io_buf_internal);
59 
60 VOID impd_store_audio_io_buffer_freq(
61     FLOAT32* audio_real_buff[], FLOAT32* audio_imag_buff[],
62     ia_audio_in_out_buf* audio_io_buf_internal);
63 
64 VOID impd_retrieve_audio_io_buffer_time(
65     FLOAT32* audio_in_out_buf[], ia_audio_in_out_buf* audio_io_buf_internal);
66 
67 VOID impd_retrieve_audio_buffer_freq(
68     FLOAT32* audio_real_buff[], FLOAT32* audio_imag_buff[],
69     ia_audio_in_out_buf* audio_io_buf_internal);
70 
71 VOID impd_advance_audio_io_buffer_time(
72     ia_audio_in_out_buf* audio_io_buf_internal);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 #endif
78