Need Guide for using xvba/vaapi with ATI graphic hardware on openSUSE

Could an ATI graphic card user, who has Video Acceleration (VA) API functioning with their ATI hardware and the ATI Catalyst proprietary driver please write a guide for openSUSE, explaining how to get this working on openSUSE ?

**Purportedly Working on other distros **

I note other distributions, such as Arch, having this working in a guide such as this: ArchWiki:Archive - ArchWiki If accounts from that distro are to believed, even users with cards such as the Radeon HD3450 can get this to work, and it is not confined to Radeon HD5000 series and newer cards.

… Anyway, I don’t think there should be a reason why this can not be configured to work on openSUSE.

Some basic theory

For those who know nothing about this, by enabling Video Acceleration on one’s PC/Video hardware, it is possible to offload the decoding in a video (of selected video codecs) from the CPU to the GPU, resulting in a SIGNFICANT reduction of CPU overhead, such that some older PCs can play HD videos at high bit rates (such as 1920x1080 @ 25MB/sec) where before they could not. Even PCs with modern CPUs benefit by the reduction in CPU load.

Both nVidia (via vdpau) and Intel offer such CPU to GPU offloading, and while it is available for selected ATI hardware, the documentation on how to do this is SERIOUSLY lacking. We need someone to figure this out for openSUSE and post how. It may also mean a custom compile of mplayer (or some other multimedia player) in order to take advantage of this.

Note what the Arch Linux page has to say about this:

Video Acceleration API (VA API) is an open source software library (“libVA”) and API specification which enables and provides access to graphics hardware (GPU) acceleration for video processing on Linux and UNIX based operating systems. The main motivation for VA API is to enable hardware accelerated video decode at various entry-points (VLD, IDCT, Motion Compensation, deblocking) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/WMV3).

In November 2009, VA-API gained a new proprietary xvba-video backend which allows VA-API powered applications to take advantage of AMD Radeon’s UVD2 chipsets via the XvBA (X-Video Bitstream Acceleration API designed by AMD) library.

XvBA support and xvba-video is still under development, however in nowadays it is working very well in most cases and with mplayer (and mplayer front-ends), so feel free to check it. You have to build xvba-video package and install mplayer-vaapi (available in community repository) & libva (available in extra repository) packages. Then just set your video player to use vaapi:gl as video output

… I don’t think the video output always need be “vaapi:gl” as I read of a user who had build mplayer with this capability offloading the video decode from CPU to GPU using the command:

mplayer -vo vaapi -va xvmc video.mkv

**Video Acceleration (VA) API Drivers **

I also note from the web on Splitted-desktop systems site various tarballs in support of this:

  • [2011/01/26] libva - VA API extensions for VDPAU and XvBA backends -
  • [2010/10/08] vdpau-video - VDPAU backend for VA API
  • [2010/12/15] xvba-video - XvBA backend for VA API

Sample Applications and Enabling

  • [2011/01/27] mplayer-vaapi - VA API support for MPlayer
  • [2010/03/18] gnash-vaapi - VA API support for Gnash
  • [2010/07/20] gstreamer-vaapi - VA API support for GStreamer
  • [2010/10/06] hwdecode-demos - Standalone programs showing off various HW acceleration APIs
  • [2009/06/23] mplayer-bench - Video decode acceleration benchmarks suite

**vaapi for openSUSE **

If one searches on Packman, one can find libva packaged with libva1, vaapi-tools, and libva-devel with a link to freedesktop.org - Software/vaapi but no guide how to use this, although it appears it could be used as part of the Packman packager implementation of nVidia vdpau.

Further to the above, if one searches the build service for “vaapi” one obtains this hit which indicates packages vaapi-tools, vaapi-tools-32bit, vaapi-tools-x86 in various private user repositories.
Further to the above, if one searches the build service for “libva1” one obtains this hit which indicates package libva1, libva1-x86, libva1-32-bit in various private user repositories.

It has this to say about vaapi-tools and libva1:

The libva library implements the Video Acceleration (VA) API for Linux.
The library loads a hardware dependent driver.

**xvba for openSUSE **

Further to the above, if one searches the build service for “xvba” one obtains this hit which indicates this package: xvba-video-amd

**openSUSE apps build for xvba/vaapi ?? **

Its also possible no mplayer rpm (nor other application rpm) has been build for openSUSE to take advantage of xvba/vaapi, even IF it were installed.

**Summary **

So there seems to be a capability there for openSUSE ATI graphic card users that no openSUSE user has put together yet and shared with the community in a common “how-to” guide.

Is it possible for someone to investigate and create such a guide ? It may require a user with reasonably advanced compilation skills (in addition to having the necessary hardware).

Performance Issue with video direct rendering and adobe flash player in openSuSE 12.1 (32bit) was fixed for me…

My steps to success:

1.** Install ATI driver** from AMD web site (to many HOWTOs in WEB)

  1. Fix links to fglrx in /usr/lib/dri:
    libGL.so -> /usr/lib/fglrx/fglrx-libGL.so.1.2
    libGL.so.1 -> /usr/lib/fglrx/fglrx-libGL.so.1.2
    libGL.so.1.2 -> /usr/lib/fglrx/fglrx-libGL.so.1.2

  2. Modify xorg.conf in /etc/X11:

    Section “Device”
    Identifier “aticonfig-Device[0]-0”
    Driver “fglrx”
    ** Option “OpenGLOverlay” “on”
    Option “OverlayOnCRTC2” “1”
    **EndSection

** Section “Module”
Load “dri”
EndSection

Section “DRI”
Mode 0666
EndSection

Section “ServerFlags”
Option “DontZap” “0”
Option “AutoAddDevices” “False”
EndSection**
**
4. Install packages:**
libva1 (repo Index of /repositories/home:/tiwai:/vaapi/openSUSE_12.1/i586)
vaapi-tools (repo Index of /repositories/home:/tiwai:/vaapi/openSUSE_12.1/i586)
libgstvaapi-x11 (not sure)
libgstvaapi-glx (not sure)
libgstvaapi (not sure)
gstreamer (not sure)

5. install xvba-video-amd
I used self builded rpm from spec file
My xvba-video-amd rpm.
Spec file for xvba-video-amd rpm
SRC file for xvba-video-amd

6. Modify /etc/environment
LIBVA_DRIVER_NAME=“fglrx”
LIBVA_DRIVERS_PATH="/usr/lib/dri/"
**

  1. Reboot and verify**:
    > vainfo
    libva: libva version 0.32.0
    libva: User requested driver ‘fglrx’
    libva: Trying to open /usr/lib/dri//fglrx_drv_video.so
    libva: va_openDriver() returns 0
    vainfo: VA-API version: 0.32 (libva 1.1.0)
    vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
    vainfo: Supported profile and entrypoints
    VAProfileH264High : VAEntrypointVLD
    VAProfileVC1Advanced : VAEntrypointVLD

    > glxinfo | grep “direct rendering”
    direct rendering: Yes

Any questions to green at rent-it.net.ua