video-blend: fix blending of rectangles partially or fully outside of the video
authorVineeth T M <vineeth.tm@samsung.com>
Mon, 10 Nov 2014 11:06:35 +0000 (16:36 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 16 Nov 2014 13:55:22 +0000 (13:55 +0000)
commit9032c12e690665a9b1f29ad014073261e7e6e799
tree44361372690bfeaca4761cf1cb04b59a6ccdcdc9
parent7f5aa9af04044373bf54536793c88aab3f7c8516
video-blend: fix blending of rectangles partially or fully outside of the video

In case of overlay being completely or partially outside
the video frame, the offset calculations are not right,
which resulted in the overlay not being displayed as
expected, or crashes due to invalid memory access.

When the overlay rectangle is completely outside,
we need not render the overlay at all.

For partial display of overlay rectangles, src_yoff
was not being calculated, hence it was always clipping
the bottom half of the overlay, By calculating the
src_yoff, now the overlay is clipped properly.

https://bugzilla.gnome.org/show_bug.cgi?id=739281
gst-libs/gst/video/video-blend.c