[Bug 668483] video: add support for global-alpha multiplicator for overlay rectangles

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Feb 23 05:47:46 PST 2012


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

Holger Kaelberer <hk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #205856|0                           |1
        is obsolete|                            |
 Attachment #206157|0                           |1
        is obsolete|                            |

--- Comment #5 from Holger Kaelberer <hk at getslash.de> 2012-02-23 13:47:40 UTC ---
Created an attachment (id=208266)
 View: https://bugzilla.gnome.org/attachment.cgi?id=208266
 Review: https://bugzilla.gnome.org/review?bug=668483&attachment=208266

Add support for global alpha multiplicator to video-blend and
gstoverlaycomposition interface

updated the patch


Now global_alpha is applied automatically in get_pixels*() unless requested
differently by caller.

Some notes:

- As proposed per-rectangle seq_num is updated automatically if global_alpha is
changed.

- The current implementation is 'optimized' for speed and saving memory. I
first tried an implementation integrating nicely into the internal caching of
preprocessed/scaled rectangles, meaning that after each application of
global_alpha the resulting pixel-data was added to the rectangle cache. This
turned out to be too inefficient in terms of CPU-usage and memory consumption
and made osd-fading pratically unusable in our application on STBs. Therefore I
kept caching only for scaled and un/premultiplied rectangle-data and
implemented the application of global_alpha to be done on the fly in
get_pixels_argb_internal() on the pixel-data per scaled rectangle. I think this
is reasonable as the need for caching of faded overlays is questionable.

This patch also fixes some issues in the current (now tested ;-) code that
handles GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA:
- crash ("double free") for the unscaled-case in
gst_video_overlay_rectangle_get_pixels_argb_internal()
- gst_video_overlay_rectangle_(un)premultiply(): use both the wrong channel for
alpha
- set FLAG_PREMULTIPLIED correctly when adding scaled-rects to cache
- evaluate FLAG_PREMULTIPLIED correctly when searching rect-cache

Thanks for reviewing,
  Holger

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


More information about the gstreamer-bugs mailing list