compositor: Copy frames as-is when possible
authorNirbheek Chauhan <nirbheek@centricular.com>
Thu, 13 Jun 2019 21:02:50 +0000 (02:32 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Thu, 13 Jun 2019 21:20:51 +0000 (02:50 +0530)
commitabd80b6561a83bbbc9b54482c146df54b13a8b11
tree62d139e208360e0bdaac69b7a550f5f8e197bc57
parenteaade964092b1dc35f2a1fd9a38b85bbec62a9a5
compositor: Copy frames as-is when possible

The blend functions for alpha formats need to do more work than just
doing a memcpy, so we can do a memcpy when we know that a blend is not
actually needed.

1080p AYUV ! compositor background=transparent ! fakesink - 56% faster

Specifically, when we don't draw the background and the first pad we
draw completely covers the output frame, we can just copy it as-is.
The rest of the pads (if any) will get composited on top normally.
gst/compositor/compositor.c