From aa75a0e9d29e401dd048f6ec077b8c3c4129efee Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 11 Mar 2024 20:46:00 +0100 Subject: 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] --- video/out/drm_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'video/out/drm_common.c') 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), }; -- cgit v1.2.3