← Back to team overview

elementary-dev-community team mailing list archive

Re: VA-API in Audience/elementary?

 

There is hardware acceleration of video playback on several levels. I
assume you mean offloading stream decoding to the GPU in this context,
because other means of acceleration were implemented quite a while
ago.

Hardware acceleration of video decoding has been possible in GStreamer
0.10 (e.g. it works like that on my maemophone), but this never was
widely used. GStreamer 1.0 supports hardware acceleration with VA-API
more or less out of the box.

However, the main problem here is not the media players but in the GPU
drivers. Only Intel driver provides VA-API acceleration and only on
recent GPUs.

Nvidia's binary blob provides VDPAU acceleration, which is not
leveraged by GStreamer at this point (though some monolithic players
seem to be able to use it). However, this is being actively worked on
in GStreamer.

The situation with other drivers is much worse:
Nouveau does not provide any decoding acceleration yet (they're still
reverse-engineering the relevant GPU unit).
AMD binary blob has yet-another-acceleration-api, but it's
undocumented and doesn't even work properly (see
http://www.phoronix.com/scan.php?page=article&item=amd_xvba_xbmc&num=1)
Open-source AMD (r600g) driver provides video decoding acceleration
but it works only for full-screen playback and not for all codecs.
It's also rather inefficient because AMD does not provide
documentation on the dedicated video decoding engine out of fear of
compromising Digital Right Mismanagement on an OS sold by a certain
small and soft corporation, so the decoder uses GPU shaders instead.

Generally speaking, it's very hard for modular backends like GStreamer
those monolithic backends like MPlayer. In MPlayer you can easily
change how the whole thing works relatively easily. In GStreamer you
have to redesign the whole thing, come up with new APIs that suit
everybody, rewrite all plugins for the API change... so MPlayer and
VLC always will be one step ahead in low-level features. On the other
hand they're rather inflexible; for example, it's very hard if not
impossible to implement Audience's pop-up preview using MPlayer as a
backend.

But we shouldn't concern ourselves with those monolithic backends at
all because we can't ship any of them due to some legal crap with
libavcodec.

--
Sergey "Shnatsel" Davidoff
OS architect @ elementary


References