Commit graph

516 commits

Author SHA1 Message Date
Cameron Gutman
5e46c4ec2b Update Windows and Mac prebuilt libraries
SDL2 -> 1fa6142
FFmpeg -> 7.0
opus -> 1.5.1
dav1d -> 1.4.1
2024-04-06 19:56:38 -05:00
Cameron Gutman
fd2ff61a40 Support Vulkan AV1 decoding with FFmpeg 7.0 2024-04-06 12:31:14 -05:00
Cameron Gutman
f2535f1e6e Avoid D3D9 fallback on lack of codec support unless a D3D11 FL11.0 GPU wasn't found
We'd rather not waste time (and risk crashes) loading the D3D9 driver if the GPU doesn't have the physical decoding hardware at all.
2024-03-26 23:59:18 -05:00
Cameron Gutman
cefa567f95 Demote DXVA2 renderer to second pass of hwaccels 2024-03-26 23:04:54 -05:00
Cameron Gutman
97bd515b11 Remove leftover preferred Metal device logic 2024-03-26 01:16:57 -05:00
Cameron Gutman
a093a0ae59 Restore AVSampleDisplayLayer renderer for dGPU/eGPU systems
These sometimes have issues importing decoded frames for Metal rendering.
2024-03-24 17:47:29 -05:00
Cameron Gutman
ceca83346b Use FIFO present mode for VSync 2024-03-02 11:19:52 -06:00
Cameron Gutman
896456a8ac Wait for command buffer completion before returning from renderFrame() 2024-02-11 00:15:32 -06:00
Cameron Gutman
8959ddbeb6 Rewrite overlay support in Metal renderer to avoid additional subviews
Subviews cause our Metal layer to fall out of the direct composition path on Intel hardware
2024-02-11 00:15:07 -06:00
Cameron Gutman
767215fce5 Rewrite old frame pacing logic for Metal renderer 2024-02-10 22:49:13 -06:00
Cameron Gutman
3ef05f3a35 Completely switch to D3D11VA over DXVA2 for supported GPUs in all scenarios
Fixes #1179
2024-02-09 01:24:03 -06:00
Cameron Gutman
12624bc5c4 Avoid the composited display path for our Metal layer 2024-02-08 18:19:01 -06:00
Cameron Gutman
80242f2e90 Fix Metal debug layer validation errors 2024-02-08 18:06:46 -06:00
Cameron Gutman
cf3e328f9d Add seamless resize support for Metal renderer 2024-02-08 18:05:47 -06:00
Cameron Gutman
b972a22459 Use SDL helpers to create Metal view 2024-02-07 03:26:09 -06:00
Cameron Gutman
db06239018 Rewrite the macOS renderer using CAMetalLayer
This allows v-sync to be disabled on macOS and lets us remove a whole bunch of old hacks.

