[LINUX] HOW-TO use VAAPI HW Acceleration on AMD Zacate (Fusion) platform

  Thread Rating:
  • 14 Votes - 4.71 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Redsandro Offline
Skilled Python Coder
Posts: 133
Joined: Jul 2008
Reputation: 0
Location: Netherlands
Post: #841
fritsch Wrote:I think you guess wrong. XvBA ist just 2 month old. We call it experimental and still want to fix a lot of bugs. Eden will support vaapi, which also was in Dharma, but not enabled by default.

I misinterpreted; I assumed this was about XvBA backend support through VAAPI because that's what this topic is about, which has been available for at least a year but wasn't included in main stable releases, apparently due to problems I've never experienced myself.

I didn't know XvBA was gonna be implemented directly, putting VAAPI offside, until I googled what you said. Sounds good, no more splitted-desktop drivers and wrappers.

pjohn07 need not be sad about Eden lacking this for now. I tried the XvBA-VAAPI build of OpenELEC from december 17th and it's even faster than my current installed XBMC, using that new video option I haven't got yet, what was it called, something something surfaces.

For manual installation of direct XvBA XBMC, check this repository:
https://launchpad.net/~wsnipex/+archive/xbmc-xvba
Last compile two days ago.

Try Xubuntu. It's the new Ubuntu.
(This post was last modified: 2011-12-20 18:45 by Redsandro.)
find quote
GTMoraes Offline
Junior Member
Posts: 22
Joined: Feb 2011
Reputation: 0
Post: #842
Darn, I'm still having the image corruption bug on 1080p movie, just like the pictures on the older pages. Did anyone manage to fix it?

Also, I can't make the mplayer to find the vaapi..
Here's the output of -vo help from both after-install mplayer, on-installation-folder mplayer (./mplayer) and a try to run on vaapi anyway:
Code:
gtmoraes@GT-HP-DM1:~/mplayer/mplayer-vaapi-20110127/mplayer-vaapi$ mplayer -vo help
MPlayer SVN-r32819-4.6.1 (C) 2000-2011 MPlayer Team
Available video output drivers:
    xv    X11/Xv
    gl_nosw    OpenGL no software rendering
    x11    X11 ( XImage/Shm )
    xover    General X11 driver for overlay capable video output drivers
    sdl    SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
    gl    OpenGL
    gl2    X11 (OpenGL) - multiple textures version
    dga    DGA ( Direct Graphic Access V2.0 )
    fbdev    Framebuffer Device
    fbdev2    Framebuffer Device
    svga    SVGAlib
    matrixview    MatrixView (OpenGL)
    aa    AAlib
    caca    libcaca
    v4l2    V4L2 MPEG Video Decoder Output
    directfb    Direct Framebuffer Device
    dfbmga    DirectFB / Matrox G200/G400/G450/G550
    xvidix    X11 (VIDIX)
    cvidix    console VIDIX
    null    Null video output
    mpegpes    MPEG-PES to DVB card
    yuv4mpeg    yuv4mpeg output for mjpegtools
    png    PNG file
    jpeg    JPEG file
    gif89a    animated GIF output
    tga    Targa output
    pnm    PPM/PGM/PGMYUV file
    md5sum    md5sum of each frame

