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

msdk: return a right pointer for Y410 when mapping a frame

parent ba24af04
...@@ -231,6 +231,10 @@ gst_msdk_system_memory_map_full (GstMemory * base_mem, GstMapInfo * info, ...@@ -231,6 +231,10 @@ gst_msdk_system_memory_map_full (GstMemory * base_mem, GstMapInfo * info,
/* The first channel in memory is V for MFX_FOURCC_AYUV (GST_VIDEO_FORMAT_VUYA) format */ /* The first channel in memory is V for MFX_FOURCC_AYUV (GST_VIDEO_FORMAT_VUYA) format */
if (mem->surface->Info.FourCC == MFX_FOURCC_AYUV) if (mem->surface->Info.FourCC == MFX_FOURCC_AYUV)
return mem->surface->Data.V; return mem->surface->Data.V;
#if (MFX_VERSION >= 1027)
else if (mem->surface->Info.FourCC == MFX_FOURCC_Y410)
return mem->surface->Data.U; /* Data.Y410 */
#endif
else else
return mem->surface->Data.Y; return mem->surface->Data.Y;
} }
......
...@@ -238,6 +238,8 @@ gst_video_meta_map_msdk_memory (GstVideoMeta * meta, guint plane, ...@@ -238,6 +238,8 @@ gst_video_meta_map_msdk_memory (GstVideoMeta * meta, guint plane,
/* The first channel in memory is V for GST_VIDEO_FORMAT_VUYA */ /* The first channel in memory is V for GST_VIDEO_FORMAT_VUYA */
if (meta->format == GST_VIDEO_FORMAT_VUYA) if (meta->format == GST_VIDEO_FORMAT_VUYA)
*data = mem->surface->Data.V + offset; *data = mem->surface->Data.V + offset;
else if (meta->format == GST_VIDEO_FORMAT_Y410)
*data = mem->surface->Data.U + offset; /* Data.Y410 */
else else
*data = mem->surface->Data.Y + offset; *data = mem->surface->Data.Y + offset;
*stride = pitch; *stride = pitch;
......
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