diff options
author | Lynne <dev@lynne.ee> | 2019-08-28 21:58:10 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2020-02-04 23:19:48 +0000 |
commit | a88449ffb2f249e31ecf98f84e7f8c338308e7e4 (patch) | |
tree | 0a45a83b97d0bef178397c54b1963a9925f06153 /libavutil/hwcontext.c | |
parent | d7210ce7f5418508d6f8eec6e90d978e06a2d49e (diff) | |
download | ffmpeg-a88449ffb2f249e31ecf98f84e7f8c338308e7e4.tar.gz |
lavu: add Vulkan hwcontext code
This commit adds the necessary code to initialize and use a Vulkan device
within the hwcontext libavutil framework.
Currently direct mapping to VAAPI and DRM frames is functional, and
transfers to CUDA and native frames are supported.
Lets hope the future Vulkan video decode extension fits well within this
framework.
Diffstat (limited to 'libavutil/hwcontext.c')
-rw-r--r-- | libavutil/hwcontext.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 3189391c07..d09a15a249 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -59,6 +59,9 @@ static const HWContextType * const hw_table[] = { #if CONFIG_MEDIACODEC &ff_hwcontext_type_mediacodec, #endif +#if CONFIG_VULKAN + &ff_hwcontext_type_vulkan, +#endif NULL, }; @@ -73,6 +76,7 @@ static const char *const hw_type_names[] = { [AV_HWDEVICE_TYPE_VDPAU] = "vdpau", [AV_HWDEVICE_TYPE_VIDEOTOOLBOX] = "videotoolbox", [AV_HWDEVICE_TYPE_MEDIACODEC] = "mediacodec", + [AV_HWDEVICE_TYPE_VULKAN] = "vulkan", }; enum AVHWDeviceType av_hwdevice_find_type_by_name(const char *name) |