mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
msdk: set correct parameters for BGRx frame
Otherwise when mapping BGRx frame onto CPU's memory, CPU will get wrong data for B, G, R components Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2205>
This commit is contained in:
parent
5835f2aa8d
commit
6750123d5c
2 changed files with 2 additions and 0 deletions
|
@ -110,6 +110,7 @@ ensure_data (GstMsdkSystemMemory * mem)
|
|||
mem->surface->Data.Pitch = mem->destination_pitches[0];
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_BGRA:
|
||||
case GST_VIDEO_FORMAT_BGRx:
|
||||
mem->surface->Data.B = mem->cached_data[0];
|
||||
mem->surface->Data.G = mem->surface->Data.B + 1;
|
||||
mem->surface->Data.R = mem->surface->Data.B + 2;
|
||||
|
|
|
@ -239,6 +239,7 @@ gst_video_meta_map_msdk_memory (GstVideoMeta * meta, guint plane,
|
|||
|
||||
switch (meta->format) {
|
||||
case GST_VIDEO_FORMAT_BGRA:
|
||||
case GST_VIDEO_FORMAT_BGRx:
|
||||
*data = mem->surface->Data.B + offset;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue