1 /****************************************************************************** 2 * 3 * Copyright (C) 2015 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_UNI_MULTI_BAND_H 21 #define IMPD_DRC_UNI_MULTI_BAND_H 22 23 #define DRC_SUBBAND_COUNT_WITH_AUDIO_CODEC_FILTERBANK_MAX \ 24 FILTER_BANK_PARAMETER_COUNT 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 typedef struct { 31 FLOAT32 overlap_weight[AUDIO_CODEC_SUBBAND_COUNT_MAX]; 32 } ia_band_overlap_params_struct; 33 34 typedef struct { 35 ia_band_overlap_params_struct str_band_overlap_params[BAND_COUNT_MAX]; 36 } ia_group_overlap_params_struct; 37 38 typedef struct { 39 ia_group_overlap_params_struct 40 str_group_overlap_params[CHANNEL_GROUP_COUNT_MAX]; 41 } ia_overlap_params_struct; 42 43 WORD32 44 impd_fcenter_norm_sb_init(WORD32 num_subbands, FLOAT32* fcenter_norm_subband); 45 46 WORD32 47 impd_generate_slope(WORD32 num_subbands, FLOAT32* fcenter_norm_subband, 48 FLOAT32 fcross_norm_lo, FLOAT32 fcross_norm_hi, 49 FLOAT32* response); 50 51 WORD32 52 impd_generate_overlap_weights( 53 WORD32 num_drc_bands, WORD32 drc_band_type, 54 ia_gain_params_struct* gain_params, WORD32 dec_subband_count, 55 ia_group_overlap_params_struct* pstr_group_overlap_params); 56 57 WORD32 58 impd_init_overlap_weight( 59 ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc, 60 ia_drc_instructions_struct* str_drc_instruction_str, 61 WORD32 sub_band_domain_mode, ia_overlap_params_struct* pstr_overlap_params); 62 63 #ifdef __cplusplus 64 } 65 #endif 66 #endif 67