gtmoraes@GT-HP-DM1:~/mplayer/mplayer-vaapi-20110127/mplayer-vaapi$ mplayer -va vaapi -vo vaapi ~/Vídeos/
Assalto.ao.Banco.Central.2011.1080p.BluRay.x264.DTS-HDChina.sample.mkv
hddvd_demo_1080p.mkv
hd_other_mitsubishi_see_it.m2ts
gtmoraes@GT-HP-DM1:~/mplayer/mplayer-vaapi-20110127/mplayer-vaapi$ mplayer -va vaapi -vo vaapi ~/Vídeos/Assalto.ao.Banco.Central.2011.1080p.BluRay.x264.DTS-HDChina.sample.mkv
MPlayer SVN-r32819-4.6.1 (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /home/gtmoraes/Vídeos/Assalto.ao.Banco.Central.2011.1080p.BluRay.x264.DTS-HDChina.sample.mkv.
libavformat file format detected.
[matroska,webm @ 0x2bbb5f0] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (dca), -aid 0
[lavf] stream 2: subtitle (pgssub), -sid 0
VIDEO:  [H264]  1920x1080  0bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
Load subtitles in /home/gtmoraes/Vídeos/
Error opening/initializing the selected video_out (-vo) device.
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   3.6 (03.6) of 64.7 (01:04.6) 12.9%


MPlayer interrupted by signal 2 in module: decode_audio
A:   3.9 (03.8) of 64.7 (01:04.6) 18.1%

Exiting... (Quit)
gtmoraes@GT-HP-DM1:~/mplayer/mplayer-vaapi-20110127/mplayer-vaapi$ ./mplayer -vo help
MPlayer SVN-r32819-4.6.1 (C) 2000-2011 MPlayer Team
Available video output drivers:
    xv    X11/Xv
    gl_nosw    OpenGL no software rendering
    x11    X11 ( XImage/Shm )
    xover    General X11 driver for overlay capable video output drivers
    sdl    SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
    gl    OpenGL
    gl2    X11 (OpenGL) - multiple textures version
    dga    DGA ( Direct Graphic Access V2.0 )
    fbdev    Framebuffer Device
    fbdev2    Framebuffer Device
    svga    SVGAlib
    matrixview    MatrixView (OpenGL)
    aa    AAlib
    caca    libcaca
    v4l2    V4L2 MPEG Video Decoder Output
    directfb    Direct Framebuffer Device
    dfbmga    DirectFB / Matrox G200/G400/G450/G550
    xvidix    X11 (VIDIX)
    cvidix    console VIDIX
    null    Null video output
    mpegpes    MPEG-PES to DVB card
    yuv4mpeg    yuv4mpeg output for mjpegtools
    png    PNG file
    jpeg    JPEG file
    gif89a    animated GIF output
    tga    Targa output
    pnm    PPM/PGM/PGMYUV file
    md5sum    md5sum of each frame

gtmoraes@GT-HP-DM1:~/mplayer/mplayer-vaapi-20110127/mplayer-vaapi$

vainfo looks alright
Code:
gtmoraes@GT-HP-DM1:~/mplayer/mplayer-vaapi-20110127/mplayer-vaapi$ vainfo
libva: VA-API version 0.32.0
libva: User requested driver 'xvba'
libva: Trying to open /usr/lib/va/drivers/xvba_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
vainfo: Supported profile and entrypoints
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD
gtmoraes@GT-HP-DM1:~/mplayer/mplayer-vaapi-20110127/mplayer-vaapi$

so does fglrxinfo
Code:
gtmoraes@GT-HP-DM1:~/mplayer/mplayer-vaapi-20110127/mplayer-vaapi$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6300 series Graphics
OpenGL version string: 4.1.11161 Compatibility Profile Context

gtmoraes@GT-HP-DM1:~/mplayer/mplayer-vaapi-20110127/mplayer-vaapi$

what might be wrong? I followed the this post first page' instructions of Mplayer

PC: AMD Athlon 64 X2 5000 | 3GB DDR2 800 | GeForce GT220 1GB | 320GB HDD SATA II | Realtek ALC889A | Samsung SyncMaster P2250 21,5" LCD
Netbook: HP Pavilion dm1 | AMD Fusion E-350 1.6GHz | Radeon HD6310 | 4GB DDR3 | 11,5" LED
[Image: sigpic_85204_365da025f09fe694da278d13e0be4fdf.png]
Ubuntu Powered.
(This post was last modified: 2012-01-04 15:28 by GTMoraes.)
find quote
Mark656 Offline
Junior Member
Posts: 1
Joined: Jan 2012
Reputation: 0
Post: #843
[quote=Robotica]This topic is a follow-up to this topic: AMD Fusion based hardware for a HTPC?

There is lots of information about all the problems related to VAAPI, AMD, drivers and hardware accelaration in Linux (with Windows 7 this platform works like a charm already and it beats ATOM/ION on price, performance and features). In the meanwhile, nice development happened and the platform is ready for a HTPC with Linux. What happened?
  • AMD added support for their Fusion Platform with their closed source catalyst drivers (aka fglrx) from day one the products hit the market.
  • Open Source drivers are updated and getting better and better (not likely to outperform the closed source drivers with media playback for comming years)
  • Problems related to VAAPI and XBMC are fixed.
  • VAAPI is not enabled in XBMC 10.0 and 10.1. VAAPI is only enabled in the nightly (GIT) builds and most likely from Eden and on.
  • Genereal Linux developments (like ALSA, MESA, kernel, etc.) are in kernel 3.0Confused and on. Soon the distro's will give easy access to all those developments.
  • It's confirmed to work with most hd and sd movies.
  • No GPU deinterlacing support but CPU can handle it (atm only single core due to XBMC. FFMPEG already is dualcore. btw, same problem for Intel with their Sandy's). Needs work on libva to have this for GPU.

team-xbmc PPA can't be used until this ticket is closed.

Since needed dependencies are missing in most Linux distro's, compiling yourself a build is not easy. Right now, there are 2 compiled options for you (with VAAPI enabled):
I downloaded the ISO file above and and coppied to CD and install the 4GB Flash driver, but I got problem with this ISO(xbmclive10.0amd)file it keeps showing the lists and never finish the installation. It took more than 3 hours and just showing the lists so I just shut down the machine. Please help show me how to fix the issues or any other places I can download another one and. Any help will be appreciated.
find quote
Robotica Offline
Banned
Posts: 1,202
Joined: Aug 2010
Post: #844
Deinterlace (VAAPI) is supported now for the newer intel.
https://github.com/xbmc/xbmc/commit/62a1...f347c1a4ed

for AMD&VAAPI, Libva needs to be ready to support this? ....more info??
(This post was last modified: 2012-01-10 02:02 by Robotica.)
find quote
.:B:. Offline
Fan
Posts: 348
Joined: Mar 2010
Reputation: 0
Post: #845
As I understand it, take a look at the XvBA thread, deinterlacing should work with xvba. The general trend seems to be that XvBA is to be preferred over VA-API for AMD, btw.

* Netgear WNDR3700, OpenWrt Attitude Adjustment 12.09.1 :: HP Procurve V1410-8G switch
* OpenELEC 4 b3: HTPC Zotac Nano AD10 with Pulse-Eight CEC adapter, Sony KDL52-NX800 :: Desktop Phenom II X4 980 BE / AMD HD6950 / 23" Dell Full HD
* Debian Jessie x86_64: Celeron G1610, HTTP/NFS/MySQL/ZFS server
* Blog
find quote
fritsch Offline
Team-XBMC Member
Posts: 4,282
Joined: Aug 2011
Reputation: 107
Location: Karlsruhe
Post: #846
Robotica Wrote:Deinterlace (VAAPI) is supported now for the newer intel.
https://github.com/xbmc/xbmc/commit/62a1...f347c1a4ed

for AMD&VAAPI, Libva needs to be ready to support this? ....more info??

I also saw this commit, what made me think were the following lines:
Code:
if(compare_version(major, minor, micro, 1, 0, 17) < 0)
{
     CLog::Log(LOGDEBUG, "VAAPI - deinterlace not support on this intel driver version");

     deinterlace = false;
}

1.0.17 is a quite high version, if the va driver is meant. I could not even find this release on git by freedesktop.org. This is btw. the first support for deinterlace on intel hardware through vaapi.
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,352
Joined: Nov 2008
Reputation: 33
Location: Hungary
Post: #847
fritsch Wrote:1.0.17 is a quite high version, if the va driver is meant. I could not even find this release on git by freedesktop.org. This is btw. the first support for deinterlace on intel hardware through vaapi.

Hi Fritsch !

The reason for this is that it is only supported in a branched libva and intel driver version. (vaapi-ext) So elupus increased the needed version to the current +1.5. But if you use the vaapi-ext branch (manually increasing the microversion number) it is already working quite nicely. I will put up some vaapi-ext packages on my Intel thread.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Robotica Offline
Banned
Posts: 1,202
Joined: Aug 2010
Post: #848
@Alanwww1:

Congratulation being a teammember nowadays! You really deserved it for all your hard work, especially related to the modern Intel SoC's and VAAPI. You had to be patient to get things running and AMD SoC's also started of thanks to your persistence.
(This post was last modified: 2012-01-10 17:14 by Robotica.)
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,352
Joined: Nov 2008
Reputation: 33
Location: Hungary
Post: #849
Robotica Wrote:@Alanwww1:
Congratulation being a teammember nowadays! You really deserved it for all your hard work, especially related to the modern Intel SoC's and VAAPI. You had to be patient to get things running and AMD SoC's also started of thanks to your persistence.

Thanks Robotica ! :-)

I will continue to do it, hopefully harder than ever. The only limit for me is my not too much free time.

It is great to see that AMD SoCs are also developing quite well. XBMC will rule all platforms :-)

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
alecxx Offline
Junior Member
Posts: 22
Joined: Jun 2011
Reputation: 0
Post: #850
I'm comparing right now an "Alan implementation"(i5 2500k+z68,VAAPI) AND a ZACATE e350 (xbmcbuntu 24.01.12 build), side by side...AND...they perform almost equally.

