Commit 3c1940c1 authored by Sebastian Dröge's avatar Sebastian Dröge

videobox: Fix conversion from 3 byte RGB to ARGB

parent 687ff845
......@@ -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++) {
......
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