Log in

View Full Version : Hardware accelerated decoding (H.264)


koliva
22nd March 2013, 13:00
Hi all,

In my application, I encode the images with x264 and decode them (in another pc) using libav at the moment. Everything works quite perfect and without any problem. Since the scope of my application is changed from decoding a single video stream to decoding multiple of video streams, I need to investigate some time to implement hardware acceleration for the decoder. I have no clue about how to implement it. I have AMD Radeon graphics card on the pc which Linux has been running on. Could you please give me some hints, ideas and suggestions about this implementation?

Thanks.

Darksoul71
22nd March 2013, 14:13
This site should give plenty of ressources to evaluate:
http://wiki.xbmc.org/index.php?title=Hardware_Accelerated_Video_Decoding_Development

koliva
22nd March 2013, 16:31
This site should give plenty of ressources to evaluate:
http://wiki.xbmc.org/index.php?title=Hardware_Accelerated_Video_Decoding_Development

Thanks for the link. It states that

ATI/AMD's current display drivers for Linux do not support XvMC. Despite the fact that all Radeon graphic chips hardware has support for MPEG-2 acceleration, (eg. motion compensation, and iDCT decoding), ATI has never provided access to these capabilities in Linux.

Is that all? I mean there is no way of having it in Linux ? :eek:

What about this one? When I check the graphics card specs: http://www.amd.com/us/products/notebook/graphics/amd-radeon-6000m/amd-radeon-6800m/Pages/amd-radeon-6800m.aspx#2

it says:
AMD App Acceleration2

OpenCL™ 1.1 support5
DirectCompute 11
Accelerated video encoding, transcoding, and upscaling6,7,8
UVD 2 dedicated video playback accelerator
MPEG-4 AVC/H.264
VC-1
MPEG-2 (SD & HD)
Adobe® Flash®9
Enhanced video quality features
Advanced post-processing and scaling8
Dynamic contrast enhancement and color correction
Brighter whites processing (blue stretch)
Independent video gamma control
Dynamic video range control
Dual-stream HD (1080p) playback support10
DXVA 1.0 & 2.0 support

nhakobian
22nd March 2013, 17:07
DXVA 1.0 & 2.0 support

DXVA is a Windows only API.

Nvidia has a Linux library called VDPAU for their own devices, while AMD has XvBA. There is also VA API which can call these device dependent APIs, but it seems only a subset of the hardware features are available.

My information comes from wikipedia so you may want to read up more there and see what is most useful to you.

koliva
25th March 2013, 16:57
I have been reading all the documentations that I pass by about this topic and it seems that the implementation pretty straightforward. I mean, just install necessary drivers + packages and let the libav to find them and use them. How can I come to know if my decoder is using hardware acceleration or not? Can I see a kind of log somewhere which tells me that the hardware acceleration is enabled?

nm
25th March 2013, 20:46
I have been reading all the documentations that I pass by about this topic and it seems that the implementation pretty straightforward. I mean, just install necessary drivers + packages and let the libav to find them and use them.

It's not that simple. See how VLC uses VAAPI & libav.