• 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_FUNC_DEF_H
21 #define IXHEAACD_FUNC_DEF_H
22 
23 #define restrict
24 
25 WORD32 ixheaacd_calc_idx_offset(WORD32 qn1, WORD32 qn2);
26 
27 VOID ixheaacd_qn_data(WORD32 nk_mode, WORD32 *qn,
28                       ia_bit_buf_struct *it_bit_buff);
29 
30 VOID ixheaacd_memset(FLOAT32 *x, WORD32 n);
31 
32 VOID ixheaacd_mem_cpy(const FLOAT32 x[], FLOAT32 y[], WORD32 n);
33 
34 VOID ixheaacd_vec_add(FLOAT32 x[], FLOAT32 y[], FLOAT32 z[], WORD32 n);
35 
36 VOID ixheaacd_vec_cnst_mul(FLOAT32 a, FLOAT32 x[], FLOAT32 z[], WORD32 n);
37 
38 WORD32 ixheaacd_lpd_dec(ia_usac_data_struct *usac_data,
39                         ia_usac_lpd_decoder_handle st,
40                         ia_td_frame_data_struct *pstr_td_frame_data,
41                         FLOAT32 fsynth[], WORD32 first_lpd_flag,
42                         WORD32 short_fac_flag, WORD32 bpf_control_info);
43 
44 WORD32 ixheaacd_lpd_dec_update(ia_usac_lpd_decoder_handle tddec,
45                                ia_usac_data_struct *usac_data, WORD32 i_ch);
46 
47 VOID ixheaacd_acelp_update(ia_usac_data_struct *usac_data, FLOAT32 signal_out[],
48                            ia_usac_lpd_decoder_handle st);
49 
50 VOID ixheaacd_init_acelp_data(ia_usac_data_struct *usac_data,
51                               ia_usac_lpd_decoder_handle st);
52 
53 VOID ixheaacd_reset_acelp_data(ia_usac_data_struct *usac_data,
54                                ia_usac_lpd_decoder_handle st,
55                                FLOAT32 *ptr_ola_buffer, WORD32 last_was_short,
56                                WORD32 tw_mdct);
57 
58 WORD32 ixheaacd_acelp_alias_cnx(ia_usac_data_struct *usac_data,
59                                 ia_td_frame_data_struct *pstr_td_frame_data,
60                                 WORD32 k, FLOAT32 A[], FLOAT32 stab_fac,
61                                 ia_usac_lpd_decoder_handle st);
62 
63 WORD32 ixheaacd_tcx_mdct(ia_usac_data_struct *usac_data,
64                          ia_td_frame_data_struct *pstr_td_frame_data,
65                          WORD32 frame_index, FLOAT32 A[], WORD32 long_frame,
66                          ia_usac_lpd_decoder_handle st);
67 
68 VOID ixheaacd_alg_vec_dequant(ia_td_frame_data_struct *pstr_td_frame_data,
69                               WORD32 first_lpd_flag, FLOAT32 *lsf,
70                               WORD32 mod[]);
71 
72 VOID ixheaacd_fac_decoding(WORD32 fac_len, WORD32 k, WORD32 *fac_prm,
73                            ia_bit_buf_struct *it_bit_buff);
74 
75 VOID ixheaacd_lpc_to_td(FLOAT32 *lpc_coeffs, WORD32 lpc_order,
76                         FLOAT32 *mdct_gains, WORD32 lg);
77 
78 VOID ixheaacd_noise_shaping(FLOAT32 x[], WORD32 lg, WORD32 fdns_npts,
79                             FLOAT32 old_gains[], FLOAT32 new_gains[]);
80 VOID ixheaacd_interpolation_lsp_params(FLOAT32 lsp_old[], FLOAT32 lsp_new[],
81                                        FLOAT32 lp_flt_coff_a[],
82                                        WORD32 nb_subfr);
83 
84 VOID ixheaacd_lpc_coef_gen(FLOAT32 lsf_old[], FLOAT32 lsf_new[], FLOAT32 a[],
85                            WORD32 nb_subfr, WORD32 m);
86 
87 VOID ixheaacd_tw_create(VOID);
88 
89 WORD32 ixheaacd_reset_acelp_tw_data(ia_usac_data_struct *usac_data, WORD32 i,
90                                     ia_usac_lpd_decoder_handle st);
91 
92 WORD32 ixheaacd_tw_frame_process(ia_usac_data_struct *usac_data, WORD32 ch);
93 
94 VOID ixheaacd_huffman_decode(WORD32 it_bit_buff, WORD16 *h_index, WORD16 *len,
95                              const UWORD16 *input_table,
96                              const UWORD32 *idx_table);
97 
98 #endif
99