The state of GPU assisted HD video decoding

Posted on Monday, May 11, 2009 by Erlik

Many GPU (graphic Processing Unit) manufacturers like to promote the video decoding capabilities of their products, and for good reason as decoding HD video is one of the most processing intensive tasks that a typical computer will have to perform. Most HD video is encoded with the H264 codec, which provides excellent image quality and compressions ratios, but requires much more processing power to decode than older codecs like DivX, Xvid and MPEG2.

It is very interesting to have as much as possible of the HD video decoding work performed by the GPU instead of CPU in a computer because this allows you to keep an old computer in usage and allows for a cooler and quieter computer as a GPU typically produce less heat than a CPU during HD video decoding. Also GPU assisted HD video decoding usually produce a smoother image and animation, as the decoding processing is not perturbed by other processes requesting CPU time such as virus scanners etc...

The level of video processing that will effectively be taken over from your CPU varies dramatically not only based on your GPU itself but also based on the decoding software you use. To simplify things we will divide the amount of work performed by the GPU in 3 levels:

1) Scaling and rendering: one of the most intensive tasks when rendering video on a computer screen is to scale the image to the resolution of the monitor. If the program just add or removes lines the result will look ugly with jagged lines. To avoid this GPUs perform bicubic scaling: a process that smooths the image scaling at the cost of extra processing. All GPUs manufactured in the last 10 years have these capabilities. All OS also have this. In Linux this is performed by the Xvideo renderer.

2) iDTC and motion compensation acceleration: Most video codecs since MPEG2 uses these 2 functions as part of the compression process. Since these consume a significant amount of CPU, HD video decoding performance is improved and uses less CPU if these operations are performed in the GPU. All GPUs from the last 5 years have this capability (even recent intel integrated GPUs) but not all software can take advantage of it. On Windows, most software able to use DirectX video acceleration can use this. This includes most DVD playing software as well as most free media players such as Smplayer, VLC media player and media player classic. On the Linux side, most video drivers implement these function as XVMC, a standard also supported by most video players, however acceleration is limited to the MPEG2 codec, which is unfortunate as it is H264 decoding that would benefit the most from it.

3) Full bitstream acceleration: This means that the GPU takes in charge almost all of the video decoding, leaving only the sound processing and control to the CPU. This allows to play even 1080p HD video on a lowly atom CPU, meaning that when used the CPU is pretty much irrelevant. On the hardware side this is only supported on recent GPU such as the Nvidia8 & 9 series and the AMD HD series. On the software side support is scarce as well.
On Windows major DVD and Blu-ray playback software (such as powerDVD) will support it, but these players usually refuse to play video files from the internet, such as mkv and sometimes mp4. The only free media player that does so with directX-VA acceleration is media player classic home theater, but this comes with restrictions on the renderer you can use.
On the Linux side it is currently supported on nvidia GPUs only in the form on VDPAU accelerated video decoding. VDPAU is now supported in the XBMC 9.4 media player and VLC media player, with other players either supporting it as patches or with plan to support it in the near future. Intel and AMD also have their plans for Linux video decoding acceleration in the form of XVBA and VAAPI, but these are not in mainstream use yet.

In conclusion, the level of GPU assistance for HD video decoding that you will get is often dependent on the combination of GPU, OS and player software that you will use more than on the GPU alone. this is why it is difficult to play flash video full screen on a netbook while the same video plays fine in a media player. With Nvidia GPUs the results are excellent on Linux, while with intel or AMD GPUs they are currently quite poor under this OS. On Windows all brands are well supported by commercial players, but support is poorer for free players such as VLC media player and Smplayer, leaving media player classic as the only free player to use bitstream acceleration.

Read more in the Linux category.

Technorati Delicious StumbleUpon Reddit BlinkList Mixx Facebook Google Bookmark newsvine live slashdot Submit to OSNews

1 comments:

Rackmount Monitor says:

With C/C++ and FORTRAN language support along with API’s such as OpenCL and Microsoft Direct Compute available today, GPU computing is now main stream. NVIDIA is the only company to offer this breadth of open and standard language solutions for the GPU. NVIDIA also provides powerful performance analysis tools for OpenCL developers, including NVIDIA Parallel Nsight for Visual Studio and NVIDIA Visual Profiler for Linux and MacOS.