Home | History | Annotate | Download | only in drc_src
      1 /******************************************************************************
      2  *
      3  * Copyright (C) 2015 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_UNI_SEL_PROC_LOUDNESS_CONTROL_H
     21 #define IMPD_DRC_UNI_SEL_PROC_LOUDNESS_CONTROL_H
     22 
     23 #ifdef __cplusplus
     24 extern "C" {
     25 #endif /* __cplusplus */
     26 
     27 WORD32
     28 impd_signal_peak_level_info(ia_drc_config* pstr_drc_config,
     29                             ia_drc_loudness_info_set_struct* pstr_loudness_info,
     30                             ia_drc_instructions_struct* str_drc_instruction_str,
     31                             const WORD32 requested_dwnmix_id,
     32                             const WORD32 album_mode,
     33                             const WORD32 num_compression_eq_count,
     34                             const WORD32* num_compression_eq_id,
     35                             WORD32* peak_info_count, WORD32 eq_set_id[],
     36                             FLOAT32 signal_peak_level[],
     37                             WORD32 explicit_peak_information_present[]);
     38 
     39 WORD32
     40 impd_extract_loudness_peak_to_average_info(
     41     ia_loudness_info_struct* loudness_info,
     42     const WORD32 dyn_range_measurement_type,
     43     WORD32* loudness_peak_2_avg_value_present,
     44     FLOAT32* loudness_peak_2_avg_value);
     45 
     46 WORD32
     47 impd_overall_loudness_present(const ia_loudness_info_struct* loudness_info,
     48                               WORD32* loudness_info_present);
     49 
     50 WORD32
     51 impd_find_overall_loudness_info(
     52     ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct,
     53     ia_drc_loudness_info_set_struct* pstr_loudness_info,
     54     const WORD32 requested_dwnmix_id, const WORD32 drc_set_id_requested,
     55     WORD32* overall_loudness_info_present, WORD32* loudness_info_count,
     56     ia_loudness_info_struct* loudness_info[]);
     57 
     58 WORD32
     59 impd_high_pass_loudness_adjust_info(
     60     const ia_loudness_info_struct* loudness_info,
     61     WORD32* loudness_hp_adjust_present, FLOAT32* loudness_hp_adjust);
     62 
     63 WORD32
     64 impd_find_high_pass_loudness_adjust(
     65     ia_drc_loudness_info_set_struct* pstr_loudness_info,
     66     const WORD32 requested_dwnmix_id, const WORD32 drc_set_id_requested,
     67     const WORD32 album_mode, const FLOAT32 device_cutoff_freq,
     68     WORD32* loudness_hp_adjust_present, FLOAT32* loudness_hp_adjust);
     69 
     70 WORD32
     71 impd_init_loudness_control(
     72     ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct,
     73     ia_drc_loudness_info_set_struct* pstr_loudness_info,
     74     const WORD32 requested_dwnmix_id, const WORD32 drc_set_id_requested,
     75     const WORD32 num_compression_eq_count, const WORD32* num_compression_eq_id,
     76     WORD32* loudness_info_count, WORD32 eq_set_id[],
     77     FLOAT32 loudness_normalization_gain_db[], FLOAT32 loudness[]);
     78 
     79 #ifdef __cplusplus
     80 }
     81 #endif /* __cplusplus */
     82 
     83 #endif
     84