Skip to content

Commit 689573e

Browse files
SheynarReenigneArcher
authored andcommitted
Allow gl_cuda yuv420HDR and yuv444HDR
1 parent 6c34c4f commit 689573e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/platform/linux/cuda.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ namespace cuda {
361361
auto hw_frames_ctx = (AVHWFramesContext *) hw_frames_ctx_buf->data;
362362

363363
if (hw_frames_ctx->sw_format != AV_PIX_FMT_NV12 &&
364-
hw_frames_ctx->sw_format != AV_PIX_FMT_YUV444P) {
364+
hw_frames_ctx->sw_format != AV_PIX_FMT_YUV444P &&
365+
hw_frames_ctx->sw_format != AV_PIX_FMT_P010LE &&
366+
hw_frames_ctx->sw_format != AV_PIX_FMT_YUV444P16LE) {
365367
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;
366368
return -1;
367369
}
@@ -374,7 +376,7 @@ namespace cuda {
374376
}
375377

376378
sw_format = hw_frames_ctx->sw_format;
377-
is_yuv444 = (sw_format == AV_PIX_FMT_YUV444P);
379+
is_yuv444 = (sw_format == AV_PIX_FMT_YUV444P || sw_format == AV_PIX_FMT_YUV444P16LE);
378380

379381
auto sws_opt = egl::sws_t::make(width, height, frame->width, frame->height, sw_format, is_yuv444);
380382
if (!sws_opt) {

0 commit comments

Comments
 (0)