92 Commits

Author SHA1 Message Date
Cameron Gutman
231a67946d WIP SDL3 compatibility 2025-01-31 01:13:17 -06:00
Cameron Gutman
13b2b28c2f Abstract SDL_SysWM into compat functions 2025-01-30 22:41:40 -06:00
Cameron Gutman
4af9623727 Replace C++ VLAs with std::vector 2024-10-15 22:41:21 -05:00
Cameron Gutman
6f39d120cb Unify handling of DRM devices between DRM and VAAPI
SDL may not be able to give us a DRM FD for Vulkan windows.
2024-09-21 20:46:11 -05:00
Cameron Gutman
b266f61ba6 Disable direct rendering of YUV444 using vaPutSurface()
It doesn't work as of libva 2.21 + iHD 24.2.5 despite the fact that
the VAEntrypointVideoProc advertises VA_RT_FORMAT_YUV444.
2024-09-15 21:03:00 -05:00
Cameron Gutman
c707dab70a Plumb YUV444 logic into additional renderers 2024-07-25 06:36:40 -05:00
Cameron Gutman
d3219ae24a Don't use VAAPI fallback driver names on libva 2.20+
libva 2.20 is good enough at detecting driver names (even under XWayland)
that we don't need to use the fallback name list anymore. This saves time
probing drivers, avoids excessive log output from failed probes, and avoids
tickling bugs in VAAPI drivers that are installed but unused.
2024-06-18 00:31:59 -05:00
Cameron Gutman
4474f815af Only use fallback VDPAU/VAAPI driver paths on AppImages
Native packages and Flatpak/Snap packages both have properly set
driver path values embedded in libva.so/libvdpau.so. Let's not go
splunking for drivers in random folders on those systems.
2024-05-25 14:39:09 -05:00
Cameron Gutman
e130a15037 Remove dependency on AV_VAAPI_DRIVER_QUIRK_SURFACE_ATTRIBUTES for VDPAU wrapper identification
These quirks may be deprecated and no longer populated in an upcoming FFmpeg version.
2024-05-25 14:24:31 -05:00
Cameron Gutman
845ef147c9 Add new libva driver path values for Fedora 40 2024-05-25 14:22:43 -05:00
Cameron Gutman
76d0eb6b63 Avoid trying VDPAU when Vulkan is preferred
The VDPAU renderer causes interoperability issues with Vulkan.
2024-04-18 00:41:24 -05:00
Cameron Gutman
e20d56041e Fix rare race condition in overlay update code 2023-12-31 15:21:18 -06:00
Cameron Gutman
2a05b890d8 Enable transparent resizing and display changes for supported renderers 2023-12-17 21:15:40 -06:00
Cameron Gutman
481f23b6e9 Remove some dependencies on fixed window and frame sizes 2023-12-17 20:39:26 -06:00
Cameron Gutman
6eb5e07007 Fix warnings in 32-bit builds 2023-10-12 19:05:52 -05:00
Cameron Gutman
a2f23b7053 Fix automatic VA DRM driver selection with libva 2.20 2023-10-05 18:12:12 -05:00
Cameron Gutman
c2778e040a Build fix for old EGL headers 2023-09-26 23:16:22 -05:00
Cameron Gutman
1efdeeb9dc Export composed VA surface layers for EGL import if supported
Importing composed formats is more efficient and performant because it allows
tiled and/or compressed surfaces to be directly sampled by shaders without
requiring a conversion to a linear planar format first.
2023-09-26 22:58:13 -05:00
Cameron Gutman
b01dfea343 Refactor EGLImage creation into a separate shared class 2023-09-26 21:03:19 -05:00
Cameron Gutman
f420dc740a Set EGL_IMAGE_PRESERVED_KHR=EGL_TRUE on our EGLImages
They're mapped read-only and may be saved internally as reference frames,
so they must not be modified by the EGL implementation.
2023-09-26 02:38:46 -05:00
Cameron Gutman
acbe503c12 Fix NVIDIA VAAPI X11 deprioritization check to actually check for X11 2023-09-05 20:46:43 -05:00
Cameron Gutman
0261c41574 Revert "Prefer nvidia-vaapi-driver over VDPAU for AV1"
libvdpau 1.5 has supported this for a while and we'll fall
back to VAAPI if VDPAU doesn't work.

