util/format: add util format y8_400_unorm

Signed-off-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18914>
This commit is contained in:
James Zhu
2022-09-15 17:54:52 +05:30
committed by Leo Liu
parent 791f187405
commit 9055ab9de3
4 changed files with 6 additions and 0 deletions

View File

@@ -295,6 +295,7 @@ enum pipe_format {
PIPE_FORMAT_NV12,
PIPE_FORMAT_NV21,
PIPE_FORMAT_Y8_400_UNORM,
/* PIPE_FORMAT_Y8_U8_V8_420_UNORM = IYUV */
/* PIPE_FORMAT_Y8_U8V8_420_UNORM = NV12 */
PIPE_FORMAT_Y8_U8_V8_422_UNORM,
@@ -635,6 +636,8 @@ pipe_format_to_chroma_format(enum pipe_format format)
case PIPE_FORMAT_Y8_U8_V8_444_UNORM:
case PIPE_FORMAT_Y16_U16_V16_444_UNORM:
return PIPE_VIDEO_CHROMA_FORMAT_444;
case PIPE_FORMAT_Y8_400_UNORM:
return PIPE_VIDEO_CHROMA_FORMAT_400;
default:
return PIPE_VIDEO_CHROMA_FORMAT_NONE;
}

View File

@@ -397,6 +397,7 @@ PIPE_FORMAT_YV16 , planar3, 1, 1, 1, , , , , xy
PIPE_FORMAT_IYUV , planar3, 1, 1, 1, , , , , xyzw, yuv
PIPE_FORMAT_NV12 , planar2, 1, 1, 1, , , , , xyzw, yuv
PIPE_FORMAT_NV21 , planar2, 1, 1, 1, , , , , xyzw, yuv
PIPE_FORMAT_Y8_400_UNORM , other , 1, 1, 1, un8, , , , x001, yuv
# RGB version of NV12 and YV12 for hardware that supports sampling from
# multiplane textures but needs color-space conversion in the shader.
Can't render this file because it contains an unexpected character in line 8 and column 3.

View File

@@ -1377,6 +1377,7 @@ util_format_get_plane_format(enum pipe_format format, unsigned plane)
case PIPE_FORMAT_IYUV:
case PIPE_FORMAT_Y8_U8_V8_422_UNORM:
case PIPE_FORMAT_Y8_U8_V8_444_UNORM:
case PIPE_FORMAT_Y8_400_UNORM:
return PIPE_FORMAT_R8_UNORM;
case PIPE_FORMAT_NV12:
case PIPE_FORMAT_Y8_U8V8_422_UNORM:

View File

@@ -101,6 +101,7 @@ def has_access(format):
'r8g8_r8b8_unorm',
'g8r8_b8r8_unorm',
'g8r8_g8b8_unorm',
'y8_400_unorm',
'y8_u8_v8_422_unorm',
'y8_u8v8_422_unorm',
'y8_u8_v8_444_unorm',