XBMC Project Implements AMD XvBA Interface

Written by Michael Larabel in AMD on 14 December 2011 at 04:31 PM EST. 45 Comments
AMD
The XBMC multimedia project has implemented AMD's XvBA interface directly for providing video hardware acceleration for Radeon and Fusion graphics processors.

While AMD's XvBA interface has had a bumpy history to say the least, right now it's barely moving. For the past two years there's been the VA-API library wrapper to XvBA so that this AMD video acceleration API can be used by VA-API-supportive Linux programs, but even that has fallen into an unmaintained state since its lead developer left for Intel.

At first X-Video Bitstream Acceleration wasn't even documented publicly but this VA-API front-end library was the only choice. Fortunately, they changed ways earlier this year and became more open about XvBA -- something where NVIDIA was more open from the get-go with their Video Decode and Presentation API for Unix (VDPAU).

While XvBA is now "open", it's seen no major implementations yet by the leading open-source multimedia projects. That, however, has changed as XBMC has implemented XvBA support with the xvba-va-driver wrapper having fallen into disrepair.

Unfortunately, even with the latest Catalyst Linux driver, the XvBA video support there still can be buggy at times. Regardless, it's nice to see a direct XvBA implementation from one of the most popular Linux HTPC projects.

Below is the email I received from one of the XBMC developers about this newly-introduced support, which adds more detail for interested XBMC users with AMD graphics hardware.
Hello Phoronix-Team,

As a long time phoronix reader i followed the AMD driver, AMD UVD, xvba discussions. As xvba-va-driver wrapper development stopped in June this year and all-over performance and stability did not really impress the users, we implemented direct xvba support for xbmc. We started with the ffmpeg part, VC-1 and h264 and later implemented the callback infrastracture and management within xbmc. In order to use our code you just have to install AMD linux driver (fglrx >= 11.11), no more wrapper, etc. is needed.

We are proud to announce, that there now exists an xbmc-pvr build(1) and already an openelec build (2) for AMD Fusion Hardware. User feedback is really nice for now. See also the phoronix link above.

What you get:
There are great improvements over xvba-va-driver in stability, performance and robustness. (3)

H264, VC-1 decoding support including smooth 24p playback.

What does not work:
H264 with Level >= 5.1 (artefacts, etc.)
Shared Surfaces are a bit unstable, but workaround integrated.

What we will do for the future:
Implement MPEG-2 (if we get in real contact with AMD)
Use H264 Level 5.1 (if AMD tells us how to do)
Fix issues from above (if AMD tries to help us)

The development was started and organized by chief developer Rainer Hochecker (Fernetmenta) (H264, huge part of xbmc integration), Peter Frühberger (fritsch) (VC1, bugfixes, (mpeg-2)). PPA Packages and Testing was done by Wolfgang Schupp (wsnipex).

Ubuntu Packages are already available:
https://launchpad.net/~wsnipex/+archive/xbmc-xvba

There is still some work to do, but this currently hangs at AMD driver. There is a problem with deinterlacing, so using Shared Surfaces gets unstable, we worked around it by doing deinterlacing through opengl. Next problem with the driver is, that it currently only support H264 - Level 4.1 on Linux, Windows is already having 5.1 support. The documentation for mpeg-2 bitstream support in xvba-sdk is not really detailed so we did not get it working for now.

If you are interested in a just working solution for htpc with HD decoding capabilities on AMD hardware, just give it a try.

Nice day to you all

Peter Frühberger

1) https://github.com/FernetMenta/xbmc/commits/xvba
2) http://openelec.tv/forum/28-issue-reports/19234-xvba-support-thread?limit=20&start=20
3) http://phoronix.com/forums/showthread.php?33853-AMD-Zacate-E-350
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week