mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
msdk: set parameters in mfxFrameData for a MFX_FOURCC_Y210 frame
This commit is contained in:
parent
c763a6f157
commit
32fce730ed
2 changed files with 15 additions and 0 deletions
|
@ -347,6 +347,15 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
|
||||||
data->A = data->R;
|
data->A = data->R;
|
||||||
break;
|
break;
|
||||||
#endif
|
#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:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -138,6 +138,12 @@ ensure_data (GstMsdkSystemMemory * mem)
|
||||||
mem->surface->Data.A = mem->surface->Data.R;
|
mem->surface->Data.A = mem->surface->Data.R;
|
||||||
mem->surface->Data.Pitch = mem->destination_pitches[0];
|
mem->surface->Data.Pitch = mem->destination_pitches[0];
|
||||||
break;
|
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:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue