msdk: Fix mjpeg BGRx encode

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6401>
This commit is contained in:
Cheah, Vincent Beng Keat 2024-03-27 14:34:31 +08:00 committed by GStreamer Marge Bot
parent 7d0e90b7bc
commit 249a086612
2 changed files with 2 additions and 0 deletions

View file

@ -324,6 +324,7 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
data->V = data->U + 2; data->V = data->U + 2;
break; break;
case VA_FOURCC_ARGB: case VA_FOURCC_ARGB:
case VA_FOURCC_XRGB:
data->Pitch = mem_id->image.pitches[0]; data->Pitch = mem_id->image.pitches[0];
data->B = buf + mem_id->image.offsets[0]; data->B = buf + mem_id->image.offsets[0];
data->G = data->B + 1; data->G = data->B + 1;

View file

@ -601,6 +601,7 @@ gst_msdkenc_init_encoder (GstMsdkEnc * thiz)
break; break;
#endif #endif
case GST_VIDEO_FORMAT_BGRA: case GST_VIDEO_FORMAT_BGRA:
case GST_VIDEO_FORMAT_BGRx:
thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_RGB4; thiz->param.mfx.FrameInfo.FourCC = MFX_FOURCC_RGB4;
thiz->param.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV444; thiz->param.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV444;
thiz->param.mfx.FrameInfo.BitDepthLuma = 8; thiz->param.mfx.FrameInfo.BitDepthLuma = 8;