• 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_INTERFACE_H
21 #define IXHEAACD_INTERFACE_H
22 
23 enum {
24   LN = 2048,
25   SN = 256,
26   LN2 = LN / 2,
27   SN2 = SN / 2,
28   LN4 = LN / 4,
29   SN4 = SN / 4,
30   NSHORT = LN / SN,
31   MAX_SBK = NSHORT,
32 
33   MAXBANDS = 16 * NSHORT,
34   MAXFAC = 121,
35   MIDFAC = (MAXFAC - 1) / 2,
36   SF_OFFSET = 100,
37 
38   LEN_TAG = 4,
39   LEN_MAX_SFBS = 4,
40   LEN_MAX_SFBL = 6,
41   LEN_SAMP_IDX = 4,
42   LEN_PC_COMM = 8,
43 };
44 
45 WORD32 ixheaacd_dec_main(VOID *handle, WORD8 *inbuffer, WORD8 *outbuffer,
46                          WORD32 *out_bytes, WORD32 frames_done, WORD32 pcmsize,
47                          WORD32 *num_channel_out);
48 
49 VOID ixheaacd_complex_fft_p3(WORD32 *xr, WORD32 *xi, WORD32 nlength,
50                              WORD32 fft_mode, WORD32 *preshift);
51 
52 VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
53                                  WORD32 fft_mode, WORD32 *preshift);
54 
55 VOID ixheaacd_complex_fft_p2_armv7(WORD32 *xr, WORD32 *xi, WORD32 nlength,
56                                    WORD32 fft_mode, WORD32 *preshift);
57 
58 VOID ixheaacd_mps_complex_fft_64_dec(WORD32 *ptr_x, WORD32 *fin_re,
59                                      WORD32 *fin_im, WORD32 nlength);
60 
61 VOID ixheaacd_mps_complex_fft_64_armv7(WORD32 *ptr_x, WORD32 *fin_re,
62                                        WORD32 *fin_im, WORD32 nlength);
63 
64 VOID ixheaacd_mps_complex_fft_64_asm(const WORD32 *table, WORD32 nlength,
65                                      WORD32 *ptr_x, WORD32 *ptr_y,
66                                      const WORD8 *table2);
67 
68 VOID ixheaacd_complex_ifft_p2_asm(const WORD32 *table, WORD32 nlength,
69                                   WORD32 *ptr_x, WORD32 *ptr_y);
70 
71 VOID ixheaacd_complex_fft_p2_asm(const WORD32 *table, WORD32 nlength,
72                                  WORD32 *ptr_x, WORD32 *ptr_y);
73 
74 VOID ixheaacd_mps_synt_pre_twiddle_dec(WORD32 *ptr_in, WORD32 *table_re,
75                                        WORD32 *table_im, WORD32 resolution);
76 
77 VOID ixheaacd_mps_synt_pre_twiddle_armv7(WORD32 *ptr_in, WORD32 *table_re,
78                                          WORD32 *table_im, WORD32 resolution);
79 
80 VOID ixheaacd_mps_synt_post_twiddle_dec(WORD32 *ptr_in, WORD32 *table_re,
81                                         WORD32 *table_im, WORD32 resolution);
82 
83 VOID ixheaacd_mps_synt_post_twiddle_armv7(WORD32 *ptr_in, WORD32 *table_re,
84                                           WORD32 *table_im, WORD32 resolution);
85 
86 VOID ixheaacd_calc_pre_twid_dec(WORD32 *ptr_x, WORD32 *r_ptr, WORD32 *i_ptr,
87                                 WORD32 nlength, const WORD32 *cos_ptr,
88                                 const WORD32 *sin_ptr);
89 
90 VOID ixheaacd_calc_pre_twid_armv7(WORD32 *ptr_x, WORD32 *r_ptr, WORD32 *i_ptr,
91                                   WORD32 nlength, const WORD32 *cos_ptr,
92                                   const WORD32 *sin_ptr);
93 
94 VOID ixheaacd_calc_post_twid_dec(WORD32 *ptr_x, WORD32 *r_ptr, WORD32 *i_ptr,
95                                  WORD32 nlength, const WORD32 *cos_ptr,
96                                  const WORD32 *sin_ptr);
97 
98 VOID ixheaacd_calc_post_twid_armv7(WORD32 *ptr_x, WORD32 *r_ptr, WORD32 *i_ptr,
99                                    WORD32 nlength, const WORD32 *cos_ptr,
100                                    const WORD32 *sin_ptr);
101 
102 VOID ixheaacd_mps_synt_post_fft_twiddle_dec(WORD32 resolution, WORD32 *fin_re,
103                                             WORD32 *fin_im, WORD32 *table_re,
104                                             WORD32 *table_im, WORD32 *state);
105 
106 VOID ixheaacd_mps_synt_post_fft_twiddle_armv7(WORD32 resolution, WORD32 *fin_re,
107                                               WORD32 *fin_im, WORD32 *table_re,
108                                               WORD32 *table_im, WORD32 *state);
109 
110 VOID ixheaacd_mps_synt_out_calc_dec(WORD32 resolution, WORD32 *out,
111                                     WORD32 *state, const WORD32 *filter_coeff);
112 
113 VOID ixheaacd_mps_synt_out_calc_armv7(WORD32 resolution, WORD32 *out,
114                                       WORD32 *state,
115                                       const WORD32 *filter_coeff);
116 #endif /* #ifndef IXHEAACD_INTERFACE_H */
117