mpv/video/out
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
..
cocoa
d3d11 vo: hwdec: Pass the ra_ctx to hwdecs instead of just the ra 2023-05-28 15:46:05 -07:00
gpu hwdec_vulkan: add Vulkan HW Interop 2023-05-28 15:46:05 -07:00
gpu_next vo_gpu_next: respect `gl->flipped` 2023-05-27 11:37:48 +02:00
hwdec hwdec_vulkan: add Vulkan HW Interop 2023-05-28 15:46:05 -07:00
mac options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
opengl vo: hwdec: Pass the ra_ctx to hwdecs instead of just the ra 2023-05-28 15:46:05 -07:00
placebo video/out/placebo/utils: add mappings from pl enums to mpv enums 2023-03-05 22:37:05 -05:00
vulkan options: remove explicit initialization of integers to 0 2023-02-21 17:15:17 +00:00
win32
wldmabuf Revert "vo_dmabuf_wayland: drop support for linux-dmabuf-v2" 2023-02-18 02:21:54 +00:00
android_common.c vo: change vo_platform_init to bool 2023-01-08 20:42:42 +00:00
android_common.h vo: change vo_platform_init to bool 2023-01-08 20:42:42 +00:00
aspect.c
aspect.h
bitmap_packer.c
bitmap_packer.h
cocoa_cb_common.swift options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
cocoa_common.h
cocoa_common.m various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
dither.c various: fix warning -Wimplicit-const-int-float-conversion 2023-02-26 16:45:07 +01:00
dither.h
dr_helper.c vo: add `int flags` to the get_image signature 2023-01-23 14:13:34 +01:00
dr_helper.h vo: add `int flags` to the get_image signature 2023-01-23 14:13:34 +01:00
drm_atomic.c drm: rewrite based around vo_drm_state 2023-01-21 17:08:29 +00:00
drm_atomic.h drm: rewrite based around vo_drm_state 2023-01-21 17:08:29 +00:00
drm_common.c options: remove explicit initialization of integers to 0 2023-02-21 17:15:17 +00:00
drm_common.h drm: rewrite based around vo_drm_state 2023-01-21 17:08:29 +00:00
drm_prime.c
drm_prime.h
filter_kernels.c filter_kernels: fix kaiser 2022-12-20 13:53:25 +01:00
filter_kernels.h
libmpv.h vo: add `int flags` to the get_image signature 2023-01-23 14:13:34 +01:00
libmpv_sw.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
present_sync.c vo: move wayland presentation to separate files 2022-06-19 18:13:55 +00:00
present_sync.h vo: move wayland presentation to separate files 2022-06-19 18:13:55 +00:00
vo.c vo: fix race condition with redraw requests 2023-03-02 22:09:10 +00:00
vo.h vo: make mp_frame_perf thread safe 2023-05-25 16:25:33 +02:00
vo_caca.c
vo_direct3d.c various: fix typos 2023-03-28 19:29:44 +00:00
vo_dmabuf_wayland.c vo: hwdec: Pass the ra_ctx to hwdecs instead of just the ra 2023-05-28 15:46:05 -07:00
vo_drm.c drm: rewrite based around vo_drm_state 2023-01-21 17:08:29 +00:00
vo_gpu.c vo: hwdec: Pass the ra_ctx to hwdecs instead of just the ra 2023-05-28 15:46:05 -07:00
vo_gpu_next.c vo: hwdec: Pass the ra_ctx to hwdecs instead of just the ra 2023-05-28 15:46:05 -07:00
vo_image.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
vo_kitty.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_lavc.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
vo_libmpv.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
vo_mediacodec_embed.c vo: hwdec: do hwdec interop lookup by image format 2022-09-21 09:39:34 -07:00
vo_null.c
vo_rpi.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_sdl.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_sixel.c various: fix various typos in the code base 2023-03-28 19:29:44 +00:00
vo_tct.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_vaapi.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_vdpau.c options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
vo_wlshm.c wayland: use bool type for alpha framebuffer tracking 2023-02-28 14:53:32 +00:00
vo_x11.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
vo_xv.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
w32_common.c win32: follow Windows settings and update dark mode state 2023-04-04 20:04:57 +02:00
w32_common.h vo: change vo_platform_init to bool 2023-01-08 20:42:42 +00:00
wayland_common.c wayland: improve guessing when mpv is focused 2023-05-17 16:13:04 -05:00
wayland_common.h wayland: use correct x/y coordinates for the cursor 2023-03-08 14:06:22 +00:00
win_state.c win_state: add vo_calc_window_geometry3 2021-09-06 10:16:10 +03:00
win_state.h win_state: add vo_calc_window_geometry3 2021-09-06 10:16:10 +03:00
x11_common.c player: add --auto-window-resize option 2023-03-02 02:55:36 +00:00
x11_common.h player: add --auto-window-resize option 2023-03-02 02:55:36 +00:00