• 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 IXHEAACD_TNS_H
21 #define IXHEAACD_TNS_H
22 
23 VOID ixheaacd_aac_tns_process(
24     ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info, WORD32 num_ch,
25     ia_aac_dec_tables_struct *ptr_aac_tables, WORD object_type, WORD32 ar_flag,
26     WORD32 *predicted_spectrum);
27 
28 WORD16 ixheaacd_read_tns_data(
29     ia_bit_buf_struct *it_bit_buff,
30     ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info);
31 
32 WORD32 ixheaacd_calc_max_spectral_line_dec(WORD32 *ptr_tmp, WORD32 size);
33 
34 WORD32 ixheaacd_calc_max_spectral_line_armv7(WORD32 *ptr_tmp, WORD32 size);
35 
36 WORD32 ixheaacd_calc_max_spectral_line_armv8(WORD32 *ptr_tmp, WORD32 size);
37 
38 VOID ixheaacd_tns_decode_coef(const ia_filter_info_struct *filter,
39                               WORD16 *parcor_coeff,
40                               ia_aac_dec_tables_struct *ptr_aac_tables);
41 
42 VOID ixheaacd_tns_parcor_lpc_convert_dec(WORD16 *parcor, WORD16 *lpc,
43                                          WORD16 *scale, WORD order);
44 
45 void ixheaacd_tns_parcor_lpc_convert_dec_ld(WORD32 *parcor, WORD32 *lpc,
46                                             WORD16 *scale, WORD32 order);
47 
48 VOID ixheaacd_tns_parcor_lpc_convert_armv7(WORD16 *parcor, WORD16 *lpc,
49                                            WORD16 *scale, WORD order);
50 
51 VOID ixheaacd_tns_ar_filter_dec(WORD32 *spectrum, WORD32 size, WORD32 inc,
52                                 WORD16 *lpc, WORD32 order, WORD32 shift_value,
53                                 WORD scale_spec, WORD32 *ptr_filter_state);
54 
55 void ixheaacd_tns_ma_filter_fixed_ld(WORD32 *spectrum, WORD32 size, WORD32 inc,
56                                      WORD32 *lpc, WORD32 order,
57                                      WORD16 shift_value);
58 
59 VOID ixheaacd_tns_ar_filter_armv7(WORD32 *spectrum, WORD32 size, WORD32 inc,
60                                   WORD16 *lpc, WORD32 order, WORD32 shift_value,
61                                   WORD scale_spec, WORD32 *ptr_filter_state);
62 
63 VOID ixheaacd_tns_decode_coefficients(const ia_filter_info_struct *filter,
64                                       WORD32 *a,
65                                       ia_aac_dec_tables_struct *ptr_aac_tables);
66 VOID ixheaacd_tns_parcor_to_lpc(WORD32 *parcor, WORD32 *lpc, WORD16 *scale,
67                                 WORD32 order);
68 
69 VOID ixheaacd_tns_ar_filter_fixed_dec(WORD32 *spectrum, WORD32 size, WORD32 inc,
70                                       WORD32 *lpc, WORD32 order,
71                                       WORD32 shift_value, WORD scale_spec);
72 
73 VOID ixheaacd_tns_ar_filter_fixed_armv7(WORD32 *spectrum, WORD32 size,
74                                         WORD32 inc, WORD32 *lpc, WORD32 order,
75                                         WORD32 shift_value, WORD scale_spec);
76 
77 VOID ixheaacd_tns_ar_filter_fixed_non_neon_armv7(WORD32 *spectrum, WORD32 size,
78                                                  WORD32 inc, WORD32 *lpc,
79                                                  WORD32 order,
80                                                  WORD32 shift_value,
81                                                  WORD scale_spec);
82 
83 VOID ixheaacd_tns_ar_filter_fixed_armv8(WORD32 *spectrum, WORD32 size,
84                                         WORD32 inc, WORD32 *lpc, WORD32 order,
85                                         WORD32 shift_value, WORD scale_spec);
86 
87 #endif /* #ifndef IXHEAACD_TNS_H */
88