1 /**************************************************************************
3 * Copyright 2010 VMware, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
18 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20 * USE OR OTHER DEALINGS IN THE SOFTWARE.
22 * The above copyright notice and this permission notice (including the
23 * next paragraph) shall be included in all copies or substantial portions
26 **************************************************************************/
31 * YUV and RGB subsampled formats conversion.
33 * @author Jose Fonseca <jfonseca@vmware.com>
37 #include "util/u_debug.h"
38 #include "util/u_format_yuv.h"
42 util_format_r8g8_b8g8_unorm_unpack_rgba_float(float *dst_row
, unsigned dst_stride
,
43 const uint8_t *src_row
, unsigned src_stride
,
44 unsigned width
, unsigned height
)
48 for (y
= 0; y
< height
; y
+= 1) {
50 const uint32_t *src
= (const uint32_t *)src_row
;
54 for (x
= 0; x
+ 1 < width
; x
+= 2) {
55 value
= util_cpu_to_le32(*src
++);
57 r
= ubyte_to_float((value
>> 0) & 0xff);
58 g0
= ubyte_to_float((value
>> 8) & 0xff);
59 b
= ubyte_to_float((value
>> 16) & 0xff);
60 g1
= ubyte_to_float((value
>> 24) & 0xff);
65 dst
[3] = 1.0f
; /* a */
71 dst
[3] = 1.0f
; /* a */
76 value
= util_cpu_to_le32(*src
);
78 r
= ubyte_to_float((value
>> 0) & 0xff);
79 g0
= ubyte_to_float((value
>> 8) & 0xff);
80 b
= ubyte_to_float((value
>> 16) & 0xff);
81 g1
= ubyte_to_float((value
>> 24) & 0xff);
86 dst
[3] = 1.0f
; /* a */
89 src_row
+= src_stride
/sizeof(*src_row
);
90 dst_row
+= dst_stride
/sizeof(*dst_row
);
96 util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row
, unsigned dst_stride
,
97 const uint8_t *src_row
, unsigned src_stride
,
98 unsigned width
, unsigned height
)
102 for (y
= 0; y
< height
; y
+= 1) {
103 uint8_t *dst
= dst_row
;
104 const uint32_t *src
= (const uint32_t *)src_row
;
106 uint8_t r
, g0
, g1
, b
;
108 for (x
= 0; x
+ 1 < width
; x
+= 2) {
109 value
= util_cpu_to_le32(*src
++);
111 r
= (value
>> 0) & 0xff;
112 g0
= (value
>> 8) & 0xff;
113 b
= (value
>> 16) & 0xff;
114 g1
= (value
>> 24) & 0xff;
119 dst
[3] = 0xff; /* a */
125 dst
[3] = 0xff; /* a */
130 value
= util_cpu_to_le32(*src
);
132 r
= (value
>> 0) & 0xff;
133 g0
= (value
>> 8) & 0xff;
134 b
= (value
>> 16) & 0xff;
135 g1
= (value
>> 24) & 0xff;
140 dst
[3] = 0xff; /* a */
143 src_row
+= src_stride
/sizeof(*src_row
);
144 dst_row
+= dst_stride
/sizeof(*dst_row
);
150 util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *dst_row
, unsigned dst_stride
,
151 const float *src_row
, unsigned src_stride
,
152 unsigned width
, unsigned height
)
156 for (y
= 0; y
< height
; y
+= 1) {
157 const float *src
= src_row
;
158 uint32_t *dst
= (uint32_t *)dst_row
;
162 for (x
= 0; x
+ 1 < width
; x
+= 2) {
163 r
= 0.5f
*(src
[0] + src
[4]);
166 b
= 0.5f
*(src
[2] + src
[6]);
168 value
= float_to_ubyte(r
);
169 value
|= float_to_ubyte(g0
) << 8;
170 value
|= float_to_ubyte(b
) << 16;
171 value
|= float_to_ubyte(g1
) << 24;
173 *dst
++ = util_le32_to_cpu(value
);
184 value
= float_to_ubyte(r
);
185 value
|= float_to_ubyte(g0
) << 8;
186 value
|= float_to_ubyte(b
) << 16;
187 value
|= float_to_ubyte(g1
) << 24;
189 *dst
= util_le32_to_cpu(value
);
192 dst_row
+= dst_stride
/sizeof(*dst_row
);
193 src_row
+= src_stride
/sizeof(*src_row
);
199 util_format_r8g8_b8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row
, unsigned dst_stride
,
200 const uint8_t *src_row
, unsigned src_stride
,
201 unsigned width
, unsigned height
)
205 for (y
= 0; y
< height
; y
+= 1) {
206 const uint8_t *src
= src_row
;
207 uint32_t *dst
= (uint32_t *)dst_row
;
208 uint32_t r
, g0
, g1
, b
;
211 for (x
= 0; x
+ 1 < width
; x
+= 2) {
212 r
= (src
[0] + src
[4] + 1) >> 1;
215 b
= (src
[2] + src
[6] + 1) >> 1;
222 *dst
++ = util_le32_to_cpu(value
);
238 *dst
= util_le32_to_cpu(value
);
241 dst_row
+= dst_stride
/sizeof(*dst_row
);
242 src_row
+= src_stride
/sizeof(*src_row
);
248 util_format_r8g8_b8g8_unorm_fetch_rgba_float(float *dst
, const uint8_t *src
,
249 unsigned i
, MAYBE_UNUSED
unsigned j
)
254 dst
[0] = ubyte_to_float(src
[0]); /* r */
255 dst
[1] = ubyte_to_float(src
[1 + 2*i
]); /* g */
256 dst
[2] = ubyte_to_float(src
[2]); /* b */
257 dst
[3] = 1.0f
; /* a */
262 util_format_g8r8_g8b8_unorm_unpack_rgba_float(float *dst_row
, unsigned dst_stride
,
263 const uint8_t *src_row
, unsigned src_stride
,
264 unsigned width
, unsigned height
)
268 for (y
= 0; y
< height
; y
+= 1) {
269 float *dst
= dst_row
;
270 const uint32_t *src
= (const uint32_t *)src_row
;
274 for (x
= 0; x
+ 1 < width
; x
+= 2) {
275 value
= util_cpu_to_le32(*src
++);
277 g0
= ubyte_to_float((value
>> 0) & 0xff);
278 r
= ubyte_to_float((value
>> 8) & 0xff);
279 g1
= ubyte_to_float((value
>> 16) & 0xff);
280 b
= ubyte_to_float((value
>> 24) & 0xff);
285 dst
[3] = 1.0f
; /* a */
291 dst
[3] = 1.0f
; /* a */
296 value
= util_cpu_to_le32(*src
);
298 g0
= ubyte_to_float((value
>> 0) & 0xff);
299 r
= ubyte_to_float((value
>> 8) & 0xff);
300 g1
= ubyte_to_float((value
>> 16) & 0xff);
301 b
= ubyte_to_float((value
>> 24) & 0xff);
306 dst
[3] = 1.0f
; /* a */
309 src_row
+= src_stride
/sizeof(*src_row
);
310 dst_row
+= dst_stride
/sizeof(*dst_row
);
316 util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row
, unsigned dst_stride
,
317 const uint8_t *src_row
, unsigned src_stride
,
318 unsigned width
, unsigned height
)
322 for (y
= 0; y
< height
; y
+= 1) {
323 uint8_t *dst
= dst_row
;
324 const uint32_t *src
= (const uint32_t *)src_row
;
326 uint8_t r
, g0
, g1
, b
;
328 for (x
= 0; x
+ 1 < width
; x
+= 2) {
329 value
= util_cpu_to_le32(*src
++);
331 g0
= (value
>> 0) & 0xff;
332 r
= (value
>> 8) & 0xff;
333 g1
= (value
>> 16) & 0xff;
334 b
= (value
>> 24) & 0xff;
339 dst
[3] = 0xff; /* a */
345 dst
[3] = 0xff; /* a */
350 value
= util_cpu_to_le32(*src
);
352 g0
= (value
>> 0) & 0xff;
353 r
= (value
>> 8) & 0xff;
354 g1
= (value
>> 16) & 0xff;
355 b
= (value
>> 24) & 0xff;
360 dst
[3] = 0xff; /* a */
363 src_row
+= src_stride
/sizeof(*src_row
);
364 dst_row
+= dst_stride
/sizeof(*dst_row
);
370 util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *dst_row
, unsigned dst_stride
,
371 const float *src_row
, unsigned src_stride
,
372 unsigned width
, unsigned height
)
376 for (y
= 0; y
< height
; y
+= 1) {
377 const float *src
= src_row
;
378 uint32_t *dst
= (uint32_t *)dst_row
;
382 for (x
= 0; x
+ 1 < width
; x
+= 2) {
383 r
= 0.5f
*(src
[0] + src
[4]);
386 b
= 0.5f
*(src
[2] + src
[6]);
388 value
= float_to_ubyte(g0
);
389 value
|= float_to_ubyte(r
) << 8;
390 value
|= float_to_ubyte(g1
) << 16;
391 value
|= float_to_ubyte(b
) << 24;
393 *dst
++ = util_le32_to_cpu(value
);
404 value
= float_to_ubyte(g0
);
405 value
|= float_to_ubyte(r
) << 8;
406 value
|= float_to_ubyte(g1
) << 16;
407 value
|= float_to_ubyte(b
) << 24;
409 *dst
= util_le32_to_cpu(value
);
412 dst_row
+= dst_stride
/sizeof(*dst_row
);
413 src_row
+= src_stride
/sizeof(*src_row
);
419 util_format_g8r8_g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row
, unsigned dst_stride
,
420 const uint8_t *src_row
, unsigned src_stride
,
421 unsigned width
, unsigned height
)
425 for (y
= 0; y
< height
; y
+= 1) {
426 const uint8_t *src
= src_row
;
427 uint32_t *dst
= (uint32_t *)dst_row
;
428 uint32_t r
, g0
, g1
, b
;
431 for (x
= 0; x
+ 1 < width
; x
+= 2) {
432 r
= (src
[0] + src
[4] + 1) >> 1;
435 b
= (src
[2] + src
[6] + 1) >> 1;
442 *dst
++ = util_le32_to_cpu(value
);
458 *dst
= util_le32_to_cpu(value
);
461 dst_row
+= dst_stride
/sizeof(*dst_row
);
462 src_row
+= src_stride
/sizeof(*src_row
);
468 util_format_g8r8_g8b8_unorm_fetch_rgba_float(float *dst
, const uint8_t *src
,
469 unsigned i
, MAYBE_UNUSED
unsigned j
)
474 dst
[0] = ubyte_to_float(src
[1]); /* r */
475 dst
[1] = ubyte_to_float(src
[0 + 2*i
]); /* g */
476 dst
[2] = ubyte_to_float(src
[3]); /* b */
477 dst
[3] = 1.0f
; /* a */
482 util_format_uyvy_unpack_rgba_float(float *dst_row
, unsigned dst_stride
,
483 const uint8_t *src_row
, unsigned src_stride
,
484 unsigned width
, unsigned height
)
488 for (y
= 0; y
< height
; y
+= 1) {
489 float *dst
= dst_row
;
490 const uint32_t *src
= (const uint32_t *)src_row
;
492 uint8_t y0
, y1
, u
, v
;
494 for (x
= 0; x
+ 1 < width
; x
+= 2) {
495 value
= util_cpu_to_le32(*src
++);
497 u
= (value
>> 0) & 0xff;
498 y0
= (value
>> 8) & 0xff;
499 v
= (value
>> 16) & 0xff;
500 y1
= (value
>> 24) & 0xff;
502 util_format_yuv_to_rgb_float(y0
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
503 dst
[3] = 1.0f
; /* a */
506 util_format_yuv_to_rgb_float(y1
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
507 dst
[3] = 1.0f
; /* a */
512 value
= util_cpu_to_le32(*src
);
514 u
= (value
>> 0) & 0xff;
515 y0
= (value
>> 8) & 0xff;
516 v
= (value
>> 16) & 0xff;
517 y1
= (value
>> 24) & 0xff;
519 util_format_yuv_to_rgb_float(y0
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
520 dst
[3] = 1.0f
; /* a */
523 src_row
+= src_stride
/sizeof(*src_row
);
524 dst_row
+= dst_stride
/sizeof(*dst_row
);
530 util_format_uyvy_unpack_rgba_8unorm(uint8_t *dst_row
, unsigned dst_stride
,
531 const uint8_t *src_row
, unsigned src_stride
,
532 unsigned width
, unsigned height
)
536 for (y
= 0; y
< height
; y
+= 1) {
537 uint8_t *dst
= dst_row
;
538 const uint32_t *src
= (const uint32_t *)src_row
;
540 uint8_t y0
, y1
, u
, v
;
542 for (x
= 0; x
+ 1 < width
; x
+= 2) {
543 value
= util_cpu_to_le32(*src
++);
545 u
= (value
>> 0) & 0xff;
546 y0
= (value
>> 8) & 0xff;
547 v
= (value
>> 16) & 0xff;
548 y1
= (value
>> 24) & 0xff;
550 util_format_yuv_to_rgb_8unorm(y0
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
551 dst
[3] = 0xff; /* a */
554 util_format_yuv_to_rgb_8unorm(y1
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
555 dst
[3] = 0xff; /* a */
560 value
= util_cpu_to_le32(*src
);
562 u
= (value
>> 0) & 0xff;
563 y0
= (value
>> 8) & 0xff;
564 v
= (value
>> 16) & 0xff;
565 y1
= (value
>> 24) & 0xff;
567 util_format_yuv_to_rgb_8unorm(y0
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
568 dst
[3] = 0xff; /* a */
571 src_row
+= src_stride
/sizeof(*src_row
);
572 dst_row
+= dst_stride
/sizeof(*dst_row
);
578 util_format_uyvy_pack_rgba_float(uint8_t *dst_row
, unsigned dst_stride
,
579 const float *src_row
, unsigned src_stride
,
580 unsigned width
, unsigned height
)
584 for (y
= 0; y
< height
; y
+= 1) {
585 const float *src
= src_row
;
586 uint32_t *dst
= (uint32_t *)dst_row
;
587 uint8_t y0
, y1
, u
, v
;
590 for (x
= 0; x
+ 1 < width
; x
+= 2) {
591 uint8_t y0
, y1
, u0
, u1
, v0
, v1
, u
, v
;
593 util_format_rgb_float_to_yuv(src
[0], src
[1], src
[2],
595 util_format_rgb_float_to_yuv(src
[4], src
[5], src
[6],
598 u
= (u0
+ u1
+ 1) >> 1;
599 v
= (v0
+ v1
+ 1) >> 1;
606 *dst
++ = util_le32_to_cpu(value
);
612 util_format_rgb_float_to_yuv(src
[0], src
[1], src
[2],
621 *dst
= util_le32_to_cpu(value
);
624 dst_row
+= dst_stride
/sizeof(*dst_row
);
625 src_row
+= src_stride
/sizeof(*src_row
);
631 util_format_uyvy_pack_rgba_8unorm(uint8_t *dst_row
, unsigned dst_stride
,
632 const uint8_t *src_row
, unsigned src_stride
,
633 unsigned width
, unsigned height
)
637 for (y
= 0; y
< height
; y
+= 1) {
638 const uint8_t *src
= src_row
;
639 uint32_t *dst
= (uint32_t *)dst_row
;
640 uint8_t y0
, y1
, u
, v
;
643 for (x
= 0; x
+ 1 < width
; x
+= 2) {
644 uint8_t y0
, y1
, u0
, u1
, v0
, v1
, u
, v
;
646 util_format_rgb_8unorm_to_yuv(src
[0], src
[1], src
[2],
648 util_format_rgb_8unorm_to_yuv(src
[4], src
[5], src
[6],
651 u
= (u0
+ u1
+ 1) >> 1;
652 v
= (v0
+ v1
+ 1) >> 1;
659 *dst
++ = util_le32_to_cpu(value
);
665 util_format_rgb_8unorm_to_yuv(src
[0], src
[1], src
[2],
674 *dst
= util_le32_to_cpu(value
);
677 dst_row
+= dst_stride
/sizeof(*dst_row
);
678 src_row
+= src_stride
/sizeof(*src_row
);
684 util_format_uyvy_fetch_rgba_float(float *dst
, const uint8_t *src
,
685 unsigned i
, MAYBE_UNUSED
unsigned j
)
696 util_format_yuv_to_rgb_float(y
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
703 util_format_yuyv_unpack_rgba_float(float *dst_row
, unsigned dst_stride
,
704 const uint8_t *src_row
, unsigned src_stride
,
705 unsigned width
, unsigned height
)
709 for (y
= 0; y
< height
; y
+= 1) {
710 float *dst
= dst_row
;
711 const uint32_t *src
= (const uint32_t *)src_row
;
713 uint8_t y0
, y1
, u
, v
;
715 for (x
= 0; x
+ 1 < width
; x
+= 2) {
716 value
= util_cpu_to_le32(*src
++);
718 y0
= (value
>> 0) & 0xff;
719 u
= (value
>> 8) & 0xff;
720 y1
= (value
>> 16) & 0xff;
721 v
= (value
>> 24) & 0xff;
723 util_format_yuv_to_rgb_float(y0
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
724 dst
[3] = 1.0f
; /* a */
727 util_format_yuv_to_rgb_float(y1
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
728 dst
[3] = 1.0f
; /* a */
733 value
= util_cpu_to_le32(*src
);
735 y0
= (value
>> 0) & 0xff;
736 u
= (value
>> 8) & 0xff;
737 y1
= (value
>> 16) & 0xff;
738 v
= (value
>> 24) & 0xff;
740 util_format_yuv_to_rgb_float(y0
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
741 dst
[3] = 1.0f
; /* a */
744 src_row
+= src_stride
/sizeof(*src_row
);
745 dst_row
+= dst_stride
/sizeof(*dst_row
);
751 util_format_yuyv_unpack_rgba_8unorm(uint8_t *dst_row
, unsigned dst_stride
,
752 const uint8_t *src_row
, unsigned src_stride
,
753 unsigned width
, unsigned height
)
757 for (y
= 0; y
< height
; y
+= 1) {
758 uint8_t *dst
= dst_row
;
759 const uint32_t *src
= (const uint32_t *)src_row
;
761 uint8_t y0
, y1
, u
, v
;
763 for (x
= 0; x
+ 1 < width
; x
+= 2) {
764 value
= util_cpu_to_le32(*src
++);
766 y0
= (value
>> 0) & 0xff;
767 u
= (value
>> 8) & 0xff;
768 y1
= (value
>> 16) & 0xff;
769 v
= (value
>> 24) & 0xff;
771 util_format_yuv_to_rgb_8unorm(y0
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
772 dst
[3] = 0xff; /* a */
775 util_format_yuv_to_rgb_8unorm(y1
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
776 dst
[3] = 0xff; /* a */
781 value
= util_cpu_to_le32(*src
);
783 y0
= (value
>> 0) & 0xff;
784 u
= (value
>> 8) & 0xff;
785 y1
= (value
>> 16) & 0xff;
786 v
= (value
>> 24) & 0xff;
788 util_format_yuv_to_rgb_8unorm(y0
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
789 dst
[3] = 0xff; /* a */
792 src_row
+= src_stride
/sizeof(*src_row
);
793 dst_row
+= dst_stride
/sizeof(*dst_row
);
799 util_format_yuyv_pack_rgba_float(uint8_t *dst_row
, unsigned dst_stride
,
800 const float *src_row
, unsigned src_stride
,
801 unsigned width
, unsigned height
)
805 for (y
= 0; y
< height
; y
+= 1) {
806 const float *src
= src_row
;
807 uint32_t *dst
= (uint32_t *)dst_row
;
808 uint8_t y0
, y1
, u
, v
;
811 for (x
= 0; x
+ 1 < width
; x
+= 2) {
812 uint8_t y0
, y1
, u0
, u1
, v0
, v1
, u
, v
;
814 util_format_rgb_float_to_yuv(src
[0], src
[1], src
[2],
816 util_format_rgb_float_to_yuv(src
[4], src
[5], src
[6],
819 u
= (u0
+ u1
+ 1) >> 1;
820 v
= (v0
+ v1
+ 1) >> 1;
827 *dst
++ = util_le32_to_cpu(value
);
833 util_format_rgb_float_to_yuv(src
[0], src
[1], src
[2],
842 *dst
= util_le32_to_cpu(value
);
845 dst_row
+= dst_stride
/sizeof(*dst_row
);
846 src_row
+= src_stride
/sizeof(*src_row
);
852 util_format_yuyv_pack_rgba_8unorm(uint8_t *dst_row
, unsigned dst_stride
,
853 const uint8_t *src_row
, unsigned src_stride
,
854 unsigned width
, unsigned height
)
858 for (y
= 0; y
< height
; y
+= 1) {
859 const uint8_t *src
= src_row
;
860 uint32_t *dst
= (uint32_t *)dst_row
;
861 uint8_t y0
, y1
, u
, v
;
864 for (x
= 0; x
+ 1 < width
; x
+= 2) {
865 uint8_t y0
, y1
, u0
, u1
, v0
, v1
, u
, v
;
867 util_format_rgb_8unorm_to_yuv(src
[0], src
[1], src
[2],
869 util_format_rgb_8unorm_to_yuv(src
[4], src
[5], src
[6],
872 u
= (u0
+ u1
+ 1) >> 1;
873 v
= (v0
+ v1
+ 1) >> 1;
880 *dst
++ = util_le32_to_cpu(value
);
886 util_format_rgb_8unorm_to_yuv(src
[0], src
[1], src
[2],
895 *dst
= util_le32_to_cpu(value
);
898 dst_row
+= dst_stride
/sizeof(*dst_row
);
899 src_row
+= src_stride
/sizeof(*src_row
);
905 util_format_yuyv_fetch_rgba_float(float *dst
, const uint8_t *src
,
906 unsigned i
, MAYBE_UNUSED
unsigned j
)
917 util_format_yuv_to_rgb_float(y
, u
, v
, &dst
[0], &dst
[1], &dst
[2]);
922 /* XXX: Stubbed for now */
924 util_format_yv12_unpack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
925 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
926 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
928 util_format_yv12_pack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
929 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
930 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
932 util_format_yv12_unpack_rgba_float(UNUSED
float *dst_row
, UNUSED
unsigned dst_stride
,
933 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
934 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
936 util_format_yv12_pack_rgba_float(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
937 UNUSED
const float *src_row
, UNUSED
unsigned src_stride
,
938 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
940 util_format_yv12_fetch_rgba_float(UNUSED
float *dst
, UNUSED
const uint8_t *src
,
941 UNUSED
unsigned i
, UNUSED
unsigned j
) {}
943 util_format_yv16_unpack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
944 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
945 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
947 util_format_yv16_pack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
948 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
949 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
951 util_format_yv16_unpack_rgba_float(UNUSED
float *dst_row
, UNUSED
unsigned dst_stride
,
952 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
953 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
955 util_format_yv16_pack_rgba_float(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
956 UNUSED
const float *src_row
, UNUSED
unsigned src_stride
,
957 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
959 util_format_yv16_fetch_rgba_float(UNUSED
float *dst
, UNUSED
const uint8_t *src
,
960 UNUSED
unsigned i
, UNUSED
unsigned j
) {}
962 util_format_iyuv_unpack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
963 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
964 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
966 util_format_iyuv_pack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
967 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
968 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
970 util_format_iyuv_unpack_rgba_float(UNUSED
float *dst_row
, UNUSED
unsigned dst_stride
,
971 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
972 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
974 util_format_iyuv_pack_rgba_float(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
975 UNUSED
const float *src_row
, UNUSED
unsigned src_stride
,
976 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
978 util_format_iyuv_fetch_rgba_float(UNUSED
float *dst
, UNUSED
const uint8_t *src
,
979 UNUSED
unsigned i
, UNUSED
unsigned j
) {}
981 util_format_nv12_unpack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
982 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
983 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
985 util_format_nv12_pack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
986 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
987 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
989 util_format_nv12_unpack_rgba_float(UNUSED
float *dst_row
, UNUSED
unsigned dst_stride
,
990 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
991 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
993 util_format_nv12_pack_rgba_float(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
994 UNUSED
const float *src_row
, UNUSED
unsigned src_stride
,
995 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
997 util_format_nv12_fetch_rgba_float(UNUSED
float *dst
, UNUSED
const uint8_t *src
,
998 UNUSED
unsigned i
, UNUSED
unsigned j
) {}
1000 util_format_nv21_unpack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1001 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1002 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1004 util_format_nv21_pack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1005 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1006 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1008 util_format_nv21_unpack_rgba_float(UNUSED
float *dst_row
, UNUSED
unsigned dst_stride
,
1009 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1010 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1012 util_format_nv21_pack_rgba_float(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1013 UNUSED
const float *src_row
, UNUSED
unsigned src_stride
,
1014 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1016 util_format_nv21_fetch_rgba_float(UNUSED
float *dst
, UNUSED
const uint8_t *src
,
1017 UNUSED
unsigned i
, UNUSED
unsigned j
) {}
1019 util_format_p016_unpack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1020 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1021 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1023 util_format_p016_pack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1024 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1025 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1027 util_format_p016_unpack_rgba_float(UNUSED
float *dst_row
, UNUSED
unsigned dst_stride
,
1028 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1029 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1031 util_format_p016_pack_rgba_float(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1032 UNUSED
const float *src_row
, UNUSED
unsigned src_stride
,
1033 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1035 util_format_p016_fetch_rgba_float(UNUSED
float *dst
, UNUSED
const uint8_t *src
,
1036 UNUSED
unsigned i
, UNUSED
unsigned j
) {}
1039 util_format_r8g8_r8b8_unorm_unpack_rgba_float(UNUSED
float *dst_row
, UNUSED
unsigned dst_stride
,
1040 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1041 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1044 util_format_r8g8_r8b8_unorm_unpack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1045 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1046 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1049 util_format_r8g8_r8b8_unorm_pack_rgba_float(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1050 UNUSED
const float *src_row
, UNUSED
unsigned src_stride
,
1051 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1054 util_format_r8g8_r8b8_unorm_pack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1055 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1056 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1059 util_format_r8g8_r8b8_unorm_fetch_rgba_float(UNUSED
float *dst
, UNUSED
const uint8_t *src
,
1060 UNUSED
unsigned i
, UNUSED
unsigned j
) {}
1063 util_format_g8r8_b8r8_unorm_unpack_rgba_float(UNUSED
float *dst_row
, UNUSED
unsigned dst_stride
,
1064 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1065 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1068 util_format_g8r8_b8r8_unorm_unpack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1069 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1070 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1073 util_format_g8r8_b8r8_unorm_pack_rgba_float(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1074 UNUSED
const float *src_row
, UNUSED
unsigned src_stride
,
1075 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1078 util_format_g8r8_b8r8_unorm_pack_rgba_8unorm(UNUSED
uint8_t *dst_row
, UNUSED
unsigned dst_stride
,
1079 UNUSED
const uint8_t *src_row
, UNUSED
unsigned src_stride
,
1080 UNUSED
unsigned width
, UNUSED
unsigned height
) {}
1083 util_format_g8r8_b8r8_unorm_fetch_rgba_float(UNUSED
float *dst
, UNUSED
const uint8_t *src
,
1084 UNUSED
unsigned i
, UNUSED
unsigned j
) {}