• 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 VOID impd_signal_peak_level_info(
34     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, WORD32* num_compression_eq_id,
39     WORD32* peak_info_count, WORD32 eq_set_id[], FLOAT32 signal_peak_level[],
40     WORD32 explicit_peak_information_present[]);
41 
42 WORD32
43 impd_extract_loudness_peak_to_average_info(
44     ia_loudness_info_struct* loudness_info, WORD32 dyn_range_measurement_type,
45     WORD32* loudness_peak_2_avg_value_present,
46     FLOAT32* loudness_peak_2_avg_value);
47 
48 WORD32
49 impd_loudness_peak_to_average_info(
50     ia_drc_loudness_info_set_struct* pstr_loudness_info,
51     ia_drc_instructions_struct* str_drc_instruction_str,
52     WORD32 requested_dwnmix_id, WORD32 dyn_range_measurement_type,
53     WORD32 album_mode, WORD32* loudness_peak_2_avg_value_present,
54     FLOAT32* loudness_peak_2_avg_value);
55 
56 WORD32
57 impd_overall_loudness_present(ia_loudness_info_struct* loudness_info,
58                               WORD32* loudness_info_present);
59 
60 WORD32
61 impd_find_overall_loudness_info(
62     ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct,
63     ia_drc_loudness_info_set_struct* pstr_loudness_info,
64     WORD32 requested_dwnmix_id, WORD32 drc_set_id_requested,
65     WORD32* overall_loudness_info_present, WORD32* loudness_info_count,
66     ia_loudness_info_struct* loudness_info[]);
67 
68 WORD32
69 impd_high_pass_loudness_adjust_info(ia_loudness_info_struct* loudness_info,
70                                     WORD32* loudness_hp_adjust_present,
71                                     FLOAT32* loudness_hp_adjust);
72 
73 WORD32
74 impd_find_high_pass_loudness_adjust(
75     ia_drc_loudness_info_set_struct* pstr_loudness_info,
76     WORD32 requested_dwnmix_id, WORD32 drc_set_id_requested, WORD32 album_mode,
77     FLOAT32 device_cutoff_freq, WORD32* loudness_hp_adjust_present,
78     FLOAT32* loudness_hp_adjust);
79 
80 WORD32
81 impd_init_loudness_control(
82     ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct,
83     ia_drc_loudness_info_set_struct* pstr_loudness_info,
84     WORD32 requested_dwnmix_id, WORD32 drc_set_id_requested,
85     WORD32 num_compression_eq_count, WORD32* num_compression_eq_id,
86     WORD32* loudness_info_count, WORD32 eq_set_id[],
87     FLOAT32 loudness_normalization_gain_db[], FLOAT32 loudness[]);
88 
89 #ifdef __cplusplus
90 }
91 #endif /* __cplusplus */
92 
93 #endif
94