151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick/******************************************************************************
24908247643e9e97852e847c00bfe7c4259279538Ray Essick *
34908247643e9e97852e847c00bfe7c4259279538Ray Essick * Copyright (C) 2018 The Android Open Source Project
44908247643e9e97852e847c00bfe7c4259279538Ray Essick *
54908247643e9e97852e847c00bfe7c4259279538Ray Essick * Licensed under the Apache License, Version 2.0 (the "License");
64908247643e9e97852e847c00bfe7c4259279538Ray Essick * you may not use this file except in compliance with the License.
74908247643e9e97852e847c00bfe7c4259279538Ray Essick * You may obtain a copy of the License at:
84908247643e9e97852e847c00bfe7c4259279538Ray Essick *
94908247643e9e97852e847c00bfe7c4259279538Ray Essick * http://www.apache.org/licenses/LICENSE-2.0
104908247643e9e97852e847c00bfe7c4259279538Ray Essick *
114908247643e9e97852e847c00bfe7c4259279538Ray Essick * Unless required by applicable law or agreed to in writing, software
124908247643e9e97852e847c00bfe7c4259279538Ray Essick * distributed under the License is distributed on an "AS IS" BASIS,
134908247643e9e97852e847c00bfe7c4259279538Ray Essick * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
144908247643e9e97852e847c00bfe7c4259279538Ray Essick * See the License for the specific language governing permissions and
154908247643e9e97852e847c00bfe7c4259279538Ray Essick * limitations under the License.
164908247643e9e97852e847c00bfe7c4259279538Ray Essick *
1751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick *****************************************************************************
184908247643e9e97852e847c00bfe7c4259279538Ray Essick * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
194908247643e9e97852e847c00bfe7c4259279538Ray Essick*/
2051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick#ifndef IMPD_DRC_STURCT_H
2151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick#define IMPD_DRC_STURCT_H
2251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
2351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick#ifdef __cplusplus
24b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuriextern "C" {
2551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick#endif
2651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
27b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_UNKNOWN_OTHER 0
28b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
29b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
30b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_MAX_OF_LOUDNESS_RANGE 3
31b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_MOMENTARY_LOUDNESS_MAX 4
32b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_SHORT_TERM_LOUDNESS_MAX 5
33b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_LOUDNESS_RANGE 6
34b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_MIXING_LEVEL 7
35b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_ROOM_TYPE 8
36b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define METHOD_DEFINITION_SHORT_TERM_LOUDNESS 9
37b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
38b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_UNKNOWN_OTHER 0
39b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_EBU_R_128 1
40b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_BS_1770_4 2
41b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_BS_1770_3 MEASUREMENT_SYSTEM_BS_1770_4
4251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick#define MEASUREMENT_SYSTEM_BS_1770_4_PRE_PROCESSING 3
43b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_BS_1770_3_PRE_PROCESSING \
44b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  MEASUREMENT_SYSTEM_BS_1770_4_PRE_PROCESSING
45b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_USER 4
46b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_EXPERT_PANEL 5
47b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_BS_1771_1 6
48b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_RESERVED_A 7
49b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_RESERVED_B 8
50b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_RESERVED_C 9
51b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_RESERVED_D 10
52b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MEASUREMENT_SYSTEM_RESERVED_E 11
53b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
54b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define RELIABILITY_UKNOWN 0
55b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define RELIABILITY_UNVERIFIED 1
56b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define RELIABILITY_CEILING 2
57b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define RELIABILITY_ACCURATE 3
58b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
59b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_COUNT 12
60b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
61b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_NONE (-1)
62b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_NIGHT 0x0001
63b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_NOISY 0x0002
64b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_LIMITED 0x0004
65b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_LOWLEVEL 0x0008
66b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_DIALOG 0x0010
67b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_GENERAL_COMPR 0x0020
68b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_EXPAND 0x0040
69b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_ARTISTIC 0x0080
70b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_CLIPPING 0x0100
71b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_FADE 0x0200
72b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_DUCK_OTHER 0x0400
73b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EFFECT_BIT_DUCK_SELF 0x0800
74b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
75b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAIN_CODING_PROFILE_REGULAR 0
76b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAIN_CODING_PROFILE_FADING 1
77b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAIN_CODING_PROFILE_CLIPPING 2
78b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAIN_CODING_PROFILE_CONSTANT 3
79b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAIN_CODING_PROFILE_DUCKING GAIN_CODING_PROFILE_CLIPPING
80b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
81b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAIN_INTERPOLATION_TYPE_SPLINE 0
82b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAIN_INTERPOLATION_TYPE_LINEAR 1
83b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
84b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_METHOD_DEFINITION_DEFAULT 0
85b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_METHOD_DEFINITION_PROGRAM_LOUDNESS 1
86b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_METHOD_DEFINITION_ANCHOR_LOUDNESS 2
87b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
88b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_DEFAULT 0
89b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_BS_1770_4 1
90b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_BS_1770_3 USER_MEASUREMENT_SYSTEM_BS_1770_4
91b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_USER 2
92b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_EXPERT_PANEL 3
93b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_RESERVED_A 4
94b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_RESERVED_B 5
95b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_RESERVED_C 6
96b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_RESERVED_D 7
97b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_MEASUREMENT_SYSTEM_RESERVED_E 8
98b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
99b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_LOUDNESS_PREPROCESSING_DEFAULT 0
100b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_LOUDNESS_PREPROCESSING_OFF 1
101b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define USER_LOUDNESS_PREPROCESSING_HIGHPASS 2
102b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
103b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define LOUDNESS_DEVIATION_MAX_DEFAULT 63
104b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define LOUDNESS_NORMALIZATION_GAIN_MAX_DEFAULT 1000
105b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
106b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define SHORT_TERM_LOUDNESS_TO_AVG 0
107b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define MOMENTARY_LOUDNESS_TO_AVG 1
108b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define TOP_OF_LOUDNESS_RANGE_TO_AVG 2
109b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
110b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define DRC_COMPLEXITY_LEVEL_MAX 0xF
111b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define EQ_COMPLEXITY_LEVEL_MAX 0xF
112b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_LEVEL_SUPPORTED_TOTAL 20.0f
113b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
114b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_SUBBAND_EQ 2.5f
115b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_FIR 0.4f
116b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_IIR 5.0f
117b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_MOD_TIME 1.0f
118b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_MOD_SUBBAND 2.0f
119b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_LAP 2.0f
120b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_SHAPE 6.0f
121b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_SPLINE 5.0f
122b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_LINEAR 2.5f
123b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_PARAM_DRC_FILT 5.0f
124b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_PARAM_DRC_SUBBAND 5.0f
125b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_PARAM_LIM_FILT 4.5f
126b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define COMPLEXITY_W_PARAM_DRC_ATTACK 136.0f
127b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
128b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define LEFT_SIDE 0
129b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define RIGHT_SIDE 1
130b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
131b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define CHARACTERISTIC_SIGMOID 0
132b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define CHARACTERISTIC_NODES 1
133b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define CHARACTERISTIC_PASS_THRU 2
134b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
135b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAINFORMAT_QMF32 0x1
136b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAINFORMAT_QMFHYBRID39 0x2
137b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAINFORMAT_QMF64 0x3
138b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAINFORMAT_QMFHYBRID71 0x4
139b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAINFORMAT_QMF128 0x5
140b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAINFORMAT_QMFHYBRID135 0x6
141b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define GAINFORMAT_UNIFORM 0x7
142b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
143b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define DRC_INPUT_LOUDNESS_TARGET (-31.0f)
144b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
145b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define SHAPE_FILTER_TYPE_OFF 0
146b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define SHAPE_FILTER_TYPE_LF_CUT 1
147b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define SHAPE_FILTER_TYPE_LF_BOOST 2
148b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define SHAPE_FILTER_TYPE_HF_CUT 3
149b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define SHAPE_FILTER_TYPE_HF_BOOST 4
150b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
151b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri#define SHAPE_FILTER_DRC_GAIN_MAX_MINUS_ONE 1583.8931924611f
152b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
153b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuritypedef struct {
154b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 type;
155b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 gain_offset;
156b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 y1_bound;
157b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 warped_gain_max;
158b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 factor;
159b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 coeff_sum;
160b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 partial_coeff_sum;
161b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 g_norm;
162b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 a1;
163b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 a2;
164b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 b1;
165b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 b2;
166b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 audio_in_state_1[MAX_CHANNEL_COUNT];
167b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 audio_in_state_2[MAX_CHANNEL_COUNT];
168b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 audio_out_state_1[MAX_CHANNEL_COUNT];
169b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 audio_out_state_2[MAX_CHANNEL_COUNT];
17051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_shape_filter_struct;
17151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
17251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
173b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 shape_flter_block_flag;
174b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 drc_gain_last;
175b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_shape_filter_struct shape_filter[4];
17651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} shape_filter_block;
17751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
17851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
179b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 level_estim_k_weighting_type;
180b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 level_estim_integration_time_present;
181b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 level_estim_integration_time;
182b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_curve_definition_type;
183b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic;
184b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 node_count;
185b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 node_level[PARAM_DRC_TYPE_FF_NODE_COUNT_MAX];
186b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 node_gain[PARAM_DRC_TYPE_FF_NODE_COUNT_MAX];
187b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_gain_smooth_parameters_present;
188b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_attack_time_slow;
189b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_release_time_slow;
190b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_time_fast_present;
191b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_attack_time_fast;
192b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_release_time_fast;
193b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_threshold_present;
194b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_attack_threshold;
195b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_rel_threshold;
196b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_hold_off_count_present;
197b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_smooth_hold_off;
198b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
199b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 disable_paramteric_drc;
20051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_parametric_drc_type_feed_forward_struct;
2014908247643e9e97852e847c00bfe7c4259279538Ray Essick
20251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
203b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_lim_threshold_present;
204b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 parametric_lim_threshold;
205b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_lim_attack;
206b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_lim_release_present;
207b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_lim_release;
208b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic;
2094908247643e9e97852e847c00bfe7c4259279538Ray Essick
210b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 disable_paramteric_drc;
21151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_parametric_drc_lim_struct;
21251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
21351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
214b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_id;
215b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_look_ahead_flag;
216b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_look_ahead;
217b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_preset_id_present;
218b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_preset_id;
219b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_type;
220b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 len_bit_size;
221b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_parametric_drc_type_feed_forward_struct
222b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_parametric_drc_type_feed_forward;
223b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_parametric_drc_lim_struct parametric_drc_lim;
2244908247643e9e97852e847c00bfe7c4259279538Ray Essick
225b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic;
226b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 disable_paramteric_drc;
22751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_parametric_drc_instructions_struct;
22851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
22951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
230b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_id;
231b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 side_chain_config_type;
232b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 downmix_id;
233b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 level_estim_channel_weight_format;
234b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 level_estim_ch_weight[MAX_CHANNEL_COUNT];
235b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_input_loudness_present;
236b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 drc_input_loudness;
2374908247643e9e97852e847c00bfe7c4259279538Ray Essick
238b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 ch_count_from_dwnmix_id;
23951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_parametric_drc_gain_set_params_struct;
24051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
24151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
242b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_location;
243b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_frame_size_format;
244b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_frame_size;
245b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_delay_max_present;
246b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_delay_max;
247b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 reset_parametric_drc;
248b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_gain_set_count;
249b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_parametric_drc_gain_set_params_struct
250b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_parametric_drc_gain_set_params[SEQUENCE_COUNT_MAX];
25151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_coeff_parametric_drc_struct;
2524908247643e9e97852e847c00bfe7c4259279538Ray Essick
25351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
254b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 base_channel_count;
255b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 layout_signaling_present;
256b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 defined_layout;
257b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 speaker_position[SPEAKER_POS_COUNT_MAX];
25851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_channel_layout_struct;
25951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
26051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
261b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 downmix_id;
262b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 target_channel_count;
263b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 target_layout;
264b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 downmix_coefficients_present;
265b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 downmix_coefficient[DOWNMIX_COEFF_COUNT_MAX];
26651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_downmix_instructions_struct;
26751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
26851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
269b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_seq_idx;
270b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic;
271b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic_present;
272b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic_format_is_cicp;
273b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic_left_index;
274b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic_right_index;
275b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 crossover_freq_idx;
276b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 start_subband_index;
27751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_gain_params_struct;
27851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
27951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
280b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 ducking_scaling_flag;
281b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 ducking_scaling;
282b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 ducking_scaling_quantized;
28351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_ducking_modifiers_struct;
28451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
28551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
286b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 target_characteristic_left_present[DRC_BAND_COUNT_MAX];
287b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 target_characteristic_left_index[DRC_BAND_COUNT_MAX];
288b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 target_characteristic_right_present[DRC_BAND_COUNT_MAX];
289b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 target_characteristic_right_index[DRC_BAND_COUNT_MAX];
290b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 shape_filter_flag;
291b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 shape_filter_idx;
292b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_scaling_flag[BAND_COUNT_MAX];
293b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 attn_scaling[BAND_COUNT_MAX];
294b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 ampl_scaling[BAND_COUNT_MAX];
295b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_offset_flag[BAND_COUNT_MAX];
296b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 gain_offset[BAND_COUNT_MAX];
29751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_gain_modifiers_struct;
29851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
29951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
300b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_coding_profile;
301b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_interpolation_type;
302b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 full_frame;
303b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 time_alignment;
304b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 time_delt_min_flag;
305b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 time_delt_min_val;
306b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 band_count;
307b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_band_type;
308b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_gain_params_struct gain_params[BAND_COUNT_MAX];
3094908247643e9e97852e847c00bfe7c4259279538Ray Essick
310b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 num_gain_max_values;
311b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_tables_struct str_tables;
31251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_gain_set_params_struct;
31351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
3144908247643e9e97852e847c00bfe7c4259279538Ray Essick#define SPLIT_CHARACTERISTIC_NODE_COUNT_MAX 4
31551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
316b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 characteristic_format;
317b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 in_out_ratio;
318b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 gain;
319b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 exp;
320b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 flip_sign;
321b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 characteristic_node_count;
322b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 node_level[SPLIT_CHARACTERISTIC_NODE_COUNT_MAX + 1];
323b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 node_gain[SPLIT_CHARACTERISTIC_NODE_COUNT_MAX + 1];
32451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_split_drc_characteristic_struct;
32551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
32651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
327b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 corner_freq_index;
328b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 filter_strength_index;
32951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_shape_filter_params_struct;
33051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
33151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
332b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 lf_cut_filter_present;
333b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_shape_filter_params_struct str_lf_cut_params;
334b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 lf_boost_filter_present;
335b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_shape_filter_params_struct str_lf_boost_params;
336b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 hf_cut_filter_present;
337b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_shape_filter_params_struct str_hfCutParams;
338b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 hf_boost_filter_present;
339b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_shape_filter_params_struct str_hf_boost_params;
34051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_shape_filter_block_params_struct;
3414908247643e9e97852e847c00bfe7c4259279538Ray Essick
34251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
343b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_location;
344b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic;
34551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_coefficients_basic_struct;
34651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
34751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
348b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 version;
349b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_location;
350b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_frame_size_present;
351b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_frame_size;
352b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_set_count;
353b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_gain_set_params_struct gain_set_params[GAIN_SET_COUNT_MAX];
354b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic_left_present;
355b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 characteristic_left_count;
356b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_split_drc_characteristic_struct
357b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_split_characteristic_left[SPLIT_CHARACTERISTIC_COUNT_MAX];
358b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic_right_present;
359b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 characteristic_right_count;
360b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_split_drc_characteristic_struct
361b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_split_characteristic_right[SPLIT_CHARACTERISTIC_COUNT_MAX];
362b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 shape_filters_present;
363b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 shape_num_filter;
364b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_shape_filter_block_params_struct
365b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_shape_filter_block_params[SHAPE_FILTER_COUNT_MAX + 1];
366b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_sequence_count;
367b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_set_params_index_for_gain_sequence[SEQUENCE_COUNT_MAX];
368b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_set_count_plus;
3694908247643e9e97852e847c00bfe7c4259279538Ray Essick
37051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_uni_drc_coeffs_struct;
37151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
37251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
373b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_id;
374b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_location;
375b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 dwnmix_id_count;
376b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 downmix_id[DOWNMIX_ID_COUNT_MAX];
377b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_effect;
378b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 limiter_peak_target_present;
379b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 limiter_peak_target;
380b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_target_loudness_present;
381b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_target_loudness_value_upper;
382b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_target_loudness_value_lower_present;
383b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_target_loudness_value_lower;
38451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_instructions_basic_struct;
38551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
38651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
387b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_id;
388b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_complexity_level;
389b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 requires_eq;
390b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_apply_to_dwnmix;
391b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_location;
392b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 dwnmix_id_count;
393b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 downmix_id[DOWNMIX_ID_COUNT_MAX];
394b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 depends_on_drc_set_present;
395b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 depends_on_drc_set;
396b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 no_independent_use;
397b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_effect;
398b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_set_index[MAX_CHANNEL_COUNT];
399b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_gain_modifiers_struct
400b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_gain_modifiers_of_ch_group[CHANNEL_GROUP_COUNT_MAX];
401b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_ducking_modifiers_struct
402b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_ducking_modifiers_for_channel[MAX_CHANNEL_COUNT];
403b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 limiter_peak_target_present;
404b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 limiter_peak_target;
405b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_target_loudness_present;
406b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_target_loudness_value_upper;
407b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_target_loudness_value_lower_present;
408b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_target_loudness_value_lower;
409b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
410b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 audio_num_chan;
411b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 num_drc_ch_groups;
412b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_set_index_for_channel_group[CHANNEL_GROUP_COUNT_MAX];
413b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 band_count_of_ch_group[CHANNEL_GROUP_COUNT_MAX];
414b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_interpolation_type_for_channel_group[CHANNEL_GROUP_COUNT_MAX];
415b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 time_delta_min_for_channel_group[CHANNEL_GROUP_COUNT_MAX];
416b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 time_alignment_for_channel_group[CHANNEL_GROUP_COUNT_MAX];
417b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_ducking_modifiers_struct
418b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_ducking_modifiers_for_channel_group[CHANNEL_GROUP_COUNT_MAX];
419b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 channel_group_of_ch[MAX_CHANNEL_COUNT];
420b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 num_chan_per_ch_group[CHANNEL_GROUP_COUNT_MAX];
421b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_element_count;
422b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 multiband_audio_sig_count;
423b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 ch_group_parametric_drc_flag[CHANNEL_GROUP_COUNT_MAX];
424b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_set_idx_of_ch_group_parametric_drc[CHANNEL_GROUP_COUNT_MAX];
425b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_look_ahead_samples[CHANNEL_GROUP_COUNT_MAX];
426b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_look_ahead_samples_max;
42751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_instructions_struct;
42851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
42951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
430b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 method_def;
431b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 method_val;
432b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 measurement_system;
433b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 reliability;
43451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_loudness_measure_struct;
43551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
43651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
437b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_id;
438b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_set_id;
439b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 downmix_id;
440b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 sample_peak_level_present;
441b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 sample_peak_level;
442b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 true_peak_level_present;
443b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 true_peak_level;
444b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 true_peak_level_measurement_system;
445b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 true_peak_level_reliability;
446b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 measurement_count;
447b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_loudness_measure_struct loudness_measure[MEASUREMENT_COUNT_MAX];
44851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_loudness_info_struct;
4494908247643e9e97852e847c00bfe7c4259279538Ray Essick
45051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
451b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loud_eq_set_id;
452b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_location;
453b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 dwnmix_id_count;
454b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 downmix_id[DOWNMIX_ID_COUNT_MAX];
455b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_id_count;
456b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_id[DRC_SET_ID_COUNT_MAX];
457b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_set_id_count;
458b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_set_id[EQ_SET_ID_COUNT_MAX];
459b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loudness_after_drc;
460b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loudness_after_eq;
461b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loud_eq_gain_sequence_count;
462b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 gain_seq_idx[LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX];
463b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic_format_is_cicp[LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX];
464b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic[LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX];
465b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic_left_index[LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX];
466b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_characteristic_right_index[LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX];
467b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 frequency_range_index[LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX];
468b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 loud_eq_scaling[LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX];
469b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 loud_eq_offset[LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX];
47051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_loud_eq_instructions_struct;
47151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
47251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
473b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 filt_ele_idx;
474b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 filt_ele_gain_flag;
475b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 filt_ele_gain;
47651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_filt_ele_struct;
47751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
47851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
479b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 filter_element_count;
480b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_filt_ele_struct str_filter_element[FILTER_ELEMENT_COUNT_MAX];
48151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_filt_block_struct;
48251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
48351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
484b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_filter_format;
485b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 bs_real_zero_radius_one_count;
486b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 real_zero_count;
487b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 generic_zero_count;
488b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 real_pole_count;
489b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 cmplx_pole_count;
490b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 zero_sign[REAL_ZERO_RADIUS_ONE_COUNT_MAX];
491b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 real_zero_radius[REAL_ZERO_COUNT_MAX];
492b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 generic_zero_radius[COMPLEX_ZERO_COUNT_MAX];
493b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 generic_zero_angle[COMPLEX_ZERO_COUNT_MAX];
494b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 real_pole_radius[REAL_POLE_COUNT_MAX];
495b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 complex_pole_radius[COMPLEX_POLE_COUNT_MAX];
496b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 complex_pole_angle[COMPLEX_POLE_COUNT_MAX];
497b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 fir_filt_order;
498b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 fir_symmetry;
499b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 fir_coeff[FIR_ORDER_MAX / 2];
50051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_unique_td_filt_element;
50151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
50251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
503b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 num_eq_nodes;
504b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 eq_slope[EQ_NODE_COUNT_MAX];
505b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_freq_delta[EQ_NODE_COUNT_MAX];
506b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 eq_gain_initial;
507b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 eq_gain_delta[EQ_NODE_COUNT_MAX];
50851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_eq_subband_gain_spline_struct;
50951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
51051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
511b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 eq_subband_gain[EQ_SUBBAND_GAIN_COUNT_MAX];
51251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_eq_subband_gain_vector;
51351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
51451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
515b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_delay_max_present;
516b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_delay_max;
517b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 unique_filter_block_count;
518b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_filt_block_struct str_filter_block[FILTER_BLOCK_COUNT_MAX];
519b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 unique_td_filter_element_count;
520b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_unique_td_filt_element unique_td_filt_ele[FILTER_ELEMENT_COUNT_MAX];
521b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 unique_eq_subband_gains_count;
522b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_subband_gain_representation;
523b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_subband_gain_format;
524b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_subband_gain_count;
525b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_eq_subband_gain_spline_struct
526b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_eq_subband_gain_spline[UNIQUE_SUBBAND_GAIN_COUNT_MAX];
527b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_eq_subband_gain_vector
528b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_eq_subband_gain_vector[UNIQUE_SUBBAND_GAIN_COUNT_MAX];
52951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_eq_coeff_struct;
53051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
53151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
532b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 filter_block_count;
533b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 filter_block_index[EQ_FILTER_BLOCK_COUNT_MAX];
53451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_filter_block_refs_struct;
53551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
53651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
537b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_cascade_gain_present[EQ_CHANNEL_GROUP_COUNT_MAX];
538b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 eq_cascade_gain[EQ_CHANNEL_GROUP_COUNT_MAX];
539b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_filter_block_refs_struct str_filter_block_refs[EQ_CHANNEL_GROUP_COUNT_MAX];
540b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_phase_alignment_present;
541b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_phase_alignment[EQ_CHANNEL_GROUP_COUNT_MAX]
542b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri                           [EQ_CHANNEL_GROUP_COUNT_MAX];
54351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_td_filter_cascade_struct;
54451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
54551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
546b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_set_id;
547b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_set_complexity_level;
548b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 dwnmix_id_count;
549b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 downmix_id[DOWNMIX_ID_COUNT_MAX];
550b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_apply_to_downmix;
551b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_id_count;
552b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_set_id[DRC_SET_ID_COUNT_MAX];
553b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_set_purpose;
554b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 depends_on_eq_set_present;
555b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 depends_on_eq_set;
556b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 no_independent_eq_use;
557b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_channel_count;
558b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_ch_group_count;
559b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_ch_group_of_channel[MAX_CHANNEL_COUNT];
560b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 td_filter_cascade_present;
561b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_td_filter_cascade_struct str_td_filter_cascade;
562b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 subband_gains_present;
563b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 subband_gains_index[EQ_CHANNEL_GROUP_COUNT_MAX];
564b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_transition_duration_present;
565b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_transition_duration;
56651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_eq_instructions_struct;
56751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
56851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
569b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_config_ext_type[EXT_COUNT_MAX];
570b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 ext_bit_size[EXT_COUNT_MAX - 1];
571b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri
572b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_present;
573b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_drc_coeff_parametric_drc_struct str_drc_coeff_param_drc;
574b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 parametric_drc_instructions_count;
575b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_parametric_drc_instructions_struct
576b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_parametric_drc_instructions[PARAM_DRC_INSTRUCTIONS_COUNT_MAX];
577b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_extension_v1_present;
578b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loud_eq_instructions_flag;
579b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loud_eq_instructions_count;
580b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_loud_eq_instructions_struct
581b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      loud_eq_instructions[LOUD_EQ_INSTRUCTIONS_COUNT_MAX];
582b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_flag;
583b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_eq_coeff_struct str_eq_coeff;
584b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 eq_instructions_count;
585b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_eq_instructions_struct str_eq_instructions[EQ_INSTRUCTIONS_COUNT_MAX];
58651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_config_ext;
58751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
588b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuritypedef struct ia_drc_config {
589b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 sample_rate_present;
590b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 sampling_rate;
591b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 dwnmix_instructions_count;
592b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_coefficients_drc_count;
593b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_instructions_uni_drc_count;
594b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_instructions_count_plus;
595b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_description_basic_present;
596b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_coefficients_basic_count;
597b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_instructions_basic_count;
598b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_config_ext_present;
599b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 apply_drc;
600b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_drc_config_ext str_drc_config_ext;
601b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_drc_coefficients_basic_struct
602b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_drc_coefficients_basic[DRC_COEFF_COUNT_MAX];
603b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_drc_instructions_basic_struct
604b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_drc_instructions_basic[DRC_INSTRUCTIONS_COUNT_MAX];
605b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_uni_drc_coeffs_struct
606b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_p_loc_drc_coefficients_uni_drc[DRC_COEFF_COUNT_MAX];
607b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_drc_instructions_struct
608b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      str_drc_instruction_str[DRC_INSTRUCTIONS_COUNT_MAX];
609b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_channel_layout_struct channel_layout;
610b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_downmix_instructions_struct
611b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri      dwnmix_instructions[DOWNMIX_INSTRUCTION_COUNT_MAX];
61251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_config;
61351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
61451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
615b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loudness_info_set_ext_type[EXT_COUNT_MAX];
616b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 ext_bit_size[EXT_COUNT_MAX - 1];
61751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_loudness_info_set_ext_struct;
61851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
619b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuritypedef struct ia_drc_loudness_info_set_struct {
620b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loudness_info_album_count;
621b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loudness_info_count;
622b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 loudness_info_set_ext_present;
623b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_loudness_info_struct str_loudness_info_album[LOUDNESS_INFO_COUNT_MAX];
624b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_loudness_info_struct loudness_info[LOUDNESS_INFO_COUNT_MAX];
625b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_loudness_info_set_ext_struct str_loudness_info_set_ext;
62651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_loudness_info_set_struct;
62751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
62851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
629b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 loc_db_gain;
630b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  FLOAT32 slope;
631b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 time;
63251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_node_struct;
63351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
63451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
635b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_gain_coding_mode;
636b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 num_nodes;
637b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_node_struct str_node[NODE_COUNT_MAX];
63851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_spline_nodes_struct;
63951aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
64051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
641b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_spline_nodes_struct str_spline_nodes[1];
64251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_gain_sequence_struct;
64351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
64451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
645b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 uni_drc_gain_ext_type[EXT_COUNT_MAX];
646b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 ext_bit_size[EXT_COUNT_MAX - 1];
64751aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_uni_drc_gain_ext_struct;
64851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
649b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuritypedef struct ia_drc_gain_struct {
650b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 num_drc_gain_sequences;
651b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_drc_gain_sequence_struct drc_gain_sequence[SEQUENCE_COUNT_MAX];
652b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 uni_drc_gain_ext_flag;
653b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_uni_drc_gain_ext_struct uni_drc_gain_ext;
65451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_gain_struct;
65551aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
65651aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essicktypedef struct {
657b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 delta_tmin_default;
658b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 drc_frame_size;
659b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 num_gain_values_max_default;
660b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 delay_mode;
661b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 lfe_channel_map_count;
662b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  WORD32 lfe_channel_map[MAX_CHANNEL_COUNT];
66351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick} ia_drc_params_bs_dec_struct;
66451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
665b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuritypedef struct ia_drc_bits_dec_struct {
666b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_tables_struct tables_default;
667b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri  ia_drc_params_bs_dec_struct ia_drc_params_struct;
66851aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
669b3226ce6f80c78946aa3190cec158fb9852272eaRamesh Katuri} ia_drc_bits_dec_struct;
67051aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick
67151aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick#ifdef __cplusplus
67251aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick}
67351aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick#endif
67451aa06e124ba688ca810b25ee0b5bb66678aac14Ray Essick#endif
675