I will try, late tonight(hopefully), with Openelec on Zacate .

Is it possibile that xvba sports better rendering over Vaapi?
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,352
Joined: Nov 2008
Reputation: 33
Location: Hungary
Post: #851
alecxx Wrote:I'm comparing right now an "Alan implementation"(i5 2500k+z68,VAAPI) AND a ZACATE e350 (xbmcbuntu 24.01.12 build), side by side...AND...they perform almost equally.

Interesting comparison. You checked also Deinterlacing quality ? I think this is an area where Intel could improve. Currently only BOB is implemented.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
alecxx Offline
Junior Member
Posts: 22
Joined: Jun 2011
Reputation: 0
Post: #852
No, i just tested with "p" material...

Btw, just IMHO, I prefer AMD colors..AND dark scenes are WAY better...

compared over a DELL Ips monitor (0-255)
find quote
Redsandro Offline
Skilled Python Coder
Posts: 133
Joined: Jul 2008
Reputation: 0
Location: Netherlands
Post: #853
I am not sure if this is related to the latest build, but XBMC crashes EVERY FIRST TIME after loggin in during media scanning now. The second time it works.

http://pastebin.com/BhGuZ4xW

Since last year I have been doing nothing on my HTPC except automatic updates, so I am automatically thinking of an XBMC update.

