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