diff options
author | Lynne <dev@lynne.ee> | 2020-03-15 10:30:34 +0000 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2020-03-17 22:52:00 +0000 |
commit | 1a5e9ae4d8e5ee34c983f16a280c9a262a3fbf8d (patch) | |
tree | 5ca6ca91a178b870c5b5bed04259161ccad5e0ee /libavfilter/vulkan.c | |
parent | ecc3dceff44b8612c80014d45a514df882883940 (diff) | |
download | ffmpeg-1a5e9ae4d8e5ee34c983f16a280c9a262a3fbf8d.tar.gz |
scale_vulkan: add support for RGB->YUV conversions
Only top-left chroma position supported for now.
Diffstat (limited to 'libavfilter/vulkan.c')
-rw-r--r-- | libavfilter/vulkan.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavfilter/vulkan.c b/libavfilter/vulkan.c index 558b4bfbe0..ff76ab15e9 100644 --- a/libavfilter/vulkan.c +++ b/libavfilter/vulkan.c @@ -666,6 +666,18 @@ VkSampler *ff_vk_init_sampler(AVFilterContext *avctx, int unnorm_coords, return sampler; } +int ff_vk_mt_is_np_rgb(enum AVPixelFormat pix_fmt) +{ + if (pix_fmt == AV_PIX_FMT_ABGR || pix_fmt == AV_PIX_FMT_BGRA || + pix_fmt == AV_PIX_FMT_RGBA || pix_fmt == AV_PIX_FMT_RGB24 || + pix_fmt == AV_PIX_FMT_BGR24 || pix_fmt == AV_PIX_FMT_RGB48 || + 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) + return 1; + return 0; +} + const char *ff_vk_shader_rep_fmt(enum AVPixelFormat pixfmt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pixfmt); |