msdk: set some parameters in mfxFrameData for a MFX_FOURCC_A2RGB10 frame

This commit is contained in:
Haihao Xiang 2019-03-21 16:14:47 +08:00 committed by Víctor Manuel Jáquez Leal
parent c40ecbe7f5
commit 21f07e95f5
2 changed files with 14 additions and 2 deletions

View file

@ -331,7 +331,13 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
data->Y = data->V + 2;
data->A = data->V + 3;
break;
case VA_FOURCC_A2R10G10B10:
data->Pitch = mem_id->image.pitches[0];
data->R = buf + mem_id->image.offsets[0];
data->G = data->R;
data->B = data->R;
data->A = data->R;
break;
default:
g_assert_not_reached ();
break;

View file

@ -131,7 +131,13 @@ ensure_data (GstMsdkSystemMemory * mem)
mem->surface->Data.PitchLow =
(mfxU16) (mem->destination_pitches[0] % (1 << 16));
break;
case GST_VIDEO_FORMAT_BGR10A2_LE:
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.A = mem->surface->Data.R;
mem->surface->Data.Pitch = mem->destination_pitches[0];
break;
default:
g_assert_not_reached ();
break;