Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / gst / audioconvert / gstaudioconvertorc.orc
1
2 .init gst_audio_convert_orc_init
3
4 .function orc_audio_convert_unpack_u8
5 .dest 4 d1 gint32
6 .source 1 s1 guint8
7 .param 4 p1
8 .const 4 c1 0x80000000
9 .temp 2 t2
10 .temp 4 t3
11
12 convubw t2, s1
13 convuwl t3, t2
14 shll t3, t3, p1
15 xorl d1, t3, c1
16
17
18 .function orc_audio_convert_unpack_s8
19 .dest 4 d1 gint32
20 .source 1 s1 guint8
21 .param 4 p1
22 .temp 2 t2
23 .temp 4 t3
24
25 convubw t2, s1
26 convuwl t3, t2
27 shll d1, t3, p1
28
29
30 .function orc_audio_convert_unpack_u16
31 .dest 4 d1 gint32
32 .source 2 s1 guint8
33 .param 4 p1
34 .const 4 c1 0x80000000
35 .temp 4 t2
36
37 convuwl t2, s1
38 shll t2, t2, p1
39 xorl d1, t2, c1
40
41
42 .function orc_audio_convert_unpack_s16
43 .dest 4 d1 gint32
44 .source 2 s1 guint8
45 .param 4 p1
46 .temp 4 t2
47
48 convuwl t2, s1
49 shll d1, t2, p1
50
51
52 .function orc_audio_convert_unpack_u16_swap
53 .dest 4 d1 gint32
54 .source 2 s1 guint8
55 .param 4 p1
56 .const 4 c1 0x80000000
57 .temp 2 t1
58 .temp 4 t2
59
60 swapw t1, s1
61 convuwl t2, t1
62 shll t2, t2, p1
63 xorl d1, t2, c1
64
65
66 .function orc_audio_convert_unpack_s16_swap
67 .dest 4 d1 gint32
68 .source 2 s1 guint8
69 .param 4 p1
70 .temp 2 t1
71 .temp 4 t2
72
73 swapw t1, s1
74 convuwl t2, t1
75 shll d1, t2, p1
76
77
78 .function orc_audio_convert_unpack_u32
79 .dest 4 d1 gint32
80 .source 4 s1 guint8
81 .param 4 p1
82 .const 4 c1 0x80000000
83 .temp 4 t1
84
85 shll t1, s1, p1
86 xorl d1, t1, c1
87
88
89 .function orc_audio_convert_unpack_s32
90 .dest 4 d1 gint32
91 .source 4 s1 guint8
92 .param 4 p1
93
94 shll d1, s1, p1
95
96
97 .function orc_audio_convert_unpack_u32_swap
98 .dest 4 d1 gint32
99 .source 4 s1 guint8
100 .param 4 p1
101 .const 4 c1 0x80000000
102 .temp 4 t1
103
104 swapl t1, s1
105 shll t1, t1, p1
106 xorl d1, t1, c1
107
108
109 .function orc_audio_convert_unpack_s32_swap
110 .dest 4 d1 gint32
111 .source 4 s1 guint8
112 .param 4 p1
113 .temp 4 t1
114
115 swapl t1, s1
116 shll d1, t1, p1
117
118 .function orc_audio_convert_unpack_float_s32
119 .source 4 s1 gfloat
120 .dest 4 d1 guint32
121 .temp 4 t1
122
123 loadl t1, s1
124 # multiply with 2147483647.0
125 mulf t1, t1, 0x4F000000
126 # add 0.5 for rounding
127 addf t1, t1, 0x3F000000
128 convfl d1, t1
129
130 .function orc_audio_convert_unpack_float_s32_swap
131 .source 4 s1 gfloat
132 .dest 4 d1 guint32
133 .temp 4 t1
134
135 swapl t1, s1
136 # multiply with 2147483647.0
137 mulf t1, t1, 0x4F000000
138 # add 0.5 for rounding
139 addf t1, t1, 0x3F000000
140 convfl d1, t1
141
142 .function orc_audio_convert_unpack_double_s32
143 .source 8 s1 gdouble
144 .dest 4 d1 guint32
145 .temp 8 t1
146
147 loadq t1, s1
148 # multiply with 2147483647.0
149 muld t1, t1, 0x41DFFFFFFFC00000L
150 # add 0.5 for rounding
151 addd t1, t1, 0x3FE0000000000000L
152 convdl d1, t1
153
154 .function orc_audio_convert_unpack_double_s32_swap
155 .source 8 s1 gdouble
156 .dest 4 d1 guint32
157 .temp 8 t1
158
159 swapq t1, s1
160 # multiply with 2147483647.0
161 muld t1, t1, 0x41DFFFFFFFC00000L
162 # add 0.5 for rounding
163 addd t1, t1, 0x3FE0000000000000L
164 convdl d1, t1
165
166 .function orc_audio_convert_unpack_float_double
167 .dest 8 d1 gdouble
168 .source 4 s1 gfloat
169
170 convfd d1, s1
171
172 .function orc_audio_convert_unpack_float_double_swap
173 .dest 8 d1 gdouble
174 .source 4 s1 gfloat
175 .temp 4 t1
176
177 swapl t1, s1
178 convfd d1, t1
179
180 .function orc_audio_convert_unpack_double_double
181 .dest 8 d1 gdouble
182 .source 8 s1 gdouble
183
184 copyq d1, s1
185
186 .function orc_audio_convert_unpack_double_double_swap
187 .dest 8 d1 gdouble
188 .source 8 s1 gdouble
189
190 swapq d1, s1
191
192 .function orc_audio_convert_unpack_u8_double
193 .dest 8 d1 gdouble
194 .source 1 s1 guint8
195 .param 4 p1
196 .const 4 c1 0x80000000
197 .temp 2 t2
198 .temp 4 t3
199
200 convubw t2, s1
201 convuwl t3, t2
202 shll t3, t3, p1
203 xorl t3, t3, c1
204 convld d1, t3
205
206 .function orc_audio_convert_unpack_s8_double
207 .dest 8 d1 gdouble
208 .source 1 s1 guint8
209 .param 4 p1
210 .temp 2 t2
211 .temp 4 t3
212
213 convubw t2, s1
214 convuwl t3, t2
215 shll t3, t3, p1
216 convld d1, t3
217
218 .function orc_audio_convert_unpack_u16_double
219 .dest 8 d1 gdouble
220 .source 2 s1 guint8
221 .param 4 p1
222 .const 4 c1 0x80000000
223 .temp 4 t2
224
225 convuwl t2, s1
226 shll t2, t2, p1
227 xorl t2, t2, c1
228 convld d1, t2
229
230 .function orc_audio_convert_unpack_s16_double
231 .dest 8 d1 gdouble
232 .source 2 s1 guint8
233 .param 4 p1
234 .temp 4 t2
235
236 convuwl t2, s1
237 shll t2, t2, p1
238 convld d1, t2
239
240 .function orc_audio_convert_unpack_u16_double_swap
241 .dest 8 d1 gdouble
242 .source 2 s1 guint8
243 .param 4 p1
244 .const 4 c1 0x80000000
245 .temp 2 t1
246 .temp 4 t2
247
248 swapw t1, s1
249 convuwl t2, t1
250 shll t2, t2, p1
251 xorl t2, t2, c1
252 convld d1, t2
253
254 .function orc_audio_convert_unpack_s16_double_swap
255 .dest 8 d1 gdouble
256 .source 2 s1 guint8
257 .param 4 p1
258 .temp 2 t1
259 .temp 4 t2
260
261 swapw t1, s1
262 convuwl t2, t1
263 shll t2, t2, p1
264 convld d1, t2
265
266 .function orc_audio_convert_unpack_u32_double
267 .dest 8 d1 gdouble
268 .source 4 s1 guint8
269 .param 4 p1
270 .const 4 c1 0x80000000
271 .temp 4 t1
272
273 shll t1, s1, p1
274 xorl t1, t1, c1
275 convld d1, t1
276
277 .function orc_audio_convert_unpack_s32_double
278 .dest 8 d1 gdouble
279 .source 4 s1 guint8
280 .param 4 p1
281 .temp 4 t1
282
283 shll t1, s1, p1
284 convld d1, t1
285
286 .function orc_audio_convert_unpack_u32_double_swap
287 .dest 8 d1 gdouble
288 .source 4 s1 guint8
289 .param 4 p1
290 .const 4 c1 0x80000000
291 .temp 4 t1
292
293 swapl t1, s1
294 shll t1, t1, p1
295 xorl t1, t1, c1
296 convld d1, t1
297
298 .function orc_audio_convert_unpack_s32_double_swap
299 .dest 8 d1 gdouble
300 .source 4 s1 guint8
301 .param 4 p1
302 .temp 4 t1
303
304 swapl t1, s1
305 shll t1, t1, p1
306 convld d1, t1
307
308 .function orc_audio_convert_pack_u8
309 .dest 1 d1 guint8
310 .source 4 s1 gint32
311 .param 4 p1
312 .const 4 c1 0x80000000
313 .temp 4 t1
314 .temp 2 t2
315
316 xorl t1, s1, c1
317 shrul t1, t1, p1
318 convlw t2, t1
319 convwb d1, t2
320
321
322 .function orc_audio_convert_pack_s8
323 .dest 1 d1 guint8
324 .source 4 s1 gint32
325 .param 4 p1
326 .temp 4 t1
327 .temp 2 t2
328
329 shrsl t1, s1, p1
330 convlw t2, t1
331 convwb d1, t2
332
333
334
335 .function orc_audio_convert_pack_u16
336 .dest 2 d1 guint8
337 .source 4 s1 gint32
338 .param 4 p1
339 .const 4 c1 0x80000000
340 .temp 4 t1
341
342 xorl t1, s1, c1
343 shrul t1, t1, p1
344 convlw d1, t1
345
346
347 .function orc_audio_convert_pack_s16
348 .dest 2 d1 guint8
349 .source 4 s1 gint32
350 .param 4 p1
351 .temp 4 t1
352
353 shrsl t1, s1, p1
354 convlw d1, t1
355
356
357 .function orc_audio_convert_pack_u16_swap
358 .dest 2 d1 guint8
359 .source 4 s1 gint32
360 .param 4 p1
361 .const 4 c1 0x80000000
362 .temp 4 t1
363 .temp 2 t2
364
365 xorl t1, s1, c1
366 shrul t1, t1, p1
367 convlw t2, t1
368 swapw d1, t2
369
370
371 .function orc_audio_convert_pack_s16_swap
372 .dest 2 d1 guint8
373 .source 4 s1 gint32
374 .param 4 p1
375 .temp 4 t1
376 .temp 2 t2
377
378 shrsl t1, s1, p1
379 convlw t2, t1
380 swapw d1, t2
381
382
383
384 .function orc_audio_convert_pack_u32
385 .dest 4 d1 guint8
386 .source 4 s1 gint32
387 .param 4 p1
388 .const 4 c1 0x80000000
389 .temp 4 t1
390
391 xorl t1, s1, c1
392 shrul d1, t1, p1
393
394
395 .function orc_audio_convert_pack_s32
396 .dest 4 d1 guint8
397 .source 4 s1 gint32
398 .param 4 p1
399
400 shrsl d1, s1, p1
401
402
403 .function orc_audio_convert_pack_u32_swap
404 .dest 4 d1 guint8
405 .source 4 s1 gint32
406 .param 4 p1
407 .const 4 c1 0x80000000
408 .temp 4 t1
409
410 xorl t1, s1, c1
411 shrul t1, t1, p1
412 swapl d1, t1
413
414
415 .function orc_audio_convert_pack_s32_swap
416 .dest 4 d1 guint8
417 .source 4 s1 gint32
418 .param 4 p1
419 .temp 4 t1
420
421 shrsl t1, s1, p1
422 swapl d1, t1
423
424 .function orc_audio_convert_pack_s32_float
425 .dest 4 d1 gfloat
426 .source 4 s1 gint32
427 .temp 4 t1
428
429 convlf t1, s1
430 # divide by 2147483647.0
431 divf t1, t1, 0x4F000000
432 storel d1, t1
433
434 .function orc_audio_convert_pack_s32_float_swap
435 .dest 4 d1 gfloat
436 .source 4 s1 gint32
437 .temp 4 t1
438
439 convlf t1, s1
440 # divide by 2147483647.0
441 divf t1, t1, 0x4F000000
442 swapl d1, t1
443
444 .function orc_audio_convert_pack_s32_double
445 .dest 8 d1 gdouble
446 .source 4 s1 gint32
447 .temp 8 t1
448
449 convld t1, s1
450 # divide by 2147483647.0
451 divd t1, t1, 0x41DFFFFFFFC00000L
452 storeq d1, t1
453
454 .function orc_audio_convert_pack_s32_double_swap
455 .dest 8 d1 gdouble
456 .source 4 s1 gint32
457 .temp 8 t1
458
459 convld t1, s1
460 # divide by 2147483647.0
461 divd t1, t1, 0x41DFFFFFFFC00000L
462 swapq d1, t1
463
464 .function orc_audio_convert_pack_double_float
465 .dest 4 d1 gfloat
466 .source 8 s1 gdouble
467
468 convdf d1, s1
469
470 .function orc_audio_convert_pack_double_float_swap
471 .dest 4 d1 gfloat
472 .source 8 s1 gdouble
473 .temp 4 t1
474
475 convdf t1, s1
476 swapl d1, t1
477
478 .function orc_audio_convert_pack_double_u8
479 .dest 1 d1 guint8
480 .source 8 s1 gdouble
481 .param 4 p1
482 .const 4 c1 0x80000000
483 .temp 4 t1
484 .temp 2 t2
485
486 convdl t1, s1
487 xorl t1, t1, c1
488 shrul t1, t1, p1
489 convlw t2, t1
490 convwb d1, t2
491
492 .function orc_audio_convert_pack_double_s8
493 .dest 1 d1 guint8
494 .source 8 s1 gdouble
495 .param 4 p1
496 .temp 4 t1
497 .temp 2 t2
498
499 convdl t1, s1
500 shrsl t1, t1, p1
501 convlw t2, t1
502 convwb d1, t2
503
504 .function orc_audio_convert_pack_double_u16
505 .dest 2 d1 guint8
506 .source 8 s1 gdouble
507 .param 4 p1
508 .const 4 c1 0x80000000
509 .temp 4 t1
510
511 convdl t1, s1
512 xorl t1, t1, c1
513 shrul t1, t1, p1
514 convlw d1, t1
515
516 .function orc_audio_convert_pack_double_s16
517 .dest 2 d1 guint8
518 .source 8 s1 gdouble
519 .param 4 p1
520 .temp 4 t1
521
522 convdl t1, s1
523 shrsl t1, t1, p1
524 convlw d1, t1
525
526 .function orc_audio_convert_pack_double_u16_swap
527 .dest 2 d1 guint8
528 .source 8 s1 gdouble
529 .param 4 p1
530 .const 4 c1 0x80000000
531 .temp 4 t1
532 .temp 2 t2
533
534 convdl t1, s1
535 xorl t1, t1, c1
536 shrul t1, t1, p1
537 convlw t2, t1
538 swapw d1, t2
539
540 .function orc_audio_convert_pack_double_s16_swap
541 .dest 2 d1 guint8
542 .source 8 s1 gdouble
543 .param 4 p1
544 .temp 4 t1
545 .temp 2 t2
546
547 convdl t1, s1
548 shrsl t1, t1, p1
549 convlw t2, t1
550 swapw d1, t2
551
552 .function orc_audio_convert_pack_double_u32
553 .dest 4 d1 guint8
554 .source 8 s1 gdouble
555 .param 4 p1
556 .const 4 c1 0x80000000
557 .temp 4 t1
558
559 convdl t1, s1
560 xorl t1, t1, c1
561 shrul d1, t1, p1
562
563 .function orc_audio_convert_pack_double_s32
564 .dest 4 d1 guint8
565 .source 8 s1 gdouble
566 .param 4 p1
567 .temp 4 t1
568
569 convdl t1, s1
570 shrsl d1, t1, p1
571
572 .function orc_audio_convert_pack_double_u32_swap
573 .dest 4 d1 guint8
574 .source 8 s1 gdouble
575 .param 4 p1
576 .const 4 c1 0x80000000
577 .temp 4 t1
578
579 convdl t1, s1
580 xorl t1, t1, c1
581 shrul t1, t1, p1
582 swapl d1, t1
583
584 .function orc_audio_convert_pack_double_s32_swap
585 .dest 4 d1 guint8
586 .source 8 s1 gdouble
587 .param 4 p1
588 .temp 4 t1
589
590 convdl t1, s1
591 shrsl t1, t1, p1
592 swapl d1, t1
593