mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
msdk: set some parameters in mfxFrameData for a MFX_FOURCC_AYUV frame
This commit is contained in:
parent
5a5d707cdd
commit
24d12a4abf
2 changed files with 20 additions and 0 deletions
|
@ -320,6 +320,15 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
|
|||
data->B = data->R;
|
||||
break;
|
||||
#endif
|
||||
case VA_FOURCC_AYUV:
|
||||
data->PitchHigh = (mfxU16) (mem_id->image.pitches[0] / (1 << 16));
|
||||
data->PitchLow = (mfxU16) (mem_id->image.pitches[0] % (1 << 16));
|
||||
data->V = buf + mem_id->image.offsets[0];
|
||||
data->U = data->V + 1;
|
||||
data->Y = data->V + 2;
|
||||
data->A = data->V + 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
|
|
@ -121,6 +121,17 @@ ensure_data (GstMsdkSystemMemory * mem)
|
|||
mem->surface->Data.Pitch = mem->destination_pitches[0];
|
||||
break;
|
||||
#endif
|
||||
case GST_VIDEO_FORMAT_VUYA:
|
||||
mem->surface->Data.V = mem->cached_data[0];
|
||||
mem->surface->Data.U = mem->surface->Data.V + 1;
|
||||
mem->surface->Data.Y = mem->surface->Data.V + 2;
|
||||
mem->surface->Data.A = mem->surface->Data.V + 3;
|
||||
mem->surface->Data.PitchHigh =
|
||||
(mfxU16) (mem->destination_pitches[0] / (1 << 16));
|
||||
mem->surface->Data.PitchLow =
|
||||
(mfxU16) (mem->destination_pitches[0] % (1 << 16));
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue