aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMike Blumenkrantz <[email protected]>2019-07-03 12:14:54 -0400
committerKenneth Graunke <[email protected]>2019-07-31 09:50:06 -0700
commit338a29b08fe69aa91ad0318d54da1670f40307f0 (patch)
tree063489668fcc5db00c74b78e54cf5ff5fc73345e /src/gallium/auxiliary
parent7f75b2b5af0944d060cff8ee66eb138ba937d3bd (diff)
gallium: add AYUV and XYUV formats
this only adds the PIPE_FORMAT members, not any direct handling for them Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_format.csv4
-rw-r--r--src/gallium/auxiliary/util/u_format_yuv.c46
-rw-r--r--src/gallium/auxiliary/util/u_format_yuv.h47
3 files changed, 97 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index a7e2dbb70ef..b55d7ba0540 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -157,6 +157,10 @@ PIPE_FORMAT_Z24_UNORM_S8_UINT_AS_R8G8B8A8 , plain, 1, 1, un8 , un8 , un8 , un8 ,
PIPE_FORMAT_UYVY , subsampled, 2, 1, x32 , , , , xyz1, yuv
# http://www.fourcc.org/yuv.php#YUYV (a.k.a http://www.fourcc.org/yuv.php#YUY2)
PIPE_FORMAT_YUYV , subsampled, 2, 1, x32 , , , , xyz1, yuv
+
+PIPE_FORMAT_AYUV , other, 4, 4, un8 , , , , xyzw, yuv
+PIPE_FORMAT_XYUV , other, 4, 4, un8 , , , , xyz1, yuv
+
# same subsampling but with rgb channels
PIPE_FORMAT_R8G8_B8G8_UNORM , subsampled, 2, 1, x32 , , , , xyz1, rgb
PIPE_FORMAT_G8R8_G8B8_UNORM , subsampled, 2, 1, x32 , , , , xyz1, rgb
diff --git a/src/gallium/auxiliary/util/u_format_yuv.c b/src/gallium/auxiliary/util/u_format_yuv.c
index e0f85c5aa97..c3ccc35f272 100644
--- a/src/gallium/auxiliary/util/u_format_yuv.c
+++ b/src/gallium/auxiliary/util/u_format_yuv.c
@@ -1036,6 +1036,52 @@ util_format_p016_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
UNUSED unsigned i, UNUSED unsigned j) {}
void
+util_format_xyuv_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+
+void
+util_format_xyuv_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+
+void
+util_format_xyuv_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const float *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+
+void
+util_format_xyuv_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+
+void
+util_format_xyuv_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
+ UNUSED unsigned i, UNUSED unsigned j) {}
+void
+util_format_ayuv_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+
+void
+util_format_ayuv_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+
+void
+util_format_ayuv_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const float *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+
+void
+util_format_ayuv_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+
+void
+util_format_ayuv_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
+ UNUSED unsigned i, UNUSED unsigned j) {}
+void
util_format_r8g8_r8b8_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
UNUSED unsigned width, UNUSED unsigned height) {}
diff --git a/src/gallium/auxiliary/util/u_format_yuv.h b/src/gallium/auxiliary/util/u_format_yuv.h
index 171cbc928d7..0acb1747e43 100644
--- a/src/gallium/auxiliary/util/u_format_yuv.h
+++ b/src/gallium/auxiliary/util/u_format_yuv.h
@@ -284,6 +284,53 @@ util_format_p016_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
void
util_format_p016_fetch_rgba_float(float *dst, const uint8_t *src,
unsigned i, unsigned j);
+
+void
+util_format_xyuv_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_xyuv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_xyuv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_xyuv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_xyuv_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+void
+util_format_ayuv_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_ayuv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_ayuv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_ayuv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+
+void
+util_format_ayuv_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
void
util_format_r8g8_b8g8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,