Using this repo:
Code:
$ cat /etc/apt/sources.list.d/xbmc-nathanrennie.list
# RED 2011-12-06
# XBMC VAAPI Nathan Rennie-Waldock

#Stable
deb http://ppa.launchpad.net/nathan-renniewaldock/xbmc-stable/ubuntu oneiric main
deb-src http://ppa.launchpad.net/nathan-renniewaldock/xbmc-stable/ubuntu oneiric main

#Nightly
deb http://ppa.launchpad.net/nathan-renniewaldock/xbmc-nightly/ubuntu oneiric main
deb-src http://ppa.launchpad.net/nathan-renniewaldock/xbmc-nightly/ubuntu oneiric main

Try Xubuntu. It's the new Ubuntu.
find quote
gsjosh Offline
Junior Member
Posts: 26
Joined: Jan 2010
Reputation: 0
Post: #854
So I've been trying to get this working for a long time now, but I'm rather stuck. I used MTroi's wonderful small guide with the only exception that I used the latest Catalyst drivers (12.3) and the official stable XBMC release (11.0) as here. I know fglrx is working fine:

Code:
htpc@HTPC:~$ DISPLAY=:0 fglrxinfo
display: :0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6310 Graphics
OpenGL version string: 4.2.11566 Compatibility Profile Context

and also the libraries are installed correctly:

Code:
htpc@HTPC:~$ DISPLAY=:0 vainfo
libva: VA-API version 0.32.0
libva: User requested driver 'xvba'
libva: Trying to open /usr/lib/va/drivers/xvba_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA-API version: 0.32 (libva 1.0.15)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
vainfo: Supported profile and entrypoints
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD

but XBMC doesn't want to use VAAPI, I get this in the xbmc.log:

Code:
ERROR: VAAPI - failed executing vaCreateContext(m_display->get() , m_config , avctx->width , avctx->height , VA_PROGRESSIVE , m_surfaces , m_surfaces_count , &m_hwaccel->context_id) at line 424 with error ffffffff:unknown libva error

I have seen a user in the same thread here having a similar problem, but he didn't respond to having a solution. Anybody?
(This post was last modified: 2012-04-09 01:50 by gsjosh.)
find quote
Redsandro Offline
Skilled Python Coder
Posts: 133
Joined: Jul 2008
Reputation: 0
Location: Netherlands
Post: #855
Although I'd like to say: This whole thread has become obsolete, since Eden is released and as you can read here, va-api wrapper is both no longer maintained and no longer a requirement:

http://www.phoronix.com Wrote:As xvba-va-driver wrapper development stopped in June this year and all-over performance and stability did not really impress the users, we implemented direct xvba support for xbmc.
http://www.phoronix.com/scan.php?page=ne...px=MTAyODU
-edit-
Fixed URL.


However, I tried a fresh installation of XBMC on Lubuntu 12.04 beta 2 (with additional drivers of course) and I couldn't get fluent playback. So I restored my 11.10 image on my HTPC. I don't really have the time to go on another adventure to get stuff working. Initially, it was necessary to get hardware that was too modern for FOSS to play nice, but now that I've got it working one way or the other, my next upgrade will be "when things go easy and without ado, like they should." Smile

Anyway, as a reference, here is how I got it running:
http://forum.xbmc.org/showthread.php?tid...#pid908362

Try Xubuntu. It's the new Ubuntu.
(This post was last modified: 2012-04-09 04:20 by Redsandro.)
find quote
Post Reply