You are not logged in.

#1 2014-01-16 09:28:31

jonyibandi
Member
Registered: 2013-12-16
Posts: 9

Radeon driver + VDPAU and VAAPI

Hi!
About a week ago, somebody advised me on an IRC chat, to use open source radeon driver instead of catalyst. It is my first time, I use radeon (gallium) driver and I am surprised. On KDE everything works fine except the hardware acceleration. I read about vdpau vaapi backend, installed libvdpau-va-gl package, finally manage to got vainfo and vdpauinfo output. But if I enable "EnableLinuxHWVideoDecode=1" in mms.cfg flash player crashes. If I would like to play a hd movie and set "-vo vdpau" it has really nice performance, but there is 40-50% CPU usage. So I am a little bit confused about hardware acceleration on linux nowdays.
I have never used vdpau before, because catalyst used vaapi output.

Could you help me about these problems?

Thanks!
Andrew

Last edited by jonyibandi (2014-01-16 09:28:55)

Offline

#2 2014-01-16 10:58:31

sekret
Member
Registered: 2013-07-22
Posts: 303

Re: Radeon driver + VDPAU and VAAPI

So you use mplayer? Or mplayer2? Or mpv?

I use mpv and this is my config

# Specify default video driver (see --vo=help for a list).
vo=vdpau
# Enable hardware decoding if available. Often, this requires using an certain
# video output, otherwise no hardware decoding will be used.
hwdec = auto
[vdpau]
# The profile forces the vdpau VO.
vo=vdpau
# Use hardware decoding (this might break playback of some h264 files)
hwdec=vdpau
# Most video filters do not work with vdpau.
vf-clr=yes

With this, vdpau video decoding works perfectly and my cpu uses about 5%. I'm not sure if all those settings are required, but setting vo=vdpau is definitely not enough.

Offline

#3 2014-01-16 11:20:32

jonyibandi
Member
Registered: 2013-12-16
Posts: 9

Re: Radeon driver + VDPAU and VAAPI

I am using mplayer and mpv too. Added your configuration to /etc/mpv/mpv.conf, then I get this output:
Detected file format: Matroska
[stream] Video (+) --vid=1 (h264)
[stream] Audio (+) --aid=1 --alang=eng (*) (ac3)
Trying to use hardware decoding.
Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264]
Selected audio codec: ATSC A/52A (AC-3) [lavc:ac3]
AO: [pulse] 48000Hz stereo 2ch float
[vdpau] Codec or profile not supported by hardware.
[ffmpeg/video] h264: get_buffer() failed
[ffmpeg/video] h264: thread_get_buffer() failed
[ffmpeg/video] h264: decode_slice_header error
[vdpau] Codec or profile not supported by hardware.
[ffmpeg/video] h264: get_buffer() failed
[ffmpeg/video] h264: thread_get_buffer() failed
[ffmpeg/video] h264: decode_slice_header error
[vdpau] Codec or profile not supported by hardware.
[ffmpeg/video] h264: get_buffer() failed
[ffmpeg/video] h264: thread_get_buffer() failed
[ffmpeg/video] h264: decode_slice_header error
[vdpau] Codec or profile not supported by hardware.
[ffmpeg/video] h264: get_buffer() failed
[ffmpeg/video] h264: thread_get_buffer() failed
[ffmpeg/video] h264: decode_slice_header error
[vdpau] Codec or profile not supported by hardware.
[ffmpeg/video] h264: get_buffer() failed
[ffmpeg/video] h264: thread_get_buffer() failed
[ffmpeg/video] h264: decode_slice_header error
[vdpau] Codec or profile not supported by hardware.
[ffmpeg/video] h264: get_buffer() failed
[ffmpeg/video] h264: thread_get_buffer() failed
[ffmpeg/video] h264: decode_slice_header error
[vdpau] Codec or profile not supported by hardware.
[ffmpeg/video] h264: get_buffer() failed
[ffmpeg/video] h264: thread_get_buffer() failed
[ffmpeg/video] h264: decode_slice_header error
[vdpau] Codec or profile not supported by hardware.
[ffmpeg/video] h264: get_buffer() failed
[ffmpeg/video] h264: thread_get_buffer() failed
[ffmpeg/video] h264: decode_slice_header error
[ffmpeg/video] h264: no frame!
Error while decoding frame!
Error using hardware decoding, falling back to software decoding.
VO: [vdpau] 1280x718 => 1280x718 420p
[vo/vdpau] Compositing window manager detected. Assuming timing info is inaccurate.
AV: 00:00:58 / 02:11:14 (0%) A-V:  0.000

Offline

#4 2014-01-16 21:20:02

sekret
Member
Registered: 2013-07-22
Posts: 303

Re: Radeon driver + VDPAU and VAAPI

What does vdpauinfo show? You find the package in the AUR.

And what's the output of lspci?

Offline

#5 2014-01-16 22:22:36

jonyibandi
Member
Registered: 2013-12-16
Posts: 9

Re: Radeon driver + VDPAU and VAAPI

Here is my vdpauinfo:

display: :0.0   screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0

Video surface:

name   width height types
-------------------------------------------
420     8192  8192  NV12 YV12
422     8192  8192  UYVY YUYV
444     8192  8192  Y8U8V8A8 V8U8Y8A8

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                 0 262144  8192  8192
MPEG2_SIMPLE          3 262144  8192  8192
MPEG2_MAIN            3 262144  8192  8192

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8          8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8
R8G8B8A8          8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8
R10G10B10A2       8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8
B10G10R10A2       8192  8192    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8

