mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
vkformat: add VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
This commit is contained in:
parent
b1321f78d3
commit
d7bbcffe14
1 changed files with 12 additions and 3 deletions
|
@ -126,6 +126,8 @@
|
|||
#define SUB4204 { 0, 1, 1, 0 }, { 0, 1, 1, 0 }
|
||||
#define SUB4224 { 0, 1, 1, 0 }, { 0, 0, 0, 0 }
|
||||
|
||||
#define ASPECT_2PLANE (VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT)
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
static GstVulkanFormatInfo formats[] = {
|
||||
{FORMAT (R8G8B8A8, UNORM), FLAG (RGB) | FLAG (ALPHA) | NE, DPTH8888, PSTR4444, PLANE0, OFFS0123, SUB444, VK_IMAGE_ASPECT_COLOR_BIT},
|
||||
|
@ -170,7 +172,9 @@ static GstVulkanFormatInfo formats[] = {
|
|||
{FORMAT (R8, UINT), FLAG (RGB) | NE, DPTH8, PSTR4, PLANE0, OFFS0, SUB4, VK_IMAGE_ASPECT_COLOR_BIT},
|
||||
{FORMAT (R8, SINT), FLAG (RGB) | NE, DPTH8, PSTR4, PLANE0, OFFS0, SUB4, VK_IMAGE_ASPECT_COLOR_BIT},
|
||||
{FORMAT (R8, SRGB), FLAG (RGB) | NE, DPTH8, PSTR4, PLANE0, OFFS0, SUB4, VK_IMAGE_ASPECT_COLOR_BIT},
|
||||
|
||||
#if (defined(VK_VERSION_1_3) || defined(VK_VERSION_1_2) && VK_HEADER_VERSION >= 199)
|
||||
{FORMAT (G8_B8R8_2PLANE_420, UNORM), FLAG (YUV), DPTH888, PSTR122, PLANE011, OFFS001, SUB420, ASPECT_2PLANE},
|
||||
#endif
|
||||
#if 0
|
||||
FIXME: implement:
|
||||
{VK_FORMAT_R4G4_UNORM_PACK8, {0, 1, -1, -1}},
|
||||
|
@ -342,7 +346,6 @@ FIXME: implement:
|
|||
VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000,
|
||||
VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001,
|
||||
VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002,
|
||||
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003,
|
||||
VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004,
|
||||
VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005,
|
||||
VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006,
|
||||
|
@ -456,7 +459,13 @@ const static struct {
|
|||
{ GST_VIDEO_FORMAT_AYUV, VK_FORMAT_UNDEFINED, { VK_FORMAT_R8G8B8A8_UNORM, } },
|
||||
{ GST_VIDEO_FORMAT_YUY2, VK_FORMAT_UNDEFINED, { VK_FORMAT_R8G8_UNORM, } },
|
||||
{ GST_VIDEO_FORMAT_UYVY, VK_FORMAT_UNDEFINED, { VK_FORMAT_R8G8_UNORM, } },
|
||||
{ GST_VIDEO_FORMAT_NV12, VK_FORMAT_UNDEFINED, { VK_FORMAT_R8_UNORM, VK_FORMAT_R8G8_UNORM } },
|
||||
{ GST_VIDEO_FORMAT_NV12,
|
||||
#if (defined(VK_VERSION_1_3) || defined(VK_VERSION_1_2) && VK_HEADER_VERSION >= 199)
|
||||
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM,
|
||||
#else
|
||||
VK_FORMAT_UNDEFINED,
|
||||
#endif
|
||||
{ VK_FORMAT_R8_UNORM, VK_FORMAT_R8G8_UNORM } },
|
||||
{ GST_VIDEO_FORMAT_NV21, VK_FORMAT_UNDEFINED, { VK_FORMAT_R8_UNORM, VK_FORMAT_R8G8_UNORM } },
|
||||
{ GST_VIDEO_FORMAT_Y444, VK_FORMAT_UNDEFINED, { VK_FORMAT_R8_UNORM, } },
|
||||
{ GST_VIDEO_FORMAT_Y42B, VK_FORMAT_UNDEFINED, { VK_FORMAT_R8_UNORM, } },
|
||||
|
|
Loading…
Reference in a new issue