hwcontext_vulkan: add support for AV_PIX_FMT_GRAY10/12/14

master
Lynne 1 month ago
parent ac3f69a4b9
commit 08fb505a66
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
  1. 3
      libavutil/hwcontext_vulkan.c
  2. 3
      libavutil/vulkan.c

@ -304,6 +304,9 @@ static const struct FFVkFormatEntry {
} vk_formats_list[] = {
/* Gray formats */
{ VK_FORMAT_R8_UNORM, AV_PIX_FMT_GRAY8, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R8_UNORM } },
{ VK_FORMAT_R16_UNORM, AV_PIX_FMT_GRAY10, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16_UNORM } },
{ VK_FORMAT_R16_UNORM, AV_PIX_FMT_GRAY12, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16_UNORM } },
{ VK_FORMAT_R16_UNORM, AV_PIX_FMT_GRAY14, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16_UNORM } },
{ VK_FORMAT_R16_UNORM, AV_PIX_FMT_GRAY16, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R16_UNORM } },
{ VK_FORMAT_R32_SFLOAT, AV_PIX_FMT_GRAYF32, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R32_SFLOAT } },

@ -1422,6 +1422,9 @@ const char *ff_vk_shader_rep_fmt(enum AVPixelFormat pix_fmt,
};
return rep_tab[rep_fmt];
};
case AV_PIX_FMT_GRAY10:
case AV_PIX_FMT_GRAY12:
case AV_PIX_FMT_GRAY14:
case AV_PIX_FMT_GRAY16:
case AV_PIX_FMT_GBRAP16:
case AV_PIX_FMT_GBRP10:

Loading…
Cancel
Save