1 /******************************************************************************
2 *
3 * Copyright (C) 2023 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 #include <string.h>
21 #include "ixheaacd_type_def.h"
22 #include "ixheaacd_mps_struct_def.h"
23 #include "ixheaacd_error_codes.h"
24 #include "ixheaacd_mps_res_rom.h"
25 #include "ixheaacd_mps_aac_struct.h"
26 #include "ixheaacd_constants.h"
27 #include "ixheaacd_basic_ops32.h"
28 #include "ixheaacd_basic_ops40.h"
29 #include "ixheaacd_bitbuffer.h"
30 #include "ixheaacd_cnst.h"
31 #include "ixheaacd_common_rom.h"
32 #include "ixheaacd_sbrdecsettings.h"
33 #include "ixheaacd_sbr_scale.h"
34 #include "ixheaacd_env_extr_part.h"
35 #include "ixheaacd_sbr_rom.h"
36 #include "ixheaacd_hybrid.h"
37 #include "ixheaacd_ps_dec.h"
38 #include "ixheaacd_error_standards.h"
39 #include "ixheaacd_mps_polyphase.h"
40 #include "ixheaacd_config.h"
41 #include "ixheaacd_qmf_dec.h"
42 #include "ixheaacd_mps_dec.h"
43 #include "ixheaacd_mps_mdct_2_qmf.h"
44 #include "ixheaacd_mps_macro_def.h"
45 #include "ixheaacd_mps_basic_op.h"
46
ixheaacd_mdct2qmf_tables_init(ia_heaac_mps_state_struct * pstr_mps_state)47 IA_ERRORCODE ixheaacd_mdct2qmf_tables_init(ia_heaac_mps_state_struct *pstr_mps_state) {
48 WORD32 time_slots;
49
50 time_slots = pstr_mps_state->upd_qmf;
51
52 if (32 == time_slots) {
53 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
54 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_00;
55 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
56 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_01;
57 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
58 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_02;
59 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
60 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_03;
61 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
62 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_04;
63 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
64 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_05;
65 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
66 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_06;
67 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
68 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_07;
69 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
70 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_08;
71 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
72 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_09;
73 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
74 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_10;
75 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
76 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_11;
77 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
78 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_12;
79 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
80 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_13;
81 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
82 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_14;
83 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
84 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_15;
85 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
86 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_15;
87 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
88 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_14;
89 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
90 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_13;
91 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
92 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_12;
93 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
94 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_11;
95 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
96 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_10;
97 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
98 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_09;
99 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
100 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_08;
101 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
102 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_07;
103 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
104 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_06;
105 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
106 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_05;
107 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
108 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_04;
109 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
110 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_03;
111 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
112 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_02;
113 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
114 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_01;
115 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
116 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_00;
117 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
118 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_16;
119 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
120 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_17;
121 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
122 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_18;
123 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
124 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_19;
125 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] =
126 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_20;
127 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] =
128 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_21;
129 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] =
130 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_22;
131 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] =
132 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_23;
133 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] =
134 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_24;
135 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] =
136 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_25;
137 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] =
138 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_26;
139 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] =
140 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_27;
141 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] =
142 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_28;
143 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] =
144 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_29;
145 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] =
146 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_30;
147 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] =
148 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_31;
149 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] =
150 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_31;
151 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] =
152 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_30;
153 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] =
154 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_29;
155 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] =
156 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_28;
157 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] =
158 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_27;
159 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] =
160 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_26;
161 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] =
162 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_25;
163 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] =
164 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_24;
165 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] =
166 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_23;
167 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] =
168 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_22;
169 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] =
170 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_21;
171 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] =
172 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_20;
173 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] =
174 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_19;
175 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] =
176 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_18;
177 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] =
178 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_17;
179 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] =
180 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_16;
181
182 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[0] =
183 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_00;
184 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[1] =
185 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_01;
186 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[2] =
187 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_01;
188 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[3] =
189 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_00;
190 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[4] =
191 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_02;
192 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[5] =
193 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_03;
194 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[6] =
195 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_03;
196 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[7] =
197 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_02;
198 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[8] = NULL;
199 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[9] = NULL;
200 } else {
201 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[0] =
202 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_00;
203 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[1] =
204 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_00;
205 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[2] =
206 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_01;
207 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[3] =
208 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_01;
209 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[4] = NULL;
210 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[5] = NULL;
211 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[6] = NULL;
212 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[7] = NULL;
213 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[8] = NULL;
214 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[9] = NULL;
215
216 if (30 == time_slots) {
217 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
218 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_00;
219 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
220 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_01;
221 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
222 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_02;
223 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
224 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_03;
225 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
226 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_04;
227 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
228 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_05;
229 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
230 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_06;
231 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
232 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_07;
233 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
234 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_08;
235 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
236 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_09;
237 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
238 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_10;
239 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
240 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_11;
241 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
242 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_12;
243 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
244 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_13;
245 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
246 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_14;
247 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
248 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_14;
249 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
250 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_13;
251 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
252 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_12;
253 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
254 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_11;
255 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
256 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_10;
257 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
258 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_09;
259 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
260 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_08;
261 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
262 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_07;
263 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
264 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_06;
265 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
266 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_05;
267 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
268 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_04;
269 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
270 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_03;
271 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
272 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_02;
273 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
274 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_01;
275 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
276 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_00;
277 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
278 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_15;
279 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
280 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_16;
281 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
282 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_17;
283 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
284 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_18;
285 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
286 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_19;
287 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
288 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_20;
289 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] =
290 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_21;
291 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] =
292 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_22;
293 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] =
294 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_23;
295 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] =
296 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_24;
297 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] =
298 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_25;
299 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] =
300 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_26;
301 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] =
302 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_27;
303 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] =
304 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_28;
305 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] =
306 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_29;
307 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] =
308 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_29;
309 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] =
310 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_28;
311 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] =
312 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_27;
313 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] =
314 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_26;
315 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] =
316 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_25;
317 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] =
318 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_24;
319 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] =
320 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_23;
321 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] =
322 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_22;
323 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] =
324 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_21;
325 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] =
326 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_20;
327 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] =
328 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_19;
329 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] =
330 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_18;
331 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] =
332 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_17;
333 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] =
334 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_16;
335 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] =
336 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_15;
337 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
338 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
339 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
340 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
341 } else if (24 == time_slots) {
342 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
343 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_00;
344 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
345 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_01;
346 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
347 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_02;
348 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
349 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_03;
350 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
351 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_04;
352 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
353 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_05;
354 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
355 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_06;
356 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
357 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_07;
358 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
359 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_08;
360 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
361 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_09;
362 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
363 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_10;
364 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
365 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_11;
366 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
367 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_11;
368 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
369 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_10;
370 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
371 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_09;
372 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
373 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_08;
374 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
375 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_07;
376 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
377 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_06;
378 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
379 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_05;
380 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
381 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_04;
382 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
383 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_03;
384 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
385 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_02;
386 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
387 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_01;
388 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
389 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_00;
390 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
391 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_12;
392 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
393 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_13;
394 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
395 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_14;
396 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
397 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_15;
398 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
399 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_16;
400 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
401 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_17;
402 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
403 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_18;
404 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
405 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_19;
406 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
407 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_20;
408 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
409 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_21;
410 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
411 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_22;
412 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
413 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_23;
414 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] =
415 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_23;
416 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] =
417 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_22;
418 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] =
419 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_21;
420 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] =
421 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_20;
422 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] =
423 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_19;
424 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] =
425 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_18;
426 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] =
427 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_17;
428 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] =
429 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_16;
430 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] =
431 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_15;
432 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] =
433 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_14;
434 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] =
435 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_13;
436 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] =
437 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_12;
438 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
439 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
440 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
441 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
442 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
443 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
444 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
445 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
446 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
447 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
448 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
449 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
450 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
451 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
452 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
453 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
454 } else if (18 == time_slots) {
455 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
456 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_00;
457 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
458 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_01;
459 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
460 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_02;
461 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
462 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_03;
463 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
464 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_04;
465 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
466 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_05;
467 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
468 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_06;
469 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
470 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_07;
471 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
472 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_08;
473 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
474 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_08;
475 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
476 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_07;
477 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
478 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_06;
479 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
480 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_05;
481 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
482 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_04;
483 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
484 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_03;
485 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
486 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_02;
487 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
488 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_01;
489 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
490 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_00;
491 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
492 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_09;
493 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
494 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_10;
495 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
496 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_11;
497 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
498 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_12;
499 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
500 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_13;
501 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
502 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_14;
503 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
504 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_15;
505 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
506 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_16;
507 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
508 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_17;
509 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
510 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_17;
511 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
512 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_16;
513 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
514 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_15;
515 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
516 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_14;
517 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
518 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_13;
519 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
520 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_12;
521 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
522 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_11;
523 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
524 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_10;
525 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
526 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_09;
527 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] = NULL;
528 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] = NULL;
529 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] = NULL;
530 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] = NULL;
531 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] = NULL;
532 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] = NULL;
533 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] = NULL;
534 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] = NULL;
535 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] = NULL;
536 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] = NULL;
537 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] = NULL;
538 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] = NULL;
539 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
540 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
541 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
542 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
543 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
544 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
545 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
546 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
547 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
548 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
549 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
550 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
551 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
552 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
553 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
554 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
555 } else if (16 == time_slots) {
556 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
557 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_00;
558 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
559 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_01;
560 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
561 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_02;
562 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
563 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_03;
564 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
565 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_04;
566 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
567 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_05;
568 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
569 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_06;
570 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
571 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_07;
572 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
573 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_07;
574 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
575 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_06;
576 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
577 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_05;
578 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
579 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_04;
580 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
581 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_03;
582 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
583 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_02;
584 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
585 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_01;
586 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
587 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_00;
588 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
589 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_08;
590 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
591 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_09;
592 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
593 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_10;
594 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
595 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_11;
596 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
597 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_12;
598 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
599 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_13;
600 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
601 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_14;
602 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
603 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_15;
604 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
605 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_15;
606 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
607 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_14;
608 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
609 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_13;
610 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
611 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_12;
612 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
613 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_11;
614 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
615 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_10;
616 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
617 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_09;
618 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
619 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_08;
620 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] = NULL;
621 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] = NULL;
622 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] = NULL;
623 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] = NULL;
624 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] = NULL;
625 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] = NULL;
626 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] = NULL;
627 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] = NULL;
628 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] = NULL;
629 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] = NULL;
630 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] = NULL;
631 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] = NULL;
632 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] = NULL;
633 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] = NULL;
634 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] = NULL;
635 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] = NULL;
636 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
637 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
638 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
639 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
640 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
641 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
642 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
643 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
644 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
645 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
646 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
647 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
648 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
649 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
650 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
651 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
652 } else if (15 == time_slots) {
653 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
654 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_00;
655 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
656 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_01;
657 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
658 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_02;
659 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
660 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_03;
661 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
662 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_04;
663 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
664 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_05;
665 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
666 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_06;
667 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
668 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_06;
669 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
670 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_05;
671 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
672 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_04;
673 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
674 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_03;
675 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
676 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_02;
677 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
678 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_01;
679 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
680 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_00;
681 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
682 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_07;
683 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
684 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_08;
685 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
686 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_09;
687 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
688 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_10;
689 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
690 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_11;
691 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
692 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_12;
693 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
694 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_13;
695 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
696 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_14;
697 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
698 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_14;
699 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
700 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_13;
701 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
702 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_12;
703 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
704 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_11;
705 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
706 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_10;
707 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
708 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_09;
709 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
710 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_08;
711 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
712 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_07;
713 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] = NULL;
714 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] = NULL;
715 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] = NULL;
716 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] = NULL;
717 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] = NULL;
718 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] = NULL;
719 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] = NULL;
720 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] = NULL;
721 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] = NULL;
722 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] = NULL;
723 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] = NULL;
724 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] = NULL;
725 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] = NULL;
726 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] = NULL;
727 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] = NULL;
728 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] = NULL;
729 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] = NULL;
730 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] = NULL;
731 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
732 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
733 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
734 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
735 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
736 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
737 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
738 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
739 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
740 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
741 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
742 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
743 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
744 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
745 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
746 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
747
748 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[4] =
749 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_00;
750 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[5] =
751 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_00;
752 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[6] =
753 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_01;
754 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[7] =
755 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_02;
756 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[8] =
757 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_02;
758 pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[9] =
759 pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_01;
760 } else {
761 if (pstr_mps_state->residual_coding) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TIMESLOTS;
762 }
763 }
764
765 return IA_NO_ERROR;
766 }
767
ixheaacd_mdct2qmf_create(ia_heaac_mps_state_struct * pstr_mps_state)768 IA_ERRORCODE ixheaacd_mdct2qmf_create(ia_heaac_mps_state_struct *pstr_mps_state) {
769 IA_ERRORCODE error_code = IA_NO_ERROR;
770
771 WORD32 *qmf_residual_real = pstr_mps_state->array_struct->qmf_residual_real_pre;
772 WORD32 *qmf_residual_imag = pstr_mps_state->array_struct->qmf_residual_imag_pre;
773
774 memset(qmf_residual_real, 0, RES_CHXQMFXTSX4);
775 memset(qmf_residual_imag, 0, RES_CHXQMFXTSX4);
776
777 error_code = ixheaacd_mdct2qmf_tables_init(pstr_mps_state);
778
779 return error_code;
780 }
781
ixheaacd_local_zero(WORD32 const l,WORD32 * const b)782 static VOID ixheaacd_local_zero(WORD32 const l, WORD32 *const b) {
783 WORD32 i;
784
785 for (i = 0; i < l; i++) {
786 b[i] = 0;
787 }
788 }
789
ixheaacd_local_fold_out(WORD32 * const s,WORD32 const lv,WORD32 * const w,WORD32 const l_w,WORD32 * const v_main,WORD32 * const v_slave)790 static VOID ixheaacd_local_fold_out(WORD32 *const s, WORD32 const lv, WORD32 *const w,
791 WORD32 const l_w, WORD32 *const v_main,
792 WORD32 *const v_slave) {
793 WORD32 n;
794 WORD32 i;
795 WORD32 j;
796 WORD32 k;
797
798 WORD32 temp_1;
799
800 WORD32 *w1;
801 WORD32 *w2;
802 WORD32 *w3;
803 WORD32 *w4;
804 WORD32 *ptr1, *ptr2, *ptr3;
805
806 WORD32 m = l_w >> 1;
807 WORD32 l = lv / m;
808 WORD32 m2w = m >> 1;
809 WORD32 m2a = m - m2w;
810
811 for (i = m; i < lv; i += l_w) {
812 for (n = i + l_w; i < n; i++) {
813 s[i] = -s[i];
814 }
815 }
816
817 w1 = &w[-m2a];
818 w2 = &w[m2w];
819 w3 = &w[m2w];
820 w4 = &w[m + m2w];
821
822 for (n = 0, j = 0, k = m; n < l - 1; n++) {
823 for (i = 0; i < m2a; i++, j++, k++) {
824 v_main[k] = ixheaacd_mps_mult32_shr_30(w2[i], s[k]);
825 v_slave[j] = ixheaacd_mps_mult32_shr_30(w4[i], s[k]);
826 }
827
828 for (; i < m; i++, j++, k++) {
829 v_main[j] = ixheaacd_mps_mult32_shr_30(w3[i], s[j]);
830 v_slave[k] = ixheaacd_mps_mult32_shr_30(w1[i], s[j]);
831 }
832 }
833
834 ptr1 = v_main;
835 ptr2 = v_slave + m - 1;
836 ptr3 = s;
837 for (i = 0; i < m2a; i++) {
838 temp_1 = *ptr3++;
839 *ptr1++ = ixheaacd_mps_mult32_shr_30(*w2++, temp_1);
840 *ptr2-- = ixheaacd_mps_mult32_shr_30(*w4++, temp_1);
841 }
842
843 j = l * m - m2w;
844 k = l * m - m2a - 1;
845 ptr3 = s + l * m - m;
846 ptr1 = v_main + j;
847 ptr2 = v_slave + k;
848
849 w1 += m2a;
850 for (; i < m; i++, j++) {
851 temp_1 = *ptr3++;
852 *ptr1++ = ixheaacd_mps_mult32_shr_30(*w2++, temp_1);
853 *ptr2-- = ixheaacd_mps_mult32_shr_30(*w1++, temp_1);
854 }
855 }
856
ixheaacd_local_imdet(WORD32 * x1,WORD32 * x2,WORD32 * const scale1,WORD32 const val,WORD32 * z_real,WORD32 * z_imag,const ia_mps_dec_mdct2qmf_cos_table_struct * ia_mps_dec_mdct2qmfcos_tab,WORD32 is_long,VOID * scratch)857 static VOID ixheaacd_local_imdet(
858 WORD32 *x1, WORD32 *x2, WORD32 *const scale1, WORD32 const val, WORD32 *z_real,
859 WORD32 *z_imag, const ia_mps_dec_mdct2qmf_cos_table_struct *ia_mps_dec_mdct2qmfcos_tab,
860 WORD32 is_long, VOID *scratch) {
861 WORD32 lw = val << 1;
862 WORD32 offset = val - (val >> 1);
863
864 WORD32 temp_1, temp3, temp_2;
865 WORD32 *z_real_2, *z_imag_2;
866 WORD32 *px1, *px2, *px3, *px4;
867 const WORD16 *cp, *sp;
868 WORD32 *scale;
869 WORD32 cnt = val + (val >> 1);
870
871 WORD32 k;
872 WORD32 n, j;
873
874 WORD32 l;
875
876 WORD32 *p_sum = scratch;
877 WORD32 *p_diff = (WORD32 *)scratch + SUM_SIZE;
878
879 z_real_2 = z_real + lw;
880 z_imag_2 = z_imag + lw;
881
882 for (l = 0; l < LOOP_COUNTER; l++) {
883 WORD32 *sum = p_sum;
884 WORD32 *diff = p_diff;
885
886 px1 = x1;
887 px2 = x2 + val - 1;
888 px3 = x2 + val;
889 px4 = x1 + 2 * val - 1;
890
891 for (n = 0; n < val; n++) {
892 *sum++ = *px1 + *px2;
893 *sum++ = *px3 + *px4;
894 *diff++ = *px1++ - *px2--;
895 *diff++ = *px3++ - *px4--;
896 }
897
898 scale = scale1;
899 for (k = 0; k < cnt; k++) {
900 if (1 == is_long) {
901 cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_long[k];
902 sp = cp + val;
903 } else {
904 cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_short[k + is_long];
905 sp = cp + val;
906 }
907
908 sum = p_sum;
909 diff = p_diff;
910
911 temp_1 = *cp++;
912 temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
913 sum++;
914 *z_real = temp_2;
915
916 temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
917 sum++;
918 *z_real_2 = temp_2;
919
920 temp_1 = *--sp;
921 temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
922 diff++;
923 *z_imag = temp_2;
924
925 temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
926 diff++;
927 *z_imag_2 = temp_2;
928 for (n = 1; n < val; n++) {
929 temp_1 = *cp++;
930 temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
931 sum++;
932 *z_real += temp_2;
933
934 temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
935 sum++;
936 *z_real_2 += temp_2;
937
938 temp_1 = *--sp;
939 temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
940 diff++;
941 *z_imag += temp_2;
942
943 temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
944 diff++;
945 *z_imag_2 += temp_2;
946 }
947 z_real++;
948 z_imag++;
949 z_real_2++;
950 z_imag_2++;
951 }
952 z_real -= cnt;
953 z_real_2 -= cnt;
954 z_imag -= cnt;
955 z_imag_2 -= cnt;
956
957 for (j = 0; j < (cnt); j++) {
958 *z_real = ixheaacd_mps_mult32_shr_15(*z_real, *scale);
959 z_real++;
960 *z_imag = ixheaacd_mps_mult32_shr_15(*z_imag, *scale);
961 z_imag++;
962 *z_real_2 = ixheaacd_mps_mult32_shr_15(*z_real_2, *scale);
963 z_real_2++;
964 *z_imag_2 = ixheaacd_mps_mult32_shr_15(*z_imag_2, *scale);
965 scale++;
966 z_imag_2++;
967 }
968
969 for (; k < lw; k++) {
970 if (1 == is_long) {
971 cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_long[k];
972 sp = cp + val;
973 } else {
974 cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_short[k + is_long];
975 sp = cp + val;
976 }
977
978 sum = p_sum;
979 diff = p_diff;
980
981 temp_1 = *cp++;
982
983 temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
984 sum++;
985 *z_real = temp3;
986
987 temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
988 sum++;
989 *z_real_2 = temp3;
990
991 temp_1 = *--sp;
992 temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
993 diff++;
994 *z_imag = temp3;
995
996 temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
997 diff++;
998 *z_imag_2 = temp3;
999
1000 for (n = 1; n < val; n++) {
1001 temp_1 = *cp++;
1002 temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
1003 sum++;
1004 *z_real += temp3;
1005
1006 temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
1007 sum++;
1008 *z_real_2 += temp3;
1009
1010 temp_1 = *--sp;
1011 temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
1012 diff++;
1013 *z_imag += temp3;
1014
1015 temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
1016 diff++;
1017 *z_imag_2 += temp3;
1018 }
1019
1020 z_real++;
1021 z_imag++;
1022 z_real_2++;
1023 z_imag_2++;
1024 }
1025 z_real -= offset;
1026 z_real_2 -= offset;
1027 z_imag -= offset;
1028 z_imag_2 -= offset;
1029
1030 for (j = 0; j < (offset); j++) {
1031 temp_1 = (*scale++) * -1;
1032 *z_real = ixheaacd_mps_mult32_shr_15(*z_real, temp_1);
1033 z_real++;
1034 *z_imag = ixheaacd_mps_mult32_shr_15(*z_imag, temp_1);
1035 z_imag++;
1036 *z_real_2 = ixheaacd_mps_mult32_shr_15(*z_real_2, temp_1);
1037 z_real_2++;
1038 *z_imag_2 = ixheaacd_mps_mult32_shr_15(*z_imag_2, temp_1);
1039 z_imag_2++;
1040 }
1041
1042 x1 += lw;
1043 x2 += lw;
1044
1045 z_real += lw;
1046 z_imag += lw;
1047 z_imag_2 += lw;
1048 z_real_2 += lw;
1049 }
1050 }
1051
ixheaacd_local_hybcmdct2qmf(WORD32 * const v_main,WORD32 * const v_slave,WORD32 * const w,WORD32 const lw,WORD32 * z_real,WORD32 * z_imag,const ia_mps_dec_mdct2qmf_cos_table_struct * ia_mps_dec_mdct2qmfcos_tab,VOID * scratch,WORD32 is_long)1052 static VOID ixheaacd_local_hybcmdct2qmf(
1053 WORD32 *const v_main, WORD32 *const v_slave, WORD32 *const w, WORD32 const lw, WORD32 *z_real,
1054 WORD32 *z_imag, const ia_mps_dec_mdct2qmf_cos_table_struct *ia_mps_dec_mdct2qmfcos_tab,
1055 VOID *scratch, WORD32 is_long) {
1056 WORD32 i, start = 0;
1057 WORD32 m = lw >> 1;
1058
1059 switch (lw) {
1060 case TSX2_4:
1061 case TSX2_6:
1062 case TSX2_30:
1063 case TSX2_36:
1064 case TSX2_60:
1065 start = 1;
1066 break;
1067
1068 case TSX2_8:
1069 case TSX2_32:
1070 case TSX2_48:
1071 case TSX2_64:
1072 start = 0;
1073 break;
1074
1075 default:
1076 break;
1077 }
1078
1079 ixheaacd_local_imdet(v_slave, v_main, w, m, z_real, z_imag, ia_mps_dec_mdct2qmfcos_tab, is_long,
1080 scratch);
1081
1082 for (i = start; i < (m << 7); i += 2) {
1083 z_imag[i] = -(z_imag[i]);
1084 }
1085
1086 return;
1087 }
1088
ixheaacd_local_p_zero_ts15(WORD32 * const b,WORD32 * src,WORD32 l)1089 static VOID ixheaacd_local_p_zero_ts15(WORD32 *const b, WORD32 *src, WORD32 l) {
1090 WORD32 i;
1091
1092 for (i = 0; i < 15; i++) {
1093 b[i] = *src++;
1094 }
1095 if (l != 15) {
1096 src--;
1097 for (; i < l; i++) {
1098 b[i] = *--src;
1099 }
1100 }
1101 }
1102
ixheaacd_local_p_nonzero(WORD32 * const b,WORD32 * src,WORD32 l)1103 static VOID ixheaacd_local_p_nonzero(WORD32 *const b, WORD32 *src, WORD32 l) {
1104 WORD32 i;
1105
1106 for (i = 0; i < l; i++) {
1107 b[i] = *src--;
1108 }
1109 }
1110
ixheaacd_local_p_zero(WORD32 * const b,WORD32 * src,WORD32 l,WORD32 upd_qmf)1111 static VOID ixheaacd_local_p_zero(WORD32 *const b, WORD32 *src, WORD32 l, WORD32 upd_qmf) {
1112 WORD32 i;
1113
1114 for (i = 0; i < upd_qmf; i++) {
1115 b[i] = *src++;
1116 }
1117 if (l != upd_qmf) {
1118 for (; i < l; i++) {
1119 b[i] = *--src;
1120 }
1121 }
1122 }
1123
ixheaacd_local_sin(WORD32 const t,WORD32 const p,WORD32 const l,WORD32 * const b,ia_mps_dec_mdct2qmf_table_struct * mdct2qmf_tab)1124 static VOID ixheaacd_local_sin(WORD32 const t, WORD32 const p, WORD32 const l, WORD32 *const b,
1125 ia_mps_dec_mdct2qmf_table_struct *mdct2qmf_tab) {
1126 WORD32 *sin_ptr;
1127
1128 switch (t) {
1129 case TS_2:
1130 switch (p) {
1131 case ZERO:
1132 b[0] = 12540;
1133 b[1] = 30274;
1134 if (l == TSX2_4) {
1135 b[2] = b[1];
1136 b[3] = b[0];
1137 }
1138 break;
1139 case TS_2:
1140 b[0] = 30274;
1141 b[1] = 12540;
1142 break;
1143 default:
1144 break;
1145 }
1146 break;
1147 case TS_4:
1148 switch (p) {
1149 case ZERO:
1150 sin_ptr = mdct2qmf_tab->local_sin_4;
1151 b[0] = *sin_ptr++;
1152 b[1] = *sin_ptr++;
1153 b[2] = *sin_ptr++;
1154 b[3] = *sin_ptr;
1155 if (l == TSX2_8) {
1156 b[4] = *sin_ptr--;
1157 b[5] = *sin_ptr--;
1158 b[6] = *sin_ptr--;
1159 b[7] = *sin_ptr;
1160 }
1161 break;
1162 case TS_4:
1163 sin_ptr = &(mdct2qmf_tab->local_sin_4[TS_MINUS_ONE_4]);
1164 b[0] = *sin_ptr--;
1165 b[1] = *sin_ptr--;
1166 b[2] = *sin_ptr--;
1167 b[3] = *sin_ptr;
1168 break;
1169 default:
1170 break;
1171 }
1172 break;
1173 case UPD_QMF_15:
1174 switch (p) {
1175 case ZERO:
1176 sin_ptr = &(mdct2qmf_tab->local_sin_15[1]);
1177 ixheaacd_local_p_zero_ts15(b, sin_ptr, l);
1178 break;
1179 case UPD_QMF_15:
1180 sin_ptr = &(mdct2qmf_tab->local_sin_15[TS_MINUS_ONE_15]);
1181 ixheaacd_local_p_nonzero(b, sin_ptr, l);
1182 break;
1183 default:
1184 break;
1185 }
1186 break;
1187 case UPD_QMF_16:
1188 switch (p) {
1189 case ZERO:
1190 sin_ptr = mdct2qmf_tab->local_sin_16;
1191 ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_16);
1192 break;
1193 case UPD_QMF_16:
1194 sin_ptr = &(mdct2qmf_tab->local_sin_16[TS_MINUS_ONE_16]);
1195 ixheaacd_local_p_nonzero(b, sin_ptr, l);
1196 break;
1197 default:
1198 break;
1199 }
1200 break;
1201 case UPD_QMF_18:
1202 switch (p) {
1203 case ZERO:
1204 sin_ptr = mdct2qmf_tab->local_sin_18;
1205 ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_18);
1206 break;
1207 case UPD_QMF_18:
1208 sin_ptr = &(mdct2qmf_tab->local_sin_18[TS_MINUS_ONE_18]);
1209 ixheaacd_local_p_nonzero(b, sin_ptr, l);
1210 break;
1211 default:
1212 break;
1213 }
1214 break;
1215 case UPD_QMF_24:
1216 switch (p) {
1217 case ZERO:
1218 sin_ptr = mdct2qmf_tab->local_sin_24;
1219 ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_24);
1220 break;
1221 case UPD_QMF_24:
1222 sin_ptr = &(mdct2qmf_tab->local_sin_24[TS_MINUS_ONE_24]);
1223 ixheaacd_local_p_nonzero(b, sin_ptr, l);
1224 break;
1225 default:
1226 break;
1227 }
1228 break;
1229 case UPD_QMF_30:
1230 switch (p) {
1231 case ZERO:
1232 sin_ptr = mdct2qmf_tab->local_sin_30;
1233 ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_30);
1234 break;
1235 case UPD_QMF_30:
1236 sin_ptr = &(mdct2qmf_tab->local_sin_30[TS_MINUS_ONE_30]);
1237 ixheaacd_local_p_nonzero(b, sin_ptr, l);
1238 break;
1239 default:
1240 break;
1241 }
1242 break;
1243 case UPD_QMF_32:
1244 switch (p) {
1245 case ZERO:
1246 sin_ptr = mdct2qmf_tab->local_sin_32;
1247 ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_32);
1248 break;
1249 case UPD_QMF_32:
1250 sin_ptr = &(mdct2qmf_tab->local_sin_32[TS_MINUS_ONE_32]);
1251 ixheaacd_local_p_nonzero(b, sin_ptr, l);
1252
1253 break;
1254 default:
1255 break;
1256 }
1257 break;
1258 default:
1259 break;
1260 }
1261 return;
1262 }
1263
ixheaacd_local_one(WORD32 const l,WORD32 * const b)1264 static VOID ixheaacd_local_one(WORD32 const l, WORD32 *const b) {
1265 WORD32 i;
1266
1267 for (i = 0; i < l; i++) {
1268 b[i] = ONE_IN_Q15;
1269 }
1270 }
1271
ixheaacd_local_freq_win(WORD32 const l,WORD32 * const b,const WORD32 ** wf)1272 static VOID ixheaacd_local_freq_win(WORD32 const l, WORD32 *const b, const WORD32 **wf) {
1273 WORD32 i;
1274 WORD32 odd_length = (l & ONE_BIT_MASK);
1275 WORD32 temp_1;
1276 WORD32 *b_start, *b_end;
1277 b_start = b;
1278 b_end = b + 2 * l - 1 - odd_length;
1279
1280 for (i = 0; i < l - odd_length; i++) {
1281 temp_1 = wf[l - 1][i];
1282 *b_start++ = temp_1;
1283 *b_end-- = temp_1;
1284 }
1285
1286 if (odd_length == 1) {
1287 *b_start = wf[l - 1][l - 1];
1288 *(b_start + l) = 0;
1289 }
1290 }
1291
ixheaacd_local_mdct_win(WORD32 upd_qmf,WORD32 const window_type,WORD32 * const wf,WORD32 const ** wf_tab,WORD32 * const wt,ia_mps_dec_mdct2qmf_table_struct * mdct2qmf_tab)1292 static VOID ixheaacd_local_mdct_win(WORD32 upd_qmf, WORD32 const window_type, WORD32 *const wf,
1293 WORD32 const **wf_tab, WORD32 *const wt,
1294 ia_mps_dec_mdct2qmf_table_struct *mdct2qmf_tab) {
1295 WORD32 length = 0;
1296 WORD32 length_right = 0;
1297 WORD32 length_left = 0;
1298 WORD32 length_const1 = 0;
1299 WORD32 length_const2 = 0;
1300
1301 switch (window_type) {
1302 case ONLY_LONG_SEQUENCE:
1303 length = upd_qmf;
1304 ixheaacd_local_sin(upd_qmf, 0, (length << 1), &wt[0], mdct2qmf_tab);
1305 break;
1306 case LONG_START_SEQUENCE:
1307 switch (upd_qmf) {
1308 case UPD_QMF_15:
1309 length_const1 = 6;
1310 length_const2 = 7;
1311 length_right = 2;
1312 break;
1313 case UPD_QMF_16:
1314 case UPD_QMF_32:
1315 length_const1 = 7 * (upd_qmf >> 4);
1316 length_const2 = length_const1;
1317 length_right = upd_qmf >> 3;
1318 break;
1319 case UPD_QMF_18:
1320 length_const1 = 8;
1321 length_const2 = length_const1;
1322 length_right = 2;
1323 break;
1324 case UPD_QMF_24:
1325 length_const1 = 11;
1326 length_const2 = length_const1;
1327 length_right = 2;
1328 break;
1329 case UPD_QMF_30:
1330 length_const1 = 14;
1331 length_const2 = length_const1;
1332 length_right = 2;
1333 break;
1334 default:
1335 length_const1 = 6;
1336 length_const2 = 7;
1337 length_right = 2;
1338 break;
1339 }
1340
1341 ixheaacd_local_sin(upd_qmf, 0, upd_qmf, &wt[0], mdct2qmf_tab);
1342 ixheaacd_local_one(length_const1, &wt[upd_qmf]);
1343 ixheaacd_local_sin(length_right, length_right, length_right, &wt[upd_qmf + length_const1],
1344 mdct2qmf_tab);
1345
1346 ixheaacd_local_zero(length_const2, &wt[upd_qmf + length_const1 + length_right]);
1347 length = upd_qmf;
1348 break;
1349 case EIGHT_SHORT_SEQUENCE:
1350 switch (upd_qmf) {
1351 case UPD_QMF_16:
1352 case UPD_QMF_32:
1353 length = upd_qmf >> 3;
1354 break;
1355 case UPD_QMF_15:
1356 case UPD_QMF_18:
1357 case UPD_QMF_30:
1358 case UPD_QMF_24:
1359 length = 2;
1360 break;
1361 default:
1362 break;
1363 }
1364 ixheaacd_local_sin(length, 0, 2 * length, &wt[0], mdct2qmf_tab);
1365 break;
1366 case LONG_STOP_SEQUENCE:
1367 switch (upd_qmf) {
1368 case UPD_QMF_15:
1369 length_const1 = 6;
1370 length_const2 = 7;
1371 length_left = 2;
1372 break;
1373 case UPD_QMF_16:
1374 case UPD_QMF_32:
1375 length_const1 = 7 * (upd_qmf >> 4);
1376 length_const2 = length_const1;
1377 length_left = upd_qmf >> 3;
1378 break;
1379 case UPD_QMF_18:
1380 length_const1 = 8;
1381 length_const2 = length_const1;
1382 length_left = 2;
1383 break;
1384 case UPD_QMF_24:
1385 length_const1 = 11;
1386 length_const2 = length_const1;
1387 length_left = 2;
1388 break;
1389 case UPD_QMF_30:
1390 length_const1 = 14;
1391 length_const2 = length_const1;
1392 length_left = 2;
1393 break;
1394 default:
1395 break;
1396 }
1397
1398 ixheaacd_local_zero(length_const1, &wt[0]);
1399 ixheaacd_local_sin(length_left, 0, length_left, &wt[length_const1], mdct2qmf_tab);
1400 ixheaacd_local_one(length_const2, &wt[length_const1 + length_left]);
1401 ixheaacd_local_sin(upd_qmf, upd_qmf, upd_qmf,
1402 &wt[length_const1 + length_left + length_const2], mdct2qmf_tab);
1403 length = upd_qmf;
1404 break;
1405 default:
1406 break;
1407 }
1408
1409 ixheaacd_local_freq_win(length, &wf[0], wf_tab);
1410
1411 if ((upd_qmf == UPD_QMF_15) && (window_type == EIGHT_SHORT_SEQUENCE)) {
1412 WORD32 length2 = 3;
1413
1414 ixheaacd_local_sin(length, 0, length, &wt[(length << 1)], mdct2qmf_tab);
1415 ixheaacd_local_one(1, &wt[3 * length]);
1416 ixheaacd_local_sin(length, length, length, &wt[3 * length + 1], mdct2qmf_tab);
1417 ixheaacd_local_zero(1, &wt[(length << 2) + 1]);
1418
1419 ixheaacd_local_freq_win(length2, &wf[(length << 1)], wf_tab);
1420 }
1421 return;
1422 }
1423
ixheaacd_get_gain(WORD32 l,WORD32 * gain)1424 static VOID ixheaacd_get_gain(WORD32 l, WORD32 *gain) {
1425 switch (l) {
1426 case TSX2_4:
1427 *gain = 16384;
1428 break;
1429
1430 case TSX2_6:
1431 *gain = 13377;
1432 break;
1433
1434 case TSX2_8:
1435 *gain = 11585;
1436 break;
1437
1438 case TSX2_30:
1439 *gain = 5982;
1440 break;
1441
1442 case TSX2_32:
1443 *gain = 5792;
1444 break;
1445
1446 case TSX2_36:
1447 *gain = 5461;
1448 break;
1449
1450 case TSX2_48:
1451 *gain = 4729;
1452 break;
1453
1454 case TSX2_60:
1455 *gain = 4230;
1456 break;
1457
1458 case TSX2_64:
1459 *gain = 4096;
1460 break;
1461
1462 default:
1463 break;
1464 }
1465
1466 return;
1467 }
1468
ixheaacd_mdct2qmf_process(WORD32 upd_qmf,WORD32 * const mdct_in,WORD32 * qmf_real_pre,WORD32 * qmf_real_post,WORD32 * qmf_imag_pre,WORD32 * qmf_imag_post,WORD32 const window_type,WORD32 qmf_global_offset,ia_mps_dec_mps_tables_struct * ia_mps_dec_mps_table_ptr,VOID * scratch,WORD32 time_slots)1469 VOID ixheaacd_mdct2qmf_process(WORD32 upd_qmf, WORD32 *const mdct_in, WORD32 *qmf_real_pre,
1470 WORD32 *qmf_real_post, WORD32 *qmf_imag_pre, WORD32 *qmf_imag_post,
1471 WORD32 const window_type, WORD32 qmf_global_offset,
1472 ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr,
1473 VOID *scratch, WORD32 time_slots) {
1474 WORD32 i;
1475 WORD32 j;
1476 WORD32 k;
1477
1478 WORD32 l = (upd_qmf << 1);
1479
1480 WORD32 n = 0;
1481 WORD32 *wf;
1482 WORD32 *wt;
1483
1484 WORD32 *v1;
1485 WORD32 *v2;
1486
1487 WORD32 *z1_real;
1488 WORD32 *z1_imag;
1489
1490 WORD32 *twipost_real;
1491 WORD32 *twipost_imag;
1492
1493 WORD32 *mdct_sf, *mdct_sf_ptr;
1494 WORD32 *mdct_p, *mdct_p2;
1495
1496 WORD32 temp_2, temp3, temp4;
1497
1498 WORD32 *p_qmf_real_pre = qmf_real_pre;
1499 WORD32 *p_qmf_real_post = qmf_real_post;
1500 WORD32 *p_qmf_imag_pre = qmf_imag_pre;
1501 WORD32 *p_qmf_imag_post = qmf_imag_post;
1502
1503 VOID *free_scratch;
1504
1505 WORD32 const **wf_tab = ia_mps_dec_mps_table_ptr->wf_tab_ptr->wf;
1506
1507 WORD32 window_offset = 0;
1508
1509 WORD32 mdct_offset = 0;
1510 WORD32 mdct_shift = AAC_SHORT_FRAME_LENGTH;
1511
1512 WORD32 qmf_offset = 0;
1513 WORD32 qmf_shift = 0;
1514
1515 WORD32 n_windows = 0;
1516
1517 WORD32 mdct_length = MDCT_LENGTH_LO;
1518
1519 WORD32 qmf_bands = 64;
1520 const WORD32 *ptr1, *ptr2;
1521 WORD32 is_long;
1522 WORD32 *zr, *zi;
1523
1524 WORD32 *a, *scale;
1525 WORD32 gain = 0;
1526 WORD32 *wp;
1527
1528 wf = scratch;
1529 wt = wf + MAX_TIMESLOTSX2;
1530 v1 = wt + MAX_TIMESLOTSX2;
1531 v2 = v1 + MDCT_LENGTH_HI;
1532 twipost_real = v2 + MDCT_LENGTH_HI;
1533 twipost_imag = twipost_real + MAX_NUM_QMF_BANDS;
1534 mdct_sf = twipost_imag + MAX_NUM_QMF_BANDS;
1535 z1_real = mdct_sf + MDCT_LENGTH_SF;
1536 z1_imag = z1_real + QBXTSX2;
1537 a = z1_imag + QBXTSX2;
1538 free_scratch = (VOID *)((WORD32 *)a + MAX_NUM_QMF_BANDS);
1539
1540 scale = a;
1541
1542 ixheaacd_local_mdct_win(upd_qmf, window_type, wf, wf_tab, wt,
1543 ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr);
1544
1545 switch (window_type) {
1546 case ONLY_LONG_SEQUENCE:
1547 case LONG_START_SEQUENCE:
1548 case LONG_STOP_SEQUENCE:
1549
1550 n = upd_qmf * qmf_bands - MDCT_LENGTH_LO;
1551
1552 if (n > 0) {
1553 ixheaacd_local_zero(n, &mdct_in[MDCT_LENGTH_LO]);
1554 }
1555 mdct_length += n;
1556
1557 ixheaacd_local_fold_out(mdct_in, mdct_length, wf, l, v1, v2);
1558
1559 wp = wt;
1560
1561 ixheaacd_get_gain(l, &gain);
1562
1563 for (k = 0; k < l; k++) {
1564 *scale++ = ixheaacd_mps_mult32_shr_15(gain, *wp);
1565 wp++;
1566 }
1567 ixheaacd_local_hybcmdct2qmf(v1, v2, a, l, z1_real, z1_imag,
1568 ia_mps_dec_mps_table_ptr->mdct2qmfcos_tab_ptr, free_scratch, 1);
1569
1570 ptr1 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_cos;
1571 ptr2 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_sin;
1572
1573 if (qmf_global_offset < time_slots) {
1574 if (qmf_global_offset + l < time_slots) {
1575 for (i = 0; i < qmf_bands; i++) {
1576 WORD32 cos_twi = *ptr1++;
1577 WORD32 sin_twi = *ptr2++;
1578 for (j = 0; j < l; j++) {
1579 temp3 = *z1_real++;
1580 temp4 = *z1_imag++;
1581
1582 temp_2 = j + qmf_global_offset;
1583 p_qmf_real_pre[temp_2] += cos_twi * temp3;
1584 p_qmf_real_pre[temp_2] -= sin_twi * temp4;
1585 p_qmf_imag_pre[temp_2] += cos_twi * temp4;
1586 p_qmf_imag_pre[temp_2] += sin_twi * temp3;
1587 }
1588 p_qmf_real_pre += MAX_TIME_SLOTS;
1589 p_qmf_imag_pre += MAX_TIME_SLOTS;
1590 }
1591 } else {
1592 for (i = 0; i < qmf_bands; i++) {
1593 WORD32 cos_twi = *ptr1++;
1594 WORD32 sin_twi = *ptr2++;
1595 for (j = 0; j < l; j++) {
1596 temp3 = *z1_real++;
1597 temp4 = *z1_imag++;
1598
1599 temp_2 = j + qmf_global_offset;
1600 if (temp_2 < time_slots) {
1601 p_qmf_real_pre[temp_2] += cos_twi * temp3;
1602 p_qmf_real_pre[temp_2] -= sin_twi * temp4;
1603 p_qmf_imag_pre[temp_2] += cos_twi * temp4;
1604 p_qmf_imag_pre[temp_2] += sin_twi * temp3;
1605 } else {
1606 p_qmf_real_post[temp_2 - time_slots] += cos_twi * temp3;
1607 p_qmf_real_post[temp_2 - time_slots] -= sin_twi * temp4;
1608 p_qmf_imag_post[temp_2 - time_slots] += cos_twi * temp4;
1609 p_qmf_imag_post[temp_2 - time_slots] += sin_twi * temp3;
1610 }
1611 }
1612 p_qmf_real_pre += MAX_TIME_SLOTS;
1613 p_qmf_real_post += MAX_TIME_SLOTS;
1614
1615 p_qmf_imag_pre += MAX_TIME_SLOTS;
1616 p_qmf_imag_post += MAX_TIME_SLOTS;
1617 }
1618 }
1619 } else {
1620 for (i = 0; i < qmf_bands; i++) {
1621 WORD32 cos_twi = *ptr1++;
1622 WORD32 sin_twi = *ptr2++;
1623 for (j = 0; j < l; j++) {
1624 temp3 = *z1_real++;
1625 temp4 = *z1_imag++;
1626
1627 temp_2 = j + qmf_global_offset;
1628
1629 p_qmf_real_post[temp_2 - time_slots] += cos_twi * temp3;
1630 p_qmf_real_post[temp_2 - time_slots] -= sin_twi * temp4;
1631 p_qmf_imag_post[temp_2 - time_slots] += cos_twi * temp4;
1632 p_qmf_imag_post[temp_2 - time_slots] += sin_twi * temp3;
1633 }
1634 p_qmf_real_post += MAX_TIME_SLOTS;
1635 p_qmf_imag_post += MAX_TIME_SLOTS;
1636 }
1637 }
1638 break;
1639 case EIGHT_SHORT_SEQUENCE:
1640
1641 switch (upd_qmf) {
1642 case UPD_QMF_15:
1643 l = 4;
1644 mdct_length = AAC_SHORT_FRAME_LENGTH;
1645 qmf_offset = 6;
1646 qmf_shift = 2;
1647 n_windows = 7;
1648 break;
1649 case UPD_QMF_16:
1650 case UPD_QMF_32:
1651 n = (upd_qmf - UPD_QMF_16) * 8;
1652 mdct_length = AAC_SHORT_FRAME_LENGTH + n;
1653 l = 2 * (upd_qmf >> 3);
1654 qmf_offset = 7 * upd_qmf >> 4;
1655 qmf_shift = upd_qmf >> 3;
1656 n_windows = 8;
1657 break;
1658 case UPD_QMF_18:
1659 l = 4;
1660 mdct_length = AAC_SHORT_FRAME_LENGTH;
1661 qmf_offset = 8;
1662 qmf_shift = 2;
1663 n_windows = 9;
1664 break;
1665 case UPD_QMF_24:
1666 l = 4;
1667 mdct_length = AAC_SHORT_FRAME_LENGTH;
1668 qmf_offset = 11;
1669 qmf_shift = 2;
1670 n_windows = 12;
1671 break;
1672 case UPD_QMF_30:
1673 l = 4;
1674 mdct_length = AAC_SHORT_FRAME_LENGTH;
1675 qmf_offset = 14;
1676 qmf_shift = 2;
1677 n_windows = 15;
1678 break;
1679 default:
1680 l = 4;
1681 mdct_length = AAC_SHORT_FRAME_LENGTH;
1682 qmf_offset = 6;
1683 qmf_shift = 2;
1684 n_windows = 7;
1685 break;
1686 }
1687
1688 wp = wt;
1689 ixheaacd_get_gain(l, &gain);
1690
1691 for (k = 0; k < l; k++) {
1692 *scale++ = ixheaacd_mps_mult32_shr_15(gain, *wp);
1693 wp++;
1694 }
1695
1696 for (k = 0; k < n_windows; k++) {
1697 is_long = 0;
1698 mdct_sf_ptr = mdct_sf;
1699 switch (upd_qmf) {
1700 case UPD_QMF_16:
1701 case UPD_QMF_32:
1702 mdct_p = mdct_in + mdct_offset;
1703 for (i = 0; i < AAC_SHORT_FRAME_LENGTH; i++) {
1704 *mdct_sf_ptr++ = *mdct_p++;
1705 }
1706
1707 ixheaacd_local_zero(n, &mdct_sf[AAC_SHORT_FRAME_LENGTH]);
1708 break;
1709 case UPD_QMF_15:
1710 if (k < n_windows - 1) {
1711 mdct_p = mdct_in + mdct_offset;
1712 for (i = 0; i < AAC_SHORT_FRAME_LENGTH; i++) {
1713 *mdct_sf_ptr++ = *mdct_p++;
1714 }
1715 } else {
1716 window_offset = l;
1717 l = 6;
1718 mdct_length = 192;
1719 is_long = 4;
1720 gain = 13377;
1721 scale = a;
1722 wp = wt + window_offset;
1723
1724 for (k = 0; k < l; k++) {
1725 *scale++ = ixheaacd_mps_mult32_shr_15(gain, *wp);
1726 wp++;
1727 }
1728
1729 mdct_p = mdct_in + mdct_offset;
1730 mdct_p2 = mdct_in + mdct_offset + AAC_SHORT_FRAME_LENGTH;
1731
1732 for (i = 0, j = 0; i < mdct_length / 2; i++) {
1733 *mdct_sf_ptr++ = *mdct_p++;
1734 *mdct_sf_ptr++ = *mdct_p2++;
1735 }
1736 }
1737 break;
1738 case UPD_QMF_18:
1739 case UPD_QMF_24:
1740 case UPD_QMF_30:
1741
1742 mdct_p = mdct_in + mdct_offset;
1743 for (i = 0; i < AAC_SHORT_FRAME_LENGTH; i++) {
1744 *mdct_sf_ptr++ = *mdct_p++;
1745 }
1746 break;
1747 default:
1748 break;
1749 }
1750 ixheaacd_local_fold_out(mdct_sf, mdct_length, &wf[window_offset], l, v1, v2);
1751
1752 ixheaacd_local_hybcmdct2qmf(v1, v2, a, l, z1_real, z1_imag,
1753 ia_mps_dec_mps_table_ptr->mdct2qmfcos_tab_ptr, free_scratch,
1754 is_long);
1755
1756 zr = z1_real;
1757 zi = z1_imag;
1758
1759 ptr1 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_cos;
1760 ptr2 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_sin;
1761 temp_2 = qmf_offset + qmf_global_offset;
1762
1763 if (temp_2 < time_slots) {
1764 if ((temp_2 + l) < time_slots) {
1765 p_qmf_real_pre = qmf_real_pre;
1766 p_qmf_imag_pre = qmf_imag_pre;
1767
1768 for (i = 0; i < qmf_bands; i++) {
1769 WORD32 cos_twi = *ptr1++;
1770 WORD32 sin_twi = *ptr2++;
1771
1772 for (j = 0; j < l; j++) {
1773 temp3 = *zr++;
1774 temp4 = (*zi++);
1775
1776 p_qmf_real_pre[temp_2 + j] += cos_twi * temp3;
1777 p_qmf_real_pre[temp_2 + j] -= sin_twi * temp4;
1778 p_qmf_imag_pre[temp_2 + j] += cos_twi * temp4;
1779 p_qmf_imag_pre[temp_2 + j] += sin_twi * temp3;
1780 }
1781 p_qmf_real_pre += MAX_TIME_SLOTS;
1782 p_qmf_imag_pre += MAX_TIME_SLOTS;
1783 }
1784 } else {
1785 p_qmf_real_pre = qmf_real_pre;
1786 p_qmf_real_post = qmf_real_post;
1787 p_qmf_imag_pre = qmf_imag_pre;
1788 p_qmf_imag_post = qmf_imag_post;
1789
1790 for (i = 0; i < qmf_bands; i++) {
1791 WORD32 cos_twi = *ptr1++;
1792 WORD32 sin_twi = *ptr2++;
1793
1794 for (j = 0; j < l; j++) {
1795 temp3 = *zr++;
1796 temp4 = (*zi++);
1797
1798 if ((temp_2 + j) < time_slots) {
1799 p_qmf_real_pre[temp_2 + j] += cos_twi * temp3;
1800 p_qmf_real_pre[temp_2 + j] -= sin_twi * temp4;
1801 p_qmf_imag_pre[temp_2 + j] += cos_twi * temp4;
1802 p_qmf_imag_pre[temp_2 + j] += sin_twi * temp3;
1803 } else {
1804 p_qmf_real_post[temp_2 + j - time_slots] += cos_twi * temp3;
1805 p_qmf_real_post[temp_2 + j - time_slots] -= sin_twi * temp4;
1806 p_qmf_imag_post[temp_2 + j - time_slots] += cos_twi * temp4;
1807 p_qmf_imag_post[temp_2 + j - time_slots] += sin_twi * temp3;
1808 }
1809 }
1810 p_qmf_real_pre += MAX_TIME_SLOTS;
1811 p_qmf_imag_pre += MAX_TIME_SLOTS;
1812
1813 p_qmf_real_post += MAX_TIME_SLOTS;
1814 p_qmf_imag_post += MAX_TIME_SLOTS;
1815 }
1816 }
1817 } else {
1818 p_qmf_real_post = qmf_real_post;
1819 p_qmf_imag_post = qmf_imag_post;
1820
1821 for (i = 0; i < qmf_bands; i++) {
1822 WORD32 cos_twi = *ptr1++;
1823 WORD32 sin_twi = *ptr2++;
1824
1825 for (j = 0; j < l; j++) {
1826 temp3 = *zr++;
1827 temp4 = (*zi++);
1828 {
1829 p_qmf_real_post[temp_2 + j - time_slots] += cos_twi * temp3;
1830 p_qmf_real_post[temp_2 + j - time_slots] -= sin_twi * temp4;
1831 p_qmf_imag_post[temp_2 + j - time_slots] += cos_twi * temp4;
1832 p_qmf_imag_post[temp_2 + j - time_slots] += sin_twi * temp3;
1833 }
1834 }
1835 p_qmf_real_post += MAX_TIME_SLOTS;
1836 p_qmf_imag_post += MAX_TIME_SLOTS;
1837 }
1838 }
1839
1840 mdct_offset += mdct_shift;
1841 qmf_offset += qmf_shift;
1842 }
1843 break;
1844 default:
1845 break;
1846 }
1847 return;
1848 }
1849