From 3c1940c187a192aa0ea46ce2899acb6f9a61161c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 5 Apr 2010 17:31:36 +0200 Subject: [PATCH] videobox: Fix conversion from 3 byte RGB to ARGB --- gst/videobox/gstvideobox.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gst/videobox/gstvideobox.c b/gst/videobox/gstvideobox.c index 745885c9a8..9b8830c806 100644 --- a/gst/videobox/gstvideobox.c +++ b/gst/videobox/gstvideobox.c @@ -865,6 +865,17 @@ copy_rgb32 (guint i_alpha, GstVideoFormat dest_format, guint8 * dest, dest += dest_stride; src += src_stride; } + } else if (out_alpha && packed_in) { + for (i = 0; i < h; i++) { + for (j = 0; j < w; j++) { + dest[4 * j + p_out[0]] = i_alpha & 0xff; + dest[4 * j + p_out[1]] = src[in_bpp * j + p_in[1]]; + dest[4 * j + p_out[2]] = src[in_bpp * j + p_in[2]]; + dest[4 * j + p_out[3]] = src[in_bpp * j + p_in[3]]; + } + dest += dest_stride; + src += src_stride; + } } else if (!packed_out && !packed_in) { w *= 4; for (i = 0; i < h; i++) {