masterzorag's Activity

Tuesday, August 6, 2013

vaapi on fglrx

Just to test if we can get finally some sort of hardware accelerated decoding on AMD/ATI, I've tested a H264 video without any issue, here some from /var/log/Xorg.0.log:
[ 26.252] (II) Module fglrx: vendor="FireGL - AMD Technologies Inc."
[ 26.274] (II) Module fglrxdrm: vendor="FireGL - AMD Technologies Inc."
[ 26.274] (II) AMD Proprietary Linux Driver Version Identifier:12.10.05
[ 26.274] (II) AMD Proprietary Linux Driver Release Identifier: 12.104
[ 26.274] (II) AMD Proprietary Linux Driver Build Date: Mar 28 2013 21:07:22
[ 27.273] (--) Chipset Supported AMD Graphics Processor (0x9802) found
[ 27.277] (II) AMD Video driver is running on a device belonging to a group targeted for this release
[ 27.282] (II) AMD Video driver is signed
[ 27.302] (II) Module fglrxdrm: vendor="FireGL - AMD Technologies Inc."
[ 27.308] (**) fglrx(0): AMD 2D Acceleration Architecture enabled
[ 27.308] (--) fglrx(0): Chipset: "AMD Radeon HD 6310 Graphics" (Chipset = 0x9802)
[ 27.589] (II) fglrx(0): Adapter AMD Radeon HD 6310 Graphics has 2 configurable heads and 1 displays connected.
[ 27.591] (II) fglrx(0): doing swlDriScreenInit
[ 27.591] (II) fglrx(0): swlDriScreenInit for fglrx driver
[ 27.591] (II) fglrx(0): [uki] DRM interface version 1.0
[ 27.591] (II) fglrx(0): [uki] created "fglrx" driver at busid "PCI:0:1:0"
[ 27.591] (II) fglrx(0): [uki] added 8192 byte SAREA at 0x2000
[ 27.592] (II) fglrx(0): [uki] mapped SAREA 0x2000 to 0xb65bd000
[ 27.592] (II) fglrx(0): [uki] framebuffer handle = 0x3000
[ 27.592] (II) fglrx(0): [uki] added 1 reserved context for kernel
[ 27.592] (II) fglrx(0): swlDriScreenInit done
[ 27.592] (II) fglrx(0): Kernel Module Version Information:
[ 27.592] (II) fglrx(0): Name: fglrx
[ 27.592] (II) fglrx(0): Version: 12.10.5
[ 27.592] (II) fglrx(0): Date: Mar 28 2013
[ 27.592] (II) fglrx(0): Desc: AMD FireGL DRM kernel module
[ 27.592] (II) fglrx(0): Kernel Module version matches driver.
[ 27.592] (II) fglrx(0): Kernel Module Build Time Information:
[ 27.592] (II) fglrx(0): Build-Kernel UTS_RELEASE: 3.10.4
[ 27.592] (II) fglrx(0): Build-Kernel MODVERSIONS: yes
[ 27.592] (II) fglrx(0): Build-Kernel __SMP__: yes
[ 27.592] (II) fglrx(0): Build-Kernel PAGE_SIZE: 0x1000
[ 27.592] (II) fglrx(0): [uki] register handle = 0x00004000
[ 27.592] (II) fglrx(0): OpenGL overlay is disabled on non-FIREGL Board.
[ 27.602] (II) fglrx(0): Static shadow buffer initialized.
[ 27.611] (II) fglrx(0): DRI initialization successfull
[ 27.628] (II) fglrx(0): FBADPhys: 0x10600000 FBMappedSize: 0x00816000
[ 27.645] (II) fglrx(0): Initialized in-driver Xinerama extension
[ 27.782] (II) fglrx(0): GLESX enableFlags = 848
[ 27.783] (II) fglrx(0): GLESX is enabled
[ 27.814] Loading extension AMDXVOPL
[ 27.814] Loading extension AMDXVBA
[ 27.827] (II) fglrx(0): UVD feature is enabled(II) fglrx(0):
[ 27.831] (II) fglrx(0): Enable composite support successfully
[ 27.832] (II) fglrx(0): X context handle = 0x1
[ 27.832] (II) fglrx(0): [DRI] installation complete
[ 27.833] (II) fglrx(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 27.987] (WW) fglrx(0): Framebuffer compression is disabled by the driver: Video Ram = 262144 kByte
then libva, output of vainfo:
libva info: VA-API version 0.33.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/va/drivers/fglrx_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.33 (libva 1.1.1)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.8.0
vainfo: Supported profile and entrypoints
VAProfileH264High : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
last, vaapi-mplayer
play:
./mplayer -vo vaapi ../h264_1080p_hp_4.1_40mbps_birds.mkv
MPlayer SVN-r36265-4.6.3 (C) 2000-2013 MPlayer Team

Playing ../h264_1080p_hp_4.1_40mbps_birds.mkv.
libavformat version 55.13.102 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
VIDEO: [H264] 1920x1072 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
Load subtitles in ../
libva info: VA-API version 0.33.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/va/drivers/fglrx_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 55.20.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
Movie-Aspect is 1.79:1 - prescaling to correct movie aspect.
VO: [vaapi] 1920x1072 => 1920x1072 H.264 VA-API Acceleration
[VD_FFMPEG] XVMC-accelerated MPEG-2.
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
Movie-Aspect is 1.79:1 - prescaling to correct movie aspect.
VO: [vaapi] 1920x1072 => 1920x1072 H.264 VA-API Acceleration
xvba_video: XVBA_DestroySurface(): status 2


Exiting... (Quit)

Video plays flawless (over compiz!), CPU is offloaded from decoding


With Mesa 9.2 we can test also the radeon kernel module + gallium instead of fglrx with libva, but I've not tried yet.

No comments:

Post a Comment