Commit 32fce730 authored by Haihao Xiang's avatar Haihao Xiang Committed by Víctor Manuel Jáquez Leal

msdk: set parameters in mfxFrameData for a MFX_FOURCC_Y210 frame

parent c763a6f1
......@@ -347,6 +347,15 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
data->A = data->R;
break;
#endif
#if VA_CHECK_VERSION(1, 2, 0)
case VA_FOURCC_Y210:
data->Pitch = mem_id->image.pitches[0];
data->Y = buf + mem_id->image.offsets[0];
data->U = data->Y + 2;
data->V = data->Y + 6;
break;
#endif
default:
g_assert_not_reached ();
break;
......
......@@ -138,6 +138,12 @@ ensure_data (GstMsdkSystemMemory * mem)
mem->surface->Data.A = mem->surface->Data.R;
mem->surface->Data.Pitch = mem->destination_pitches[0];
break;
case GST_VIDEO_FORMAT_Y210:
mem->surface->Data.Y = mem->cached_data[0];
mem->surface->Data.U = mem->surface->Data.Y + 2;
mem->surface->Data.V = mem->surface->Data.Y + 6;
mem->surface->Data.Pitch = mem->destination_pitches[0];
break;
default:
g_assert_not_reached ();
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment