[Bug 739281] video-blend: fix blending of rectangles partially or fully outside of the video

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Nov 16 15:36:17 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=739281
  GStreamer | gst-plugins-base | unspecified

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|HEAD                        |1.5.1
            Summary|video-blend: correct        |video-blend: fix blending
                   |improper logic calculations |of rectangles partially or
                   |                            |fully outside of the video

--- Comment #44 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2014-11-16 23:36:08 UTC ---
Well, that patch to make xoff work for only those two formats is not going to
land like this, see comment #39, and it doesn't appear work to fix this
properly is in progress, so I don't think we should wait for that if we can
work around it trivially.

So I've fixed up the cropping on the left, and some other bits, made the test
valgrind clean, and added a visual test for all this.

I note that the unit test doesn't actually catch the fact that we're rendering
nonsense when the image is partially outside the video on the left hand side.

Oh well, let's just get this in:

commit 7f5aa9af04044373bf54536793c88aab3f7c8516
Author: Vineeth T M <vineeth.tm at samsung.com>
Date:   Mon Nov 10 12:12:42 2014 +0530

    tests: video: add video blend test

    Add test to check rendering of overlays of different sizes
    that are completely or partially outside the video surface.
    Once the overlay is blended to the video, verify if the
    position of the blended overlay is as expected, by comparing
    the pixels of the blended video with the expected values.

    https://bugzilla.gnome.org/show_bug.cgi?id=739281

commit 9032c12e690665a9b1f29ad014073261e7e6e799
Author: Vineeth T M <vineeth.tm at samsung.com>
Date:   Mon Nov 10 16:36:35 2014 +0530

    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

commit c61604fd9bff3b61870227d4ccd1a17683f4fa1d
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Sun Nov 16 01:32:55 2014 +0000

    tests: fix leak in video unit test

commit 07f254e4b2a049d02fca97810be5fd95bd39a662
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Sun Nov 16 01:34:09 2014 +0000

    tests: add visual overlay composition blending test

    Shows visual result of blending a logo on top of
    a video surface, esp. when the logo is partially
    outside of the video surface and needs to be
    clipped.

    https://bugzilla.gnome.org/show_bug.cgi?id=739281

commit 2fae23c3180edc77f08a57ad92f6c929624745cf
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Sun Nov 16 16:31:45 2014 +0000

    video-blend: fix allocation of temp src line for wide sources

    Fix allocation of temporary source line buffers for source
    images that are wider than the video overlay surface.

commit 9396d843d619560d85d6cf0f0e8f7c289c1d79b2
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Sun Nov 16 16:34:31 2014 +0000

    video-blend: fix clipping of overlay images on the left

    Fix clipping of images that are partially left of the video
    surface, they would get clipped on the right side instead of
    the left side, because the video unpack functions currently
    ignore the x offset parameter. Work around that until that
    is implemented.

    https://bugzilla.gnome.org/show_bug.cgi?id=739281

commit dc3d68d9c2873ccd69fe55f9cb576150e5752f10
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Sun Nov 16 19:28:54 2014 +0000

    tests: make overlay blending test slightly less boring

commit 5339e4507a430066bb2f497150a802aea3e8ca60
Author: Tim-Philipp Müller <tim at centricular.com>
Date:   Sun Nov 16 23:26:45 2014 +0000

    video-blend: minor optimisation

    Only need to run matrix on those pixels which
    will actually be used.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gstreamer-bugs mailing list