mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
msdk: map MFX_FOURCC_P016 to VA_FOURCC_P016
P016 is used for semi-planar 12 bits format in the media driver, so the RT format is VA_RT_FORMAT_YUV420_12
This commit is contained in:
parent
4d31299c12
commit
c5763f66c9
2 changed files with 9 additions and 0 deletions
|
@ -139,6 +139,11 @@ gst_msdk_frame_alloc (mfxHDL pthis, mfxFrameAllocRequest * req,
|
||||||
format = VA_RT_FORMAT_YUV444_10;
|
format = VA_RT_FORMAT_YUV444_10;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ((MFX_VERSION >= 1031) && VA_CHECK_VERSION(1, 2, 0))
|
||||||
|
if (format == VA_RT_FORMAT_YUV420 && va_fourcc == VA_FOURCC_P016)
|
||||||
|
format = VA_RT_FORMAT_YUV420_12;
|
||||||
|
#endif
|
||||||
|
|
||||||
va_status = vaCreateSurfaces (gst_msdk_context_get_handle (context),
|
va_status = vaCreateSurfaces (gst_msdk_context_get_handle (context),
|
||||||
format,
|
format,
|
||||||
req->Info.Width, req->Info.Height, surfaces, surfaces_num, attribs,
|
req->Info.Width, req->Info.Height, surfaces, surfaces_num, attribs,
|
||||||
|
@ -334,6 +339,7 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
|
||||||
switch (mem_id->image.format.fourcc) {
|
switch (mem_id->image.format.fourcc) {
|
||||||
case VA_FOURCC_NV12:
|
case VA_FOURCC_NV12:
|
||||||
case VA_FOURCC_P010:
|
case VA_FOURCC_P010:
|
||||||
|
case VA_FOURCC_P016:
|
||||||
data->Pitch = mem_id->image.pitches[0];
|
data->Pitch = mem_id->image.pitches[0];
|
||||||
data->Y = buf + mem_id->image.offsets[0];
|
data->Y = buf + mem_id->image.offsets[0];
|
||||||
data->UV = buf + mem_id->image.offsets[1];
|
data->UV = buf + mem_id->image.offsets[1];
|
||||||
|
|
|
@ -62,6 +62,9 @@ static const struct fourcc_map gst_msdk_fourcc_mfx_to_va[] = {
|
||||||
FOURCC_MFX_TO_VA (RGB4, ARGB),
|
FOURCC_MFX_TO_VA (RGB4, ARGB),
|
||||||
FOURCC_MFX_TO_VA (P8, P208),
|
FOURCC_MFX_TO_VA (P8, P208),
|
||||||
FOURCC_MFX_TO_VA (P010, P010),
|
FOURCC_MFX_TO_VA (P010, P010),
|
||||||
|
#if (MFX_VERSION >= 1031)
|
||||||
|
FOURCC_MFX_TO_VA (P016, P016),
|
||||||
|
#endif
|
||||||
#if (MFX_VERSION >= 1028)
|
#if (MFX_VERSION >= 1028)
|
||||||
FOURCC_MFX_TO_VA (RGB565, RGB565),
|
FOURCC_MFX_TO_VA (RGB565, RGB565),
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue