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 IA_ERRORCODE impd_drc_gain_enc_init(ia_drc_gain_enc_struct *pstr_gain_enc, 23 ia_drc_uni_drc_config_struct *pstr_uni_drc_config, 24 ia_drc_loudness_info_set_struct *pstr_loudness_info_set, 25 const WORD32 frame_size, const WORD32 sample_rate, 26 const WORD32 delay_mode, const WORD32 domain); 27 28 WORD32 impd_drc_get_delta_t_min(const WORD32 sample_rate); 29 30 IA_ERRORCODE impd_drc_encode_uni_drc_gain(ia_drc_gain_enc_struct *pstr_gain_enc, 31 FLOAT32 *ptr_gain_buffer, VOID *pstr_scratch); 32 33 IA_ERRORCODE impd_drc_write_loudness_info_set_extension( 34 ia_drc_enc_state *pstr_drc_state, ia_bit_buf_struct *it_bit_buf, 35 ia_drc_loudness_info_set_extension_struct *pstr_loudness_info_set_extension, 36 WORD32 *ptr_bit_cnt, FLAG write_bs); 37 38 IA_ERRORCODE impd_drc_write_uni_drc_config(ia_drc_enc_state *pstr_drc_state, WORD32 *ptr_bit_cnt, 39 FLAG write_bs); 40 41 VOID impd_drc_write_uni_drc_gain(ia_drc_enc_state *pstr_drc_state, WORD32 *ptr_bit_cnt); 42 43 IA_ERRORCODE impd_drc_write_measured_loudness_info(ia_drc_enc_state *pstr_drc_state); 44 45 IA_ERRORCODE impd_drc_write_loudness_info_set(ia_drc_enc_state *pstr_drc_state, 46 ia_bit_buf_struct *it_bit_buf, WORD32 *ptr_bit_cnt, 47 FLAG write_bs);