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 #define MAX_DRC_GAIN_BAND_COUNT (50) 23 #define MAX_DRC_FRAME_SIZE (4096) 24 #define DRC_OUT_BITBUFFER_SIZE (4096) 25 26 typedef struct { 27 ia_drc_enc_params_struct str_enc_params; 28 ia_drc_uni_drc_config_struct str_uni_drc_config; 29 ia_drc_loudness_info_set_struct str_enc_loudness_info_set; 30 ia_drc_uni_drc_gain_ext_struct str_enc_gain_extension; 31 32 ia_drc_gain_enc_struct str_gain_enc; 33 UWORD8 bit_buf_base_cfg[MAX_DRC_PAYLOAD_BYTES]; 34 ia_bit_buf_struct str_bit_buf_cfg; 35 WORD32 drc_config_data_size_bit; 36 UWORD8 bit_buf_base_cfg_ext[MAX_DRC_PAYLOAD_BYTES]; 37 ia_bit_buf_struct str_bit_buf_cfg_ext; 38 WORD32 drc_config_ext_data_size_bit; 39 UWORD8 bit_buf_base_cfg_tmp[MAX_DRC_PAYLOAD_BYTES]; 40 ia_bit_buf_struct str_bit_buf_cfg_tmp; 41 42 UWORD8 drc_payload_data[MAX_DRC_PAYLOAD_BYTES]; 43 FLOAT32 gain_buffer[MAX_DRC_GAIN_BAND_COUNT][MAX_DRC_FRAME_SIZE]; 44 45 UWORD8 bit_buf_base_out[DRC_OUT_BITBUFFER_SIZE]; 46 ia_bit_buf_struct str_bit_buf_out; 47 UWORD8 is_first_drc_process_complete; 48 49 VOID *drc_scratch_mem; 50 WORD32 drc_scratch_used; 51 } ia_drc_enc_state; 52