mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
video-overlay-composition: fix ayuv/argb conversion
Helps when using dvbsuboverlay in connection with vaapisink or some other video sink that wants ARGB pixels (dvbsuboverlay attaches pixels in AYUV format, and we then convert as needed). Alignment should not be a problem here.
This commit is contained in:
parent
8e4934820f
commit
95266cf212
1 changed files with 2 additions and 2 deletions
|
@ -1060,7 +1060,7 @@ gst_video_overlay_rectangle_convert (GstVideoInfo * src, GstBuffer * src_buffer,
|
|||
b = CLAMP (b, 0, 255);
|
||||
|
||||
/* native endian ARGB */
|
||||
*ddata = ((a << 24) | (r << 16) | (g << 8) | b);
|
||||
*(guint32 *) ddata = ((a << 24) | (r << 16) | (g << 8) | b);
|
||||
|
||||
sdata += 4;
|
||||
ddata += 4;
|
||||
|
@ -1075,7 +1075,7 @@ gst_video_overlay_rectangle_convert (GstVideoInfo * src, GstBuffer * src_buffer,
|
|||
for (k = 0; k < height; k++) {
|
||||
for (l = 0; l < width; l++) {
|
||||
/* native endian ARGB */
|
||||
argb = *sdata;
|
||||
argb = *(guint32 *) sdata;
|
||||
a = argb >> 24;
|
||||
r = (argb >> 16) & 0xff;
|
||||
g = (argb >> 8) & 0xff;
|
||||
|
|
Loading…
Reference in a new issue