After finished my first phase of GPU – Intel Media SDK research, now it’s time to get into libva, my goal is to get a set of performance test report for both MSDK and libva, so that we can finally choose one of them, or both of them for product use. If you don’t know libva, or not sure if you know it or not, please visit here for more informations: http://www.freedesktop.org/wiki/Software/vaapi/ or http://rg4.net/archives/971.html (a copy in RG4.NET)
And the first step of research on libva will be download & build libva.
Environment
As usual, I shall introduce my develop environment here:
OS: Ubuntu 12.04 LTS 64 bit with kernel 3.2.0-29
CPU: Core ivy bridge i7-3770
Target libva version: 1.2.1 (latest release for now)
Related projects/libraries
- libdrm : http://dri.freedesktop.org/wiki/Download/
- intel-driver: …
- libva: http://www.freedesktop.org/wiki/Software/vaapi/
Brief compile steps
Download & compile intel-driver
Download the source code
git clone git://anongit.freedesktop.org/vaapi/intel-driver intel-driver cd intel-driver
Compile
./configure
checking for DRM… no
configure: error: Package requirements (libdrm >= 2.4.45) were not met:
Requested ‘libdrm >= 2.4.45’ but version of libdrm is 2.4.43
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables DRM_CFLAGS
and DRM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Remove & install the latest version of libdrm
Remove the existing libdrm:
sudo apt-get autoremove libdrm-dev
Download the lastest version of libdrm: http://dri.freedesktop.org/libdrm/ in which I choose libdrm-2.4.46.tar.bz2Remove & install the latest version of libdrm
Remove the existing libdrm:
sudo apt-get autoremove libdrm-dev
Download the lastest version of libdrm:
git clone git://anongit.freedesktop.org/git/mesa/drm
for
http://dri.freedesktop.org/libdrm/ in which I choose libdrm-2.4.46.tar.bz2
Compiling libdrm
./configure make install
Install pciaccess
However if you encournter error like this: Package requirements (pciaccess >= 0.10) were not met:
checking for native atomic primitives… Intel
checking for PCIACCESS… no
configure: error: Package requirements (pciaccess >= 0.10) were not met:
No package ‘pciaccess’ found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables PCIACCESS_CFLAGS and PCIACCESS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
All you need to do is:
sudo apt-get install libpciaccess-dev
FAQ/Tips
Q1: va_getDriverName() failed with operation failed,driver_name=i965
jacky@ubuntu-va:/opt/softwares/VA/intel-driver$ vainfo
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=i965
vaInitialize failed with error code 1 (operation failed),exit
A2: vainfo may need root permission to work, try
sudo vainfo
Thank you for this article. That’s all I can say. You most definitely have made this blog into something special. You clearly know what you are doing, you’ve covered so many bases.Thanks!
Intel Media SDK v.s. libva:
http://www.rosoo.net/plus/view.php?aid=16479
Thanks, I was having problems with a missing DRM library when trying to comping XBMC…I think it is because of my bluray drive.
I have managed to install DRM now, and it looks like it’s going to compile!
Cheers
Shawn