Bitmap surface:

name              width height
------------------------------
B8G8R8A8          8192  8192
R8G8B8A8          8192  8192
R10G10B10A2       8192  8192
B10G10R10A2       8192  8192
A8                8192  8192

Video mixer:

feature name                    sup
------------------------------------
DEINTERLACE_TEMPORAL             -
DEINTERLACE_TEMPORAL_SPATIAL     -
INVERSE_TELECINE                 -
NOISE_REDUCTION                  y
SHARPNESS                        y
LUMA_KEY                         -
HIGH QUALITY SCALING - L1        -
HIGH QUALITY SCALING - L2        -
HIGH QUALITY SCALING - L3        -
HIGH QUALITY SCALING - L4        -
HIGH QUALITY SCALING - L5        -
HIGH QUALITY SCALING - L6        -
HIGH QUALITY SCALING - L7        -
HIGH QUALITY SCALING - L8        -
HIGH QUALITY SCALING - L9        -

parameter name                  sup      min      max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH              y        48     8192
VIDEO_SURFACE_HEIGHT             y        48     8192
CHROMA_TYPE                      y 
LAYERS                           y         0        4

attribute name                  sup      min      max
-----------------------------------------------------
BACKGROUND_COLOR                 y 
CSC_MATRIX                       y 
NOISE_REDUCTION_LEVEL            y      0.00     1.00
SHARPNESS_LEVEL                  y     -1.00     1.00
LUMA_KEY_MIN_LUMA                y 
LUMA_KEY_MAX_LUMA                y 


Inconsistency detected by ld.so: dl-close.c: 771: _dl_close: Assertion `map->l_init_called' failed!

And lspci:

00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 03)
00:1a.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
00:1d.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HM (ICH8M) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV630/M76 [Mobility Radeon HD 2600]
02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5787M Gigabit Ethernet PCI Express (rev 02)
04:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
0f:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
0f:06.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
0f:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
0f:06.3 SD Host controller: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller

Offline

#6 2014-01-17 14:22:39

sekret
Member
Registered: 2013-07-22
Posts: 303

Re: Radeon driver + VDPAU and VAAPI

There you have it:

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                 0 262144  8192  8192
MPEG2_SIMPLE          3 262144  8192  8192
MPEG2_MAIN            3 262144  8192  8192

Your video card's hardware decoding capabilities don't seem to be supported by mesa right now. Look at http://www.x.org/wiki/RadeonFeature and you'll see the status (there's hope, that it will work soon). Your card is a HD 2600, see

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV630/M76 [Mobility Radeon HD 2600]

Offline

#7 2014-01-17 15:10:02

jonyibandi
Member
Registered: 2013-12-16
Posts: 9

Re: Radeon driver + VDPAU and VAAPI

Do I have to see "Video Decode (XvMC/VDPAU/VA-API) on the 3D engine" or "Video Decode (XvMC/VDPAU/VA-API) on UVD"? I read somewhere a few weeks ago, that the radeon driver is capable of handle UVD now.

And an other question. If I downgrade my kernel and Xorg, install catalyst driver and libvdpau-va-gl package, could I use vdpau with accelerated vaapi and xvba-video? Or am I misunderstanding something about that?

Thanks for your help!

Offline

#8 2014-01-17 15:15:06

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Radeon driver + VDPAU and VAAPI

jonyibandi wrote:

If I downgrade

Aye, you could do that, but you wouldn't be a true Arch Linux user.

Offline

#9 2014-01-17 21:27:11

jonyibandi
Member
Registered: 2013-12-16
Posts: 9

Re: Radeon driver + VDPAU and VAAPI

I haven't use Archlinux enough to clearly understand that you wrote smile
It was only an idea smile

Offline

#10 2014-01-17 22:55:53

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: Radeon driver + VDPAU and VAAPI

Yes, the radeon driver supports UVD, but *only* on HD4000 and above. Your HD2600 is too old.

Your idea of using libvdpau-va-gl/vaapi/xvba-video might work, but it's a wrapper on top of a wrapper, so don't be surprised if it doesn't work.

Also, downgrading stuff in Arch isn't very simple. In your case, you'd need to fetch the xorg-server PKGBUILD with ABS, change pkgver to whatever old version you wish to have, then create the package with makepkg and install it. Afterwards, you'd need to do the same with every xf86-input-* package you use. If you haven't understood a word of what I just said, then don't attempt it smile

Edit: Ok, there's a slightly simpler way, but no guarantees it'll work: Search the wiki for catalyst-hd234k. You'll find instructions to enable a third-party repository with packages for HD2000/3000/4000 cards.

Last edited by Gusar (2014-01-17 23:05:20)

Offline

#11 2014-01-17 23:51:41

jonyibandi
Member
Registered: 2013-12-16
Posts: 9

Re: Radeon driver + VDPAU and VAAPI

Yes I know about xorg downgrade a bit, but I thought, that I will install Manjaro with catalyst driver, I did it once before, and worked well, but I was really interested is radeon driver so installed again with radeon.
Funny, that my card is too old, because I wait almost 2 years, to AMD solve the tearing problem, then an other year to get VAAPI work, then "They" said, we won't support HD2-3-4xxx card anymore. smile
Basically, I have never got fully operational hardware accel. on linux...
At least VDPAU output works, and it has a really smooth and colorful output. I won't give up, so I will install Manjaro with proprietary driver, and will share my experiences with you.

Offline

Board footer

Powered by FluxBB