summaryrefslogtreecommitdiffstats
path: root/video/out/drm_common.c
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2024-03-11 20:46:00 +0100
committersfan5 <sfan5@live.de>2024-03-16 13:27:34 +0100
commitaa75a0e9d29e401dd048f6ec077b8c3c4129efee (patch)
treed6066197cf4179884292fe036d5c4e39b603247e /video/out/drm_common.c
parentbc8038cffd2b2181f19fa9b07a99b61eba1fe6a1 (diff)
downloadmpv-aa75a0e9d29e401dd048f6ec077b8c3c4129efee.tar.bz2
mpv-aa75a0e9d29e401dd048f6ec077b8c3c4129efee.tar.xz
vo_drm: add support for YUYV format
As the first aligned format this required a fix to reconfig(). Adding the other component-swapped formats in this group would be trivial but I checked the DRM database [1] and no driver exists that supports one of those but not YUYV and this is quite fringe as-is, so I opted not to. [1] <https://drmdb.emersion.fr/formats>
Diffstat (limited to 'video/out/drm_common.c')
-rw-r--r--video/out/drm_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/drm_common.c b/video/out/drm_common.c
index 1669e249eb..cc1df9442b 100644
--- a/video/out/drm_common.c
+++ b/video/out/drm_common.c
@@ -95,7 +95,8 @@ const struct m_sub_options drm_conf = {
{"xrgb8888", DRM_OPTS_FORMAT_XRGB8888},
{"xrgb2101010", DRM_OPTS_FORMAT_XRGB2101010},
{"xbgr8888", DRM_OPTS_FORMAT_XBGR8888},
- {"xbgr2101010", DRM_OPTS_FORMAT_XBGR2101010})},
+ {"xbgr2101010", DRM_OPTS_FORMAT_XBGR2101010},
+ {"yuyv", DRM_OPTS_FORMAT_YUYV})},
{"drm-draw-surface-size", OPT_SIZE_BOX(draw_surface_size)},
{"drm-vrr-enabled", OPT_CHOICE(vrr_enabled,
{"no", 0}, {"yes", 1}, {"auto", -1})},
@@ -106,6 +107,7 @@ const struct m_sub_options drm_conf = {
.drm_atomic = 1,
.draw_plane = DRM_OPTS_PRIMARY_PLANE,
.drmprime_video_plane = DRM_OPTS_OVERLAY_PLANE,
+ .drm_format = DRM_OPTS_FORMAT_XRGB8888,
},
.size = sizeof(struct drm_opts),
};