• 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_AAC_IMDCT_H
21 #define IXHEAACD_AAC_IMDCT_H
22 
23 WORD32 ixheaacd_inverse_transform(
24     WORD32 spec_data[], WORD32 scratch[],
25     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD32 expo,
26     WORD32 npoints);
27 
28 VOID ixheaacd_inverse_transform_960(
29     WORD32 spec_data[], WORD32 scratch[],
30     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD32 expo,
31     WORD32 *imdct_scale);
32 
33 VOID ixheaacd_post_twiddle_dec(WORD32 out_ptr[], WORD32 spec_data[],
34                                ia_aac_dec_imdct_tables_struct *ptr_imdct_tables,
35                                WORD32 npoints);
36 
37 VOID ixheaacd_post_twiddle_armv7(
38     WORD32 out_ptr[], WORD32 spec_data[],
39     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD32 npoints);
40 
41 VOID ixheaacd_post_twiddle_armv8(
42     WORD32 out_ptr[], WORD32 spec_data[],
43     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD32 npoints);
44 
45 VOID ixheaacd_post_twid_overlap_add_dec(
46     WORD32 pcm_out[], WORD32 spec_data[],
47     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD npoints,
48     WORD32 *ptr_overlap_buf, WORD16 q_shift, const WORD16 *window,
49     WORD16 ch_fac);
50 
51 VOID ixheaacd_post_twid_overlap_add_armv7(
52     WORD32 pcm_out[], WORD32 spec_data[],
53     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD npoints,
54     WORD32 *ptr_overlap_buf, WORD16 q_shift, const WORD16 *window,
55     WORD16 ch_fac);
56 
57 VOID ixheaacd_post_twid_overlap_add_armv8(
58     WORD32 pcm_out[], WORD32 spec_data[],
59     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD npoints,
60     WORD32 *ptr_overlap_buf, WORD16 q_shift, const WORD16 *window,
61     WORD16 ch_fac);
62 
63 VOID ixheaacd_pretwiddle_compute_dec(
64     WORD32 *spec_data1, WORD32 *spec_data2, WORD32 *out_ptr,
65     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD npoints4,
66     WORD32 neg_expo);
67 
68 VOID ixheaacd_pretwiddle_compute_960_dec(
69     WORD32 *spec_data1, WORD32 *spec_data2, WORD32 *out_ptr,
70     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD npoints4,
71     WORD32 neg_expo);
72 
73 VOID ixheaacd_pretwiddle_compute_armv7(
74     WORD32 *spec_data1, WORD32 *spec_data2, WORD32 *out_ptr,
75     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD npoints4,
76     WORD32 neg_expo);
77 
78 VOID ixheaacd_pretwiddle_compute_armv8(
79     WORD32 *spec_data1, WORD32 *spec_data2, WORD32 *out_ptr,
80     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD npoints4,
81     WORD32 neg_expo);
82 
83 VOID ixheaacd_imdct_using_fft_dec(
84     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD32 npoints,
85     WORD32 *ptr_x, WORD32 *ptr_y);
86 
87 VOID ixheaacd_imdct_using_fft_armv7(
88     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD32 npoints,
89     WORD32 *ptr_x, WORD32 *ptr_y);
90 
91 VOID ixheaacd_imdct_using_fft_armv8(
92     ia_aac_dec_imdct_tables_struct *ptr_imdct_tables, WORD32 npoints,
93     WORD32 *ptr_x, WORD32 *ptr_y);
94 
95 VOID ixheaacd_fft_480_ld(WORD32 *inp, WORD32 *op,
96                          ia_aac_dec_imdct_tables_struct *imdct_tables_ptr);
97 
98 VOID ixheaacd_fft_5(WORD32 *inp, WORD32 *op);
99 
100 VOID ixheaacd_fft_3(WORD32 *inp, WORD32 *op);
101 
102 VOID ixheaacd_fft_960_15(WORD32 *inp, WORD32 *op,
103                          ia_aac_dec_imdct_tables_struct *imdct_tables_ptr);
104 
105 VOID ixheaacd_fft_960(WORD32 *inp, WORD32 *op,
106                       ia_aac_dec_imdct_tables_struct *imdct_tables_ptr);
107 
108 VOID ixheaacd_fft_120(ia_aac_dec_imdct_tables_struct *imdct_tables_ptr,
109                       WORD32 npoints, WORD32* ptr_x, WORD32* ptr_y);
110 
111 VOID ixheaacd_fft_32_points(WORD16 *ptr_w, WORD32 npoints,
112                             WORD32* ptr_x, WORD32* ptr_y);
113 
114 VOID ixheaacd_ld_dec_fft_15_opt(WORD32 *inp, WORD32 *op, WORD32 *fft3out,
115                                 WORD16 *re_arr_tab_sml_240_ptr);
116 
117 VOID ixheaacd_dec_rearrange_short(WORD32 *ip, WORD32 *op, WORD32 mdct_len_2,
118                                   WORD16 *re_arr_tab);
119 
120 VOID ixheaacd_pre_twiddle(WORD32 *xptr, WORD32 *data, WORD32 n,
121                           WORD32 *cos_array_ptr, WORD32 neg_expo);
122 
123 VOID ixheaacd_pre_twiddle_960(WORD32 *xptr, WORD32 *data, WORD32 n,
124                               WORD32 *cos_array_ptr, WORD32 neg_expo);
125 
126 VOID ixheaacd_pre_twiddle_120(WORD32 *xptr, WORD32 *data, WORD32 n,
127                               WORD16 *cos_array_ptr, WORD32 neg_expo);
128 
129 VOID ixheaacd_post_twiddle_ld(WORD32 out[], WORD32 x[],
130                               const WORD32 *cos_sin_ptr, WORD m);
131 
132 VOID ixheaacd_post_twiddle_960(WORD32 out[], WORD32 x[],
133                                const WORD32 *cos_sin_ptr, WORD m);
134 
135 VOID ixheaacd_post_twiddle_120(WORD32 out[], WORD32 x[],
136                                const WORD16 *cos_sin_ptr, WORD m);
137 
138 VOID ixheaacd_post_twiddle_eld(WORD32 out[], WORD32 x[],
139                                const WORD32 *cos_sin_ptr, WORD m);
140 
141 VOID ixheaacd_fft32x32_ld_dec(ia_aac_dec_imdct_tables_struct *imdct_tables_ptr,
142                               WORD32 npoints, WORD32 *ptr_x, WORD32 *ptr_y);
143 
144 VOID ixheaacd_fft32x32_ld2_armv7(
145     ia_aac_dec_imdct_tables_struct *imdct_tables_ptr, WORD32 npoints,
146     WORD32 *ptr_x, WORD32 *ptr_y);
147 
148 VOID ixheaacd_fft32x32_ld2_armv8(
149     ia_aac_dec_imdct_tables_struct *imdct_tables_ptr, WORD32 npoints,
150     WORD32 *ptr_x, WORD32 *ptr_y);
151 
152 WORD16 ixheaacd_neg_expo_inc_dec(WORD16 neg_expo);
153 
154 WORD16 ixheaacd_neg_expo_inc_arm(WORD16 neg_expo);
155 
156 VOID ixheaacd_rearrange_dec(WORD32 *ip, WORD32 *op, WORD32 mdct_len_2,
157                             UWORD8 *re_arr_tab);
158 
159 VOID ia_aac_ld_dec_rearrange_armv7(WORD32 *ip, WORD32 *op, WORD32 mdct_len_2,
160                                    UWORD8 *re_arr_tab);
161 
162 VOID ixheaacd_fft_15_ld_dec(WORD32 *inp, WORD32 *op, WORD32 *fft3out,
163                             UWORD8 *re_arr_tab_sml_240_ptr);
164 
165 VOID ixheaacd_fft_15_ld_armv7(WORD32 *inp, WORD32 *op, WORD32 *fft3out,
166                               UWORD8 *re_arr_tab_sml_240_ptr);
167 
168 VOID ixheaacd_inverse_transform_512(
169     WORD32 data[], WORD32 temp[], WORD32 *imdct_scale, WORD32 *cos_sin_ptr,
170     ia_aac_dec_imdct_tables_struct *imdct_tables_ptr, WORD32 object_type);
171 
172 VOID ixheaacd_mdct_960(WORD32 *inp, WORD32 *scratch, WORD32 *mdct_scale,
173                        WORD32 mdct_flag,
174                        ia_aac_dec_imdct_tables_struct *imdct_tables_ptr);
175 
176 VOID ixheaacd_mdct_480_ld(WORD32 *inp, WORD32 *scratch, WORD32 *mdct_scale,
177                           WORD32 mdct_flag,
178                           ia_aac_dec_imdct_tables_struct *imdct_tables_ptr,
179                           WORD32 object_type);
180 #endif
181