mpv/video
Philip Langdale 61e685594d 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
2023-05-28 15:46:05 -07:00
..
decode vd_lavc: sort hwdecs without hwdevices last for autoprobing 2023-02-26 16:40:59 +01:00
filter various: fix typos 2023-03-28 19:29:44 +00:00
out hwdec_vulkan: add Vulkan HW Interop 2023-05-28 15:46:05 -07:00
csputils.c video: add missing libplacebo colorspace enums 2023-03-05 22:37:05 -05:00
csputils.h video: add missing libplacebo colorspace enums 2023-03-05 22:37:05 -05:00
cuda.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
d3d.c
d3d.h
drmprime.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
fmt-conversion.c hwdec_vulkan: add Vulkan HW Interop 2023-05-28 15:46:05 -07:00
fmt-conversion.h
hwdec.c filters: support loading new hwdec_interops from filters 2022-09-21 09:39:34 -07:00
hwdec.h vo: hwdec: do hwdec interop lookup by image format 2022-09-21 09:39:34 -07:00
image_loader.c
image_loader.h
image_writer.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
image_writer.h options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
img_format.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
img_format.h hwdec_vulkan: add Vulkan HW Interop 2023-05-28 15:46:05 -07:00
mp_image.c mp_image: use the ffmpeg interlaced frame flags where available 2023-05-11 14:31:17 -07:00
mp_image.h mp_image: forward AV_FRAME_DATA_DOVI_RPU_BUFFER side data 2023-02-19 20:50:37 +01:00
mp_image_pool.c various: fix typos 2023-03-28 19:29:44 +00:00
mp_image_pool.h f_hwtransfer: mp_image_pool: support HW -> HW mapping 2022-09-21 09:39:34 -07:00
repack.c repack: add repacker for ccc16x16 formats 2022-09-10 12:31:44 -07:00
repack.h
sws_utils.c test: integrate unittests with meson 2023-03-02 15:45:27 +00:00
sws_utils.h
vaapi.c
vaapi.h
vdpau.c
vdpau.h
vdpau_functions.inc
vdpau_mixer.c
vdpau_mixer.h options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
zimg.c video: add missing libplacebo colorspace enums 2023-03-05 22:37:05 -05:00
zimg.h options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00