[Libav-user] Hardware decoding via libva

2012-12-21 Thread faeem
Hi All ... I currently use a media player based on ffplay.c, but have a problem where HD video playing on an Intel Atom processor is far too slow, and uses too much CPU time. My understanding is that the problem may be resolved by using direct hardware decoding via VAAPI/libva. I have tested

Re: [Libav-user] Hardware decoding via libva

2012-12-21 Thread Carl Eugen Hoyos
faeem writes: > Would someone please direct me to documentation > and/or some other explanation of how to perform > hardware decoding using VAAPI/libva with ffmpeg's > libav libraries. Code examples would be great. I know of two examples, the va-api code in vlc and the code in a patch for MP

Re: [Libav-user] Hardware decoding via libva

2012-12-21 Thread Claudio Freire
On Fri, Dec 21, 2012 at 9:53 PM, Carl Eugen Hoyos wrote: >> - The main modification I've made is to render the video via OpenGL >> instead of using an overlay. > > I sounds like a very welcome addition to the FFmpeg > codebase, please consider sending a patch. Have in mind that overlays tend to p

Re: [Libav-user] Hardware decoding via libva

2012-12-22 Thread faeem
Hi Claudio ... I'll look into patching ffplay.c with my OpenGL changes and submitting the code once I've gotten the direct rendering problem sorted out. I am aware of the performance loss caused by OpenGL. It was chosen over overlays because it makes adding in special effects much easier, es

Re: [Libav-user] Hardware decoding via libva

2012-12-22 Thread faeem
On 22/12/2012 02:53, Carl Eugen Hoyos wrote: faeem writes: I know of two examples, the va-api code in vlc and the code in a patch for MPlayer, see for example http://thread.gmane.org/gmane.comp.video.mplayer.devel/61734/focus=61744 [...] Thanks. I'll be looking into those examples ASAP.

Re: [Libav-user] Hardware decoding via libva

2012-12-22 Thread Carl Eugen Hoyos
faeem writes: > I'll need to run the YUV to RGB conversion on each frame > if I'm running OpenGL and this will still be CPU intensive. (I don't think this is correct but it is not related to va-api at all, consider testing mplayer -vo gl, it is very fast because it does not need CPU conversio

Re: [Libav-user] Hardware decoding via libva

2012-12-22 Thread faeem
Thanks for the YUV->RGB tip. I'll look into that. I think I read on wikipedia that ffmpeg/libavcodec has no va-api support, but does contain data structures that allow it to be used with va-api. I figured someone here would have some idea on what to do, and I've already got some very useful ad

Re: [Libav-user] Hardware decoding via libva

2012-12-22 Thread Oleg
You're misunderstanding some concepts. There are two operations that can be accelerated by GPU: decoding and yuv->rgb converting. First thing can be achieved by vaapi as you mentioned. Second, by using OpenGL shader(I prefer OpenGL as it's cross-platform. Other option is to use DirectX on Win pl

Re: [Libav-user] Hardware decoding via libva

2012-12-23 Thread Xiang, Haihao
VA API has vaPutSurface() to directly render the decoded frame on a drawable, you can refer to the code of mplayer vaapi (git://gitorious.org/vaapi/mplayer.git) Regards Haihao > You're misunderstanding some concepts. There are two operations that can be > accelerated by GPU: decoding and yuv->

Re: [Libav-user] Hardware decoding via libva

2012-12-23 Thread Claudio Freire
On Sat, Dec 22, 2012 at 10:22 AM, Oleg wrote: > You're misunderstanding some concepts. There are two operations that can be > accelerated by GPU: decoding and yuv->rgb converting. First thing can be > achieved by vaapi as you mentioned. Second, by using OpenGL shader(I prefer > OpenGL as it's c