<div dir="ltr"><div><div><div>Hi,<br><br></div>Big thanks Gwenole, <a href="http://gitorious.org/hwdecode-demos/hwdecode-demos/">http://gitorious.org/hwdecode-demos/hwdecode-demos/</a> very useful. <br><br></div>Best Regards,<br>
</div>Warp.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 14, 2014 at 9:20 AM, Gwenole Beauchesne <span dir="ltr"><<a href="mailto:gb.devel@gmail.com" target="_blank">gb.devel@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
2014-08-14 7:06 GMT+02:00 Alexey <<a href="mailto:warpdest@gmail.com">warpdest@gmail.com</a>>:<br>
<div class=""><br>
> I try find simple example for decode h264 and fail. If someone have please<br>
> share.<br>
<br>
</div>There are plenty of examples around.<br>
<br>
* hwdecode-demos, which shows off various ways to use HW decode<br>
acceleration for a single frame:<br>
<<a href="http://gitorious.org/hwdecode-demos/hwdecode-demos/" target="_blank">http://gitorious.org/hwdecode-demos/hwdecode-demos/</a>><br>
<br>
* gstreamer-vaapi, a set of GStreamer plug-ins:<br>
<<a href="http://gitorious.org/vaapi/gstreamer-vaapi/" target="_blank">http://gitorious.org/vaapi/gstreamer-vaapi/</a><br>
<br>
* FFmpeg/LibAV, another major multimedia framework on Linux:<br>
<<a href="http://git.videolan.org/?p=ffmpeg.git;a=summary" target="_blank">http://git.videolan.org/?p=ffmpeg.git;a=summary</a>><br>
<br>
Depending on your usages and constraints, I suggest you to use higher<br>
level farmeworks as GStreamer or FFmpeg/LibAV to get this work done.<br>
The reason behind this is that it's not a matter of submitting the<br>
encoded elementary stream, you need additional work. So, in general,<br>
it's just simpler to use higher level frameworks, unless you have<br>
specific requirements.<br>
<div class=""><br>
> And another question is its possible decode h264 stream and get back<br>
> decoded YUV data to host?<br>
<br>
</div>A typical way for that is to use vaGetImage() on the decoded VA<br>
surface to copy the pixels back to host. You could also use<br>
vaDeriveImage() and a copy function that takes care of improving<br>
performance when downloading from Uncacheable Speculative Write<br>
Combining (USWC) memory.<br>
<br>
The best example for that is VLC:<br>
<<a href="http://git.videolan.org/?p=vlc.git;a=summary" target="_blank">http://git.videolan.org/?p=vlc.git;a=summary</a>> (look for copy.[ch]<br>
files, vaapi.[ch] files).<br>
<br>
Regards,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Gwenole Beauchesne<br>
Intel Corporation SAS / 2 rue de Paris, 92196 Meudon Cedex, France<br>
Registration Number (RCS): Nanterre B 302 456 199<br>
</font></span></blockquote></div><br></div>