1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
|
@ ------------------------------------------------------------------
@ Copyright (C) 1998-2009 PacketVideo
@
@ Licensed under the Apache License, Version 2.0 (the "License");
@ you may not use this file except in compliance with the License.
@ You may obtain a copy of the License at
@
@ http://www.apache.org/licenses/LICENSE-2.0
@
@ Unless required by applicable law or agreed to in writing, software
@ distributed under the License is distributed on an "AS IS" BASIS,
@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
@ express or implied.
@ See the License for the specific language governing permissions
@ and limitations under the License.
@ -------------------------------------------------------------------
@
@
@ Filename: pvmp3_dct_18_gcc.s
@
@------------------------------------------------------------------------------
@ REVISION HISTORY
@
@
@ Who: Date: MM/DD/YYYY
@ Description:
@
@------------------------------------------------------------------------------
.arm
.align 4
.text
.extern pvmp3_dct_9
@------------------------------------------------------------------------------
.global pvmp3_mdct_18
pvmp3_mdct_18:
stmfd sp!,{r4-r11,lr}
mov r7,r2
adr r2,constdata$1
mov r6,r1
add r3,r2,#0x24
add r12,r3,#0x44
add r1,r0,#0x44
mov r5,r0
@ for ( i=9@ i!=0@ i--)
@ {
mov r4,#9
Loop_1:
@ tmp = *(pt_vec)
@ tmp1 = *(pt_vec_o)
ldr lr,[r0] @@ tmp == lr
ldr r8,[r3],#4 @@ tmp1 == r8
@ tmp = fxp_mul32_Q32( tmp<<1, *(pt_cos++ ))
@ tmp1 = fxp_mul32_Q27( tmp1, *(pt_cos_x--))
mov lr,lr,lsl #1
smull r10,lr,r8,lr
ldr r8,[r12],#-4
ldr r9,[r1]
subs r4,r4,#1
smull r9,r10,r8,r9
mov r8,r9,lsr #27
add r8,r8,r10,lsl #5
@ *(pt_vec++) = tmp + tmp1
@ *(pt_vec_o--) = fxp_mul32_Q28( (tmp - tmp1), *(pt_cos_split++))
add r9,lr,r8
sub r8,lr,r8
ldr lr,[r2],#4
str r9,[r0],#4
smull r8,r9,lr,r8
mov lr,r8,lsr #28
add lr,lr,r9,lsl #4
str lr,[r1],#-4
bne Loop_1
@ }
mov r0,r5 @@ r0 = vec
bl pvmp3_dct_9
add r0,r5,#0x24 @@ r0 = &vec[9]
bl pvmp3_dct_9
ldr r0,[r5,#0x20]
ldr r2,[r5,#0x40]
str r0,[r5,#0x40]
ldr r0,[r5,#0x1c]
ldr r3,[r5,#0x38]
str r0,[r5,#0x38]
ldr r1,[r5,#0x18]
ldr r0,[r5,#0x30]
str r1,[r5,#0x30]
ldr r12,[r5,#0x14]
ldr r1,[r5,#0x28]
str r12,[r5,#0x28]
ldr r12,[r5,#0x10]
str r12,[r5,#0x20]
ldr r12,[r5,#0xc]
str r12,[r5,#0x18]
ldr r12,[r5,#8]
str r12,[r5,#0x10]
ldr r12,[r5,#4]
str r12,[r5,#8]
ldr r12,[r5,#0x24]
sub r12,r12,r1
str r12,[r5,#4]
ldr r12,[r5,#0x2c]
sub r1,r12,r1
str r1,[r5,#0xc]
sub r1,r12,r0
str r1,[r5,#0x14]
ldr r1,[r5,#0x34]
sub r0,r1,r0
str r0,[r5,#0x1c]
sub r0,r1,r3
str r0,[r5,#0x24]
ldr r1,[r5,#0x3c]
sub r3,r1,r3
sub r1,r1,r2
str r1,[r5,#0x34]
str r3,[r5,#0x2c]
ldr r1,[r5,#0x44]
sub r1,r1,r2
str r1,[r5,#0x3c]
ldr r12,[r5,#0]
Loop_2:
add r1,r5,r4,lsl #2
ldr r2,[r1,#0x28]
ldr r3,[r6,r4,lsl #2]
add r0,r0,r2
str r0,[r1,#0x28]
ldr lr,[r7,r4,lsl #2]
ldr r1,[r1,#4]
smlal r0,r3,lr,r0
mov r0,r2
add r2,r12,r1
rsb r2,r2,#0
str r3,[r5,r4,lsl #2]
str r2,[r6,r4,lsl #2]
add r4,r4,#1
cmp r4,#6
mov r12,r1
blt Loop_2
ldr r1,[r5,#0x40]
ldr r2,[r6,#0x18]
add r3,r0,r1
str r3,[r5,#0x40]
ldr lr,[r7,r4,lsl #2]
mov r3,r3,lsl #1
ldr r0,[r5,#0x1c]
smlal r3,r2,lr,r3
add r3,r12,r0
str r2,[r5,#0x18]
ldr r2,[r6,#0x1c]
rsb r3,r3,#0
str r3,[r6,#0x18]
ldr r3,[r5,#0x20]
add r0,r3,r0
rsb r0,r0,#0
str r0,[r6,#0x1c]
ldr r3,[r5,#0x44]
ldr r0,[r6,#0x20]
add r3,r3,r1
mov r1,r2
ldr r10,[r7,#0x1c]
mov r2,r3,lsl #1
smlal r12,r1,r10,r2
str r1,[r5,#0x1c]
ldr r1,[r5,#0x20]
ldr r3,[r5,#0x24]
add r1,r1,r3
rsb r1,r1,#0
str r1,[r6,#0x20]
ldr r1,[r5,#0x44]
ldr r3,[r7,#0x20]
mov r1,r1,lsl #1
smlal r12,r0,r3,r1
ldr lr,[r7,#0x24]
ldr r3,[r6,#0x24]
str r0,[r5,#0x20]
smlal r1,r3,lr,r1
ldr r0,[r6,#0x40]
ldr r12,[r6,#0x44]
str r3,[r5,#0x24]
ldr r1,[r5,#0x28]
ldr r3,[r7,#0x44]
mov r1,r1,lsl #1
smlal r1,r12,r3,r1
ldr r1,[r5,#0x40]
str r12,[r5,#0x44]
rsb r8,r1,#0
str r8,[r5,#0x28]
ldr r1,[r5,#0x2c]
ldr r3,[r7,#0x40]
mov r1,r1,lsl #1
smlal r1,r0,r3,r1
str r0,[r5,#0x40]
ldr r0,[r5,#0x3c]
ldr r1,[r6,#0x38]
ldr r3,[r6,#0x3c]
rsb r9,r0,#0
str r9,[r5,#0x2c]
ldr r0,[r5,#0x30]
ldr r12,[r7,#0x3c]
mov r0,r0,lsl #1
smlal r0,r3,r12,r0
str r3,[r5,#0x3c]
ldr r0,[r5,#0x38]
rsb r0,r0,#0
str r0,[r5,#0x30]
ldr r3,[r5,#0x34]
ldr r12,[r7,#0x38]
mov r3,r3,lsl #1
smlal r3,r1,r12,r3
mov r0,r0,lsl #1
str r1,[r5,#0x38]
ldr r4,[r7,#0x34]
ldr r1,[r6,#0x34]
ldr r3,[r6,#0x30]
smlal r0,r1,r4,r0
ldr r12,[r6,#0x2c]
ldr lr,[r6,#0x28]
str r1,[r5,#0x34]
ldr r1,[r7,#0x30]
mov r0,r9,lsl #1
smlal r0,r3,r1,r0
mov r0,r8,lsl #1
ldr r1,[r7,#0x2c]
str r3,[r5,#0x30]
smlal r0,r12,r1,r0
ldr r0,[r7,#0x28]
str r12,[r5,#0x2c]
smlal r2,lr,r0,r2
str lr,[r5,#0x28]
ldr r1,[r6,#4]
ldr r12,[r7,#0x48]
mov r2,r1,lsl #1
ldr r1,[r6,#0x20]
ldr r0,[r6,#0]
mov r1,r1,lsl #1
smull r4,lr,r12,r1
ldr r3,[r6,#0x1c]
str lr,[r6,#0]
ldr r12,[r7,#0x4c]
mov r3,r3,lsl #1
smull r4,lr,r12,r3
mov r0,r0,lsl #1
ldr r12,[r7,#0x64]
str lr,[r6,#4]
smull r4,lr,r12,r2
ldr r12,[r7,#0x68]
str lr,[r6,#0x1c]
smull r4,lr,r12,r0
ldr r12,[r7,#0x6c]
str lr,[r6,#0x20]
smull lr,r0,r12,r0
ldr r12,[r7,#0x70]
str r0,[r6,#0x24]
smull r0,r2,r12,r2
ldr r0,[r7,#0x88]
str r2,[r6,#0x28]
smull r3,r2,r0,r3
ldr r0,[r7,#0x8c]
str r2,[r6,#0x40]
smull r2,r1,r0,r1
str r1,[r6,#0x44]
ldr r0,[r6,#0x18]
ldr lr,[r7,#0x50]
mov r1,r0,lsl #1
ldr r0,[r6,#0x14]
smull r5,r4,lr,r1
mov r3,r0,lsl #1
ldr r0,[r6,#0x10]
mov r12,r0,lsl #1
ldr r0,[r6,#0xc]
mov r2,r0,lsl #1
ldr r0,[r6,#8]
str r4,[r6,#8]
ldr lr,[r7,#0x54]
mov r0,r0,lsl #1
smull r5,r4,lr,r3
ldr lr,[r7,#0x58]
str r4,[r6,#0xc]
smull r5,r4,lr,r12
ldr lr,[r7,#0x5c]
str r4,[r6,#0x10]
smull r5,r4,lr,r2
ldr lr,[r7,#0x60]
str r4,[r6,#0x14]
smull r5,r4,lr,r0
ldr lr,[r7,#0x74]
str r4,[r6,#0x18]
smull r4,r0,lr,r0
ldr lr,[r7,#0x78]
str r0,[r6,#0x2c]
smull r0,r2,lr,r2
ldr r0,[r7,#0x7c]
str r2,[r6,#0x30]
smull r12,r2,r0,r12
ldr r0,[r7,#0x80]
str r2,[r6,#0x34]
smull r3,r2,r0,r3
ldr r0,[r7,#0x84]
str r2,[r6,#0x38]
smull r2,r1,r0,r1
str r1,[r6,#0x3c]
ldmfd sp!,{r4-r11,pc}
@------------------------------------------------------------------------------
constdata$1:
cosTerms_dct18:
.word 0x0807d2b0
.word 0x08483ee0
.word 0x08d3b7d0
.word 0x09c42570
.word 0x0b504f30
.word 0x0df29440
.word 0x12edfb20
.word 0x1ee8dd40
.word 0x5bca2a00
cosTerms_1_ov_cos_phi:
.word 0x400f9c00
.word 0x408d6080
.word 0x418dcb80
.word 0x431b1a00
.word 0x4545ea00
.word 0x48270680
.word 0x4be25480
.word 0x50ab9480
.word 0x56ce4d80
.word 0x05ebb630
.word 0x06921a98
.word 0x0771d3a8
.word 0x08a9a830
.word 0x0a73d750
.word 0x0d4d5260
.word 0x127b1ca0
.word 0x1ea52b40
.word 0x5bb3cc80
|