mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
msdk: map MFX_FOURCC_Y416 to VA_FOURCC_Y416
Y416 is used for packed 12 bits 4:4:4:4 YUV format in media driver, the RT format is VA_RT_FORMAT_YUV444_12
This commit is contained in:
parent
e769df9689
commit
55ed9458b5
2 changed files with 11 additions and 0 deletions
|
@ -145,6 +145,9 @@ gst_msdk_frame_alloc (mfxHDL pthis, mfxFrameAllocRequest * req,
|
||||||
|
|
||||||
if (format == VA_RT_FORMAT_YUV422 && va_fourcc == VA_FOURCC_Y216)
|
if (format == VA_RT_FORMAT_YUV422 && va_fourcc == VA_FOURCC_Y216)
|
||||||
format = VA_RT_FORMAT_YUV422_12;
|
format = VA_RT_FORMAT_YUV422_12;
|
||||||
|
|
||||||
|
if (format == VA_RT_FORMAT_YUV444 && va_fourcc == VA_FOURCC_Y416)
|
||||||
|
format = VA_RT_FORMAT_YUV444_12;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
va_status = vaCreateSurfaces (gst_msdk_context_get_handle (context),
|
va_status = vaCreateSurfaces (gst_msdk_context_get_handle (context),
|
||||||
|
@ -409,6 +412,13 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
|
||||||
data->Pitch = mem_id->image.pitches[0];
|
data->Pitch = mem_id->image.pitches[0];
|
||||||
data->U = buf + mem_id->image.offsets[0]; /* data->Y410 */
|
data->U = buf + mem_id->image.offsets[0]; /* data->Y410 */
|
||||||
break;
|
break;
|
||||||
|
case VA_FOURCC_Y416:
|
||||||
|
data->Pitch = mem_id->image.pitches[0];
|
||||||
|
data->U = buf + mem_id->image.offsets[0];
|
||||||
|
data->Y = data->U + 2;
|
||||||
|
data->V = data->U + 4;
|
||||||
|
data->A = data->U + 6;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
case VA_FOURCC_ABGR:
|
case VA_FOURCC_ABGR:
|
||||||
data->Pitch = mem_id->image.pitches[0];
|
data->Pitch = mem_id->image.pitches[0];
|
||||||
|
|
|
@ -65,6 +65,7 @@ static const struct fourcc_map gst_msdk_fourcc_mfx_to_va[] = {
|
||||||
#if (MFX_VERSION >= 1031)
|
#if (MFX_VERSION >= 1031)
|
||||||
FOURCC_MFX_TO_VA (P016, P016),
|
FOURCC_MFX_TO_VA (P016, P016),
|
||||||
FOURCC_MFX_TO_VA (Y216, Y216),
|
FOURCC_MFX_TO_VA (Y216, Y216),
|
||||||
|
FOURCC_MFX_TO_VA (Y416, Y416),
|
||||||
#endif
|
#endif
|
||||||
#if (MFX_VERSION >= 1028)
|
#if (MFX_VERSION >= 1028)
|
||||||
FOURCC_MFX_TO_VA (RGB565, RGB565),
|
FOURCC_MFX_TO_VA (RGB565, RGB565),
|
||||||
|
|
Loading…
Reference in a new issue