GNOME Bugzilla – Bug 745006
video-converter: Add frame 'alpha' property to video-converter
Last modified: 2015-02-24 16:31:30 UTC
Add alpha property to video-converter. This alpha value can be provided by client by adding it in config structure which is used while creating a new instance of the video-converter. While converting a video frame from source format to destination format (with alpha component), provided alpha value in conjunction with source alpha can be used to calculate alpha value of the destination format. Elements like alpha, videobox provide 'alpha' property. video-converter can be used directly in those elements for format conversions.
Created attachment 297754 [details] [review] add alpha property to video-converter Initial patch for AYUV -> BGRA conversion. Please review.
Comment on attachment 297754 [details] [review] add alpha property to video-converter >--- a/gst-libs/gst/video/video-format.h >+++ b/gst-libs/gst/video/video-format.h >@@ -251,7 +251,7 @@ typedef void (*GstVideoFormatUnpack) (const GstVideoFormatInfo *info, > GstVideoPackFlags flags, gpointer dest, > const gpointer data[GST_VIDEO_MAX_PLANES], > const gint stride[GST_VIDEO_MAX_PLANES], >- gint x, gint y, gint width); >+ gint x, gint y, gint width, guint alpha); Can't do that, it breaks API/ABI.
I'm working on a better patch
commit 5077a5e3af29071ae0ad88068942d91db9972ac0 Author: Wim Taymans <wtaymans@redhat.com> Date: Tue Feb 24 17:26:31 2015 +0100 video-converter: add alpha handling Add support for alpha. Make it possible to copy, set and multiply the alpha value of a frame during conversion. Set the border alpha to 0xff by default. Go over some of the fastpaths and add alpha handling. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=745006