From 249a08661266a853db0ba6c66ce9be431a2a8172 Mon Sep 17 00:00:00 2001 From: "Cheah, Vincent Beng Keat" Date: Wed, 27 Mar 2024 14:34:31 +0800 Subject: [PATCH] msdk: Fix mjpeg BGRx encode Part-of: --- subprojects/gst-plugins-bad/sys/msdk/gstmsdkallocator_libva.c | 1 + subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkallocator_libva.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkallocator_libva.c index eab8001602..e92719af76 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkallocator_libva.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkallocator_libva.c @@ -324,6 +324,7 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data) data->V = data->U + 2; break; case VA_FOURCC_ARGB: + case VA_FOURCC_XRGB: data->Pitch = mem_id->image.pitches[0]; data->B = buf + mem_id->image.offsets[0]; data->G = data->B + 1; diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c index 393b3574be..43f61515d7 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkenc.c @@ -601,6 +601,7 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz) break; #endif case GST_VIDEO_FORMAT_BGRA: + case GST_VIDEO_FORMAT_BGRx: thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_RGB4; thiz->param.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV444; thiz->param.mfx.FrameInfo.BitDepthLuma = 8;