mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
hwcontext_vulkan: add support for AV_PIX_FMT_RGBAF32
This commit is contained in:
parent
1addd0fdca
commit
d55a351741
@ -320,6 +320,7 @@ static const struct FFVkFormatEntry {
|
||||
{ VK_FORMAT_R8G8B8A8_UNORM, AV_PIX_FMT_RGB0, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R8G8B8A8_UNORM } },
|
||||
{ VK_FORMAT_A2R10G10B10_UNORM_PACK32, AV_PIX_FMT_X2RGB10, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_A2R10G10B10_UNORM_PACK32 } },
|
||||
{ VK_FORMAT_A2B10G10R10_UNORM_PACK32, AV_PIX_FMT_X2BGR10, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_A2B10G10R10_UNORM_PACK32 } },
|
||||
{ VK_FORMAT_R32G32B32A32_SFLOAT, AV_PIX_FMT_RGBAF32, VK_IMAGE_ASPECT_COLOR_BIT, 1, 1, 1, { VK_FORMAT_R32G32B32A32_SFLOAT } },
|
||||
|
||||
/* 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 } },
|
||||
|
@ -1281,7 +1281,8 @@ int ff_vk_mt_is_np_rgb(enum AVPixelFormat pix_fmt)
|
||||
pix_fmt == AV_PIX_FMT_RGBA64 || pix_fmt == AV_PIX_FMT_RGB565 ||
|
||||
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_X2RGB10 || pix_fmt == AV_PIX_FMT_X2BGR10 ||
|
||||
pix_fmt == AV_PIX_FMT_RGBAF32)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@ -1331,6 +1332,15 @@ const char *ff_vk_shader_rep_fmt(enum AVPixelFormat pix_fmt,
|
||||
};
|
||||
return rep_tab[rep_fmt];
|
||||
}
|
||||
case AV_PIX_FMT_RGBAF32: {
|
||||
const char *rep_tab[] = {
|
||||
[FF_VK_REP_NATIVE] = "rgba32",
|
||||
[FF_VK_REP_FLOAT] = "rgba32",
|
||||
[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:
|
||||
|
Loading…
Reference in New Issue
Block a user