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

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Sep 28 05:30:11 PDT 2015


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

--- Comment #45 from Arnaud Vrac <rawoul at gmail.com> ---
I've updated the patches, they are rebased on master and are the same than on
my github dvdspu branch.

Jan, the PGS subtitles should look better now, can you confirm ?

The cache issue is still here, I haven't had time to fix it yet. I have some
numbers I got playing a DVD Rip as fast as possible, unfortunately they are not
good when blending:

$ time gst-launch-1.0 file://$PWD/12_MONKEYS.mkv ! matroskademux name=dmx
dmx.video_0 ! queue ! avdec_mpeg2video ! d.video dmx.subtitle_0 ! queue !
d.subpicture dvdspu name=d ! fakesink

blended AYUV overlay, with cache: 873.82s user 17.35s system 146% cpu 10:07.05
total
blended AYUV overlay, no cache:   893.13s user 57.03s system 142% cpu 11:05.09
total
blended ARGB overlay, with cache: 1191.11s user 17.00s system 130% cpu 15:23.82
total
blended ARGB overlay, no cache:   1210.60s user 53.36s system 129% cpu 16:19.72
total
no overlay (direct blending):     445.42s user 19.90s system 246% cpu 3:09.12
total

So the new code is much slower when using the generic blending code. Most of
the time is spent in gst_video_blend, and also converting ARGB to YUV before
blending when the overlay is rendered to ARGB. I don't think we can ever match
the original performance, since it is highly optimised for the blending YUV to
YUV use case. I see multiple things that could be improved:

 - keep the old code path for blending. This could make the code pretty
complicated though.
 - crop the overlay rectangles to only contain visible pixels. This could be
done in two ways:
    * with GstCropMeta, unfortunately the overlay code does not account for
this meta.
    * by tweaking the overlay GstVideoMeta width, height and plane offset. We
must make sure the alignment is correct though.

Caching doesn't help much when blending, since rendering the overlay is fast
compared to the blending operation.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the gstreamer-bugs mailing list