aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-10-27 14:50:54 -0300
committerJames Almer <jamrial@gmail.com>2024-10-27 14:50:57 -0300
commitbb57b780134f59e3bddfab295e34e88468bbd545 (patch)
tree2d137c9a953f293c17109e3e9e2fcba5c1c0ee83
parent839f6d38a0ff32d8fb89fc1f1b281ed874ae3543 (diff)
downloadffmpeg-bb57b780134f59e3bddfab295e34e88468bbd545.tar.gz
avutil/hwcontext_vulkan: add missing packed YUV444 format mappings
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavutil/hwcontext_vulkan.c7
-rw-r--r--libavutil/vulkan.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index ea33c815aa..0b52ad5112 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -363,14 +363,18 @@ static const struct FFVkFormatEntry {
{ VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM, AV_PIX_FMT_YUV444P12, ASPECT_3PLANE, 3, 1, 3, { VK_FORMAT_R16_UNORM, VK_FORMAT_R16_UNORM, VK_FORMAT_R16_UNORM } },
{ VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM, AV_PIX_FMT_YUV444P16, ASPECT_3PLANE, 3, 1, 3, { VK_FORMAT_R16_UNORM, VK_FORMAT_R16_UNORM, VK_FORMAT_R16_UNORM } },
- /* Single plane 422 at 8, 10 and 12 bits */
+ /* Single plane 422 at 8, 10, 12 and 16 bits */
{ VK_FORMAT_G8B8G8R8_422_UNORM, AV_PIX_FMT_YUYV422, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R8G8B8A8_UNORM } },
{ VK_FORMAT_B8G8R8G8_422_UNORM, AV_PIX_FMT_UYVY422, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R8G8B8A8_UNORM } },
{ VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16, AV_PIX_FMT_Y210, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16G16B16A16_UNORM } },
{ VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16, AV_PIX_FMT_Y212, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16G16B16A16_UNORM } },
{ VK_FORMAT_G16B16G16R16_422_UNORM, AV_PIX_FMT_Y216, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16G16B16A16_UNORM } },
+
+ /* Single plane 444 at 8, 10, 12 and 16 bits */
+ { VK_FORMAT_B8G8R8A8_UNORM, AV_PIX_FMT_UYVA, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_B8G8R8A8_UNORM } },
{ VK_FORMAT_A2R10G10B10_UNORM_PACK32, AV_PIX_FMT_XV30, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16G16B16A16_UNORM } },
{ VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16, AV_PIX_FMT_XV36, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16G16B16A16_UNORM } },
+ { VK_FORMAT_R16G16B16A16_UNORM, AV_PIX_FMT_XV48, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16G16B16A16_UNORM } },
};
static const int nb_vk_formats_list = FF_ARRAY_ELEMS(vk_formats_list);
@@ -2869,6 +2873,7 @@ static const struct {
{ DRM_FORMAT_XYUV8888, VK_FORMAT_R8G8B8A8_UNORM },
{ DRM_FORMAT_XVYU2101010, VK_FORMAT_A2R10G10B10_UNORM_PACK32 } ,
{ DRM_FORMAT_XVYU12_16161616, VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 } ,
+ { DRM_FORMAT_XVYU16161616, VK_FORMAT_R16G16B16A16_UNORM } ,
#endif
};
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index b7654d0f36..2c71312d78 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -1300,6 +1300,7 @@ const char *ff_vk_shader_rep_fmt(enum AVPixelFormat pix_fmt,
case AV_PIX_FMT_RGB0:
case AV_PIX_FMT_RGB565:
case AV_PIX_FMT_BGR565:
+ case AV_PIX_FMT_UYVA:
case AV_PIX_FMT_YUYV422:
case AV_PIX_FMT_UYVY422: {
const char *rep_tab[] = {
@@ -1326,7 +1327,8 @@ const char *ff_vk_shader_rep_fmt(enum AVPixelFormat pix_fmt,
case AV_PIX_FMT_RGBA64:
case AV_PIX_FMT_Y212:
case AV_PIX_FMT_Y216:
- case AV_PIX_FMT_XV36: {
+ case AV_PIX_FMT_XV36:
+ case AV_PIX_FMT_XV48: {
const char *rep_tab[] = {
[FF_VK_REP_NATIVE] = "rgba16ui",
[FF_VK_REP_FLOAT] = "rgba16",