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 WORD32 frame_size; 24 WORD32 sample_rate; 25 WORD32 delay_mode; 26 WORD32 domain; 27 WORD32 parametric_drc_only; 28 WORD32 frame_count; 29 WORD32 gain_sequence_present; 30 } ia_drc_enc_params_struct; 31 32 typedef struct { 33 ia_drc_enc_params_struct str_enc_params; 34 ia_drc_uni_drc_config_struct str_uni_drc_config; 35 ia_drc_loudness_info_set_struct str_enc_loudness_info_set; 36 ia_drc_uni_drc_gain_ext_struct str_enc_gain_extension; 37 } ia_drc_input_config; 38 39 typedef struct { 40 ia_drc_enc_params_struct str_enc_params; 41 ia_drc_uni_drc_config_struct str_uni_drc_config; 42 ia_drc_loudness_info_set_struct str_enc_loudness_info_set; 43 ia_drc_uni_drc_gain_ext_struct str_enc_gain_extension; 44 } ia_drc_internal_config; 45 46 IA_ERRORCODE impd_drc_enc_init(VOID *pstr_drc_state, VOID *ptr_drc_scratch, 47 ia_drc_input_config *pstr_inp_config); 48 49 IA_ERRORCODE impd_drc_enc(VOID *pstr_drc_state, FLOAT32 **pptr_input, UWORD32 inp_offset, 50 WORD32 *ptr_bits_written, VOID *pstr_scratch); 51 52 IA_ERRORCODE impd_loudness_info_init(VOID *pstr_drc_state, ia_drc_input_config *pstr_inp_config); 53 54 IA_ERRORCODE impd_drc_validate_config_params(ia_drc_input_config *pstr_inp_config);