Kodi Community Forum
[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform (/showthread.php?tid=99154)



- CK1one - 2011-08-08

FernetMenta Wrote:Can you point me to the Killa-sample.mkv? I am working on improvements for VAAPI.

http://rapidshare.com/files/82525583/killa.sampla.x264.mkv.html


- zbox_ad02 - 2011-08-09

CK1one Wrote:http://rapidshare.com/files/82525583/killa.sampla.x264.mkv.html

Exactly, I downloaded killa sample from here.

I uploaded a video captured from my AD02 running linux, vaapi and VLC.
See the Pixel bleeding or whatever they call it.
It does't seems like processing capability issue since it runs smooth and the CPU goes to max 50% not more.


- javum - 2011-08-09

zbox_ad02 Wrote:On ZBOX AD02 (RADION graphics) with Linux Natty, VAAPI enabled successfully.
But the performance is poor when playing Killa-sample.mkv compared to Nvidia driver with ZBOX ND22.

Killa-sample.mkv
Code:
Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
[color=red]Format profile                   : [email protected][/color]
Format settings, CABAC           : Yes
[color=red] Format settings, ReFrames        : 16 frames[/color]
Muxing mode                      : Container [email protected]
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 23s 41ms
Bit rate                         : 33.1 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16/9
Frame rate                       : 23.976 fps
Resolution                       : 24 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.666

Audio
ID                               : 2
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : A_AC3
Duration                         : 23s 46ms
Bit rate mode                    : Constant
Bit rate                         : 448 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Surround: L R, LFE
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
But ATI/AMD driver in Linux is limited to [email protected].


- toehser - 2011-08-09

javum Wrote:But ATI/AMD driver in Linux is limited to [email protected].
Is the limiting factor the chip, the driver, the xvba, the vaapi, or what?


- Robotica - 2011-08-09

toehser Wrote:Is the limiting factor the chip, the driver, the xvba, the vaapi, or what?

xvba limitation


- chrisk2305 - 2011-08-09

@zbox_ad02: alright, here is what i did:

Code:
1  nano /etc/apt/sources.list
    added proposed and backports repos here
    2  apt-get update
    3  apt-get upgrade
    4  apt-get install -y build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases ia32-libs
    5  cd ~; mkdir catalyst11.7; cd catalyst11.7
    6  wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-7-x86.x86_64.run
    7  chmod +x ati-driver-installer-11-7-x86.x86_64.run
    8  sh ./ati-driver-installer-11-7-x86.x86_64.run --extract ati
    9  cd ati
   10  ./ati-installer.sh 8.872 --buildpkg Ubuntu/natty
   11  cd ..
   12  rm -rf ati
   13  dpkg -i fglrx*.deb
   14  apt-add-repository ppa:rexbron/bugfixes
   15  apt-get install -y libkms1 libdrm-dev pkg-config vainfo
   16  mkdir vaapi; cd vaapi
   17 wget http://www.splitted-desktop.com/~gbeauchesne/xvba-video/xvba-video_0.8.0-1_amd64.deb
   18 dpkg -i xvba-video_0.8.0-1_amd64.deb
   19 cd /usr/lib/dri; sudo ln -s /usr/lib/va/drivers/fglrx_drv_video.so fglrx_drv_video.so
   20 nano /etc/environment
added the lines from the post here
   21 reboot
   22 apt-get install vlc

Video in VLC was definetly not GPU accelerated (GPU Acceleration was enabled of course). vainfo reports xvba 0.8.0.1 from splitted desktop, fglrxinfo is fine. Where to go from here? Thanks!

edit: while applying the mplayer-vaapi patch i get this:

Code:
root@htpc:~/mplayer-vaapi-20110127# ./checkout-patch-build.sh
ERROR: you need VA API headers for this project



- zbox_ad02 - 2011-08-09

chrisk2305 Wrote:@zbox_ad02: alright, here is what i did:
...............

Video in VLC was definetly not GPU accelerated (GPU Acceleration was enabled of course). vainfo reports xvba 0.8.0.1 from splitted desktop, fglrxinfo is fine. Where to go from here? Thanks!

edit: while applying the mplayer-vaapi patch i get this:

Code:
root@htpc:~/mplayer-vaapi-20110127# ./checkout-patch-build.sh
ERROR: you need VA API headers for this project



Ok, Not sure what is wrong with that, but the xorg config is not done in your script and you downloaded xbva from splitted desktop, you actually don't have to.
Here is a step by step how to do it, so first off, re-install Natty and please follow each step, don't skip any of them. let me know how did it go.

Enabling VA on ZBOX Fusion E350 APU:
===============================

Step 1: Install OS.

- Install UBUNTU_11.04_NetInstall_x64 from USB. Use unetbootin to prepare the usb.
- From Synaptic, enable backports and proposed repositories.
- From Update Manager, do full update for the system.
- Reboot.

Step 2: Install catalyst driver

Code:
$ sudo apt-get install -y build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases ia32-libs
$ cd ~; mkdir catalyst11.7; cd catalyst11.7
$ wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-7-x86.x86_64.run
$ chmod +x ati-driver-installer-11-7-x86.x86_64.run
$ sudo sh ./ati-driver-installer-11-7-x86.x86_64.run --extract ati
$ cd ati
$ sudo ./ati-installer.sh 8.872 --buildpkg Ubuntu/natty
$ cd ..
$ rm -rf ati
$ sudo dpkg -i fglrx*.deb
$ sudo aticonfig --initial -f
$ sudo aticonfig --input=/etc/X11/xorg.conf --tls=1

Step 3: Install VAAPI stuff

Code:
$ sudo apt-get install -y libkms1 libdrm-dev pkg-config vainfo
$ sudo apt-add-repository ppa:rexbron/bugfixes
$ sudo apt-get update
$ sudo apt-get install xvba-va-driver
$ sudo apt-get install vainfo          # I think not necessary, just check if it is already installed.
$ sudo apt-get install libva-glx1

The following steps didn't make any difference but I just did it any way.
Append the following lines to /etc/environment
Code:
LIBVA_DRIVER_NAME=xvba
LIBVA_DRIVERS_PATH=/usr/lib/va/drivers

Step 4: Install VLC
Code:
$ sudo apt-get install vlc
Step 5: Test video accelaration:
in one window run "$ top" to monitor CPU load.
In second terminal run an HD video with VLC WITHOUT VA
Code:
$ vlc video.mkv
Now run another video WITH VA to compare
Code:
$ vlc --ffmpeg-hw video.mkv
Compare CPU load in both situations.


- zbox_ad02 - 2011-08-09

Robotica Wrote:xvba limitation

Do you expect any improvements in the near future?


- chrisk2305 - 2011-08-10

@zbox_ad02: Hi, thanks for your help! But i miss the part where libva1 and libva-dev is installed. When I install them from splitted desktop the mplayer-vaapi patch works but when the compiler is checking for vaapi it still reports "no". i'll do a fresh install again with your tutorial and report back.


- Robotica - 2011-08-10

zbox_ad02 Wrote:Do you expect any improvements in the near future?

Since Intel is also suffering from this, it would totally make sense to have this fixed.... But when and by whom?


- zbox_ad02 - 2011-08-10

chrisk2305 Wrote:@zbox_ad02: Hi, thanks for your help! But i miss the part where libva1 and libva-dev is installed. When I install them from splitted desktop the mplayer-vaapi patch works but when the compiler is checking for vaapi it still reports "no". i'll do a fresh install again with your tutorial and report back.

Some how I didn't have to install them, they just appeared after I enabled the back ports and proposed repos and ran full upgrade.

Do that,

- After enabling the repos and do full upgrade and reboot, check in Synaptic if you have libva1 and libva-dev installed.
- You should find them, if not, install them from Synaptic, not from splitted desktop.

It worked for me this way, so let's try that for a start.

Good luck.


- mbah.pande - 2011-08-11

Install XBMC is ok

then try to little modification and compile from git

but got error

checking for XMU... yes
checking for XINERAMA... yes
checking for CURL... no
configure: error: Could not find a required library. Please see the README for your platform.

try to make symbolic link

sudo ln -s libcurl-gnutls.so.4 libcurl.so.4

but still not work try to read twice the README but can't find some that help.

anybody know to fix this?


- wsnipex - 2011-08-11

in the readme.linux is a full list of packages that you need to install.


- craigdabbs - 2011-08-11

after many hours of fiddling i have finally got everything working on my zacate board except for the 24P vsync judder issue, i can play 720p content fine with the cpu but 1080p content struggles without vaapi acceleration. But the slight stutter without 24p mode really annoys me so i have ended up putting a cheap nvidia gt200 series card in.

Its a shame xbmc cant get rid of this bug with 24p + vsync + xvba as in my opinion its easier to setup the various tv modes with the catalyst software rather than editing a xorg.conf file you have to do with nvidia. You can install everything fairly easy now to get vaapi working especially as xbmc can be installed from the unstable ppa with vaapi already enabled.
Ive mentioned on another thread that im willing to donate to the xbmc developers to sort this bug out, the ati hardware offers lots more in features compared to its nvidia counterparts at the same price level.

Is there any work being done on this bug as it more or less rules out the zacate boards from htpc's atm for me, im willing to help but im relatively new to linux and not sure what i could contribute.

Thanks

Craig


- Robotica - 2011-08-11

craigdabbs Wrote:after many hours of fiddling i have finally got everything working on my zacate board except for the 24P vsync judder issue, i can play 720p content fine with the cpu but 1080p content struggles without vaapi acceleration. But the slight stutter without 24p mode really annoys me so i have ended up putting a cheap nvidia gt200 series card in.

Its a shame xbmc cant get rid of this bug with 24p + vsync + xvba as in my opinion its easier to setup the various tv modes with the catalyst software rather than editing a xorg.conf file you have to do with nvidia. You can install everything fairly easy now to get vaapi working especially as xbmc can be installed from the unstable ppa with vaapi already enabled.
Ive mentioned on another thread that im willing to donate to the xbmc developers to sort this bug out, the ati hardware offers lots more in features compared to its nvidia counterparts at the same price level.

Is there any work being done on this bug as it more or less rules out the zacate boards from htpc's atm for me, im willing to help but im relatively new to linux and not sure what i could contribute.

Thanks

Craig

Not much you can do. teamXBMC is showing no interest in AMD-related features. However, sraue (openelec) and fernmetta have this hardware and showed some interest in AMD hardware. Maybe they will help...

Maybe the ticket got solved but there is no action within the ticket.