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