compositor: Copy frames as-is when possible
authorNirbheek Chauhan <nirbheek@centricular.com>
Thu, 13 Jun 2019 21:02:50 +0000 (02:32 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 9 Aug 2019 23:20:11 +0000 (00:20 +0100)
commit921417138f3c4c36b703e05f05ba69a42079bec6
tree04efce8d014c9ec482c791dd7ff03a583c934861
parentdd3e409ede55da6da0857deb29ad7e57d74f6e1c
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