[Bug 685282] dvdspu: figure out how to make it work with hardware decoders and subpicture overlays

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Sep 2 06:17:13 PDT 2013


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

Arnaud Vrac <rawoul> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rawoul at gmail.com

--- Comment #1 from Arnaud Vrac <rawoul at gmail.com> 2013-09-02 13:17:10 UTC ---
I've ported dvdspu to use the GstVideoOverlayComposition API, and I'd like some
feedback. The patches work well on my side for either PGS or VobSub formats,
using a hardware renderer for composition or by blending the overlay directly
in the video frames.

Note that I'm using an ARGB overlay. I agree that usually video is YUV so it
would be faster to use an AYUV overlay for blending, however in my case I can
only use ARGB for hardware composition, and there is currently no way to
negotiate the supported overlay formats with the downstream elements.

Right now a single overlay rectangle is allocated, and the SPU objects are
rendered inside this rectangle. The size of the rectangle is made minimal on
purpose: instead of allocating the full overlay size, only the surface of the
cropped objects is allocated to minimize memory usage. So coordinates of the
rendered objects are translated to match the rectangle position in the overlay.

The patch also changes how coordinates of the SPU are calculated against the
video frame. Usually in BD or DVD rips, black borders are removed and video
might be scaled with the same aspect ratio. However, the SPU data is not
corrected to account for the black borders removal or the scaling. In this case
the SPU data was not rendered correctly (see Bug #663750). This patch tries to
fix that by calculating the scaling/translation necessary to render the overlay
as intended in the original content. The scaling can be done easily using the
overlay composition API. When playing a DVD these heuristics are a noop since
the video frame size matches the overlay size.

Interlacing should be handled transparently by the overlay composition API so
Bug #667224 should be fixed too.

The performance level and memory usage should not be too far from the previous
implementation, since before there were intermediate buffers for A/U/V
blending.

Performance could be improved a lot by caching the overlay composition, I'm not
sure how to do that yet.

-- 
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