mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
msdk: return a right pointer for Y410 when mapping a frame
This commit is contained in:
parent
ba24af0490
commit
9da737d6aa
2 changed files with 6 additions and 0 deletions
|
@ -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,
|
||||||
/* 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;
|
||||||
|
|
Loading…
Reference in a new issue