From ad00aaacd0ff7cd2e7c33a554289246d149a9314 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 27 Jan 2024 02:13:42 +1100 Subject: [PATCH] [obs] fix non-dmabuf 24-bit imports OBS `GS_RGBA` maps to the sRGB color space which breaks our mapping kludge, as such we need to use the UNORM variants to avoid this --- obs/lg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/obs/lg.c b/obs/lg.c index efd9cc25..b8af8013 100644 --- a/obs/lg.c +++ b/obs/lg.c @@ -677,12 +677,12 @@ static void lgVideoTick(void * data, float seconds) switch(this->type) { case FRAME_TYPE_BGRA: - format = GS_BGRA; + format = GS_BGRA_UNORM; drm_format = DRM_FORMAT_ARGB8888; break; case FRAME_TYPE_RGBA: - format = GS_RGBA; + format = GS_RGBA_UNORM; drm_format = DRM_FORMAT_ARGB8888; break; @@ -697,7 +697,7 @@ static void lgVideoTick(void * data, float seconds) /* fallthrough */ case FRAME_TYPE_BGR_32: - format = GS_BGRA; + format = GS_BGRA_UNORM; drm_format = DRM_FORMAT_ARGB8888; unpack = true; break;