View previous topic :: View next topic |
Author |
Message |
azp Guru
Joined: 16 Nov 2003 Posts: 456 Location: Sweden
|
Posted: Tue Dec 15, 2015 6:33 pm Post subject: Proper video acceleration on RadeonSI |
|
|
Hi guys, I've been googling the hell out of this, as well as reading the Gentoo and Arch wikis and forums. But I just can't get a straight answer: What is the correct way of setting up video acceleration on the radeonsi drivers?
Vdpau?
Libva/VA-API?
vdpau/gallium as vdpau-drivers?
The reason I started looking for this is that my Totem can't play any videos, and I saw issues with libva when I checked the gst-debug output.
Code: | libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/va/drivers/radeonsi_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/va/drivers/radeonsi_drv_video.so
libva info: va_openDriver() returns -1 |
So I checked that everything was built with va-api and vdpau use flags. It is. The libva and vdpau packages are installed.
Code: | root@skare$ eix -I libva
[I] x11-libs/libva
Available versions: 1.3.1 (~)1.4.0 (~)1.4.1 (~)1.5.0 (~)1.5.1 (~)1.6.0 (~)1.6.1 **9999 {X +drm egl opengl vdpau wayland ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" VIDEO_CARDS="dummy fglrx intel nouveau nvidia"}
Installed versions: 1.6.1(06:59:05 PM 12/15/2015)(X drm egl opengl vdpau wayland ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" VIDEO_CARDS="-dummy -fglrx -intel -nouveau -nvidia")
Homepage: http://www.freedesktop.org/wiki/Software/vaapi
Description: Video Acceleration (VA) API for Linux
[I] x11-libs/libva-vdpau-driver
Available versions: 0.7.4-r2 0.7.4-r3 **9999 {debug opengl ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
Installed versions: 0.7.4-r3(06:59:36 PM 12/15/2015)(opengl -debug ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
Homepage: http://www.freedesktop.org/wiki/Software/vaapi
Description: VDPAU Backend for Video Acceleration (VA) API
root@skare$ eix -I libva
[I] x11-libs/libva
Available versions: 1.3.1 (~)1.4.0 (~)1.4.1 (~)1.5.0 (~)1.5.1 (~)1.6.0 (~)1.6.1 **9999 {X +drm egl opengl vdpau wayland ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" VIDEO_CARDS="dummy fglrx intel nouveau nvidia"}
Installed versions: 1.6.1(06:59:05 PM 12/15/2015)(X drm egl opengl vdpau wayland ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" VIDEO_CARDS="-dummy -fglrx -intel -nouveau -nvidia")
Homepage: http://www.freedesktop.org/wiki/Software/vaapi
Description: Video Acceleration (VA) API for Linux
[I] x11-libs/libva-vdpau-driver
Available versions: 0.7.4-r2 0.7.4-r3 **9999 {debug opengl ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
Installed versions: 0.7.4-r3(06:59:36 PM 12/15/2015)(opengl -debug ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
Homepage: http://www.freedesktop.org/wiki/Software/vaapi
Description: VDPAU Backend for Video Acceleration (VA) API
Found 2 matches
root@skare$ eix -I vdpau
[I] x11-libs/libva-vdpau-driver
Available versions: 0.7.4-r2 0.7.4-r3 **9999 {debug opengl ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
Installed versions: 0.7.4-r3(06:59:36 PM 12/15/2015)(opengl -debug ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
Homepage: http://www.freedesktop.org/wiki/Software/vaapi
Description: VDPAU Backend for Video Acceleration (VA) API
[I] x11-libs/libvdpau
Available versions: 1.1.1 {doc dri test ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
Installed versions: 1.1.1(11:49:02 PM 12/12/2015)(dri -doc -test ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
Homepage: http://www.freedesktop.org/wiki/Software/VDPAU
Description: VDPAU wrapper and trace libraries
[I] x11-libs/libvdpau-va-gl [1]
Available versions: (~)0.3.4 **9999
Installed versions: 0.3.4(06:57:16 PM 12/15/2015)(-test)
Homepage: https://github.com/i-rinat/libvdpau-va-gl/
Description: VDPAU driver with VA-API/OpenGL backend.
[I] x11-misc/vdpauinfo
Available versions: 1.0
Installed versions: 1.0(07:02:01 PM 12/15/2015)
Homepage: http://www.freedesktop.org/wiki/Software/VDPAU
Description: Displays info about your card's VDPAU support
[1] "x11" /var/lib/layman/x11 |
I then changed the LIBVA_DRIVER_NAME env variable, and the vainfo started working:
Code: | peter@skare ~ $ export LIBVA_DRIVER_NAME=vdpau
peter@skare /mnt/b3/downloads/Family.Guy.S12.720p.HDTV.x264-TBy $ vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'vdpau'
libva info: Trying to open /usr/lib64/va/drivers/vdpau_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.6.1)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.4
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG4Simple : VAEntrypointVLD
VAProfileMPEG4AdvancedSimple : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
peter@skare ~ $ ll /usr/lib/va/drivers/
total 1,6M
-rwxr-xr-x 1 root root 1,5M 13 dec 22.53 gallium_drv_video.so*
lrwxrwxrwx 1 root root 18 15 dec 18.59 nouveau_drv_video.so -> vdpau_drv_video.so*
lrwxrwxrwx 1 root root 18 15 dec 18.59 nvidia_drv_video.so -> vdpau_drv_video.so*
lrwxrwxrwx 1 root root 18 15 dec 18.59 s3g_drv_video.so -> vdpau_drv_video.so*
-rwxr-xr-x 1 root root 996 15 dec 18.59 vdpau_drv_video.la*
-rwxr-xr-x 1 root root 95K 15 dec 18.59 vdpau_drv_video.so*
peter@skare ~ $ export LIBVA_DRIVER_NAME=gallium
peter@skare ~ $ vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'gallium'
libva info: Trying to open /usr/lib64/va/drivers/gallium_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.6.1)
vainfo: Driver version: mesa gallium vaapi
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG4Simple : VAEntrypointVLD
VAProfileMPEG4AdvancedSimple : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264Baseline : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD |
But which one should I choose? Should it be gallium or vdpau? One forum posted mentioned that I don't even need the vdpau for radeonsi drivers, since the gallium drivers have built-in va-support (which I guess is the gallium driver?).
So what's the deal? Which is the best video acceleration available on radeonsi drivers, and how do I enable it (and disable all other possibilities?). _________________ Weeks of coding can save you hours of planning. |
|
Back to top |
|
|
chithanh Developer
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Tue Dec 15, 2015 9:36 pm Post subject: |
|
|
VAAPI support is currently broken in mesa (bug 549564)
Your options are OpenMAX (supports both encode and decode) or VDPAU (decode only).
Last edited by chithanh on Tue Feb 09, 2016 2:17 pm; edited 1 time in total |
|
Back to top |
|
|
azp Guru
Joined: 16 Nov 2003 Posts: 456 Location: Sweden
|
Posted: Thu Feb 04, 2016 3:05 pm Post subject: |
|
|
chithanh wrote: | VAAPI support is currently broken in mesa (bug 549654)
Your options are OpenMAX (supports both encode and decode) or VDPAU (decode only). |
Ok, thanks, so which is the optimal way? I'd like a clear-cut "This is the best acceleration method as of today", it's really hard to find online. Personally, I have no idea if my card supports OpenMAX or not, or if it's better or worse than VDPAU. _________________ Weeks of coding can save you hours of planning. |
|
Back to top |
|
|
chithanh Developer
Joined: 05 Aug 2006 Posts: 2158 Location: Berlin, Germany
|
Posted: Thu Feb 04, 2016 6:16 pm Post subject: |
|
|
The card is agnostic to the acceleration method. These are all implemented via mesa.
The question is, what does your playback software or multimedia framework support. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Feb 04, 2016 10:16 pm Post subject: |
|
|
And the answer to that's usually "VDPAU", so go with that... |
|
Back to top |
|
|
GabrielYYZ n00b
Joined: 03 May 2012 Posts: 24 Location: Dominican Republic
|
Posted: Fri Feb 05, 2016 1:10 am Post subject: |
|
|
I have a R9 280 and VDPAU+mpv(the "mplayer-next") works like a charm. |
|
Back to top |
|
|
Leio Developer
Joined: 27 Feb 2003 Posts: 494 Location: Estonia
|
Posted: Fri Feb 05, 2016 2:33 pm Post subject: |
|
|
If your multimedia framework/program only supports VAAPI and you need to decode with VDPAU, you could also try x11-libs/libva-vdpau-driver to hopefully make it work with VAAPI that way. Haven't tried it myself yet though (switched to intel laptop as my main before getting to that with my radeon desktop for gstreamer purposes - gstreamer doesn't support H.264 with VDPAU yet in 1.x versions and point towards VAAPI usage). _________________ GNOME team lead; GStreamer; MIPS/ARM64 |
|
Back to top |
|
|
azp Guru
Joined: 16 Nov 2003 Posts: 456 Location: Sweden
|
Posted: Mon Feb 22, 2016 10:48 am Post subject: |
|
|
I don't care which player I use, as long as it works. I recently switched from Totem (since they seem to have problems with VAAPI/VDPAU) to MPV and really like that so far.
I'll adapt to the player which supports "the most suitable acceleration method" for my driver/card. Someone said that libva-vdpau-driver is like going across to river to fetch water, which to me sounds like it's "not the most optimal solution". But since I don't know if libva (VAAPI?) or vdpau is considered more "native" for my driver/card I wouldn't have guessed that.
So it sounds like VAAPI is the default support for AMD drivers, as long as my framework/player supports it? _________________ Weeks of coding can save you hours of planning. |
|
Back to top |
|
|
Leio Developer
Joined: 27 Feb 2003 Posts: 494 Location: Estonia
|
Posted: Tue Feb 23, 2016 8:38 am Post subject: |
|
|
I believe AMD open source drivers can do all of VDPAU, VAAPI and OpenMAX but the VAAPI support is broken in some versions. VAAPI support is enabled for radeon on mesa with USE=vaapi but was or is broken on some versions as noted above.
VDPAU support came first, but that API doesn't support hardware encoding and didn't catch on, so they added OpenMAX for encoding (very much used across the board on ARM devices, but not very popular on x86_64; they did decoding support there too afaik) and then also VAAPI for the same + decoding.
If you liked totem and would like to use that with hardware decoding, I believe there has been further fixes done to that in gstreamer, and would be good to have it working great on Gentoo. gstreamer doesn't support H.264 via VDPAU though, but does support OpenMAX and VAAPI fully and advertises that libva-vdpau-driver bridge if hardware only does VDPAU. If there are still problems, we could work on that, but I'm now back to intel graphics on my main machine (and don't like totem's UI myself much) _________________ GNOME team lead; GStreamer; MIPS/ARM64 |
|
Back to top |
|
|
azp Guru
Joined: 16 Nov 2003 Posts: 456 Location: Sweden
|
Posted: Mon Feb 29, 2016 2:18 pm Post subject: |
|
|
Leio wrote: | I believe AMD open source drivers can do all of VDPAU, VAAPI and OpenMAX but the VAAPI support is broken in some versions. VAAPI support is enabled for radeon on mesa with USE=vaapi but was or is broken on some versions as noted above.
VDPAU support came first, but that API doesn't support hardware encoding and didn't catch on, so they added OpenMAX for encoding (very much used across the board on ARM devices, but not very popular on x86_64; they did decoding support there too afaik) and then also VAAPI for the same + decoding.
If you liked totem and would like to use that with hardware decoding, I believe there has been further fixes done to that in gstreamer, and would be good to have it working great on Gentoo. gstreamer doesn't support H.264 via VDPAU though, but does support OpenMAX and VAAPI fully and advertises that libva-vdpau-driver bridge if hardware only does VDPAU. If there are still problems, we could work on that, but I'm now back to intel graphics on my main machine (and don't like totem's UI myself much) |
First I'd like to say "Thanks for great answers!". I don't think I have much preference regarding video player, I just like if I'm able to open a file and have working srt subtitles. I very rarely watch videos on my computer, I mainly use my "smart" TV with my NAS. I figured that I still wanted a working hardware acceleration, it feels very sub-optimal to use software decoding if it can be done on the GPU. _________________ Weeks of coding can save you hours of planning. |
|
Back to top |
|
|
azp Guru
Joined: 16 Nov 2003 Posts: 456 Location: Sweden
|
Posted: Mon Oct 24, 2016 8:41 pm Post subject: |
|
|
As a follow-up to this question, I just found a test a couple of years old, that is very relevant to the question at hand!
http://www.gearsongallium.com/?p=1580 _________________ Weeks of coding can save you hours of planning. |
|
Back to top |
|
|
|