From cf9926714783efa4524ca2afd62a9817dcbccf06 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Mon, 25 May 2020 00:05:20 +0200 Subject: util/format: Add more multi-planar formats. These don't have a fourcc code as far as I can tell, but we want them for internal Vulkan use. Reviewed-by: Eric Anholt Part-of: --- src/gallium/include/pipe/p_format.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/gallium/include/pipe/p_format.h') diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h index 8b10aae40a6..f1a4652c36e 100644 --- a/src/gallium/include/pipe/p_format.h +++ b/src/gallium/include/pipe/p_format.h @@ -240,6 +240,18 @@ enum pipe_format { PIPE_FORMAT_NV12, PIPE_FORMAT_NV21, + /* PIPE_FORMAT_Y8_U8_V8_420_UNORM = IYUV */ + /* PIPE_FORMAT_Y8_U8V8_420_UNORM = NV12 */ + PIPE_FORMAT_Y8_U8_V8_422_UNORM, + PIPE_FORMAT_Y8_U8V8_422_UNORM, + PIPE_FORMAT_Y8_U8_V8_444_UNORM, + + PIPE_FORMAT_Y16_U16_V16_420_UNORM, + /* PIPE_FORMAT_Y16_U16V16_420_UNORM */ + PIPE_FORMAT_Y16_U16_V16_422_UNORM, + PIPE_FORMAT_Y16_U16V16_422_UNORM, + PIPE_FORMAT_Y16_U16_V16_444_UNORM, + PIPE_FORMAT_A4R4_UNORM, PIPE_FORMAT_R4A4_UNORM, PIPE_FORMAT_R8A8_UNORM, @@ -571,11 +583,19 @@ pipe_format_to_chroma_format(enum pipe_format format) case PIPE_FORMAT_IYUV: case PIPE_FORMAT_P010: case PIPE_FORMAT_P016: + case PIPE_FORMAT_Y16_U16_V16_420_UNORM: return PIPE_VIDEO_CHROMA_FORMAT_420; case PIPE_FORMAT_UYVY: case PIPE_FORMAT_YUYV: case PIPE_FORMAT_YV16: + case PIPE_FORMAT_Y8_U8_V8_422_UNORM: + case PIPE_FORMAT_Y8_U8V8_422_UNORM: + case PIPE_FORMAT_Y16_U16_V16_422_UNORM: + case PIPE_FORMAT_Y16_U16V16_422_UNORM: return PIPE_VIDEO_CHROMA_FORMAT_422; + case PIPE_FORMAT_Y8_U8_V8_444_UNORM: + case PIPE_FORMAT_Y16_U16_V16_444_UNORM: + return PIPE_VIDEO_CHROMA_FORMAT_444; default: return PIPE_VIDEO_CHROMA_FORMAT_NONE; } -- cgit v1.2.3