Imported Upstream version 0.10.23
[profile/ivi/gst-plugins-bad.git] / gst / colorspace / gstcolorspaceorc.orc
1
2 .function cogorc_memcpy_2d
3 .flags 2d
4 .dest 1 d1 guint8
5 .source 1 s1 guint8
6
7 copyb d1, s1
8
9
10 .function cogorc_downsample_horiz_cosite_1tap
11 .dest 1 d1 guint8
12 .source 2 s1 guint8
13
14 select0wb d1, s1
15
16
17 .function cogorc_downsample_horiz_cosite_3tap
18 .dest 1 d1 guint8
19 .source 2 s1 guint8
20 .source 2 s2 guint8
21 .temp 1 t1
22 .temp 1 t2
23 .temp 1 t3
24 .temp 2 t4
25 .temp 2 t5
26 .temp 2 t6
27
28 copyw t4, s1
29 select0wb t1, t4
30 select1wb t2, t4
31 select0wb t3, s2
32 convubw t4, t1
33 convubw t5, t2
34 convubw t6, t3
35 mullw t5, t5, 2
36 addw t4, t4, t6
37 addw t4, t4, t5
38 addw t4, t4, 2
39 shrsw t4, t4, 2
40 convsuswb d1, t4
41
42
43 .function cogorc_downsample_420_jpeg
44 .dest 1 d1 guint8
45 .source 2 s1 guint8
46 .source 2 s2 guint8
47 .temp 2 t1
48 .temp 1 t2
49 .temp 1 t3
50 .temp 1 t4
51 .temp 1 t5
52
53 copyw t1, s1
54 select0wb t2, t1
55 select1wb t3, t1
56 avgub t2, t2, t3
57 copyw t1, s2
58 select0wb t4, t1
59 select1wb t5, t1
60 avgub t4, t4, t5
61 avgub d1, t2, t4
62
63
64 .function cogorc_downsample_vert_halfsite_2tap
65 .dest 1 d1 guint8
66 .source 1 s1 guint8
67 .source 1 s2 guint8
68
69 avgub d1, s1, s2
70
71
72 .function cogorc_downsample_vert_cosite_3tap
73 .dest 1 d1 guint8
74 .source 1 s1 guint8
75 .source 1 s2 guint8
76 .source 1 s3 guint8
77 .temp 2 t1
78 .temp 2 t2
79 .temp 2 t3
80
81 convubw t1, s1
82 convubw t2, s2
83 convubw t3, s3
84 mullw t2, t2, 2
85 addw t1, t1, t3
86 addw t1, t1, t2
87 addw t1, t1, 2
88 shrsw t1, t1, 2
89 convsuswb d1, t1
90
91
92
93 .function cogorc_downsample_vert_halfsite_4tap
94 .dest 1 d1 guint8
95 .source 1 s1 guint8
96 .source 1 s2 guint8
97 .source 1 s3 guint8
98 .source 1 s4 guint8
99 .temp 2 t1
100 .temp 2 t2
101 .temp 2 t3
102 .temp 2 t4
103
104 convubw t1, s1
105 convubw t2, s2
106 convubw t3, s3
107 convubw t4, s4
108 addw t2, t2, t3
109 mullw t2, t2, 26
110 addw t1, t1, t4
111 mullw t1, t1, 6
112 addw t2, t2, t1
113 addw t2, t2, 32
114 shrsw t2, t2, 6
115 convsuswb d1, t2
116
117
118 .function cogorc_upsample_horiz_cosite_1tap
119 .dest 2 d1 guint8 guint8
120 .source 1 s1 guint8
121 .temp 1 t1
122
123 copyb t1, s1
124 mergebw d1, t1, t1
125
126
127 .function cogorc_upsample_horiz_cosite
128 .dest 2 d1 guint8 guint8
129 .source 1 s1 guint8
130 .source 1 s2 guint8
131 .temp 1 t1
132 .temp 1 t2
133
134 copyb t1, s1
135 avgub t2, t1, s2
136 mergebw d1, t1, t2
137
138
139 .function cogorc_upsample_vert_avgub
140 .dest 1 d1 guint8
141 .source 1 s1 guint8
142 .source 1 s2 guint8
143
144 avgub d1, s1, s2
145
146
147
148
149 .function orc_unpack_yuyv_y
150 .dest 1 d1 guint8
151 .source 2 s1 guint8
152
153 select0wb d1, s1
154
155
156 .function orc_unpack_yuyv_u
157 .dest 1 d1 guint8
158 .source 4 s1 guint8
159 .temp 2 t1
160
161 select0lw t1, s1
162 select1wb d1, t1
163
164
165 .function orc_unpack_yuyv_v
166 .dest 1 d1 guint8
167 .source 4 s1 guint8
168 .temp 2 t1
169
170 select1lw t1, s1
171 select1wb d1, t1
172
173
174 .function orc_pack_yuyv
175 .dest 4 d1 guint8
176 .source 2 s1 guint8 guint8
177 .source 1 s2 guint8
178 .source 1 s3 guint8
179 .temp 1 t1
180 .temp 1 t2
181 .temp 2 t3
182 .temp 2 t4
183 .temp 2 t5
184
185 copyw t5, s1
186 select0wb t1, t5
187 select1wb t2, t5
188 mergebw t3, t1, s2
189 mergebw t4, t2, s3
190 mergewl d1, t3, t4
191
192
193 .function orc_unpack_uyvy_y
194 .dest 1 d1 guint8
195 .source 2 s1 guint8
196
197 select1wb d1, s1
198
199
200 .function orc_unpack_uyvy_u
201 .dest 1 d1 guint8
202 .source 4 s1 guint8
203 .temp 2 t1
204
205 select0lw t1, s1
206 select0wb d1, t1
207
208
209 .function orc_unpack_uyvy_v
210 .dest 1 d1 guint8
211 .source 4 s1 guint8
212 .temp 2 t1
213
214 select1lw t1, s1
215 select0wb d1, t1
216
217
218 .function orc_pack_uyvy
219 .dest 4 d1 guint8
220 .source 2 s1 guint8 guint8
221 .source 1 s2 guint8
222 .source 1 s3 guint8
223 .temp 1 t1
224 .temp 1 t2
225 .temp 2 t3
226 .temp 2 t4
227 .temp 2 t5
228
229 copyw t5, s1
230 select0wb t1, t5
231 select1wb t2, t5
232 mergebw t3, s2, t1
233 mergebw t4, s3, t2
234 mergewl d1, t3, t4
235
236
237 .function orc_matrix2_u8
238 .dest 1 d1 guint8 guint8
239 .source 1 s1 guint8 guint8
240 .source 1 s2 guint8 guint8
241 .param 2 p1
242 .param 2 p2
243 .param 2 p3
244 .temp 2 t1
245 .temp 2 t2
246
247 convubw t1, s1
248 mullw t1, t1, p1
249 convubw t2, s2
250 mullw t2, t2, p2
251 addw t1, t1, t2
252 addw t1, t1, p3
253 shrsw t1, t1, 6
254 convsuswb d1, t1
255
256
257 .function orc_matrix2_11_u8
258 .dest 1 d1 guint8 guint8
259 .source 1 s1 guint8 guint8
260 .source 1 s2 guint8 guint8
261 .param 2 p1
262 .param 2 p2
263 .temp 2 t1
264 .temp 2 t2
265 .temp 2 t3
266 .temp 2 t4
267
268 convubw t1, s1
269 subw t1, t1, 16
270 mullw t3, t1, p1
271 convubw t2, s2
272 subw t2, t2, 128
273 mullw t4, t2, p2
274 addw t3, t3, t4
275 addw t3, t3, 128
276 shrsw t3, t3, 8
277 addw t3, t3, t1
278 addw t3, t3, t2
279 convsuswb d1, t3
280
281
282 .function orc_matrix2_12_u8
283 .dest 1 d1 guint8 guint8
284 .source 1 s1 guint8 guint8
285 .source 1 s2 guint8 guint8
286 .param 2 p1
287 .param 2 p2
288 .temp 2 t1
289 .temp 2 t2
290 .temp 2 t3
291 .temp 2 t4
292
293 convubw t1, s1
294 subw t1, t1, 16
295 mullw t3, t1, p1
296 convubw t2, s2
297 subw t2, t2, 128
298 mullw t4, t2, p2
299 addw t3, t3, t4
300 addw t3, t3, 128
301 shrsw t3, t3, 8
302 addw t3, t3, t1
303 addw t3, t3, t2
304 addw t3, t3, t2
305 convsuswb d1, t3
306
307
308 .function orc_matrix3_u8
309 .dest 1 d1 guint8 guint8
310 .source 1 s1 guint8 guint8
311 .source 1 s2 guint8 guint8
312 .source 1 s3 guint8 guint8
313 .param 2 p1
314 .param 2 p2
315 .param 2 p3
316 .param 2 p4
317 .temp 2 t1
318 .temp 2 t2
319
320 convubw t1, s1
321 mullw t1, t1, p1
322 convubw t2, s2
323 mullw t2, t2, p2
324 addw t1, t1, t2
325 convubw t2, s3
326 mullw t2, t2, p3
327 addw t1, t1, t2
328 addw t1, t1, p4
329 shrsw t1, t1, 6
330 convsuswb d1, t1
331
332
333 .function orc_matrix3_100_u8
334 .dest 1 d1 guint8 guint8
335 .source 1 s1 guint8 guint8
336 .source 1 s2 guint8 guint8
337 .source 1 s3 guint8 guint8
338 .param 2 p1
339 .param 2 p2
340 .param 2 p3
341 .temp 2 t1
342 .temp 2 t2
343 .temp 2 t3
344 #.temp 2 t4
345
346 convubw t1, s1
347 subw t1, t1, 16
348 mullw t3, t1, p1
349 convubw t2, s2
350 subw t2, t2, 128
351 mullw t2, t2, p2
352 addw t3, t3, t2
353 convubw t2, s3
354 subw t2, t2, 128
355 mullw t2, t2, p3
356 addw t3, t3, t2
357 addw t3, t3, 128
358 shrsw t3, t3, 8
359 addw t3, t3, t1
360 convsuswb d1, t3
361
362
363 .function orc_matrix3_100_offset_u8
364 .dest 1 d1 guint8 guint8
365 .source 1 s1 guint8 guint8
366 .source 1 s2 guint8 guint8
367 .source 1 s3 guint8 guint8
368 .param 2 p1
369 .param 2 p2
370 .param 2 p3
371 .param 2 p4
372 .param 2 p5
373 #.param 2 p6
374 .temp 2 t1
375 .temp 2 t2
376 .temp 2 t3
377 #.temp 2 t3
378 #.temp 2 t4
379
380 convubw t3, s1
381 mullw t1, t3, p1
382 convubw t2, s2
383 mullw t2, t2, p2
384 addw t1, t1, t2
385 convubw t2, s3
386 mullw t2, t2, p3
387 addw t1, t1, t2
388 addw t1, t1, p4
389 shrsw t1, t1, p5
390 #addw t1, t1, p6
391 addw t1, t1, t3
392 convsuswb d1, t1
393
394
395
396 .function orc_matrix3_000_u8
397 .dest 1 d1 guint8 guint8
398 .source 1 s1 guint8 guint8
399 .source 1 s2 guint8 guint8
400 .source 1 s3 guint8 guint8
401 .param 2 p1
402 .param 2 p2
403 .param 2 p3
404 .param 2 p4
405 .param 2 p5
406 #.param 2 p6
407 .temp 2 t1
408 .temp 2 t2
409 #.temp 2 t3
410 #.temp 2 t4
411
412 convubw t1, s1
413 mullw t1, t1, p1
414 convubw t2, s2
415 mullw t2, t2, p2
416 addw t1, t1, t2
417 convubw t2, s3
418 mullw t2, t2, p3
419 addw t1, t1, t2
420 addw t1, t1, p4
421 shrsw t1, t1, p5
422 #addw t1, t1, p6
423 convwb d1, t1
424
425
426
427 .function orc_pack_123x
428 .dest 4 d1 guint32 guint8
429 .source 1 s1 guint8
430 .source 1 s2 guint8
431 .source 1 s3 guint8
432 .param 1 p1
433 .temp 2 t1
434 .temp 2 t2
435
436 mergebw t1, s1, s2
437 mergebw t2, s3, p1
438 mergewl d1, t1, t2
439
440
441 .function orc_pack_x123
442 .dest 4 d1 guint32 guint8
443 .source 1 s1 guint8
444 .source 1 s2 guint8
445 .source 1 s3 guint8
446 .param 1 p1
447 .temp 2 t1
448 .temp 2 t2
449
450 mergebw t1, p1, s1
451 mergebw t2, s2, s3
452 mergewl d1, t1, t2
453
454
455 .function cogorc_combine2_u8
456 .dest 1 d1 guint8
457 .source 1 s1 guint8
458 .source 1 s2 guint8
459 .param 2 p1
460 .param 2 p2
461 .temp 2 t1
462 .temp 2 t2
463
464 convubw t1, s1
465 mullw t1, t1, p1
466 convubw t2, s2
467 mullw t2, t2, p2
468 addw t1, t1, t2
469 shruw t1, t1, 8
470 convsuswb d1, t1
471
472
473 .function cogorc_convert_I420_UYVY
474 .dest 4 d1 guint8
475 .dest 4 d2 guint8
476 .source 2 y1 guint8
477 .source 2 y2 guint8
478 .source 1 u guint8
479 .source 1 v guint8
480 .temp 2 uv
481
482 mergebw uv, u, v
483 x2 mergebw d1, uv, y1
484 x2 mergebw d2, uv, y2
485
486
487 .function cogorc_convert_I420_YUY2
488 .dest 4 d1 guint8
489 .dest 4 d2 guint8
490 .source 2 y1 guint8
491 .source 2 y2 guint8
492 .source 1 u guint8
493 .source 1 v guint8
494 .temp 2 uv
495
496 mergebw uv, u, v
497 x2 mergebw d1, y1, uv
498 x2 mergebw d2, y2, uv
499
500
501
502 .function cogorc_convert_I420_AYUV
503 .dest 4 d1 guint8
504 .dest 4 d2 guint8
505 .source 1 y1 guint8
506 .source 1 y2 guint8
507 .source 1 u guint8
508 .source 1 v guint8
509 .const 1 c255 255
510 .temp 2 uv
511 .temp 2 ay
512 .temp 1 tu
513 .temp 1 tv
514
515 loadupdb tu, u
516 loadupdb tv, v
517 mergebw uv, tu, tv
518 mergebw ay, c255, y1
519 mergewl d1, ay, uv
520 mergebw ay, c255, y2
521 mergewl d2, ay, uv
522
523
524 .function cogorc_convert_YUY2_I420
525 .dest 2 y1 guint8
526 .dest 2 y2 guint8
527 .dest 1 u guint8
528 .dest 1 v guint8
529 .source 4 yuv1 guint8
530 .source 4 yuv2 guint8
531 .temp 2 t1
532 .temp 2 t2
533 .temp 2 ty
534
535 x2 splitwb t1, ty, yuv1
536 storew y1, ty
537 x2 splitwb t2, ty, yuv2
538 storew y2, ty
539 x2 avgub t1, t1, t2
540 splitwb v, u, t1
541
542
543 .function cogorc_convert_UYVY_YUY2
544 .flags 2d
545 .dest 4 yuy2 guint8
546 .source 4 uyvy guint8
547
548 x2 swapw yuy2, uyvy
549
550
551 .function cogorc_planar_chroma_420_422
552 .flags 2d
553 .dest 1 d1 guint8
554 .dest 1 d2 guint8
555 .source 1 s guint8
556
557 copyb d1, s
558 copyb d2, s
559
560
561 .function cogorc_planar_chroma_420_444
562 .flags 2d
563 .dest 2 d1 guint8
564 .dest 2 d2 guint8
565 .source 1 s guint8
566 .temp 2 t
567
568 splatbw t, s
569 storew d1, t
570 storew d2, t
571
572
573 .function cogorc_planar_chroma_422_444
574 .flags 2d
575 .dest 2 d1 guint8
576 .source 1 s guint8
577 .temp 2 t
578
579 splatbw t, s
580 storew d1, t
581
582
583 .function cogorc_planar_chroma_444_422
584 .flags 2d
585 .dest 1 d guint8
586 .source 2 s guint8
587 .temp 1 t1
588 .temp 1 t2
589
590 splitwb t1, t2, s
591 avgub d, t1, t2
592
593
594 .function cogorc_planar_chroma_444_420
595 .flags 2d
596 .dest 1 d guint8
597 .source 2 s1 guint8
598 .source 2 s2 guint8
599 .temp 2 t
600 .temp 1 t1
601 .temp 1 t2
602
603 x2 avgub t, s1, s2
604 splitwb t1, t2, t
605 avgub d, t1, t2
606
607
608 .function cogorc_planar_chroma_422_420
609 .flags 2d
610 .dest 1 d guint8
611 .source 1 s1 guint8
612 .source 1 s2 guint8
613
614 avgub d, s1, s2
615
616
617 .function cogorc_convert_YUY2_AYUV
618 .flags 2d
619 .dest 8 ayuv guint8
620 .source 4 yuy2 guint8
621 .const 2 c255 0xff
622 .temp 2 yy
623 .temp 2 uv
624 .temp 4 ayay
625 .temp 4 uvuv
626
627 x2 splitwb uv, yy, yuy2
628 x2 mergebw ayay, c255, yy
629 mergewl uvuv, uv, uv
630 x2 mergewl ayuv, ayay, uvuv
631
632
633 .function cogorc_convert_UYVY_AYUV
634 .flags 2d
635 .dest 8 ayuv guint8
636 .source 4 uyvy guint8
637 .const 2 c255 0xff
638 .temp 2 yy
639 .temp 2 uv
640 .temp 4 ayay
641 .temp 4 uvuv
642
643 x2 splitwb yy, uv, uyvy
644 x2 mergebw ayay, c255, yy
645 mergewl uvuv, uv, uv
646 x2 mergewl ayuv, ayay, uvuv
647
648
649 .function cogorc_convert_YUY2_Y42B
650 .flags 2d
651 .dest 2 y guint8
652 .dest 1 u guint8
653 .dest 1 v guint8
654 .source 4 yuy2 guint8
655 .temp 2 uv
656
657 x2 splitwb uv, y, yuy2
658 splitwb v, u, uv
659
660
661 .function cogorc_convert_UYVY_Y42B
662 .flags 2d
663 .dest 2 y guint8
664 .dest 1 u guint8
665 .dest 1 v guint8
666 .source 4 uyvy guint8
667 .temp 2 uv
668
669 x2 splitwb y, uv, uyvy
670 splitwb v, u, uv
671
672
673 .function cogorc_convert_YUY2_Y444
674 .flags 2d
675 .dest 2 y guint8
676 .dest 2 uu guint8
677 .dest 2 vv guint8
678 .source 4 yuy2 guint8
679 .temp 2 uv
680 .temp 1 u
681 .temp 1 v
682
683 x2 splitwb uv, y, yuy2
684 splitwb v, u, uv
685 splatbw uu, u
686 splatbw vv, v
687
688
689 .function cogorc_convert_UYVY_Y444
690 .flags 2d
691 .dest 2 y guint8
692 .dest 2 uu guint8
693 .dest 2 vv guint8
694 .source 4 uyvy guint8
695 .temp 2 uv
696 .temp 1 u
697 .temp 1 v
698
699 x2 splitwb y, uv, uyvy
700 splitwb v, u, uv
701 splatbw uu, u
702 splatbw vv, v
703
704
705 .function cogorc_convert_UYVY_I420
706 .dest 2 y1 guint8
707 .dest 2 y2 guint8
708 .dest 1 u guint8
709 .dest 1 v guint8
710 .source 4 yuv1 guint8
711 .source 4 yuv2 guint8
712 .temp 2 t1
713 .temp 2 t2
714 .temp 2 ty
715
716 x2 splitwb ty, t1, yuv1
717 storew y1, ty
718 x2 splitwb ty, t2, yuv2
719 storew y2, ty
720 x2 avgub t1, t1, t2
721 splitwb v, u, t1
722
723
724
725 .function cogorc_convert_AYUV_I420
726 .flags 2d
727 .dest 2 y1 guint8
728 .dest 2 y2 guint8
729 .dest 1 u guint8
730 .dest 1 v guint8
731 .source 8 ayuv1 guint8
732 .source 8 ayuv2 guint8
733 .temp 4 ay
734 .temp 4 uv1
735 .temp 4 uv2
736 .temp 4 uv
737 .temp 2 uu
738 .temp 2 vv
739 .temp 1 t1
740 .temp 1 t2
741
742 x2 splitlw uv1, ay, ayuv1
743 x2 select1wb y1, ay
744 x2 splitlw uv2, ay, ayuv2
745 x2 select1wb y2, ay
746 x4 avgub uv, uv1, uv2
747 x2 splitwb vv, uu, uv
748 splitwb t1, t2, uu
749 avgub u, t1, t2
750 splitwb t1, t2, vv
751 avgub v, t1, t2
752
753
754
755 .function cogorc_convert_AYUV_YUY2
756 .flags 2d
757 .dest 4 yuy2 guint8
758 .source 8 ayuv guint8
759 .temp 2 yy
760 .temp 2 uv1
761 .temp 2 uv2
762 .temp 4 ayay
763 .temp 4 uvuv
764
765 x2 splitlw uvuv, ayay, ayuv
766 splitlw uv1, uv2, uvuv
767 x2 avgub uv1, uv1, uv2
768 x2 select1wb yy, ayay
769 x2 mergebw yuy2, yy, uv1
770
771
772 .function cogorc_convert_AYUV_UYVY
773 .flags 2d
774 .dest 4 yuy2 guint8
775 .source 8 ayuv guint8
776 .temp 2 yy
777 .temp 2 uv1
778 .temp 2 uv2
779 .temp 4 ayay
780 .temp 4 uvuv
781
782 x2 splitlw uvuv, ayay, ayuv
783 splitlw uv1, uv2, uvuv
784 x2 avgub uv1, uv1, uv2
785 x2 select1wb yy, ayay
786 x2 mergebw yuy2, uv1, yy
787
788
789
790 .function cogorc_convert_AYUV_Y42B
791 .flags 2d
792 .dest 2 y guint8
793 .dest 1 u guint8
794 .dest 1 v guint8
795 .source 8 ayuv guint8
796 .temp 4 ayay
797 .temp 4 uvuv
798 .temp 2 uv1
799 .temp 2 uv2
800
801 x2 splitlw uvuv, ayay, ayuv
802 splitlw uv1, uv2, uvuv
803 x2 avgub uv1, uv1, uv2
804 splitwb v, u, uv1
805 x2 select1wb y, ayay
806
807
808 .function cogorc_convert_AYUV_Y444
809 .flags 2d
810 .dest 1 y guint8
811 .dest 1 u guint8
812 .dest 1 v guint8
813 .source 4 ayuv guint8
814 .temp 2 ay
815 .temp 2 uv
816
817 splitlw uv, ay, ayuv
818 splitwb v, u, uv
819 select1wb y, ay
820
821
822 .function cogorc_convert_Y42B_YUY2
823 .flags 2d
824 .dest 4 yuy2 guint8
825 .source 2 y guint8
826 .source 1 u guint8
827 .source 1 v guint8
828 .temp 2 uv
829
830 mergebw uv, u, v
831 x2 mergebw yuy2, y, uv
832
833
834 .function cogorc_convert_Y42B_UYVY
835 .flags 2d
836 .dest 4 uyvy guint8
837 .source 2 y guint8
838 .source 1 u guint8
839 .source 1 v guint8
840 .temp 2 uv
841
842 mergebw uv, u, v
843 x2 mergebw uyvy, uv, y
844
845
846 .function cogorc_convert_Y42B_AYUV
847 .flags 2d
848 .dest 8 ayuv guint8
849 .source 2 yy guint8
850 .source 1 u guint8
851 .source 1 v guint8
852 .const 1 c255 255
853 .temp 2 uv
854 .temp 2 ay
855 .temp 4 uvuv
856 .temp 4 ayay
857
858 mergebw uv, u, v
859 x2 mergebw ayay, c255, yy
860 mergewl uvuv, uv, uv
861 x2 mergewl ayuv, ayay, uvuv
862
863
864 .function cogorc_convert_Y444_YUY2
865 .flags 2d
866 .dest 4 yuy2 guint8
867 .source 2 y guint8
868 .source 2 u guint8
869 .source 2 v guint8
870 .temp 2 uv
871 .temp 4 uvuv
872 .temp 2 uv1
873 .temp 2 uv2
874
875 x2 mergebw uvuv, u, v
876 splitlw uv1, uv2, uvuv
877 x2 avgub uv, uv1, uv2
878 x2 mergebw yuy2, y, uv
879
880
881 .function cogorc_convert_Y444_UYVY
882 .flags 2d
883 .dest 4 uyvy guint8
884 .source 2 y guint8
885 .source 2 u guint8
886 .source 2 v guint8
887 .temp 2 uv
888 .temp 4 uvuv
889 .temp 2 uv1
890 .temp 2 uv2
891
892 x2 mergebw uvuv, u, v
893 splitlw uv1, uv2, uvuv
894 x2 avgub uv, uv1, uv2
895 x2 mergebw uyvy, uv, y
896
897
898 .function cogorc_convert_Y444_AYUV
899 .flags 2d
900 .dest 4 ayuv guint8
901 .source 1 yy guint8
902 .source 1 u guint8
903 .source 1 v guint8
904 .const 1 c255 255
905 .temp 2 uv
906 .temp 2 ay
907
908 mergebw uv, u, v
909 mergebw ay, c255, yy
910 mergewl ayuv, ay, uv
911
912
913
914 .function cogorc_convert_AYUV_ARGB
915 .flags 2d
916 .dest 4 argb guint8
917 .source 4 ayuv guint8
918 .temp 2 t1
919 .temp 2 t2
920 .temp 1 a
921 .temp 1 y
922 .temp 1 u
923 .temp 1 v
924 .temp 2 wy
925 .temp 2 wu
926 .temp 2 wv
927 .temp 2 wr
928 .temp 2 wg
929 .temp 2 wb
930 .temp 1 r
931 .temp 1 g
932 .temp 1 b
933 .temp 4 x
934 .const 1 c8 8
935
936 x4 subb x, ayuv, 128
937 splitlw t1, t2, x
938 splitwb y, a, t2
939 splitwb v, u, t1
940 convsbw wy, y
941 convsbw wu, u
942 convsbw wv, v
943
944 mullw t1, wy, 42
945 shrsw t1, t1, c8
946 addssw wy, wy, t1
947
948 addssw wr, wy, wv
949 mullw t1, wv, 103
950 shrsw t1, t1, c8
951 subssw wr, wr, t1
952 addssw wr, wr, wv
953
954 addssw wb, wy, wu
955 addssw wb, wb, wu
956 mullw t1, wu, 4
957 shrsw t1, t1, c8
958 addssw wb, wb, t1
959
960 mullw t1, wu, 100
961 shrsw t1, t1, c8
962 subssw wg, wy, t1
963 mullw t1, wv, 104
964 shrsw t1, t1, c8
965 subssw wg, wg, t1
966 subssw wg, wg, t1
967
968 convssswb r, wr
969 convssswb g, wg
970 convssswb b, wb
971
972 mergebw t1, a, r
973 mergebw t2, g, b
974 mergewl x, t1, t2
975 x4 addb argb, x, 128
976
977
978
979 .function cogorc_convert_AYUV_BGRA
980 .flags 2d
981 .dest 4 argb guint8
982 .source 4 ayuv guint8
983 .temp 2 t1
984 .temp 2 t2
985 .temp 1 a
986 .temp 1 y
987 .temp 1 u
988 .temp 1 v
989 .temp 2 wy
990 .temp 2 wu
991 .temp 2 wv
992 .temp 2 wr
993 .temp 2 wg
994 .temp 2 wb
995 .temp 1 r
996 .temp 1 g
997 .temp 1 b
998 .temp 4 x
999 .const 1 c8 8
1000
1001 x4 subb x, ayuv, 128
1002 splitlw t1, t2, x
1003 splitwb y, a, t2
1004 splitwb v, u, t1
1005 convsbw wy, y
1006 convsbw wu, u
1007 convsbw wv, v
1008
1009 mullw t1, wy, 42
1010 shrsw t1, t1, c8
1011 addssw wy, wy, t1
1012
1013 addssw wr, wy, wv
1014 mullw t1, wv, 103
1015 shrsw t1, t1, c8
1016 subssw wr, wr, t1
1017 addssw wr, wr, wv
1018
1019 addssw wb, wy, wu
1020 addssw wb, wb, wu
1021 mullw t1, wu, 4
1022 shrsw t1, t1, c8
1023 addssw wb, wb, t1
1024
1025 mullw t1, wu, 100
1026 shrsw t1, t1, c8
1027 subssw wg, wy, t1
1028 mullw t1, wv, 104
1029 shrsw t1, t1, c8
1030 subssw wg, wg, t1
1031 subssw wg, wg, t1
1032
1033 convssswb r, wr
1034 convssswb g, wg
1035 convssswb b, wb
1036
1037 mergebw t1, b, g
1038 mergebw t2, r, a
1039 mergewl x, t1, t2
1040 x4 addb argb, x, 128
1041
1042
1043
1044
1045 .function cogorc_convert_AYUV_ABGR
1046 .flags 2d
1047 .dest 4 argb guint8
1048 .source 4 ayuv guint8
1049 .temp 2 t1
1050 .temp 2 t2
1051 .temp 1 a
1052 .temp 1 y
1053 .temp 1 u
1054 .temp 1 v
1055 .temp 2 wy
1056 .temp 2 wu
1057 .temp 2 wv
1058 .temp 2 wr
1059 .temp 2 wg
1060 .temp 2 wb
1061 .temp 1 r
1062 .temp 1 g
1063 .temp 1 b
1064 .temp 4 x
1065 .const 1 c8 8
1066
1067 x4 subb x, ayuv, 128
1068 splitlw t1, t2, x
1069 splitwb y, a, t2
1070 splitwb v, u, t1
1071 convsbw wy, y
1072 convsbw wu, u
1073 convsbw wv, v
1074
1075 mullw t1, wy, 42
1076 shrsw t1, t1, c8
1077 addssw wy, wy, t1
1078
1079 addssw wr, wy, wv
1080 mullw t1, wv, 103
1081 shrsw t1, t1, c8
1082 subssw wr, wr, t1
1083 addssw wr, wr, wv
1084
1085 addssw wb, wy, wu
1086 addssw wb, wb, wu
1087 mullw t1, wu, 4
1088 shrsw t1, t1, c8
1089 addssw wb, wb, t1
1090
1091 mullw t1, wu, 100
1092 shrsw t1, t1, c8
1093 subssw wg, wy, t1
1094 mullw t1, wv, 104
1095 shrsw t1, t1, c8
1096 subssw wg, wg, t1
1097 subssw wg, wg, t1
1098
1099 convssswb r, wr
1100 convssswb g, wg
1101 convssswb b, wb
1102
1103 mergebw t1, a, b
1104 mergebw t2, g, r
1105 mergewl x, t1, t2
1106 x4 addb argb, x, 128
1107
1108
1109
1110 .function cogorc_convert_AYUV_RGBA
1111 .flags 2d
1112 .dest 4 argb guint8
1113 .source 4 ayuv guint8
1114 .temp 2 t1
1115 .temp 2 t2
1116 .temp 1 a
1117 .temp 1 y
1118 .temp 1 u
1119 .temp 1 v
1120 .temp 2 wy
1121 .temp 2 wu
1122 .temp 2 wv
1123 .temp 2 wr
1124 .temp 2 wg
1125 .temp 2 wb
1126 .temp 1 r
1127 .temp 1 g
1128 .temp 1 b
1129 .temp 4 x
1130 .const 1 c8 8
1131
1132 x4 subb x, ayuv, 128
1133 splitlw t1, t2, x
1134 splitwb y, a, t2
1135 splitwb v, u, t1
1136 convsbw wy, y
1137 convsbw wu, u
1138 convsbw wv, v
1139
1140 mullw t1, wy, 42
1141 shrsw t1, t1, c8
1142 addssw wy, wy, t1
1143
1144 addssw wr, wy, wv
1145 mullw t1, wv, 103
1146 shrsw t1, t1, c8
1147 subssw wr, wr, t1
1148 addssw wr, wr, wv
1149
1150 addssw wb, wy, wu
1151 addssw wb, wb, wu
1152 mullw t1, wu, 4
1153 shrsw t1, t1, c8
1154 addssw wb, wb, t1
1155
1156 mullw t1, wu, 100
1157 shrsw t1, t1, c8
1158 subssw wg, wy, t1
1159 mullw t1, wv, 104
1160 shrsw t1, t1, c8
1161 subssw wg, wg, t1
1162 subssw wg, wg, t1
1163
1164 convssswb r, wr
1165 convssswb g, wg
1166 convssswb b, wb
1167
1168 mergebw t1, r, g
1169 mergebw t2, b, a
1170 mergewl x, t1, t2
1171 x4 addb argb, x, 128
1172
1173
1174
1175 .function cogorc_convert_I420_BGRA
1176 .dest 4 argb guint8
1177 .source 1 y guint8
1178 .source 1 u guint8
1179 .source 1 v guint8
1180 .temp 2 t1
1181 .temp 2 t2
1182 .temp 1 t3
1183 .temp 2 wy
1184 .temp 2 wu
1185 .temp 2 wv
1186 .temp 2 wr
1187 .temp 2 wg
1188 .temp 2 wb
1189 .temp 1 r
1190 .temp 1 g
1191 .temp 1 b
1192 .temp 4 x
1193 .const 1 c8 8
1194 .const 1 c128 128
1195
1196 subb t3, y, c128
1197 convsbw wy, t3
1198 loadupib t3, u
1199 subb t3, t3, c128
1200 convsbw wu, t3
1201 loadupib t3, v
1202 subb t3, t3, c128
1203 convsbw wv, t3
1204
1205 mullw t1, wy, 42
1206 shrsw t1, t1, c8
1207 addssw wy, wy, t1
1208
1209 addssw wr, wy, wv
1210 mullw t1, wv, 103
1211 shrsw t1, t1, c8
1212 subssw wr, wr, t1
1213 addssw wr, wr, wv
1214
1215 addssw wb, wy, wu
1216 addssw wb, wb, wu
1217 mullw t1, wu, 4
1218 shrsw t1, t1, c8
1219 addssw wb, wb, t1
1220
1221 mullw t1, wu, 100
1222 shrsw t1, t1, c8
1223 subssw wg, wy, t1
1224 mullw t1, wv, 104
1225 shrsw t1, t1, c8
1226 subssw wg, wg, t1
1227 subssw wg, wg, t1
1228
1229 convssswb r, wr
1230 convssswb g, wg
1231 convssswb b, wb
1232
1233 mergebw t1, b, g
1234 mergebw t2, r, 255
1235 mergewl x, t1, t2
1236 x4 addb argb, x, c128
1237
1238
1239
1240 .function cogorc_convert_I420_BGRA_avg
1241 .dest 4 argb guint8
1242 .source 1 y guint8
1243 .source 1 u1 guint8
1244 .source 1 u2 guint8
1245 .source 1 v1 guint8
1246 .source 1 v2 guint8
1247 .temp 2 t1
1248 .temp 2 t2
1249 .temp 1 t3
1250 .temp 1 t4
1251 .temp 2 wy
1252 .temp 2 wu
1253 .temp 2 wv
1254 .temp 2 wr
1255 .temp 2 wg
1256 .temp 2 wb
1257 .temp 1 r
1258 .temp 1 g
1259 .temp 1 b
1260 .temp 4 x
1261 .const 1 c8 8
1262 .const 1 c128 128
1263
1264 subb t3, y, c128
1265 convsbw wy, t3
1266 loadupib t3, u1
1267 loadupib t4, u2
1268 avgub t3, t3, t4
1269 subb t3, t3, c128
1270 convsbw wu, t3
1271 loadupib t3, v1
1272 loadupib t4, v2
1273 avgub t3, t3, t4
1274 subb t3, t3, c128
1275 convsbw wv, t3
1276
1277 mullw t1, wy, 42
1278 shrsw t1, t1, c8
1279 addssw wy, wy, t1
1280
1281 addssw wr, wy, wv
1282 mullw t1, wv, 103
1283 shrsw t1, t1, c8
1284 subssw wr, wr, t1
1285 addssw wr, wr, wv
1286
1287 addssw wb, wy, wu
1288 addssw wb, wb, wu
1289 mullw t1, wu, 4
1290 shrsw t1, t1, c8
1291 addssw wb, wb, t1
1292
1293 mullw t1, wu, 100
1294 shrsw t1, t1, c8
1295 subssw wg, wy, t1
1296 mullw t1, wv, 104
1297 shrsw t1, t1, c8
1298 subssw wg, wg, t1
1299 subssw wg, wg, t1
1300
1301 convssswb r, wr
1302 convssswb g, wg
1303 convssswb b, wb
1304
1305 mergebw t1, b, g
1306 mergebw t2, r, 255
1307 mergewl x, t1, t2
1308 x4 addb argb, x, c128
1309
1310
1311
1312 .function cogorc_getline_I420
1313 .dest 4 d guint8
1314 .source 1 y guint8
1315 .source 1 u guint8
1316 .source 1 v guint8
1317 .const 1 c255 255
1318 .temp 2 uv
1319 .temp 2 ay
1320 .temp 1 tu
1321 .temp 1 tv
1322
1323 loadupdb tu, u
1324 loadupdb tv, v
1325 mergebw uv, tu, tv
1326 mergebw ay, c255, y
1327 mergewl d, ay, uv
1328
1329 .function cogorc_getline_YUV9
1330 .dest 8 d guint8
1331 .source 2 y guint8
1332 .source 1 u guint8
1333 .source 1 v guint8
1334 .const 1 c255 255
1335 .temp 2 tuv
1336 .temp 4 ay
1337 .temp 4 uv
1338 .temp 1 tu
1339 .temp 1 tv
1340
1341 loadupdb tu, u
1342 loadupdb tv, v
1343 mergebw tuv, tu, tv
1344 mergewl uv, tuv, tuv
1345 x2 mergebw ay, c255, y
1346 x2 mergewl d, ay, uv
1347
1348 .function cogorc_getline_YUY2
1349 .dest 8 ayuv guint8
1350 .source 4 yuy2 guint8
1351 .const 2 c255 0xff
1352 .temp 2 yy
1353 .temp 2 uv
1354 .temp 4 ayay
1355 .temp 4 uvuv
1356
1357 x2 splitwb uv, yy, yuy2
1358 x2 mergebw ayay, c255, yy
1359 mergewl uvuv, uv, uv
1360 x2 mergewl ayuv, ayay, uvuv
1361
1362
1363 .function cogorc_getline_UYVY
1364 .dest 8 ayuv guint8
1365 .source 4 uyvy guint8
1366 .const 2 c255 0xff
1367 .temp 2 yy
1368 .temp 2 uv
1369 .temp 4 ayay
1370 .temp 4 uvuv
1371
1372 x2 splitwb yy, uv, uyvy
1373 x2 mergebw ayay, c255, yy
1374 mergewl uvuv, uv, uv
1375 x2 mergewl ayuv, ayay, uvuv
1376
1377
1378 .function cogorc_getline_YVYU
1379 .dest 8 ayuv guint8
1380 .source 4 uyvy guint8
1381 .const 2 c255 0xff
1382 .temp 2 yy
1383 .temp 2 uv
1384 .temp 4 ayay
1385 .temp 4 uvuv
1386
1387 x2 splitwb uv, yy, uyvy
1388 swapw uv, uv
1389 x2 mergebw ayay, c255, yy
1390 mergewl uvuv, uv, uv
1391 x2 mergewl ayuv, ayay, uvuv
1392
1393
1394 .function cogorc_getline_Y42B
1395 .dest 8 ayuv guint8
1396 .source 2 yy guint8
1397 .source 1 u guint8
1398 .source 1 v guint8
1399 .const 1 c255 255
1400 .temp 2 uv
1401 .temp 2 ay
1402 .temp 4 uvuv
1403 .temp 4 ayay
1404
1405 mergebw uv, u, v
1406 x2 mergebw ayay, c255, yy
1407 mergewl uvuv, uv, uv
1408 x2 mergewl ayuv, ayay, uvuv
1409
1410
1411 .function cogorc_getline_Y444
1412 .dest 4 ayuv guint8
1413 .source 1 y guint8
1414 .source 1 u guint8
1415 .source 1 v guint8
1416 .const 1 c255 255
1417 .temp 2 uv
1418 .temp 2 ay
1419
1420 mergebw uv, u, v
1421 mergebw ay, c255, y
1422 mergewl ayuv, ay, uv
1423
1424
1425 .function cogorc_getline_Y800
1426 .dest 4 ayuv guint8
1427 .source 1 y guint8
1428 .const 1 c255 255
1429 .const 2 c0x8080 0x8080
1430 .temp 2 ay
1431
1432 mergebw ay, c255, y
1433 mergewl ayuv, ay, c0x8080
1434
1435 .function cogorc_getline_Y16
1436 .dest 4 ayuv guint8
1437 .source 2 y guint8
1438 .const 1 c255 255
1439 .const 2 c0x8080 0x8080
1440 .temp 2 ay
1441 .temp 1 yb
1442
1443 convhwb yb, y
1444 mergebw ay, c255, yb
1445 mergewl ayuv, ay, c0x8080
1446
1447 .function cogorc_getline_BGRA
1448 .dest 4 argb guint8
1449 .source 4 bgra guint8
1450
1451 swapl argb, bgra
1452
1453
1454 .function cogorc_getline_ABGR
1455 .dest 4 argb guint8
1456 .source 4 abgr guint8
1457 .temp 1 a
1458 .temp 1 r
1459 .temp 1 g
1460 .temp 1 b
1461 .temp 2 gr
1462 .temp 2 ab
1463 .temp 2 ar
1464 .temp 2 gb
1465
1466 splitlw gr, ab, abgr
1467 splitwb r, g, gr
1468 splitwb b, a, ab
1469 mergebw ar, a, r
1470 mergebw gb, g, b
1471 mergewl argb, ar, gb
1472
1473
1474 .function cogorc_getline_RGBA
1475 .dest 4 argb guint8
1476 .source 4 rgba guint8
1477 .temp 1 a
1478 .temp 1 r
1479 .temp 1 g
1480 .temp 1 b
1481 .temp 2 rg
1482 .temp 2 ba
1483 .temp 2 ar
1484 .temp 2 gb
1485
1486 splitlw ba, rg, rgba
1487 splitwb g, r, rg
1488 splitwb a, b, ba
1489 mergebw ar, a, r
1490 mergebw gb, g, b
1491 mergewl argb, ar, gb
1492
1493
1494 .function cogorc_getline_NV12
1495 .dest 8 d guint8
1496 .source 2 y guint8
1497 .source 2 uv guint8
1498 .const 1 c255 255
1499 .temp 4 ay
1500 .temp 4 uvuv
1501
1502 mergewl uvuv, uv, uv
1503 x2 mergebw ay, c255, y
1504 x2 mergewl d, ay, uvuv
1505
1506
1507 .function cogorc_getline_NV21
1508 .dest 8 d guint8
1509 .source 2 y guint8
1510 .source 2 vu guint8
1511 .const 1 c255 255
1512 .temp 2 uv
1513 .temp 4 ay
1514 .temp 4 uvuv
1515
1516 swapw uv, vu
1517 mergewl uvuv, uv, uv
1518 x2 mergebw ay, c255, y
1519 x2 mergewl d, ay, uvuv
1520
1521 .function cogorc_getline_A420
1522 .dest 4 d guint8
1523 .source 1 y guint8
1524 .source 1 u guint8
1525 .source 1 v guint8
1526 .source 1 a guint8
1527 .temp 2 uv
1528 .temp 2 ay
1529 .temp 1 tu
1530 .temp 1 tv
1531
1532 loadupdb tu, u
1533 loadupdb tv, v
1534 mergebw uv, tu, tv
1535 mergebw ay, a, y
1536 mergewl d, ay, uv
1537
1538 .function cogorc_putline_I420
1539 .dest 2 y guint8
1540 .dest 1 u guint8
1541 .dest 1 v guint8
1542 .source 8 ayuv guint8
1543 .temp 4 ay
1544 .temp 4 uv
1545 .temp 2 uu
1546 .temp 2 vv
1547 .temp 1 t1
1548 .temp 1 t2
1549
1550 x2 splitlw uv, ay, ayuv
1551 x2 select1wb y, ay
1552 x2 splitwb vv, uu, uv
1553 splitwb t1, t2, uu
1554 avgub u, t1, t2
1555 splitwb t1, t2, vv
1556 avgub v, t1, t2
1557
1558
1559
1560 .function cogorc_putline_YUY2
1561 .dest 4 yuy2 guint8
1562 .source 8 ayuv guint8
1563 .temp 2 yy
1564 .temp 2 uv1
1565 .temp 2 uv2
1566 .temp 4 ayay
1567 .temp 4 uvuv
1568
1569 x2 splitlw uvuv, ayay, ayuv
1570 splitlw uv1, uv2, uvuv
1571 x2 avgub uv1, uv1, uv2
1572 x2 select1wb yy, ayay
1573 x2 mergebw yuy2, yy, uv1
1574
1575
1576 .function cogorc_putline_YVYU
1577 .dest 4 yuy2 guint8
1578 .source 8 ayuv guint8
1579 .temp 2 yy
1580 .temp 2 uv1
1581 .temp 2 uv2
1582 .temp 4 ayay
1583 .temp 4 uvuv
1584
1585 x2 splitlw uvuv, ayay, ayuv
1586 splitlw uv1, uv2, uvuv
1587 x2 avgub uv1, uv1, uv2
1588 x2 select1wb yy, ayay
1589 swapw uv1, uv1
1590 x2 mergebw yuy2, yy, uv1
1591
1592
1593 .function cogorc_putline_UYVY
1594 .dest 4 yuy2 guint8
1595 .source 8 ayuv guint8
1596 .temp 2 yy
1597 .temp 2 uv1
1598 .temp 2 uv2
1599 .temp 4 ayay
1600 .temp 4 uvuv
1601
1602 x2 splitlw uvuv, ayay, ayuv
1603 splitlw uv1, uv2, uvuv
1604 x2 avgub uv1, uv1, uv2
1605 x2 select1wb yy, ayay
1606 x2 mergebw yuy2, uv1, yy
1607
1608
1609
1610 .function cogorc_putline_Y42B
1611 .dest 2 y guint8
1612 .dest 1 u guint8
1613 .dest 1 v guint8
1614 .source 8 ayuv guint8
1615 .temp 4 ayay
1616 .temp 4 uvuv
1617 .temp 2 uv1
1618 .temp 2 uv2
1619
1620 x2 splitlw uvuv, ayay, ayuv
1621 splitlw uv1, uv2, uvuv
1622 x2 avgub uv1, uv1, uv2
1623 splitwb v, u, uv1
1624 x2 select1wb y, ayay
1625
1626
1627 .function cogorc_putline_Y444
1628 .dest 1 y guint8
1629 .dest 1 u guint8
1630 .dest 1 v guint8
1631 .source 4 ayuv guint8
1632 .temp 2 ay
1633 .temp 2 uv
1634
1635 splitlw uv, ay, ayuv
1636 splitwb v, u, uv
1637 select1wb y, ay
1638
1639
1640 .function cogorc_putline_Y800
1641 .dest 1 y guint8
1642 .source 4 ayuv guint8
1643 .temp 2 ay
1644
1645 select0lw ay, ayuv
1646 select1wb y, ay
1647
1648 .function cogorc_putline_Y16
1649 .dest 2 y guint8
1650 .source 4 ayuv guint8
1651 .temp 2 ay
1652 .temp 1 yb
1653
1654 select0lw ay, ayuv
1655 select1wb yb, ay
1656 convubw ay, yb
1657 shlw y, ay, 8
1658
1659 .function cogorc_putline_BGRA
1660 .dest 4 bgra guint8
1661 .source 4 argb guint8
1662
1663 swapl bgra, argb
1664
1665
1666 .function cogorc_putline_ABGR
1667 .dest 4 abgr guint8
1668 .source 4 argb guint8
1669 .temp 1 a
1670 .temp 1 r
1671 .temp 1 g
1672 .temp 1 b
1673 .temp 2 gr
1674 .temp 2 ab
1675 .temp 2 ar
1676 .temp 2 gb
1677
1678 splitlw gb, ar, argb
1679 splitwb b, g, gb
1680 splitwb r, a, ar
1681 mergebw ab, a, b
1682 mergebw gr, g, r
1683 mergewl abgr, ab, gr
1684
1685
1686 .function cogorc_putline_RGBA
1687 .dest 4 rgba guint8
1688 .source 4 argb guint8
1689 .temp 1 a
1690 .temp 1 r
1691 .temp 1 g
1692 .temp 1 b
1693 .temp 2 rg
1694 .temp 2 ba
1695 .temp 2 ar
1696 .temp 2 gb
1697
1698 splitlw gb, ar, argb
1699 splitwb b, g, gb
1700 splitwb r, a, ar
1701 mergebw ba, b, a
1702 mergebw rg, r, g
1703 mergewl rgba, rg, ba
1704
1705
1706 .function cogorc_putline_NV12
1707 .dest 2 y guint8
1708 .dest 2 uv guint8
1709 .source 8 ayuv guint8
1710 .temp 4 ay
1711 .temp 4 uvuv
1712 .temp 2 uv1
1713 .temp 2 uv2
1714
1715 x2 splitlw uvuv, ay, ayuv
1716 x2 select1wb y, ay
1717 splitlw uv1, uv2, uvuv
1718 x2 avgub uv, uv1, uv2
1719
1720
1721 .function cogorc_putline_NV21
1722 .dest 2 y guint8
1723 .dest 2 vu guint8
1724 .source 8 ayuv guint8
1725 .temp 4 ay
1726 .temp 4 uvuv
1727 .temp 2 uv1
1728 .temp 2 uv2
1729 .temp 2 uv
1730
1731 x2 splitlw uvuv, ay, ayuv
1732 x2 select1wb y, ay
1733 splitlw uv1, uv2, uvuv
1734 x2 avgub uv, uv1, uv2
1735 swapw vu, uv
1736
1737 .function cogorc_putline_A420
1738 .dest 2 y guint8
1739 .dest 1 u guint8
1740 .dest 1 v guint8
1741 .dest 2 a guint8
1742 .source 8 ayuv guint8
1743 .temp 4 ay
1744 .temp 4 uv
1745 .temp 2 uu
1746 .temp 2 vv
1747 .temp 1 t1
1748 .temp 1 t2
1749
1750 x2 splitlw uv, ay, ayuv
1751 x2 select1wb y, ay
1752 x2 select0wb a, ay
1753 x2 splitwb vv, uu, uv
1754 splitwb t1, t2, uu
1755 avgub u, t1, t2
1756 splitwb t1, t2, vv
1757 avgub v, t1, t2