Further optimizations of the new renderer are still needed.
2024-02-07 02:40:35 -06:00
boogie
bdc7d53515 Only give "pixel_format=nv12" option to v4l2m2m or v4l2requests decoders
pixel_format is a global option which changes avctx->pix_fmt to the
given format, and overrides the AV_PIX_FMT_DRM_PRIME requirement of a
decoder. So v4l2 out of tree patches has done some exception which is
not perfectly nice, therefore limit this option only if the given
decoder is v4l2 decoder. Otherwise rockchip mpp based ffmpeg decoders
can not work properly
2024-02-06 00:09:34 -06:00
Cameron Gutman
c3e886fbcc Use drmIoctl() instead of bare ioctl() to handle EINTR/EAGAIN 2024-01-05 18:33:17 -06:00
Cameron Gutman
e20d56041e Fix rare race condition in overlay update code 2023-12-31 15:21:18 -06:00
Cameron Gutman
114074bfd8 Don't set HDR metadata on the DXGI swapchain
This is no longer recommended by Microsoft due inconsistencies with display support for HDR metadata.
2023-12-31 15:15:06 -06:00
Cameron Gutman
61f71a318e Expose PLVK_DEBUG_EXTRA for enabling extra debug layers 2023-12-27 15:40:01 -06:00
Cameron Gutman
646ce2bf66 Handle occlusion of the Vulkan window without recreating the renderer over and over 2023-12-27 15:36:59 -06:00
Cameron Gutman
2bbae90e2c Revert "Unconditionally override host-reported minimum luminance value"
This reverts commit 770872238d.
2023-12-26 15:46:25 -06:00
Cameron Gutman
bb8e229814 Swap buffers in waitToRender() instead of renderFrame() 2023-12-26 15:45:31 -06:00
Cameron Gutman
2cef09471b Remove manual hwframe ctx setup for D3D11VA
It was apparently never necessary, since FFmpeg's default behavior of
avcodec_get_hw_frames_parameters() + av_hwframe_ctx_init() makes a
context that exactly matches the one we constructed manually.
2023-12-22 02:45:11 -06:00
Cameron Gutman
2d15382e31 Fix libplacebo renderer build on Windows 2023-12-21 18:12:19 -06:00
Cameron Gutman
770872238d Unconditionally override host-reported minimum luminance value 2023-12-18 16:43:17 -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
4e7107a09e Use the crop rect from the pl_frame instead of the raw AVFrame dimensions 2023-12-17 19:06:56 -06:00
Cameron Gutman
058739321c Move vkAcquireNextImageKHR() into waitToRender() so it can overlap with new frame arrival 2023-12-17 16:47:38 -06:00
Cameron Gutman
708bec2937 Rewrite Vulkan device selection logic to handle multi-GPU systems better 2023-12-17 15:46:10 -06:00
Cameron Gutman
c939537c5c Synchronize swapchain and pl_frame colorspace values 2023-12-16 17:36:02 -06:00
Cameron Gutman
9497657c83 Fix handling of zero minimum HDR luminance 2023-12-16 17:28:35 -06:00
Cameron Gutman
c74c4ef041 Fix native Vulkan video decoding (non-imported frames) 2023-12-16 16:21:54 -06:00
Cameron Gutman
d75663052d Fix a few minor Vulkan renderer bugs 2023-12-16 16:18:19 -06:00
Cameron Gutman
6a58dbb05e Disable 10-bit SDR swapchains on Vulkan due to inconsistent dithering behavior 2023-12-14 17:46:06 -06:00
Cameron Gutman
8aeb976128 Require a test frame for Vulkan video decoding 2023-12-14 17:44:58 -06:00
Cameron Gutman
7d51a4b67d Fix incorrect overlay colors in Vulkan renderer 2023-12-14 17:43:54 -06:00
Cameron Gutman
ee95efc0f1 Improve Vulkan renderer debuggability 2023-12-13 01:08:32 -06:00
Cameron Gutman
3ddc8ad68a Fix crash if pl_vulkan_create() fails 2023-12-13 01:04:54 -06:00
Cameron Gutman
aac5ad3fd0 Add a libplacebo-based Vulkan renderer for HDR and Vulkan video decoding support
Vulkan H.264/HEVC video decoding isn't supported with Fedora's Mesa binaries due to
patent issues, so only the VAAPI/DRM-PRIME import path was tested locally with ANV.

HDR video is getting tonemapped to my SDR monitor reasonably, so HDR output probably
works with GameScope but I haven't confirmed yet.

See #1117
2023-12-12 23:54:23 -06:00
Cameron Gutman
eef270de26 Fix HDR with external displays on macOS Sonoma
Fixes #1079
2023-10-15 15:30:41 -05:00
Cameron Gutman
9cba449092 Add config option to allow EGL usage when built with MMAL 2023-10-15 13:03:47 -05:00
Cameron Gutman
6eb5e07007 Fix warnings in 32-bit builds 2023-10-12 19:05:52 -05:00
Cameron Gutman
9120fd01a8 Adjust MMAL and RPi workarounds for Pi 5 and Bookworm support 2023-10-12 18:46:11 -05:00
Cameron Gutman
c14cc70a6a Also check for V3D compatible IDs 2023-10-08 16:52:54 -05:00
Cameron Gutman
7e4fddbe62 Only block EGL rendering on Pi 4 and earlier
Hopefully Pi 5 is powerful enough to at least render 1080p 60 FPS.
2023-10-08 16:16:33 -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
5974980aff Use BT.709 in DrmRenderer only on Starfive devices 2023-10-05 18:10:36 -05:00