mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
msdk: set some parameters in mfxFrameData for a RGB16 frame
This commit is contained in:
parent
52b5a7e206
commit
f39bcd3920
2 changed files with 12 additions and 0 deletions
|
@ -312,6 +312,12 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
|
|||
data->B = data->R + 2;
|
||||
data->A = data->R + 3;
|
||||
break;
|
||||
case VA_FOURCC_RGB565:
|
||||
data->Pitch = mem_id->image.pitches[0];
|
||||
data->R = buf + mem_id->image.offsets[0];
|
||||
data->G = data->R;
|
||||
data->B = data->R;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
|
|
@ -113,6 +113,12 @@ ensure_data (GstMsdkSystemMemory * mem)
|
|||
mem->surface->Data.B = mem->surface->Data.R + 2;
|
||||
mem->surface->Data.Pitch = mem->destination_pitches[0];
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_RGB16:
|
||||
mem->surface->Data.R = mem->cached_data[0];
|
||||
mem->surface->Data.G = mem->surface->Data.R;
|
||||
mem->surface->Data.B = mem->surface->Data.R;
|
||||
mem->surface->Data.Pitch = mem->destination_pitches[0];
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue