Kodi Community Forum
[LINUX] HOW-TO use VAAPI HW Acceleration on new Intel Sandy Bridge 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 new Intel Sandy Bridge platform (/showthread.php?tid=96669)

Pages: 1 2 3 4 5 6 7 8 9 10 11


- alanwww1 - 2011-06-26

nicob Wrote:Videoscaling with Lanczos 2 or 3 or Bicubic seem to be broken since last week... (video speedup) Took me some time, why it was working without VAAPI... xbmc would default back to bilinear...

Can you check which commit was it ?


- RedCat - 2011-06-27

Hello

I follow this guide step by step. I compiled LIBVA and MESA. I dont know, but I think it is success.
If I can start x, then no screen, no cursor. Mouse click dont work. I try hdmi1 and hdmi2 in xorg.conf file.
If I run xrandr -q command in console, then "Can't open display" and "No protocol specified"

What can I do?
Thx


- alanwww1 - 2011-06-27

RedCat Wrote:Hello

I follow this guide step by step. I compiled LIBVA and MESA. I dont know, but I think it is success.
If I can start x, then no screen, no cursor. Mouse click dont work. I try hdmi1 and hdmi2 in xorg.conf file.
If I run xrandr -q command in console, then "Can't open display" and "No protocol specified"

What can I do?
Thx

Try to delete xorg.conf and than start X. After that you should be able to move the mouse. Click into the upper-right part and than type xrandr -q.


- RedCat - 2011-06-27

alanwww1 Wrote:Try to delete xorg.conf and than start X. After that you should be able to move the mouse. Click into the upper-right part and than type xrandr -q.

Thx. I try this. I deleted xorg.conf, and startx from tty1. But nothing happend. I have black screen, mouse click dont work.
ctrl+alt+1, then run "No protocol specified"

I try login tty2, xrandr -q: "Can't open display"


- alanwww1 - 2011-06-28

For xrandr -q to work you MUST have a working X ! There is something wrong with your installation. I think i will need to update the guide as a lot of things changed since than. For example you don't need to compile mesa and libva anymore. Just use the ones in the xorg edgers ppa. I will update the guide when i have time.


- nicob - 2011-06-28

alanwww1 Wrote:Can you check which commit was it ?

I think it will be fixed with 216 (PR)

Since the problem introduced since yadif became a dependency...


- alanwww1 - 2011-06-28

nicob Wrote:I think it will be fixed with 216 (PR)

Since the problem introduced since yadif became a dependency...

That would be a shame if Sandy Bridge would be too weak to handle Lanczos or Bicubiuc upscalers at 50 (60) fps in full HD resiolution. Since Yadif is a cpu based deinterlacer, i think the only problem here, seems to be Sandy's not enough shader power to handle the upscalers at a double framerate (like Nvidia or ATI hardware can).


- RedCat - 2011-06-28

alanwww1 Wrote:For xrandr -q to work you MUST have a working X ! There is something wrong with your installation. I think i will need to update the guide as a lot of things changed since than. For example you don't need to compile mesa and libva anymore. Just use the ones in the xorg edgers ppa. I will update the guide when i have time.

Thx, I waiting for ur updated guide.


- RedCat - 2011-06-28

alanwww1 Wrote:That would be a shame if Sandy Bridge would be too weak to handle Lanczos or Bicubiuc upscalers at 50 (60) fps in full HD resiolution. Since Yadif is a cpu based deinterlacer, i think the only problem here, seems to be Sandy's not enough shader power to handle the upscalers at a double framerate (like Nvidia or ATI hardware can).

I tried reinstall again. The result is same. When you have time, you will do the guide? I would like to use. Very, very... Smile

Thx.


- RedCat - 2011-07-01

alanwww1 Wrote:For xrandr -q to work you MUST have a working X ! There is something wrong with your installation. I think i will need to update the guide as a lot of things changed since than. For example you don't need to compile mesa and libva anymore. Just use the ones in the xorg edgers ppa. I will update the guide when i have time.

When you have time to update your guide? I cant watch HD movies, on windows dont work the hw acceleration ( http://forum.xbmc.org/showthread.php?tid=98037 ), and I cant install on linux.

Pls help me.


- sephiros - 2011-07-06

Hi Alan,

I'm not sure what's going on. I can compile everything fine, XBMC compiles with VAAPI but if I try to run a video with VAAPI enabled, it will crash.

Here is the relevant part of the crash log:

Code:
07:46:11 T:2851744624 M:3993837568    INFO: ffmpeg[A9FA2B70]: Input #0, avi, from '/media/medialib/media/tvshows/The Big Bang Theory/The Big Bang Theory - Season 3/03x09 - The Vengeance Formulation.avi':
07:46:11 T:2851744624 M:3993837568    INFO: ffmpeg[A9FA2B70]:   Metadata:
07:46:11 T:2851744624 M:3993837568    INFO: ffmpeg[A9FA2B70]:     encoder         : transcode-1.0.4
07:46:11 T:2851744624 M:3993837568    INFO: ffmpeg[A9FA2B70]:   Duration: 00:18:56.18, start: 0.000000, bitrate: 1293 kb/s
07:46:11 T:2851744624 M:3993837568    INFO: ffmpeg[A9FA2B70]:     Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc
07:46:11 T:2851744624 M:3993837568    INFO: ffmpeg[A9FA2B70]:     Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 128 kb/s
07:46:11 T:2851744624 M:3993837568  NOTICE: Opening video stream: 0 source: 256
07:46:11 T:2851744624 M:3993837568  NOTICE: Creating video codec with codec id: 13
07:46:11 T:2851744624 M:3993837568   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:no OpenMax:no VDPAU:no VAAPI:yes
07:46:11 T:2851744624 M:3993837568   DEBUG: FactoryCodec - Video:  - Opening
07:46:11 T:2851744624 M:3993837568   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/swscale-0-i486-linux.so)
07:46:11 T:2851744624 M:3993837568   DEBUG: Loading: /usr/local/lib/xbmc/system/players/dvdplayer/swscale-0-i486-linux.so
07:46:11 T:2851744624 M:3993526272   DEBUG: SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/avfilter-1-i486-linux.so)
07:46:11 T:2851744624 M:3993526272   DEBUG: Loading: /usr/local/lib/xbmc/system/players/dvdplayer/avfilter-1-i486-linux.so
07:46:11 T:2851744624 M:3993722880  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
07:46:11 T:2851744624 M:3993722880   DEBUG: VAAPI - attempting to open codec 13 with profile -99 at level -99 with 1 reference frames
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - initialize version 0.32
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - profile 0
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - profile 1
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - profile 5
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - profile 6
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - profile 7
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - profile 8
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - profile 9
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - profile 10
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - unable to find a suitable profile
07:46:11 T:2851744624 M:3993378816   DEBUG: VAAPI - destroying display 0xaaeae88

here is my vainfo output:
Code:
libva: libva version 0.32.0
libva: va_getDriverName() returns 0
libva: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.32
vainfo: Driver version: i965 Driver 0.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264Baseline           :    VAEntrypointVLD
      VAProfileH264Baseline           :    VAEntrypointEncSlice
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointEncSlice
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointEncSlice
      VAProfileVC1Simple              :    VAEntrypointVLD
      VAProfileVC1Main                :    VAEntrypointVLD
      VAProfileVC1Advanced            :    VAEntrypointVLD

Any ideas?

Thanks!


- muhehe - 2011-07-29

sephiros Wrote:Hi Alan,

I'm not sure what's going on. I can compile everything fine, XBMC compiles with VAAPI but if I try to run a video with VAAPI enabled, it will crash.

Hi folks, I'm suffering with exactly the same issue. XBMC crashes when I try to play video with VAAPI. Software decoding works fine.

