diff options
author | Philip Langdale <philipl@overt.org> | 2022-08-20 09:47:27 -0700 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2022-09-03 16:19:40 -0700 |
commit | 2f9b8bbd1f415769e1da03571e09c74a78987a3d (patch) | |
tree | 31f076c49c84b4c7a717fb29586341b2d5aaa5e0 /libavfilter/vf_chromanr.c | |
parent | b982dd0d8366b2cb9cc6288b821a536c8e2b50ed (diff) | |
download | ffmpeg-2f9b8bbd1f415769e1da03571e09c74a78987a3d.tar.gz |
lavu/hwcontext_vulkan: support mapping VUYX, P012, and XV36
If we want to be able to map between VAAPI and Vulkan (to do Vulkan
filtering), we need to have matching formats on each side.
The mappings here are not exact. In the same way that P010 is still
mapped to full 16 bit formats, P012 has to be mapped that way as well.
Similarly, VUYX has to be mapped to an alpha-equipped format, and XV36
has to be mapped to a fully 16bit alpha-equipped format.
While Vulkan seems to fundamentally lack formats with an undefined,
but physically present, alpha channel, it has have 10X6 and 12X4
formats that you could imagine using for P010, P012 and XV36, but these
formats don't support the STORAGE usage flag. Today, hwcontext_vulkan
requires all formats to be storable because it wants to be able to use
them to create writable images. Until that changes, which might happen,
we have to restrict the set of formats we use.
Finally, when mapping a Vulkan image back to vaapi, I observed that
the VK_FORMAT_R16G16B16A16_UNORM format we have to use for XV36 going
to Vulkan is mapped to Y416 when going to vaapi (which makes sense as
it's the exact matching format) so I had to add an entry for it even
though we don't use it directly.
Diffstat (limited to 'libavfilter/vf_chromanr.c')
0 files changed, 0 insertions, 0 deletions