• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright (C) 2018 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_GAIN_DEC_H
21 #define IMPD_DRC_GAIN_DEC_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 typedef struct {
28   ia_node_struct str_node;
29   ia_node_struct prev_node;
30   FLOAT32 lpcm_gains[2 * AUDIO_CODEC_FRAME_SIZE_MAX + MAX_SIGNAL_DELAY];
31 } ia_interp_buf_struct;
32 
33 typedef struct {
34   WORD32 buf_interpolation_count;
35   ia_interp_buf_struct* buf_interpolation;
36 } ia_gain_buffer_struct;
37 
38 typedef struct {
39   ia_gain_buffer_struct pstr_gain_buf[SEL_DRC_COUNT];
40 } ia_drc_gain_buffers_struct;
41 
42 typedef struct {
43   WORD32 gain_interpolation_type;
44   WORD32 gain_modification_flag;
45   WORD32 ducking_flag;
46   WORD32 clipping_flag;
47   ia_ducking_modifiers_struct* pstr_ducking_modifiers;
48   ia_gain_modifiers_struct* pstr_gain_modifiers;
49   WORD32 drc_characteristic_present;
50   WORD32 drc_source_characteristic_cicp_format;
51   WORD32 source_drc_characteristic;
52   ia_split_drc_characteristic_struct* split_source_characteristic_left;
53   ia_split_drc_characteristic_struct* split_source_characteristic_right;
54   WORD32 drc_target_characteristic_cicp_format;
55   WORD32 target_drc_characteristic;
56   ia_split_drc_characteristic_struct* split_target_characteristic_left;
57   ia_split_drc_characteristic_struct* split_target_characteristic_right;
58   WORD32 interpolation_loud_eq;
59   WORD32 limiter_peak_target_present;
60   FLOAT32 limiter_peak_target;
61   FLOAT32 loudness_normalization_gain_db;
62   WORD32 delta_tmin;
63   WORD32 characteristic_index;
64   FLOAT32 compress;
65   FLOAT32 boost;
66 } ia_interp_params_struct;
67 
68 typedef struct {
69   WORD32 drc_instructions_index;
70   WORD32 drc_coeff_idx;
71   WORD32 dwnmix_instructions_index;
72 } ia_sel_drc_struct;
73 
74 typedef struct {
75   WORD32 sample_rate;
76   WORD32 delta_tmin_default;
77   WORD32 drc_frame_size;
78   WORD32 delay_mode;
79   WORD32 sub_band_domain_mode;
80   WORD32 gain_delay_samples;
81   WORD32 parametric_drc_delay;
82   WORD32 eq_delay;
83   WORD32 audio_delay_samples;
84   WORD32 drc_set_counter;
85   WORD32 multiband_sel_drc_idx;
86 
87   ia_sel_drc_struct sel_drc_array[SEL_DRC_COUNT];
88 
89 } ia_drc_params_struct;
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 #endif
95