• 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_LOUDNESS_CONTROL_H
21 #define IMPD_DRC_LOUDNESS_CONTROL_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26 
27 WORD32
28 impd_mixing_level_info(
29     ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct,
30     ia_drc_loudness_info_set_struct* pstr_loudness_info,
31     WORD32 requested_dwnmix_id, WORD32 drc_set_id_requested,
32     WORD32 eq_set_id_requested, FLOAT32* mixing_level);
33 WORD32
34 impd_signal_peak_level_info(ia_drc_config* pstr_drc_config,
35                             ia_drc_loudness_info_set_struct* pstr_loudness_info,
36                             ia_drc_instructions_struct* str_drc_instruction_str,
37                             WORD32 requested_dwnmix_id, WORD32 album_mode,
38                             WORD32 num_compression_eq_count,
39                             WORD32* num_compression_eq_id,
40                             WORD32* peak_info_count, WORD32 eq_set_id[],
41                             FLOAT32 signal_peak_level[],
42                             WORD32 explicit_peak_information_present[]);
43 
44 WORD32
45 impd_extract_loudness_peak_to_average_info(
46     ia_loudness_info_struct* loudness_info, WORD32 dyn_range_measurement_type,
47     WORD32* loudness_peak_2_avg_value_present,
48     FLOAT32* loudness_peak_2_avg_value);
49 
50 WORD32
51 impd_loudness_peak_to_average_info(
52     ia_drc_loudness_info_set_struct* pstr_loudness_info,
53     ia_drc_instructions_struct* str_drc_instruction_str,
54     WORD32 requested_dwnmix_id, WORD32 dyn_range_measurement_type,
55     WORD32 album_mode, WORD32* loudness_peak_2_avg_value_present,
56     FLOAT32* loudness_peak_2_avg_value);
57 
58 WORD32
59 impd_overall_loudness_present(ia_loudness_info_struct* loudness_info,
60                               WORD32* loudness_info_present);
61 
62 WORD32
63 impd_find_overall_loudness_info(
64     ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct,
65     ia_drc_loudness_info_set_struct* pstr_loudness_info,
66     WORD32 requested_dwnmix_id, WORD32 drc_set_id_requested,
67     WORD32* overall_loudness_info_present, WORD32* loudness_info_count,
68     ia_loudness_info_struct* loudness_info[]);
69 
70 WORD32
71 impd_high_pass_loudness_adjust_info(ia_loudness_info_struct* loudness_info,
72                                     WORD32* loudness_hp_adjust_present,
73                                     FLOAT32* loudness_hp_adjust);
74 
75 WORD32
76 impd_find_high_pass_loudness_adjust(
77     ia_drc_loudness_info_set_struct* pstr_loudness_info,
78     WORD32 requested_dwnmix_id, WORD32 drc_set_id_requested, WORD32 album_mode,
79     FLOAT32 device_cutoff_freq, WORD32* loudness_hp_adjust_present,
80     FLOAT32* loudness_hp_adjust);
81 
82 WORD32
83 impd_init_loudness_control(
84     ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct,
85     ia_drc_loudness_info_set_struct* pstr_loudness_info,
86     WORD32 requested_dwnmix_id, WORD32 drc_set_id_requested,
87     WORD32 num_compression_eq_count, WORD32* num_compression_eq_id,
88     WORD32* loudness_info_count, WORD32 eq_set_id[],
89     FLOAT32 loudness_normalization_gain_db[], FLOAT32 loudness[]);
90 
91 #ifdef __cplusplus
92 }
93 #endif /* __cplusplus */
94 
95 #endif
96