GPU computing Stay up to date in OpenCL, DirectCompute, CUDA, CAL and OpenGL information

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 6 November 2009

About Xvba VAAPI backend..

Posted on 22:44 by Unknown
Driver here:
http://www.splitted-desktop.com/~gbeauchesne/xvba-video/ 

Well I was reading Xvba info on phronix forums after mplayer-vaapi not  working on my ATI Radeon 5850 with AMD OpenCL drivers (9.11) and Ubuntu 9.10
Well the crazy thing is that I have not it get 5850 to work with any currently drivers..

The best way to install ATI is from http://wiki.cchtml.com/index.php/Main_Page.

Following this steps also libamdxvba will not install in Ubuntu 9.10 due to missing dependencies (libstdc++5) that aren't really required (see ldd libamdxvba.so) so you have to do:
sudo dpkg --force all -i libamdxvba1_8.661-0ubuntu1_i386.deb
 if you want to install other packages using
you have to use --force all
also
When you want to remove use to fix the system:
sudo apt-get -f install


The good thing is that I have a 4850 card too so I tested with it.. and I managed to test it.. with these drivers no luck.. and after testing a lot of it it's only working on 9.10 released at ATI.
Drivers:
9.9 (8.65) no
9.10 (.66)integrated Ubuntu 9.10 repos:no
9.10 (.661)official:yes
9.11 (67)no

note with 9.10 I lost playing with OpenCL and also CAL as CAL 2.0 isn't working with 5850 and 4850.. with the API being so low lewel i thougt it would be supported badsituation ..
I get segmenation faults..
Also I think (after much testing) it isn't working if you have two desktops with ATI 5850 and 4850 and booting in BIOS say with 4850..
Well as 2xxx aren't supported either seems only 3xxx (?) and 4xxx at the moment.
ATi says only UVD 2. Perhaps as 5850 has UVD 2.2 is not working..

Weird things.. only getted to work with 4850 enabled in xorg.conf say..
For me:
aticonfig --initial --adapter=1


With that I have played well Bluray bit perfect ripped m2ts. Well almost..
Casino Royale (H264 30mbps 1080p) : well usage 3-4%
Tomorrow day (VC1 ? I think) : bad colors

Anyway as said the page is only working trough GL interop:
 mplayer -va vaapi -vo vaapi:gl

 -vo vaapi:gl[:reflect]

anyway GL interop is efficient on ATI (remains 3-4%) while I learnt sometime ago Nvidia GL interop (trough ext_texture_pixmap?) is bad (increments usage to 20-30%)
but it's partly explained by a talk at a recent X conference by Aaron Platner (said X synchronization) where they argued X different streams ex. VDPAU and GL streams lack GPU sincronization between them need for no tearing.. as this is lacking (and presumably done by CPU?) perhaps is a reason..
Also I have found a bug or limitation in ATIs part and is that if you put Compiz in the scene usage ups a lot (as high as 40-60%?) and also without GL manager but putting windows in front of the player (10-25%)

Anyway also there are also good things to mention between them namely VC-1 is supported on all GPUs supporting Xvbau while as VDPAU supports decoding in high end GPUs (GT275) but with VLD in CPU (usage 20-30%) is only supported at the moment by (9400m and GT220-240 dx10.1 gpus) see vdpau support in nvidia installion..

All of that can be tested with scripts at:
http://www.splitted-desktop.com/~gbeauchesne/mplayer-bench/
There a also results on phoronix and a readme in this package..


Bad is that VDPAU supports H264 and VC1 but also MPEG2 and recently MPEG4
with a presentation API in top op it (GUI) and also advanced rescaling,etc..
Xvba trough VAAPI  seems to be limited to  H264 and VC1 (hardware UVD in fact.. )  and has in mplayer-vaapi no OSD support (subtitles,etc..)..
Anyway with GL interop is easy to put OSD on top of that and the developer hints that it has get working OSD patches..

Also seems that h264 L5.1 videos aren't working in some/most cases..
Get info with:
http://mediainfo.sourceforge.net/en/Download/Debian
Try to work:
Try to play with the extra "dm" option. e.g. -vo vaapi:dm=0 or 1 (whatever works) as a workaround. Something probably regressed.

Things learned in the forums:

First use
http://www.splitted-desktop.com/~gbeauchesne/hwdecode-demos
this simple examples for testing examples before attempting
the mpayer-vaapi

I have found this accept this flags:
--clipping
--hwaccel vaapi
--size?
--(get|put)image-format
--putimage
--glx --x11
--vaapi-glx-use-copy
--glx-alloc-pixmap-asap
--glx-use-fbo
--getimage [video|output|pixmap]

 and more..
By default uses putimage with  x11 pixmaps and that doesn't work in AIT..
the correct way is --glx for testing..
./vaapi_h264 --glx

./vaapi_vc1 --glx

 as said
./vaapi_mpeg2 --glx not works..

With these examples my 5850 get artifacts but not crashed..
Also
va --getimage
is working in 5850 correct but gets an error about a function..