This reverts commit 42960b7bf149f3dbd9e47f18792c07f2d182408a.
2023-09-05 20:39:28 -05:00
Cameron Gutman
1a2f1ed620 Enable AV1 RFI on all decoders capable of HEVC RFI 2023-08-13 16:41:48 -05:00
Cameron Gutman
d147d36867 Fix leaking /dev/dri fds on each vaInitialize() failure 2023-08-01 22:53:22 -05:00
Cameron Gutman
42960b7bf1 Prefer nvidia-vaapi-driver over VDPAU for AV1 2023-07-16 16:54:13 -05:00
Cameron Gutman
8465a27a97 Deprioritize VAAPI for Gallium and Nvidia drivers and work around RFI latency bug 2022-10-16 21:51:10 -05:00
Cameron Gutman
84fc5f3008 Use colorspace helper with VAAPI direct rendering 2022-10-14 19:23:51 -05:00
Cameron Gutman
e6c4332445 Revert "Use Rec 2020 colorspace for WCG support even if HDR is off on the host"
Rec 2020 conversion causes colors to be blown out in SDR

This reverts commit 472e8ee92ea94adbe03efc9efd7d115745593c12.
2022-10-13 01:19:49 -05:00
Cameron Gutman
472e8ee92e Use Rec 2020 colorspace for WCG support even if HDR is off on the host 2022-10-13 00:14:10 -05:00
Cameron Gutman
5501d7bc6b Include opt-out variable in VAAPI avoidance log output 2022-10-05 18:50:53 -05:00
Cameron Gutman
413ef42a34 Enable HEVC RFI for CUDA, VAAPI, and VDPAU decoders 2022-10-05 18:47:43 -05:00
Cameron Gutman
a1694ab951 Use nvidia-vaapi-driver on Wayland systems if available 2022-10-05 18:44:11 -05:00
Cameron Gutman
be2f4433db Avoid hardcoding VIDEO_FORMAT_H265_MAIN10 for HDR/10-bit color 2022-06-26 16:22:05 -05:00
Cameron Gutman
e103f6c9b6 Avoid holding the overlay lock during vaPutSurface 2022-05-28 22:28:17 -05:00
Cameron Gutman
c2d7b835fb Try moving session.h prior to vaapi.h 2022-05-21 16:58:28 -05:00
Cameron Gutman
f72888ce6f Attempt to fix build error with older Qt headers 2022-05-21 16:52:04 -05:00
Cameron Gutman
95c4a24d99 Destroy subpictures before the associated image 2022-05-20 21:46:40 -05:00
Cameron Gutman
f5f23a7c22 Implement overlay support for the VAAPI direct renderer 2022-05-20 21:40:37 -05:00
Cameron Gutman
474591c6a5 Use a separate callback to indicate EOS instead of renderFrame() 2022-04-07 21:30:20 -05:00
Cameron Gutman
fee6f75223 Fix VAAPIRenderer build error with neither HAVE_EGL nor HAVE_DRM defined 2022-04-05 00:24:00 -05:00
Cameron Gutman
cf089fdfe9 Add support for HDR with VAAPI using DRM frontend renderer 2022-01-29 18:16:39 -06:00
Cameron Gutman
9755e31fa2 Refactor VAAPI surface export check into separate function 2022-01-29 17:45:36 -06:00
Cameron Gutman
b85d5b8822 Enable P010 surface export from VAAPI to EGL 2022-01-23 18:33:30 -06:00
Cameron Gutman
0d70bd9ac0 Add (untested) VAAPI support for CCS planes on Tiger Lake
See https://github.com/intel/media-driver/issues/1210
2022-01-05 21:09:08 -06:00
Cameron Gutman
0fa7723f51 Fix build without libva-x11 2021-11-25 17:51:08 +03:00
Cameron Gutman
955da6be30 Enable Gallium VAAPI driver on VAAPI 1.x 2021-03-13 14:37:13 -06:00
Cameron Gutman
c3895f06c0 Fix handling of preferred/compatible pixel formats with EGLRenderer and VAAPI/DRM backends 2021-02-04 19:39:18 -06:00
Cameron Gutman
80137848dc Add DMA-BUF export compatibility with EGL 1.4 2021-01-31 16:24:31 -06:00
Cameron Gutman
dbfdc2fd14 Share DRM FD and GBM device with SDL
Depends on https://hg.libsdl.org/SDL/rev/d75deb75464a
2021-01-30 21:11:52 -06:00
Cameron Gutman
586a93d7aa Use the new EGL renderer for VAAPI by default 2020-06-13 20:21:54 -07:00