From c867004f1076c4c775f10e89a01677e257ca7d82 Mon Sep 17 00:00:00 2001 From: Sheynar Date: Sun, 21 Jun 2026 20:03:53 +0300 Subject: [PATCH 1/2] Allow gl_cuda yuv420HDR and yuv444HDR --- src/platform/linux/cuda.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platform/linux/cuda.cpp b/src/platform/linux/cuda.cpp index 61c31e47c8f..9b1b98fc6fb 100644 --- a/src/platform/linux/cuda.cpp +++ b/src/platform/linux/cuda.cpp @@ -361,7 +361,9 @@ namespace cuda { auto hw_frames_ctx = (AVHWFramesContext *) hw_frames_ctx_buf->data; if (hw_frames_ctx->sw_format != AV_PIX_FMT_NV12 && - hw_frames_ctx->sw_format != AV_PIX_FMT_YUV444P) { + hw_frames_ctx->sw_format != AV_PIX_FMT_YUV444P && + hw_frames_ctx->sw_format != AV_PIX_FMT_P010LE && + hw_frames_ctx->sw_format != AV_PIX_FMT_YUV444P16LE) { BOOST_LOG(error) << "cuda::gl_cuda_vram_t doesn't support any format other than AV_PIX_FMT_NV12 and AV_PIX_FMT_YUV444P"sv; return -1; } @@ -374,7 +376,7 @@ namespace cuda { } sw_format = hw_frames_ctx->sw_format; - is_yuv444 = (sw_format == AV_PIX_FMT_YUV444P); + is_yuv444 = (sw_format == AV_PIX_FMT_YUV444P || sw_format == AV_PIX_FMT_YUV444P16LE); auto sws_opt = egl::sws_t::make(width, height, frame->width, frame->height, sw_format, is_yuv444); if (!sws_opt) { From bb94706783e3c3db319aa8f3cc55e8e8b1231868 Mon Sep 17 00:00:00 2001 From: Sheynar Date: Wed, 24 Jun 2026 16:00:05 +0300 Subject: [PATCH 2/2] update gl_cuda supported formats error msg --- src/platform/linux/cuda.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/linux/cuda.cpp b/src/platform/linux/cuda.cpp index 9b1b98fc6fb..937d478098c 100644 --- a/src/platform/linux/cuda.cpp +++ b/src/platform/linux/cuda.cpp @@ -364,7 +364,7 @@ namespace cuda { hw_frames_ctx->sw_format != AV_PIX_FMT_YUV444P && hw_frames_ctx->sw_format != AV_PIX_FMT_P010LE && hw_frames_ctx->sw_format != AV_PIX_FMT_YUV444P16LE) { - BOOST_LOG(error) << "cuda::gl_cuda_vram_t doesn't support any format other than AV_PIX_FMT_NV12 and AV_PIX_FMT_YUV444P"sv; + BOOST_LOG(error) << "cuda::gl_cuda_vram_t doesn't support any format other than AV_PIX_FMT_NV12, AV_PIX_FMT_P010LE, AV_PIX_FMT_YUV444P and AV_PIX_FMT_YUV444P16LE"sv; return -1; }