msdk: set parameters in mfxFrameData for a MFX_FOURCC_Y410 frame

This commit is contained in:
Haihao Xiang 2019-05-31 15:37:51 +08:00 committed by Víctor Manuel Jáquez Leal
parent bc3a43bdb4
commit 84a46f04a7
2 changed files with 9 additions and 0 deletions

View file

@ -356,6 +356,10 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
data->U = data->Y + 2;
data->V = data->Y + 6;
break;
case VA_FOURCC_Y410:
data->Pitch = mem_id->image.pitches[0];
data->U = buf + mem_id->image.offsets[0]; /* data->Y410 */
break;
#endif
default:

View file

@ -144,6 +144,11 @@ ensure_data (GstMsdkSystemMemory * mem)
mem->surface->Data.V = mem->surface->Data.Y + 6;
mem->surface->Data.Pitch = mem->destination_pitches[0];
break;
case GST_VIDEO_FORMAT_Y410:
mem->surface->Data.U = mem->cached_data[0]; /* Data.Y410 */
mem->surface->Data.Pitch = mem->destination_pitches[0];
break;
default:
g_assert_not_reached ();
break;