diff options
author | Lynne <dev@lynne.ee> | 2024-10-12 00:58:32 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-10-15 17:45:18 +0200 |
commit | 903f7f053a4054d1e1f79a6caff5a7cad6077f9e (patch) | |
tree | a785d23ac017d0136b1d1f9606dee4187fc0f271 | |
parent | 2336e6856572f640cbf4906c6dabbdea26f91611 (diff) | |
download | ffmpeg-903f7f053a4054d1e1f79a6caff5a7cad6077f9e.tar.gz |
vulkan: add support for AV_PIX_FMT_RGBA128
-rw-r--r-- | libavutil/hwcontext_vulkan.c | 1 | ||||
-rw-r--r-- | libavutil/vulkan.c | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 465308271e..cce8d6aa47 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -322,6 +322,7 @@ static const struct FFVkFormatEntry { { VK_FORMAT_A2B10G10R10_UNORM_PACK32, AV_PIX_FMT_X2BGR10, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_A2B10G10R10_UNORM_PACK32 } }, { VK_FORMAT_R32G32B32_SFLOAT, AV_PIX_FMT_RGBF32, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R32G32B32_SFLOAT } }, { VK_FORMAT_R32G32B32A32_SFLOAT, AV_PIX_FMT_RGBAF32, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R32G32B32A32_SFLOAT } }, + { VK_FORMAT_R32G32B32A32_UINT, AV_PIX_FMT_RGBA128, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R32G32B32A32_UINT } }, /* Planar RGB */ { VK_FORMAT_R8_UNORM, AV_PIX_FMT_GBRAP, VK_IMAGE_ASPECT_COLOR_BIT, 1, 4, 4, { VK_FORMAT_R8_UNORM, VK_FORMAT_R8_UNORM, VK_FORMAT_R8_UNORM, VK_FORMAT_R8_UNORM } }, diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index e2d2478608..f62ceb6248 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -1282,7 +1282,8 @@ int ff_vk_mt_is_np_rgb(enum AVPixelFormat pix_fmt) pix_fmt == AV_PIX_FMT_BGR565 || pix_fmt == AV_PIX_FMT_BGR0 || pix_fmt == AV_PIX_FMT_0BGR || pix_fmt == AV_PIX_FMT_RGB0 || pix_fmt == AV_PIX_FMT_X2RGB10 || pix_fmt == AV_PIX_FMT_X2BGR10 || - pix_fmt == AV_PIX_FMT_RGBAF32 || pix_fmt == AV_PIX_FMT_RGBF32) + pix_fmt == AV_PIX_FMT_RGBAF32 || pix_fmt == AV_PIX_FMT_RGBF32 || + pix_fmt == AV_PIX_FMT_RGBA128) return 1; return 0; } @@ -1343,6 +1344,15 @@ const char *ff_vk_shader_rep_fmt(enum AVPixelFormat pix_fmt, }; return rep_tab[rep_fmt]; } + case AV_PIX_FMT_RGBA128: { + const char *rep_tab[] = { + [FF_VK_REP_NATIVE] = "rgba32ui", + [FF_VK_REP_FLOAT] = NULL, + [FF_VK_REP_INT] = "rgba32i", + [FF_VK_REP_UINT] = "rgba32ui", + }; + return rep_tab[rep_fmt]; + } case AV_PIX_FMT_GRAY8: case AV_PIX_FMT_GBRAP: case AV_PIX_FMT_YUV420P: |