Second:

Use vsync in Catalyst Control Center to avoid tearing..
Also if you have more than 1 GPUs or multimonitor can be good to disable RandR
support:
aticonfig --set-pcs-str="DDX,EnableRandR12,FALSE"

configure also with:
sudo aticonfig --initial=dual-head --adapter=all
(You *might* also want to disable RandR support if you're using multiple cards -- not sure if that is still required or if we figured out how to make RandR (which is still single-card oriented) coexist with multicard support -- but make sure you're running the right setup commands first and let us know what happens.)

for me better (doesnt work)
sudo aticonfig --adapter=all 

NOTE:for learnes can be good the automated scripts that get all the stuff from a guy:(driver,this library and build more recent mplayer with multichanel sound patches):

So for all Debian/Ubuntu users i updated my scripts to autoinstall the needed files. As it requires fglrx 9-10 final driver best solution is:

rm -f /etc/X11/xorg.conf*

then run first my script to install fglrx:

http://kanotix.com/files/install-fglrx-debian.sh

then run my script for mplayer vaapi - which works on nvidia to - ideal for comparison! in theory psb too, but could not test.

http://kanotix.com/files/fix/mplayer-vaapi-latest-1.txt


FIXING AMD SETTINGS:
1. Boot system in single user mode (don't let X load)
2. make a backup of your amdpcsdb
Code:

sudo mv /etc/ati/amdpcsdb /etc/ati/amdpcsdb.bak

3. copy the default
Code:

sudo cp /etc/ati/amdpcsdb.default /etc/ati/amdpcsdb

4. Apply necessary changes again ...
5. Restart the system

See follow up posts on GPU Bluray decoding in Linux.. video procession and GPU computing..


BENCHMARK
I'll have to find some more taxing clips, but in my experience so far, this has pretty impressive results. I've been trying some of the various h.264 clips (trying to find the highest frame size and bitrate ones I can) on http://www.h264info.com/clips.html

This isn't a comprehensive, or particularly scientific benchmark, but it gives an idea of the difference in processor (CPU) usage between Xv and XvBA. I'm using htop to monitor mplayer, btw.

Phenom II 810 (2.6GHz), MSI 790GX-G65 using onboard HD3300:


I am Legend 1080p (really 816p):
without XvBA: max 77% CPU
with XvBA: max 3% CPU


Coraline 1080p (from the link at the top of the page at Digital Digest)

without XvBA: spiked at 99% usage 102secs into the clip, mplayer complains system is too slow, but for the most part was 30-70%
with XvBA: %2-3

So far any of the others I've played back give the same results: no more than %3 usage. If anyone knows of a particularly strenuous clip I'd like to try it.

Other  DUMP NOTES:
fallback disable compix
aticonfig --set-pcs-str="DDX,EnableRandR12,FALSE"


mslinn; are you running the appropriate aticonfig command after install ? Going from memory, but I think it would be something like :

sudo aticonfig --initial=dual-head --adapter=all

If you run aticonfig --help and look at the end of the resulting output you'll find details on these options. Further up are options to let you control where the screens are placed.

You *might* also want to disable RandR support if you're using multiple cards -- not sure if that is still required or if we figured out how to make RandR (which is still single-card oriented) coexist with multicard support -- but make sure you're running the right setup commands first and let us know what happens.

h264 l5.1 usually fails
Try to play with the extra "dm" option. e.g. -vo vaapi:dm=0 or 1 (whatever works) as a workaround. Something probably regressed.

xvba-video has got some extra drawbacks:


a) No OSD/subtitle support at all.
Well, not in a version you can use yet. ;-)

b) mpeg2 is not fully supported, which is really bad as you still have to use only for that content type direct gl outout - on nvidia you can use vaapi for at least 3 content types, in theory with the dx10.1 cards even 4.
It's not an XvBA limitation but a limitation of the underlying HW. The API won't magically implement something if the underlying HW doesn't support it.

ou reminded me of updateing the infos at the end of the script. The way you tried works with nvidia and intel (there you need -2 script) but not with fglrx. fglrx only works with -vo vaapi:gl[:reflect]. Don't know when this will change.

2nd hint: if it still does not play check mediainfo if it is h264 L5.1. 

So how well does this work together with compiz/kwin desktop-effects?
And what about tearing, with and without compositing?
It does, though only tested in Ubuntu. Concerning the tearing, since that version only has OpenGL, you have to enable always vsync in e.g. amdcccle. There is another means to get tear-free rendering without OpenGL but this is not available in public builds.

a) you can press D to deinterlace with -vo vdpau but not with -vo vaapi
b) h264 l5.1 usually fails

xvba-video has got some extra drawbacks:

a) No OSD/subtitle support at all.
b) mpeg2 is not fully supported, which is really bad as you still have to use only for that content type direct gl outout - on nvidia you can use vaapi for at least 3 content types, in theory with the dx10.1 cards even 4.
a) you can press D to deinterlace with -vo vdpau but not with -vo vaapi
b) h264 l5.1 usually fails
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Porting CUDA to OpenCL!
    Well so you want to port CUDA code to OpenCL: you are in AMD GPU competition of porting Cuda codes to opencl (see previous post) or you are ...
  • Megapost!
    Today fools{ *GTX 485 is 512 cores 3gbytes gddr5 and 850/1750 shaders.. *ati 5990 has 4 gpus in board.. *bulldozer benchmarks }end fools.. A...
  • About ATI and Nvidia drivers (OCL included)!
    Hi I have been investigating AMD and Nvidia drivers.. for 10.3 there are 3d hooks support for 120hz monitors but is d3d9 d3d10 or d3d11 enab...
  • things found in CUDA forums
    Also some CUDA news: Mandelbulb stereo angalyph -> have to port to 3D Vision http://forums.nvidia.com/index.php?showtopic=150985&st=2...
  • opencl/opengl linux interop! seen in opencl cuda 3.0 sdk samples
    Following my OpenCL/OpenGL Window interop work: now has come to Linux  for Nvidia GPU computing registered developers via 195.17 driver! Als...
  • State of the blog..
    Sorry for the delay guys of posting code of Apple OpenCL demos port.. the blog has been with no updated for more than 2 weeks in this rapid ...
  • Optix and OpenCL SDKs with Visual Studio 2010
    Optix 1.0 ========= install cg download Cmake 2.80 cmake says error dumpbin not found and it is cuda doesn't work with vc2010 so copy pt...
  • CUDA 3.0 forums stuff!
    1.Getting CUBIN instead of ELF If you need the older text format, you can disable ELF cubins in nvcc.profile by changing "CUBINS_ARE_EL...
  • News from the web!
    Some things learned in AMD forums: 1.Why 3xxx no OpenCL: Compute shader mode is a hardware feature that did not exist in the HD38XX line of ...
  • Shaders: measuring perf, source translation and parsing different languages!
    Hi, I hope to be pretty exhaustive of options for parsing and translating between graphics and compute shaders ( some open source) For DX sh...

Blog Archive

  • ►  2013 (5)
    • ►  September (1)
    • ►  March (3)
    • ►  February (1)
  • ►  2012 (1)
    • ►  December (1)
  • ►  2010 (46)
    • ►  July (4)
    • ►  May (1)
    • ►  April (3)
    • ►  March (9)
    • ►  February (15)
    • ►  January (14)
  • ▼  2009 (125)
    • ►  December (51)
    • ▼  November (53)
      • Two big games coming today: State of the art Direc...
      • News from the web (IV) (big compilation)
      • Wishes in GPU drivers before Q2 2009!
      • CUDA Atomics perf!
      • GPU Compute benchmark results!
      • Interesting AMD Stream forums posts! (old posts)
      • Testing my apps with 8600GTS and WinXP!
      • A lot of Catalyst AMD drivers!
      • News from the web III
      • News from the web II (big compilation)
      • News from OpenCL forums!
      • Bugs in OpenGL AMD drivers: Geometry shader and te...
      • Testing LDS perf in OpenCL!
      • OpenCL bugs!
      • Benchmarking OpenCL and DirectCompute!
      • Benchmarking stientific kernels on OpenCL!
      • News from the web!
      • OpenCL learning and tutorials!
      • Porting CUDA to OpenCL!
      • GPU computing programming contests..
      • AMD 5xxx series overclocking..
      • OpenCL on Apple: update!
      • State of the blog..
      • Places where OpenCL shines!
      • Running Optix with Geforce in Linux
      • New exciting soft and info coming this year!
      • Matmul bench for CUDA, CAL, and MultiCore CPUs!
      • More than 10 places where DX Compute 5.0 is better...
      • CUDA 3.0 has CUBLAS functions for MAGMA with compl...
      • About IBM OpenCL
      • OpenGL interop perf in CUDA and OCL in Linux
      • Fraps like for Linux and for Windows DX11!
      • opencl/opengl linux interop! seen in opencl cuda 3...
      • AMD OpenCl forums (I)
      • About CUDA 3.0 (II)
      • About CUDA 3.0 (I)
      • CAL 2.0 vs 1.4 API
      • Naive OpenCL benchmarks..
      • Managing AMD OpenCL GPU devices and OpenCL backend...
      • About Xvba VAAPI backend..
      • CUDA 3.0 released
      • About Khronos ICD model..
      • Exploring Nvidia OpenCL 195.39 drivers:Bugs , perf...
      • Nvidia OpenCL samples with AMD OpenCL drivers!
      • Nvidia OpenCL samples on Nvidia 195 OpenCL drivers!!
      • AMD OpenCL samples on Nvidia 195 OpenCL drivers!!
      • Optix and OpenCL SDKs with Visual Studio 2010
      • OpenCL on AMD GPUs!
      • Dreaming about Ubuntu 10.04
      • News from the web!
      • OpenCL-z is here!
      • Port of Apple demos to Windows..
      • Shared memory names..
    • ►  October (21)
Powered by Blogger.

About Me

Unknown
View my complete profile