Chroma key (green/blue screen) blending

Sebastian Dröge sebastian at centricular.com
Wed Jan 15 10:20:48 PST 2014


On Mi, 2014-01-15 at 12:47 -0500, Nicolas Dufresne wrote:
> Le mercredi 15 janvier 2014 à 17:20 +0100, Sebastian Dröge a écrit :
> 
> > I would recommend converting to a video format with alpha channel with
> > videoconvert before the alpha element if that is a concern.
> 
> Sorry, didn't saw your reply, really ? I thought we had some code in
> alpha to be more efficient doing that ? I guess you know more then me on
> that, though I'll inform the PiTiVi GES people, measurement would be
> nice.

I didn't do any measurements but the code in alpha is plain C while
videoconvert uses ORC. But going over all pixels twice instead of once
might make alpha faster in the end. Nonetheless videoconvert is properly
handling (or could at least, there were some changes in the fast paths
recently) the chroma siting and de-subsampling of the chroma plane while
alpha is not doing that.

If videoconvert ! "video/x-raw,format=ARGB" ! alpha is better or not
probably depends on your requirements.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140115/d175e527/attachment.pgp>


More information about the gstreamer-devel mailing list