From c40ecbe7f5a3e5ebdf36f57420ff53134320115c Mon Sep 17 00:00:00 2001 From: Haihao Xiang Date: Thu, 21 Mar 2019 15:34:36 +0800 Subject: [PATCH] msdk: map MFX_FOURCC_A2RGB10 to VA_FOURCC_A2R10G10B10 --- sys/msdk/gstmsdkallocator_libva.c | 3 +++ sys/msdk/msdk_libva.c | 1 + 2 files changed, 4 insertions(+) diff --git a/sys/msdk/gstmsdkallocator_libva.c b/sys/msdk/gstmsdkallocator_libva.c index 994c1be857..46990b5ef6 100644 --- a/sys/msdk/gstmsdkallocator_libva.c +++ b/sys/msdk/gstmsdkallocator_libva.c @@ -98,6 +98,9 @@ gst_msdk_frame_alloc (mfxHDL pthis, mfxFrameAllocRequest * req, if (format == VA_RT_FORMAT_YUV420 && va_fourcc == VA_FOURCC_P010) format = VA_RT_FORMAT_YUV420_10; + if (format == VA_RT_FORMAT_YUV444 && va_fourcc == VA_FOURCC_A2R10G10B10) + format = VA_RT_FORMAT_RGB32_10; + va_status = vaCreateSurfaces (gst_msdk_context_get_handle (context), format, req->Info.Width, req->Info.Height, surfaces, surfaces_num, &attrib, 1); diff --git a/sys/msdk/msdk_libva.c b/sys/msdk/msdk_libva.c index 171c2d3969..296e5a5ae0 100644 --- a/sys/msdk/msdk_libva.c +++ b/sys/msdk/msdk_libva.c @@ -66,6 +66,7 @@ static const struct fourcc_map gst_msdk_fourcc_mfx_to_va[] = { FOURCC_MFX_TO_VA (RGB565, RGB565), #endif FOURCC_MFX_TO_VA (AYUV, AYUV), + FOURCC_MFX_TO_VA (A2RGB10, A2R10G10B10), {0, 0} };