A NVIDIA VDPAU Back-End For Intel's VA-API

Written by Michael Larabel in Display Drivers on 3 February 2009 at 03:50 AM EST. Page 1 of 1. 12 Comments.

Just over a month ago we shared that patches had emerged to support Intel's VA-API in MPlayer and FFmpeg. VA-API supports popular video formats such as MPEG-4 and VC-1 and is able to accelerate IDCT, Motion Compensation, LVC, bit-stream processing, and other functions, but this video API has not picked up much speed yet. The only display driver to have implemented support for VA-API in the hardware is Intel's closed-source driver (the one that's a bloody mess) for the Poulsbo chipset, which is found in a few select netbooks/nettops. However, it is now possible to use Intel's VA-API with NVIDIA hardware (the GeForce 8 series and later) and soon will be possible to use this video API on ATI/AMD hardware too.

Gwenolé Beauchesne is the developer working for Splitted Desktop Systems who had written the VA-API patches back in December for MPlayer and FFmpeg. However, his latest Video Acceleration API hacking has led him to write a VDPAU back-end for VA-API. By allowing VDPAU (the Video Decode and Presentation API for Unix) to operate underneath VA-API, it's now possible for video playback to be accelerated using VA-API on NVIDIA hardware. NVIDIA had introduced VDPAU to their drivers last year in order to bring PureVideo features to Linux. Our VDPAU benchmarks very pleasing with the ability to use a $20 CPU and $30 GPU to play HD videos with ease. This NVIDIA API has already worked its way into the code for MPlayer, FFmpeg, MythTV, Xine, and support for VLC is underway.

VDPAU is already supported in more media players than VA-API, so at this time using VA-API on NVIDIA hardware will not be strikingly beneficial. However, Canonical has been working on bringing VA-API support into the Helix framework for their Mobile & Embedded Media Player, which is an area where VDPAU currently has no support. NVIDIA's driver requires GeForce 8 series hardware or newer in order to utilize PureVideo and only some select GeForce graphics cards are able to use VDPAU with the VC-1 format.

Gwenolé has not only been writing a VDPAU back-end for the VA-API, but he has also been starting work on a back-end for XvBA. XvBA, or X-Video Bitstream Acceleration, is the video acceleration API that is being worked on by AMD. It was supposed to have been introduced in their Catalyst Linux driver a few months back, but it has yet to be seen by the public. With it not being officially supported in the Catalyst Linux driver and no media players yet implementing the XvBA API, AMD also has not released any documentation or header file for XvBA. In fact, the only publicized information on XvBA has come out through Phoronix. Gwenolé has mentioned that his XvBA back-end for VA-API will not be open-source. If that is signaling he is already working with AMD on this support, it is a very unfortunate sign that XvBA will not be as open-source friendly as anticipated and not even as open as NVIDIA's VDPAU API. If that is indeed the case, well, long live VA-API and VDPAU.

The VDPAU back-end for VA-API is right now about 3,100 lines of code. In order to support VA-API with a VDPAU or XvBA back-end, a slightly modified version of the VA-API library is required. A few changes are required in libva for the VDPAU and XvBA support to be implemented. Gwenolé Beauchesne had split libva for core and display interfaces, allow the X11 back-end to gather driver information through GLX, improved the detection of the NVIDIA driver, added in extra H.264 information for the VDPAU back-end, added a compatibility layer with upstream libva 0.29 buffers, added in extra VC-1 information for the VDPAU back-end, and an API change in one of the VA-API elements. The VA-API changes are available in patch form so they could easily work their way back into the mainline VA-API code-base, but that has yet to occur.

To download the source-code for the revised libva, mplayer-vaapi, and the VDPAU VA-API back-end, visit Splitted-Desktop.com.

If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.


Related Articles
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.