GNOME Bugzilla – Bug 700413
ximagesink: add alpha mask support
Last modified: 2013-05-16 10:40:50 UTC
Created attachment 244357 [details] [review] add alpha mask support When X screen return a depth = 32 with bpp = 24, the alpha mask be correctly set to have a known GST video format. X visual structure doesn't provide the aplha mask information but we can find it from the others masks. alpha_mask must also take care of little/big endian bit swap.
Is it really the case that depth=32,bpp=24 means there's an alpha channel? How do we differentiate an alpha channel being present from an unused padding byte for alignment purposes?
I have made a mistake in bug description, this patch is for depth=32 and bpp=32 (updated patch with correct values in header). In this case you need to have alpha mask to be sure to call gst_video_format_from_rgba32_masks in gst_video_format_from_masks function. I think depth=32,bpp=24 is not possible, and depth=24,bpp=32 (padding byte case) is already correctly handle.
Created attachment 244382 [details] [review] add alpha mask support for depth=32,bpp=32
commit 5da2bd3216cd067e720386b791509bf2f5222a1a Author: Benjamin Gaignard <benjamin.gaignard@linaro.org> Date: Thu May 16 10:52:29 2013 +0200 video: fix gst_video_format_from_masks() for little endian masks with alpha Need to byte-order swap the alpha mask as well in this case. https://bugzilla.gnome.org/show_bug.cgi?id=700413 commit 80e700a566cdfe03751a7e48ae7fe3b18d1c6fb6 Author: Benjamin Gaignard <benjamin.gaignard@linaro.org> Date: Thu May 16 10:52:29 2013 +0200 ximagesink: add support for 32-bit RGB with alpha mask When X screen return a depth = 32 with bpp = 32, the alpha mask must be correctly set to have a known GStreamer video format. X visual structure doesn't provide the alpha mask information, but we can find it from the others masks. https://bugzilla.gnome.org/show_bug.cgi?id=700413