crash log:
Code:
21:51:29 T:140257844971456 M:1794797568  NOTICE: Starting XBMC, Platform: Linux (Ubuntu 11.04, 2.6.38-10-generic x86_64). Built on Jul 22 2011 (Git:20110722-e825052)
Code:
21:53:36 T:140257323132672 M:1724805120    INFO: ffmpeg[33EC2700]: Input #0, matroska,webm, from '/Videos/THX.1138.1971.1080p.BluRay.x264-CiNEFiLE.mkv':
21:53:36 T:140257323132672 M:1724805120    INFO: ffmpeg[33EC2700]:   Duration: 01:28:32.29, start: 0.000000, bitrate: 10606 kb/s
21:53:36 T:140257323132672 M:1724805120    INFO: ffmpeg[33EC2700]:     Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x816, PAR 1:1 DAR 40:17, 23.98 fps, 24 tbr, 1k tbn, 47.95 tbc
21:53:36 T:140257323132672 M:1724805120    INFO: ffmpeg[33EC2700]:     Stream #0.1(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s
21:53:36 T:140257323132672 M:1724805120    INFO: ffmpeg[33EC2700]:     Stream #0.2(eng): Subtitle: [0][0][0][0] / 0x0000
21:53:36 T:140257323132672 M:1724805120  NOTICE: Opening video stream: 0 source: 256
21:53:36 T:140257323132672 M:1724805120  NOTICE: Creating video codec with codec id: 28
21:53:36 T:140257323132672 M:1724805120   DEBUG: CDVDFactoryCodec: compiled in hardware support: CrystalHD:no OpenMax:no VDPAU:no VAAPI:yes
21:53:36 T:140257323132672 M:1724805120   DEBUG: FactoryCodec - Video:  - Opening
21:53:36 T:140257323132672 M:1724805120  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
21:53:36 T:140257323132672 M:1724805120   DEBUG: FactoryCodec - Video: ff-h264 - Opened
21:53:36 T:140257323132672 M:1724805120  NOTICE: Creating video thread
21:53:36 T:140257323132672 M:1724805120  NOTICE: Opening audio stream: 1 source: 256
21:53:36 T:140257265465088 M:1724805120   DEBUG: Thread CDVDPlayerVideo start, auto delete: 0
21:53:36 T:140257265465088 M:1724805120   DEBUG: LinuxRendererGL: Cleaning up GL resources
21:53:36 T:140257265465088 M:1724805120  NOTICE: running thread: video_thread
21:53:36 T:140257323132672 M:1724805120  NOTICE: Finding audio codec for: 86020
21:53:36 T:140257323132672 M:1724805120   DEBUG: FactoryCodec - Audio: FFmpeg - Opening
21:53:36 T:140257323132672 M:1724805120   DEBUG: FactoryCodec - Audio: FFmpeg - Opened
21:53:36 T:140257323132672 M:1724805120  NOTICE: Creating audio thread
21:53:36 T:140257323132672 M:1724805120  NOTICE: Opening Subtitle stream: 2 source: 256
21:53:36 T:140257323132672 M:1724805120   DEBUG: FactoryCodec - Overlay: Text Subtitle Decoder - Opening
21:53:36 T:140257323132672 M:1724805120   DEBUG: FactoryCodec - Overlay: Text Subtitle Decoder - Opened
21:53:36 T:140257257072384 M:1724805120   DEBUG: Thread CDVDPlayerAudio start, auto delete: 0
21:53:36 T:140257257072384 M:1724805120  NOTICE: running thread: CDVDPlayerAudio::Process()
21:53:36 T:140257323132672 M:1724805120   DEBUG: ReadEditDecisionLists - Checking for edit decision lists (EDL) on local drive or remote share for: /Videos/THX.1138.1971.1080p.BluRay.x264-CiNEFiLE.mkv
21:53:36 T:140257323132672 M:1724805120   DEBUG: CDVDPlayer::SetCaching - caching state 2
21:53:36 T:140257844971456 M:1724805120   DEBUG: CGUIAudioManager::DeInitialize
21:53:36 T:140257265465088 M:1724805120   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
21:53:36 T:140257265465088 M:1724805120    INFO: CDVDPlayerVideo - Stillframe left, switching to normal playback
21:53:36 T:140257323132672 M:1724805120   DEBUG: CheckPlayerInit - dropping packet type:2 dts:83000.000000 to get to start point at 167000.000000
21:53:36 T:140257265465088 M:1724805120   DEBUG: VAAPI - attempting to open codec 28 with profile 100 at level 41 with 5 reference frames
21:53:36 T:140257323132672 M:1724805120   DEBUG: CheckPlayerInit - dropping packet type:2 dts:42000.000000 to get to start point at 167000.000000
21:53:36 T:140257323132672 M:1724805120   DEBUG: CheckPlayerInit - dropping packet type:2 dts:125000.000000 to get to start point at 167000.000000
21:53:36 T:140257257072384 M:1724805120  NOTICE: Creating audio device with codec id: 86020, channels: 6, sample rate: 48000, no pass-through
21:53:36 T:140257257072384 M:1724805120    INFO: AudioRendererFactory:  not a explicit device, trying to autodetect.
21:53:36 T:140257257072384 M:1724805120    INFO: CPCMRemap: Configured speaker layout: 2.0
21:53:36 T:140257257072384 M:1724805120    INFO: CPCMRemap: I channel map: FL,FR,CE,LFE,SL,SR
21:53:36 T:140257257072384 M:1724805120   DEBUG: CPCMRemap: Forcing side channel map to back channels
21:53:36 T:140257257072384 M:1724805120    INFO: CPCMRemap: O channel map: FL,FR
21:53:36 T:140257257072384 M:1724805120   DEBUG: CPCMRemap: Downmix normalization is disabled
21:53:36 T:140257257072384 M:1724010496   DEBUG: CPCMRemap: FL = FL(1.000000) CE(0.707107) LFE(0.707107) BL(1.000000)
21:53:36 T:140257257072384 M:1723248640   DEBUG: CPCMRemap: FR = FR(1.000000) CE(0.707107) LFE(0.707107) BR(1.000000)
21:53:36 T:140257257072384 M:1723121664   DEBUG: CPulseAudioDirectSound::CPulseAudioDirectSound - Requested channels changed from 6 to 2
21:53:36 T:140257257072384 M:1723375616   DEBUG: RemoveActiveDevice - Removing device 1
21:53:36 T:140257323132672 M:1708732416   DEBUG: CDVDPlayer::SetCaching - caching state 0
21:53:36 T:140257265465088 M:1708646400   DEBUG: VAAPI - initialize version 0.32
21:53:36 T:140257265465088 M:1708646400   DEBUG: VAAPI - profile 0
21:53:36 T:140257265465088 M:1708646400   DEBUG: VAAPI - profile 1
21:53:36 T:140257265465088 M:1708646400   DEBUG: VAAPI - profile 5
21:53:36 T:140257265465088 M:1708646400   DEBUG: VAAPI - profile 6
21:53:36 T:140257265465088 M:1708646400   DEBUG: VAAPI - profile 7
21:53:36 T:140257265465088 M:1708646400   DEBUG: VAAPI - profile 8
21:53:36 T:140257265465088 M:1708646400   DEBUG: VAAPI - profile 9
21:53:36 T:140257265465088 M:1708646400   DEBUG: VAAPI - profile 10
21:53:36 T:140257265465088 M:1708638208   DEBUG: VAAPI - making sure 8 surfaces are allocated for given 5 references
21:53:36 T:140257265465088 M:1708130304    INFO: ffmpeg[307C3700]: [h264] Cannot parallelize deblocking type 1, decoding such frames in sequential order
21:53:36 T:140257257072384 M:1708130304   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
21:53:36 T:140257257072384 M:1708130304   DEBUG: RemoveActiveDevice - Removing device 0
21:53:36 T:140257257072384 M:1709953024   DEBUG: PulseAudio: Context failed
21:53:36 T:140257257072384 M:1709953024   ERROR: PulseAudio: Waited for the Context but it failed
21:53:36 T:140257257072384 M:1709953024   ERROR: PulseAudio: Failed to create context
21:53:36 T:140257257072384 M:1709953024   DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
21:53:36 T:140257257072384 M:1709953024   DEBUG: RemoveActiveDevice - Removing device 2
21:53:36 T:140257257072384 M:1709953024   DEBUG: CGUIAudioManager::Initialize


############### END LOG FILE ################

Appreciate any help
Thanks!


- alanwww1 - 2011-07-29

With current libva and mesa compiles this happens unfortunately. I think it is some kind of segmentation fault we have. Someone need to make a debug of what function call fails and why. I have no time at the moment for this.


- usshin - 2011-07-29

So does anybody know the last git hashes of libva and mesa that worked?


- sraue - 2011-07-30

usshin Wrote:So does anybody know the last git hashes of libva and mesa that worked?

i had similiar problems if compiling Mesa with shared dricore support. in general latest Mesa-7.11-rc3/4 should work with disable shared dricore support