summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2022-03-12 11:21:29 -0800
committerPhilip Langdale <github.philipl@overt.org>2023-05-28 15:46:05 -0700
commit61e685594dce7fd5bf79c3fae65d962a1ea5e924 (patch)
tree06e5523a4016714d822e94c9c39fb9e0e9e2fb6e /wscript_build.py
parent085f3e31a091daf7d6649508b162cfcde826702a (diff)
downloadmpv-61e685594dce7fd5bf79c3fae65d962a1ea5e924.tar.bz2
mpv-61e685594dce7fd5bf79c3fae65d962a1ea5e924.tar.xz
hwdec_vulkan: add Vulkan HW Interop
Vulkan Video Decoding has finally become a reality, as it's now showing up in shipping drivers, and the ffmpeg support has been merged. With that in mind, this change introduces HW interop support for ffmpeg Vulkan frames. The implementation is functionally complete - it can display frames produced by hardware decoding, and it can work with ffmpeg vulkan filters. There are still various caveats due to gaps and bugs in drivers, so YMMV, as always. Primary testing has been done on Intel, AMD, and nvidia hardware on Linux with basic Windows testing on nvidia. Notable caveats: * Due to driver bugs, video decoding on nvidia does not work right now, unless you use the Vulkan Beta driver. It can be worked around, but requires ffmpeg changes that are not considered acceptable to merge. * Even if those work-arounds are applied, Vulkan filters will not work on video that was decoded by Vulkan, due to additional bugs in the nvidia drivers. The filters do work correctly on content decoded some other way, and then uploaded to Vulkan (eg: Decode with nvdec, upload with --vf=format=vulkan) * Vulkan filters can only be used with drivers that support VK_EXT_descriptor_buffer which doesn't include Intel ANV as yet. There is an MR outstanding for this. * When dealing with 1080p content, there may be some visual distortion in the bottom lines of frames due to chroma scaling incorporating the extra hidden lines at the bottom of the frame (1080p content is actually stored as 1088 lines), depending on the hardware/driver combination and the scaling algorithm. This cannot be easily addressed as the mechanical fix for it violates the Vulkan spec, and probably requires a spec change to resolve properly. All of these caveats will be fixed in either drivers or ffmpeg, and so will not require mpv changes (unless something unexpected happens) If you want to run on nvidia with the non-beta drivers, you can this ffmpeg tree with the work-around patches: * https://github.com/philipl/FFmpeg/tree/vulkan-nvidia-workarounds
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/wscript_build.py b/wscript_build.py
index 823f875c91..8366ba76dc 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -486,6 +486,7 @@ def build(ctx):
( "video/out/hwdec/hwdec_drmprime.c", "drm" ),
( "video/out/hwdec/hwdec_drmprime_overlay.c","drm" ),
( "video/out/hwdec/hwdec_vaapi.c", "vaapi-egl || vaapi-libplacebo" ),
+ ( "video/out/hwdec/hwdec_vulkan.c", "vulkan-interop" ),
( "video/out/hwdec/dmabuf_interop_gl.c", "dmabuf-interop-gl" ),
( "video/out/hwdec/dmabuf_interop_pl.c", "dmabuf-interop-pl" ),
( "video/out/hwdec/dmabuf_interop_wl.c", "dmabuf-wayland" ),