[Libva] H.264 decoder simple example
Gwenole Beauchesne
gb.devel at gmail.com
Wed Aug 13 22:20:47 PDT 2014
Hi,
2014-08-14 7:06 GMT+02:00 Alexey <warpdest at gmail.com>:
> I try find simple example for decode h264 and fail. If someone have please
> share.
There are plenty of examples around.
* hwdecode-demos, which shows off various ways to use HW decode
acceleration for a single frame:
<http://gitorious.org/hwdecode-demos/hwdecode-demos/>
* gstreamer-vaapi, a set of GStreamer plug-ins:
<http://gitorious.org/vaapi/gstreamer-vaapi/
* FFmpeg/LibAV, another major multimedia framework on Linux:
<http://git.videolan.org/?p=ffmpeg.git;a=summary>
Depending on your usages and constraints, I suggest you to use higher
level farmeworks as GStreamer or FFmpeg/LibAV to get this work done.
The reason behind this is that it's not a matter of submitting the
encoded elementary stream, you need additional work. So, in general,
it's just simpler to use higher level frameworks, unless you have
specific requirements.
> And another question is its possible decode h264 stream and get back
> decoded YUV data to host?
A typical way for that is to use vaGetImage() on the decoded VA
surface to copy the pixels back to host. You could also use
vaDeriveImage() and a copy function that takes care of improving
performance when downloading from Uncacheable Speculative Write
Combining (USWC) memory.
The best example for that is VLC:
<http://git.videolan.org/?p=vlc.git;a=summary> (look for copy.[ch]
files, vaapi.[ch] files).
Regards,
--
Gwenole Beauchesne
Intel Corporation SAS / 2 rue de Paris, 92196 Meudon Cedex, France
Registration Number (RCS): Nanterre B 302 456 199
More information about the Libva
mailing list