Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Radeon VDPAU r600_drv_video.so hack?

Linux Kernel, Network, and Services configuration.
Message
Author
JanPenguin
Posts: 136
Joined: 2011-01-16 13:00

Radeon VDPAU r600_drv_video.so hack?

#1 Post by JanPenguin »

My Debian workstation uses Radeon HD 3000 graphic card, cheap on-board. I got fed up by lazy support for newer version of Xorg from fglrx. I didn't like playing with different version of Xorg just to run AMD's graphics driver.

Open source Radeon driver is missing r600_drv_video.so for VDPAU. Unless using fglrx, to use VDPAU one needs to do source build installation or wait until official Debian adds it in Radeon package.

This is what I get. Honestly I haven't bother it much.

Code: Select all

VLC media player 2.0.6 Twoflower (revision 2.0.6-0-gbe9623c)
[0xc2a108] main libvlc: Running vlc with the default interface. Use 'cvlc' to
use vlc without interface.
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: va_openDriver() returns -1
I accidentally found a simple hack how to do it today. The trick is written in Russian.(http://habrahabr.ru/sandbox/66792/) I don't know Russian but it was too short to ignore. :shock: The method is to install Arch Linux's VDPAU Radeon drivers. I spent half hour to find right tarballs. I didn't have to replace any files in Debian system, which was fail safe.

For AMD 64 bit Debian Wheezy:

Download two tarballs that contain 64 bit binary files of VDPAU in a Arch Linux site.
http://mirror.us.leaseweb.net/archlinux ... pkg.tar.xz
http://mirror.us.leaseweb.net/archlinux ... pkg.tar.xz

Make temporary directories for tarball extraction and use tar xvf command.
Copy the following files to /usr/lib/x86_64-linux-gnu/ directory as super user.
You might do organize file names and file permission later on.

Code: Select all

-rwxr-xr-x 1 root root 2.9M Dec  6 19:04 /usr/lib/x86_64-linux-gnu/libvdpau_r600.so
-rwxr-xr-x 1 root root 2.9M Dec  6 19:04 /usr/lib/x86_64-linux-gnu/libvdpau_r600.so.1
-rwxr-xr-x 1 root root 2.9M Dec  6 19:04 /usr/lib/x86_64-linux-gnu/libvdpau_r600.so.1.0.0
-rw-r--r-- 1 root root 23M Dec  6 19:24 /usr/lib/x86_64-linux-gnu/libLLVM-3.3.so
Set up environment variables for the VDPAU driver. Put it in bash or Xorg startup file after testing.

Code: Select all

VDPAU_DRIVER=r600
LIBVA_DRIVER_NAME=vdpau
To do quick set up is typing two lines in a terminal.

Code: Select all

$ export VDPAU_DRIVER=r600
$ LIBVA_DRIVER_NAME=vdpau
Check vdpau status. It should display like below.

Code: Select all

$ 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  NV12 YV12 UYVY YUYV 
444     8192  8192  NV12 YV12 Y8U8V8A8 V8U8Y8A8 
<snip>
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!
Run VLC or mplayer that supports VDPAU if it's installed.

Code: Select all

VLC media player 2.0.6 Twoflower (revision 2.0.6-0-gbe9623c)
[0x2531108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'vdpau'
[b]libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so[/b]
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
libva calls vdpau_drv_video.so instead r600_drv_video.so, which is VDPAU Radeon driver of Arch Linux. :lol:

mplayer

Code: Select all

$ mplayer TheRocket.mp4 
Failed to read /etc/mplayer/mplayer.conf.local: No such file or directory
Warning unknown option include at line 177
MPlayer UNKNOWN-4.8 (C) 2000-2013 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing TheRocket.mp4.
libavformat version 55.21.100 (internal)
libavformat file format detected.
[lavf] stream 0: video (mpeg4), -vid 0
VIDEO:  [MP4V]  640x480  24bpp  23.970 fps  1678.5 kbps (204.9 kbyte/s)
Clip info:
 major_brand: isom
 minor_version: 512
 compatible_brands: isomiso2mp41
 creation_time: 2012-06-05 13:10:33
 encoder: Lavf51.12.1
Load subtitles in ./
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] This driver only supports the 3Dfx Banshee, Voodoo3 and Voodoo 5.
s3fb: Couldn't map S3 registers: Operation not permitted
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 55.41.100 (internal)
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
[b]VO: [vdpau] 640x480 => 640x480 Planar YV12 [/b]
V:   0.0   0/  0 ??% ??% ??,?% 0 0 
[VD_FFMPEG] DRI failure.
V:  12.0   0/  0  3%  2%  0.0% 0 0 


Exiting... (End of file)
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: Radeon VDPAU r600_drv_video.so hack?

#2 Post by gradinaruvasile »

I dont know if the HD3000 works with radeon/vdpau to start with. AFAIK 4200 or 4250 is the first card that has uvd 2, required for the OSS radeon vdpau.

Edit:
The r600_drv_video.so file is NOT part of vdpau - it is a "glue" between the vdpau driver and libva. Libva is Intel's creation, its a hw decoding library just like vdpau. Now, it can be used with vdpau or xvba backends too. But that way the decoding is cpu hungry and has artifacts if vdpau or xvba is used as backend. Some apps like vlc use it because they are lazy to implement native interfaces (vlc did implement vdpau since 2.1, but 2.2 is needed for it to work well).
/Edit

Anyway, if you want to test vdpau, you use mplayer, its the fastest route:

Code: Select all

mplayer -vo vdpau -vc ffh264vdpau,ffodivxvdpau,ffvc1vdpau,ffwmv3vdpau,ffmpeg12vdpau clipname
vdpauinfo should give something like (the "Decoder capabilities:" list is the effective list of the supported decoding methods, without that you have no hardware decoding):

Code: Select all

$ 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    16384 16384  NV12 YV12 
422    16384 16384  UYVY YUYV 
444    16384 16384  Y8U8V8A8 V8U8Y8A8 

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                 0  9216  2048  1152
MPEG2_SIMPLE          3  9216  2048  1152
MPEG2_MAIN            3  9216  2048  1152
H264_BASELINE        41  9216  2048  1152
H264_MAIN            41  9216  2048  1152
H264_HIGH            41  9216  2048  1152
VC1_ADVANCED          4  9216  2048  1152
MPEG4_PART2_SP        3  9216  2048  1152
MPEG4_PART2_ASP       5  9216  2048  1152

Output surface:

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

Bitmap surface:

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

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     2048
VIDEO_SURFACE_HEIGHT             y        48     1152
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  

vlc < version 2.1/2.2 does NOT use vdpau - it uses libva with optional backends of xvba or vdpau. Even the vlc ver 2.1 from Debian experimental doesnt use vdpau because its not compiled with vdpau support.
Problem is that 1. you have to have working vdpau and 2. even if you have it, this libva method is crap compared to using vdpau directly - you have artifaccts in decoding, wrong colors, crashes and much higher CPU usage. If you have any vdpau capable card, dont bother with libva, use mplayer (or some of its wrappers such as smplayer) or xbmc since these can use vdpau directly with all of its features. Or compile vlc 2.2 with all its required dependencies.
Mplayer on the other hand uses vdpau directly. A 1080p clip usually uses ~5-10% with Athlon 3GHz CPU the rest is done in the GPU.

PS I have the whole mesa stack and kernel compiled from latest git and i have a A8-5500 APU that has working vdpau (the vdpauinfo output is from there).

User avatar
Danielsan
Posts: 660
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Radeon VDPAU r600_drv_video.so hack?

#3 Post by Danielsan »

The mirror posted by you isn't more available I found this other one:

http://repo-arm-download.archlinuxcn.org/pool/packages/

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Radeon VDPAU r600_drv_video.so hack?

#4 Post by llivv »

JanPenguin wrote:

Code: Select all

$ 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  NV12 YV12 UYVY YUYV 
444     8192  8192  NV12 YV12 Y8U8V8A8 V8U8Y8A8 
<snip>
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!

Code: Select all

$ mplayer TheRocket.mp4 
Failed to read /etc/mplayer/mplayer.conf.local: No such file or directory
Warning unknown option include at line 177
[...]
Exiting... (End of file)
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!
Don't ask for help fixing when it breaks

Danielsan: did you post the arm repo on purpose? :D should I have even asked ...
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

User avatar
Danielsan
Posts: 660
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Radeon VDPAU r600_drv_video.so hack?

#5 Post by Danielsan »

It's only a name, inside there are the packages for X86/AMD64 architecture. I put this link because I was trying to follow the hack but the links above, now, are useless.

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Radeon VDPAU r600_drv_video.so hack?

#6 Post by llivv »

Danielsan wrote:It's only a name.
Yeah I see that now, thanks
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

User avatar
Danielsan
Posts: 660
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Radeon VDPAU r600_drv_video.so hack?

#7 Post by Danielsan »

I have had success to enable the VDPAU with VAAPI backend but unfortunately I don't have any real acceleration as XVBA and FGLRX; and more, I have some bug printed on screen. It seems I enabled the acceleration but really it doesn't work.

Code: Select all

$ vainfo
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.34 (libva 1.2.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
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!

Code: Select all

$ 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    16384 16384  NV12 
422    16384 16384  NV12 
444    16384 16384  NV12 

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                16  9216  2048  1152
MPEG2_SIMPLE         16  9216  2048  1152
MPEG2_MAIN           16  9216  2048  1152
H264_BASELINE        16  9216  2048  1152
H264_MAIN            16  9216  2048  1152
H264_HIGH            16  9216  2048  1152
VC1_SIMPLE           16  9216  2048  1152
VC1_MAIN             16  9216  2048  1152
VC1_ADVANCED         16  9216  2048  1152
MPEG4_PART2_SP       16  9216  2048  1152
MPEG4_PART2_ASP      16  9216  2048  1152

Output surface:

name              width height nat types
----------------------------------------------------
B8G8R8A8         16384 16384    y  NV12 
R8G8B8A8         16384 16384    y  NV12 
R10G10B10A2      16384 16384    y  NV12 
B10G10R10A2      16384 16384    y  NV12 

Bitmap surface:

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

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     2048
VIDEO_SURFACE_HEIGHT             y        48     1152
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: 765: _dl_close: Assertion `map->l_init_called' failed!
Both have the same bug: Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: Radeon VDPAU r600_drv_video.so hack?

#8 Post by gradinaruvasile »

Guys, dont bother with this. Read my previous post. You need everything done from ground up to have this working.
I have the kernel, mesa, xf86-ati, drm compiled from git and VDPAU is woking well in mplayer, mpv, xbmc. It has a CPU usage of 5% playing 1080p clips.
VLC isnt working since uses libva and i didnt even try to make it work since it doesnt worth it - you get crashes , corruption etc.

User avatar
Danielsan
Posts: 660
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Radeon VDPAU r600_drv_video.so hack?

#9 Post by Danielsan »

I would try it, I was thinking, using Testing, maybe I can have something already implemented and then use this hack. I will come back to Fglrx and XVBA driver which they work with my APU.

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: Radeon VDPAU r600_drv_video.so hack?

#10 Post by gradinaruvasile »

Danielsan wrote:I would try it, I was thinking, using Testing, maybe I can have something already implemented and then use this hack. I will come back to Fglrx and XVBA driver which they work with my APU.
Not even Sid has vdpau AFAIK. And unless you use FernetMenta's xbmc-xvba abandoned branch, xvba is partially used anyway.

Alad
Posts: 21
Joined: 2014-01-16 11:50

Re: Radeon VDPAU r600_drv_video.so hack?

#11 Post by Alad »

I did it the hard way, by recompiling mesa with --enable-vdpau, but got the same "Inconsistency" error. It didn't affect playing videos itself, but after playback mplayer broke with an "Oops, something wrong happened".

It disappeared by using an old version of libvdpau1 (0.4-4 to 0.4.1-2 from snapshots).

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: Radeon VDPAU r600_drv_video.so hack?

#12 Post by gradinaruvasile »

Alad wrote:I did it the hard way, by recompiling mesa with --enable-vdpau, but got the same "Inconsistency" error. It didn't affect playing videos itself, but after playback mplayer broke with an "Oops, something wrong happened".

It disappeared by using an old version of libvdpau1 (0.4-4 to 0.4.1-2 from snapshots).
That libvdpau is really old. Currently libvdpau is at 7 something. I suggest compile that too from git. Also make sure you have recent libdrm, xf86-ati and very recent kernel.

Alad
Posts: 21
Joined: 2014-01-16 11:50

Re: Radeon VDPAU r600_drv_video.so hack?

#13 Post by Alad »

Under jessie I have linux 3.12.9, xf86-video-ati 7.3.0 and libdrm 2.4.52-1 which seems to match git, except for the kernel (which is currently 3.12.10). When compiling libvdpau 0.7 from git the build fails with that same error message....

Right now I'm compiling mesa 10.1, maybe it will help - and hopefully fix some minor stutters I'm having.

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: Radeon VDPAU r600_drv_video.so hack?

#14 Post by gradinaruvasile »

I thought that you have wheezy. Under jessie, libvdpau is already at 0.7, no need for compiling it.
What error do you get when compiling?

Alad
Posts: 21
Joined: 2014-01-16 11:50

Re: Radeon VDPAU r600_drv_video.so hack?

#15 Post by Alad »

I found myself backporting stuff a bit too often so I switched. The error I get is:

Code: Select all

$ cat test-suite.log 
=======================================
   libvdpau 0.7: test/test-suite.log
=======================================

# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: dlclose
=============

Mismatch in the number of open file descriptors!
Inconsistency detected by ld.so: dl-close.c: 765: _dl_close: Assertion `map->l_init_called' failed!

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: Radeon VDPAU r600_drv_video.so hack?

#16 Post by gradinaruvasile »

Whats that?

Alad
Posts: 21
Joined: 2014-01-16 11:50

Re: Radeon VDPAU r600_drv_video.so hack?

#17 Post by Alad »

gradinaruvasile wrote:Whats that?
The error I got when compiling libvdpau 0.7.
gradinaruvasile wrote:What error do you get when compiling?

User avatar
Danielsan
Posts: 660
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Radeon VDPAU r600_drv_video.so hack?

#18 Post by Danielsan »

I'm happy to tell you I installed libegl1-mesa and mesa-vdpau-drivers from SID and now VPDAU is enabling even on libre radeon driver:

Code: Select all

    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    16384 16384  NV12 YV12
    422    16384 16384  UYVY YUYV
    444    16384 16384  Y8U8V8A8 V8U8Y8A8

    Decoder capabilities:

    name               level macbs width height
    -------------------------------------------
    MPEG1                 0  9216  2048  1152
    MPEG2_SIMPLE          3  9216  2048  1152
    MPEG2_MAIN            3  9216  2048  1152
    H264_BASELINE        41  9216  2048  1152
    H264_MAIN            41  9216  2048  1152
    H264_HIGH            41  9216  2048  1152
    VC1_ADVANCED          4  9216  2048  1152
    MPEG4_PART2_SP        3  9216  2048  1152
    MPEG4_PART2_ASP       5  9216  2048  1152

    Output surface:

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

    Bitmap surface:

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

    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     2048
    VIDEO_SURFACE_HEIGHT             y        48     1152
    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 
To link VDPAU at VAAPI I only created a symlink:

Code: Select all

    sudo ln -s /usr/lib/x86_64-linux-gnu/dri/vdpau_drv_video.so /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
    vainfo
    libva info: VA-API version 0.34.0
    libva info: va_getDriverName() returns 0
    libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
    libva info: Found init function __vaDriverInit_0_34
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 0.34 (libva 1.2.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
          VAProfileVC1Advanced            :   VAEntrypointVLD
To do others tests I completely removed all the variables (necessary until now to link VDPAU to VAAPI) from /etc/enviroment and ~.bash_profile and it seems working everything fine.

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: Radeon VDPAU r600_drv_video.so hack?

#19 Post by gradinaruvasile »

Indeed it works. vdpau-va-driver needs to be installed (took me awhile to find it).
Anyway, vdpau via VAAPI with vlc isnt up to par with native vdpau implementations such as in mpv/mplayer or xbmc. Playing the same clips in mpv and vlc there is quite some difference:
An 1080p clip downloaded from youtube (24 fps i think) with youtube-dl is ~3.3% CPU with mpv, 7-8% with xbmc and ~37% with vlc+vaapi.
An 1080p 60 fps clip is ~6.6% with mpv, ~14% with xbmc and up to 75% with vlc+vaapi. Vlc has some choppy moments, the rest are perfectly smooth.

I wait for native vdpau in vlc. Which doesnt seem to be a smooth ride since it needs some libav modifications.
I have a A8-6500 APU (4x 3.5 GHz cores) with an integrated Radeon HD 8570D which is, despite its name, a 6xxx series variant (uses the r600 driver) and i have the latest.

User avatar
Danielsan
Posts: 660
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: Radeon VDPAU r600_drv_video.so hack?

#20 Post by Danielsan »

It seems I have native VDPAU enabled in VLC:

Code: Select all

$ vlc -V
VLC media player 2.1.3 Rincewind (revision 2.1.3-0-ge6a71cc)
vlc: unknown option or missing mandatory argument `-V'
Try `vlc --help' for more information.

$ vlc 2013_05_16_00001.MTS
VLC media player 2.1.3 Rincewind (revision 2.1.3-0-ge6a71cc)
[0x19f0118] main libvlc: Esecuzione di vlc con l'interfaccia predefinita. Usa 'cvlc' per utilizzare vlc senza interfaccia.
[0x7f60b80019c8] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 300 ms)
[0x7f60b80019c8] main input error: ES_OUT_RESET_PCR called
[0x7f6094c825d8] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding.
[0x7f6094c825d8] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding.
More, with (S)mplayer I'm unable to use deinterlace filter instead with VLC I can.

Post Reply