• 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_BASIC_FUNCS_H
21 #define IXHEAACD_BASIC_FUNCS_H
22 
23 #define LOG_2_TABLE_SIZE 65
24 #define INV_TABLE_SIZE 256
25 #define SQRT_TABLE_SIZE 256
26 
27 WORD32 ixheaacd_sqrt(WORD32 op);
28 
29 VOID ixheaacd_fix_mant_exp_add(WORD16 a_m, WORD16 a_e, WORD16 b_m, WORD16 b_e,
30                                WORD16 *ptr_sum_mant, WORD16 *ptr_sum_exp);
31 
32 WORD32 ixheaacd_fix_mant_div(WORD16 a_m, WORD16 b_m, WORD16 *ptr_result,
33                              ixheaacd_misc_tables *pstr_common_tables);
34 
35 VOID ixheaacd_fix_mant_exp_sqrt(WORD16 *mant, WORD16 *sqrt_table);
36 
37 WORD32 ixheaacd_fix_div_dec(WORD32 divident, WORD32 divisor);
38 
39 WORD32 ixheaacd_fix_div_armv7(WORD32 divident, WORD32 divisor);
40 
41 VOID ixheaacd_mantisa_mod(WORD32 b_m, WORD32 b_e, WORD32 *ptr_sum_mant,
42                           WORD32 *ptr_sum_exp);
43 
44 extern VOID ixheaacd_scale_short_vec_left(WORD16 *word16_arr, WORD32 n,
45                                           WORD16 shift);
46 
47 extern VOID ixheaacd_scale_int_vec_left(WORD32 *word32_arr, WORD32 n,
48                                         WORD16 shift);
49 
50 extern VOID ixheaacd_scale_int_vec_right(WORD32 *word32_arr, WORD32 n,
51                                          WORD16 shift);
52 
53 extern VOID ixheaacd_scale_short_vec_right(WORD16 *word16_arr, WORD32 n,
54                                            WORD16 shift);
55 
56 #endif /* IXHEAACD_BASIC_FUNCS_H */
57