For years, video acceleration on Linux and Unix-like systems has been possible only through the X Video Motion Compensation (XvMC) API. A new, more modern replacement is in the works: the Video Acceleration API (VA API). XvMC offered a way for applications to partially offload decoding of MPEG-2-encoded video directly to the video card's graphics processing unit (GPU), which provided more speed and a smoother display when compared to processing on the system CPU. VA API will add more video formats to the accelerated decoding pipeline, as well as video encoding and post-processing.
Applications can use XvMC to save CPU cycles and reduce power consumption, but the API is extremely limited: it only supports MPEG-2 video, and only offloads the motion compensation calculations. On the other hand, XvMC is supported by a wide range of video hardware from different manufacturers, current and legacy. X developers talked about extending XvMC to support other formats and to add more steps in the video decoding process — such as the costly inverse discrete cosine transform (iDCT), but eventually decided to write a new API from the ground up.
The VA API project was launched in December of 2006, spearheaded by Jonathan Bian from Intel. Initially, the API only attempted to cover video decoding, adding support for the VC-1 codec, and adding iDCT and variable-length decoding (VLD or "slice-level acceleration") to the techniques offloaded to the GPU. The specification subsequently added MPEG-4 ASP/H.263 and MPEG-4 AVC/H.264 to the list of supported codecs, and acceleration hooks for deblocking and inverse zigzag ordering (IZZ). VA API has also been designed to handle color space conversion, gamma correction, scaling, and other video processing techniques traditionally handled by the X video extension (Xv) rather than XvMC itself.
The most recent revision of the specification is 0.30, released in March of 2009, more than a year after the release of 0.29. 0.30 introduces a major new feature to the API: hardware acceleration for video encoding. The encoding support supports multiple codecs; currently H.263, H.264, and generic MPEG-4 are specified.
In addition to the specification, the project produces libVA, an implementation library targeting Linux systems. Using libVA requires supported hardware and a supported video driver, however, which has historically been the sticking point. VA API is maintained by a team at Intel: Bian, Austin Yuan, and Waldo Bastian. Despite calls for input and outside participation, the competing GPU manufacturers have not contributed, each preferring to put effort into its own hardware video acceleration project. NVIDIA has the Video Decode and Presentation API for Unix (VDPAU), and ATI has X-Video Bitstream Acceleration (XvBA). Thus, the only Linux video driver that natively supports VA API is Intel's own (closed source) psb-video, for its Poulsbo chipset, which is aimed at low-power devices like netbooks and features the GMA500 GPU.
The single-vendor problem began to turn around in late 2008, when embedded systems vendor Splitted-Desktop Systems (SDS) decided to adopt VA API for some of its Linux-based low-power boxes. SDS's Gwenole Beauchesne developed bridge code to use VDPAU and XvBA as back-ends for VA API, bringing support for the API to NVIDIA and ATI card owners. Neither VDPAU nor XvBA support the entire product range from either manufacturer, of course, and both vendor APIs are limited in scope — neither supports encoding acceleration, and VDPAU does not support MPEG-4 ASP/H.263.
Taking advantage of this work requires a VDPAU- or XvBA-supported video card, a VDPAU- or XvBA-enabled driver, and a patched version of libVA. Beauchesne's patches to libVA add fields to VA API's control structures to pass parameters down to the VDPAU and XvBA back-ends. He publicly maintains a patch set at SDS in addition to patched libVA packages while the changes await upstream integration.
To use Beauchesne's bridge work for an NVIDA card a user would need to install his patched libVA library, the vdpau-video package that links VA API calls to VDPAU API calls, and a video driver that implements VDPAU. Thus far, only the binary nvidia driver from NVIDIA implements VDPAU, not the free nv driver from X.org. Similarly, an ATI user would need the patched libVA, the xvba-video bridging package, and a Radeon driver that implements XvBA — currently only the closed source fglrx.
Regardless of the chipset or driver used, it is impossible to see the benefits of VA API if the application does not support it. Fortunately, open source video projects are beginning to take a look. "Official" support is currently limited; RealPlayer for Mobile Devices is designed for Poulsbo-based hardware, and thus to take advantage of VA API through libVA and the psb-video driver. Likewise, closed source codec vendor Fluendo makes specialized builds of its GStreamer codecs for Poulsbo devices that will use VA API. Users with NVIDIA or ATI GPUs would not gain hardware acceleration with either product because neither uses the patched version of libVA compatible with the VDPAU and XvBA back-ends.
Fortunately, Beauchesne provides patched versions of MPlayer and FFmpeg, making this the simplest way to experience hardware acceleration on desktop Linux systems. Build notes are included. The VA API-accelerated MPlayer will work with any back-end: VDPAU for NVIDIA, XvBA for ATI, or native Poulsbo drivers for Intel. Beauchesne has sent his patches upstream, but it is not yet clear when MPlayer or FFmpeg will include VA API in official releases.
VLC has added VA API support in its development branch, and a patch is available through the developers' mailing list that adds support to current releases. MythTV can be patched to support VDPAU, but thus far there has been no work on supporting VA API. It is possible, however, to set up MythTV to use MPlayer as a video playback engine, so it would be possible to leverage Beauchesne's patched version of MPlayer that way.
Benchmarks comparing VA API-accelerated decoding to CPU-based decoding are available from several sources. Beauchesne has run multiple comparisons on different systems: Opteron, Phenom, and Atom processors, and NVIDIA, ATI, and Intel GPUs, all using MPlayer. Jean-Baptiste Kempf has run real-world tests on the VA API-enabled version of VLC. The difference in CPU utilization can be dramatic; the CPU has little to do other than pass the compressed bits to the GPU. Beauchesne's numbers report CPU utilization between 66.3 and 98.4 percent for unaccelerated video playback, and as low as 0.6 percent with VA API acceleration.
Beauchesne said he hopes to see more applications take an interest in VA API, noting that the average desktop user only benefits from it when the players adopt it. He added that he had tried to add VA API support to the open source Flash decoder Gnash, but eventually abandoned the effort because the peculiarities of the Flash format (such as requiring all pixels to be converted to RGB24) sapped away most of the gains of hardware acceleration.
On the specification side, Bian echoed Beauchesne's sentiment, hoping that more developers would take an interest in contributing to the work. "Many aspects of the API could benefit from video application developer inputs ... as the app developers are ultimately the consumers of the API." Beauchesne's patches are an example of that, he said. Yuan added that moving the libVA code to Freedesktop.org's public Git repository should streamline the process for integrating contributions from outside Intel.
Video encoding is new to the specification, but has not been tested in the wild; that is expected to happen when Intel releases its Moorestown mobile platform late in 2009. Bian indicated that more video post-processing filters may make it into the next revision, and Beauchesne added that he would like VA API to support rendering directly to an OpenGL texture, as this would allow it to work with Clutter.
The bigger news is that Intel plans to launch a VA API-supporting driver for additional graphics chips. According to Bian and Yuan, the G45 chipset is next. G45 is a Core 2 chipset introduced in 2008, and already found in a variety of products, including desktop motherboards.
Still, at the moment the only "native" VA API video drivers are Intel's Poulsbo driver and S3's Chrome driver, neither of which is open source. Although Beauchesne's bridge code for VDPAU and XvBA is open source, both rely on the binaries drivers provided by NVIDIA and ATI to implement VDPAU and XvBA, respectively.
The open source RadeonHD and Nouveau drivers are not pursuing hardware video acceleration, through VDPAU, XvBA, or VA API. Gallium3D is another possibility for purely open source drivers, although developer Younes Manton said that VDPAU was the current focus of his attention.
Searching through the mailing lists, IRC logs, and discussion forums of Linux video applications reveals that a "wait and see" attitude was taken by most projects during the first year or so of VA API development. Some of that is, no doubt, caution that would be taken towards any entirely new API; perhaps some of it is attributable to the perception that VA API was an Intel-only project or at best fated to duke it out against VDPAU and XvBA until one of them becomes dominant. VA API is the only hardware video acceleration standard open to all vendors and with the advent of bridging code for NVIDIA and ATI it is finally possible to see its effects on desktop systems. Hopefully that bodes well for its continued development as a standard.
Database Softwareannounced. "This is the first release candidate of the Firebird version 2.1.3 patch release. It is a BETA whose purpose is for FIELD TESTING. It is recommended that you test it before deploying it into production." MySQL 5.1.36 is recommended for use on production systems." Bear in mind that this is a beta release, and as with any other pre-production release, caution should be taken when installing on production level systems or systems with critical data. For production level systems using 5.1, we would like to direct your attention to the product description of MySQL Enterprise". This release contains an abundance of enhancements to make administering, querying, and programming of PostgreSQL databases easier than ever before. With 293 new or improved features in version 8.4, there are even more reasons to choose PostgreSQL for your next project." See the announcement (click below) for a list of the most interesting new features.
Web Site DevelopmentNagare is a components based framework: a Nagare application is a composition of interacting components each one with its own state and workflow kept on the server. Each component can have one or several views that are composed to generate the final web page. This enables the developers to reuse or write highly reusable components easily and quickly."
Audio ApplicationsArdour multi-track audio recorder project. First, Goings-on (3.0 and 2.X): "There hasn't been a lot to report around here recently, but thats not because nothing is happening. Instead, a furious slew of changes have been under development for 3.0, including some really fantastic new designs to aid workflow in many different situations. Carl Hetherington has been working at a furious pace and has not only fixed a lot of small bugs in both 3.0 and 2.X, but has radically overhauled the handling of preferences, and changed the basic design of edit/mix groups to provide a much more flexible, simple and convenient system. Meanwhile, I (Paul) have been busy completely altering the design of Ardour's internal signal flow to allow several things that we've wanted to implement for a long time." The project also needs more funding, see the Financial Support Issues note for details.
Music Applicationsgdigi has been announced. "Control your Digitech effect pedal under Linux! gdigi is tool aimed to provide X-Edit functionality to Linux users Supported devices (list misses your DigiTech device? Please get in touch!): * RP250 * RP500 * GNX3000 * GNX4K" Release 0.04.6-1 comes with some major changes: * Build environment and source code changes: - use of the python based waf build system. - use of the boost library for command line options. - various code cleanups and source tree restructuring All this has been done by our new project member James Warden." SuperCollider is an environment and programming language for real time audio synthesis and algorithmic composition. It provides an interpreted object-oriented language which functions as a network client to a state of the art, realtime sound synthesis server. The new release, 3.3.1, includes various minor updates to 3.3 (the most signficant changes being for mac users)."
Office ApplicationsWhile I was away on my family vacation, the SyncEvolution branch with the new GTK GUI and various other improvements was published as part of the Moblin 2.0 beta release. Since then we have added some minor fixes and improvements and later released the source as SyncEvolution 0.9 beta 2. Several developers are working on it now, so 0.9 is fairly close to being released. The design for the next big step, direct synchronization with mobile devices via a "personal" SyncML server, is already vailable for discussion."
Web BrowsersFirefox 3.5 has been under development for the past year, contains many new exciting features for users and web developers, and is our fastest Firefox release ever."
Languages and Tools
C++I am pleased to report that if you configure gcc with --enable-build-with-cxx, which causes the core compiler to be built using a C++ compiler, a bootstrap on x86_64-unknown-linux-gnu now completes. I would like to encourage people to try using --enable-build-with-cxx in other configuration--other bootstraps, cross-compilers--to see how well it works. Please let me know if you run into problems that you don't know how, or don't have time, to fix."
PHPannounced. "This release is a major improvement in the 5.X series, which includes a large number of new features and bug fixes. Some of the key new features include: namespaces, late static binding, closures, optional garbage collection for cyclic references, new extensions (like ext/phar, ext/intl and ext/fileinfo), over 140 bug fixes and much more."
PythonMDP is a Python library of widely used data processing algorithms that can be combined according to a pipeline analogy to build more complex data processing software. The base of available algorithms includes, to name but the most common, Principal Component Analysis (PCA and NIPALS), several Independent Component Analysis algorithms (CuBICA, FastICA, TDSEP, JADE, and XSFA), Slow Feature Analysis, Restricted Boltzmann Machine, and Locally Linear Embedding." released. "Python 3.1 focuses on the stabilization and optimization of the features and changes that Python 3.0 introduced. For example, the new I/O system has been rewritten in C for speed. File system APIs that use unicode strings now handle paths with undecodable bytes in them. Other features include an ordered dictionary implementation, a condensed syntax for nested with statements, and support for ttk Tile in Tkinter." For more information on what else is in the release, see "What's New In Python 3.1". timelib is a short wrapper around php's internal timelib module. It currently only provides two functions for parsing textual date descriptions".
Version ControlWe discovered a couple of bugs in the 1.16 release that we simply had to fix now. As such..."
Page editor: Forrest Cook
Next page: Linux in the news>>
Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds