Cameron Gutman
c707dab70a
Plumb YUV444 logic into additional renderers
2024-07-25 06:36:40 -05:00
Cameron Gutman
45ccd1a811
Add plane selection workaround for Spacemit driver bug
...
Expose plane bug workaround logic through new envvars:
- DRM_MIN_PLANE_ZPOS
- DRM_ALLOW_PRIMARY_PLANE
2024-07-12 19:37:56 -05:00
Cameron Gutman
d085722911
Don't attempt to use mismatched 8-bit formats with 10-bit codecs
...
In addition to silently truncating the samples, this also tickles
some nasty bugs in the VF2's out-of-tree OMX decoder.
2024-07-06 02:27:46 -05:00
Cameron Gutman
dff02eab7d
Fix DrmRenderer build
2024-06-25 23:29:37 -05:00
Cameron Gutman
e76780e105
Add a new prepareToRender() callback for renders to perform their initial window clears
...
This consolidates all the clearing that was strewn across the codebase.
2024-06-25 23:12:18 -05:00
Cameron Gutman
a9d7c8e495
Move forced KMSDRM modesetting operation into Session init code
...
Performing this each time DrmRenderer is initialized leads to long
delays when choosing a decoder on embedded platforms, particularly
those like TH1520/JH7110 which lack accelerated GL drivers.
2024-06-25 21:57:02 -05:00
Cameron Gutman
ac0e1098b9
Take COLOR_ENCODING values into account when choosing a colorspace
...
Replace the generic starfive hack with proper logic to examine the
supported enum values to select a colorspace. This fixes incorrect
colors with vs-drm on the TH1520.
2024-06-23 19:33:37 -05:00
Cameron Gutman
35695642d5
Use the first available plane that meets the zpos requirement
...
Planes seem to be listed in descending order of capabilities
with later planes sometimes lacking scaling capabilities, which
is the case with vs-drm on the TH1520.
2024-06-23 19:03:35 -05:00
Cameron Gutman
e458682a23
Refactor plane property loop to avoid leak
2024-06-23 18:13:20 -05:00
Cameron Gutman
0f57abf6f8
Don't select an overlay plane with a lower zpos than the primary plane
2024-06-23 17:55:27 -05:00
Cameron Gutman
ec7137e693
Flush window events in MMAL and DRM renderers
2024-06-09 14:26:26 -05: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
9cba449092
Add config option to allow EGL usage when built with MMAL
2023-10-15 13:03:47 -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
5974980aff
Use BT.709 in DrmRenderer only on Starfive devices
2023-10-05 18:10:36 -05:00
Cameron Gutman
18130fd8de
Use BT.601 for planes that lack COLOR_ENCODING properties
2023-09-29 18:30:39 -05:00
Cameron Gutman
b6d4f97e96
Check that the chosen plane supports the decoded frame pixel format
2023-09-29 17:22:49 -05:00
Cameron Gutman
0dd0112518
Don't export EGLImages for software frames
2023-09-29 17:20:50 -05:00
Cameron Gutman
5711e6064e
Allow reuse of an active plane for devices with only one usable plane per CRTC
2023-09-29 17:19:44 -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
654be492a0
Avoid using LFS64 interfaces with Musl
2023-09-18 20:07:56 -05:00
Cameron Gutman
fd41226cdd
Support fully-planar output in DrmRenderer
2023-09-12 18:08:48 -05:00
Cameron Gutman
c98289a9e7
Use DMA_BUF_IOCTL_SYNC to synchronize swframe copies
2023-09-09 12:19:40 -05:00
Cameron Gutman
78ea79b95a
Quiet new -Wswitch warnings
2023-09-05 22:51:08 -05:00
Cameron Gutman
c8182dfab3
Use BT.709 for DrmRenderer
2023-09-05 19:28:22 -05:00
Cameron Gutman
9ed40b5d9f
Add chroma siting metadata to EGL exported frames
2023-09-05 18:30:01 -05:00
Cameron Gutman
50255dd896
Set Colorspace connector property when streaming HDR
2023-08-09 23:02:43 -05:00
Cameron Gutman
7763ec3c5c
Fix mapping frames on RPi with 64-bit kernel and 32-bit userland
2023-08-01 22:01:34 -05:00
Casey Korver
ea06ec0133
Correct spelling mistakes found with Codespell
2023-07-09 13:21:18 -05:00
Cameron Gutman
fb39ad896e
Add h264_omx and hevc_omx decoders used by the Vision Five 2
2023-04-02 17:17:25 -05:00
Cameron Gutman
a3d1e9a117
Allow negotation of 36 and 48 bit deep color modes
2023-03-27 01:02:50 -05:00
Cameron Gutman
755c7c9895
Set max BPC property when streaming in 10-bit color modes
2023-03-27 00:44:02 -05:00
Cameron Gutman
f16b5cd337
Expose glslow config option
2023-03-26 20:27:03 -05:00
Cameron Gutman
21cda8141d
Always request AV_PIX_FMT_DRM_PRIME to ensure we get it if available
2023-03-26 19:59:12 -05:00
Cameron Gutman
90f26dfa45
Support direct KMSDRM output for platforms with slow GL implementations
2023-03-26 19:46:22 -05:00
Cameron Gutman
4cd030582d
Allow matching primary planes for direct rendering
2023-03-26 13:28:26 -05:00
Cameron Gutman
5baa8c680a
Add upstreamed NV15 format used by Rockchip devices
2023-03-11 11:44:36 -06:00
Cameron Gutman
b3cfdbb835
Fix DRM renderer build
2023-01-17 21:45:02 -06:00
Cameron Gutman
8a0142bd0f
Plumb HDR metadata and horizontal scrolling with Sunshine
2023-01-16 21:51:18 -06:00
Cameron Gutman
2a4af0bc2c
Use colorspace helpers for DRM EGL export
2022-10-05 00:20:33 -05:00
Cameron Gutman
99885f5b4b
Centralize colorspace and color range handling
2022-09-24 12:28:23 -05:00
Cameron Gutman
d39a29759c
Don't draw with test-only renderers
2022-08-21 18:38:09 -05:00
Cameron Gutman
36218b54f8
Don't hardcode /dev/dri/card0 and /dev/dri/renderD128
2022-06-30 19:25:33 -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
9daf7b5a36
Fix modesetting for non-EGL HEVC streams
2022-05-28 21:42:27 -05:00
Cameron Gutman
2bb2745f91
Enhance frame pacing logic for HDR renderers
2022-05-07 16:21:17 -05:00