[Libva] using TFP on intel
Gwenole Beauchesne
gbeauchesne at splitted-desktop.com
Thu Nov 4 03:31:42 PDT 2010
Hi,
On Tue, 2 Nov 2010, Oleksiy Krivoshey wrote:
> Could someone please point me at right direction: I want to use vaapi
> with tfp in my program on intel i3, I've got mplayer working nicely
> with -vo vaapi:gl:tfp and as I can see the TFP code in mplayer is
> almost the same as in *_impl_libva functions in
> libva/va/glx/va_glx_impl.c so my question is: what is the difference?
mplayer -vo vaapi:gl:tfp uses vaPutSurface() to a Pixmap and then the
GLX_EXT_texture_from_pixmap to bind it to an OpenGL texture.
mplayer -vo vaapi:gl uses vaCopySurfaceGLX() to render a VA surface to an
OpenGL texture, wrapped into a VA/GLX surface.
The latter approach (VA/GLX) is preferable for OpenGL applications because
some VA drivers don't support rendering to a Pixmap but do support direct
rendering to an OpenGL texture instead.
Do you mean that mplayer -vo vaapi:gl:tfp works but mplayer -vo vaapi:gl
does *not* work? Current libva 1.0.5 should just work as is. Or do you
have performance problems with either code path?
> Should I still use my own bind/unbind and pixmap operations like in
> mplayer or could I rely on libva decision made in
> va_glx_init_context() function ?
If you use the latter, just make sure to allocate a GL texture with the
same dimensions as the VA surface. Some day, I will probably look into
implementing VA/GLX directly in the G45 driver, thus possibly avoiding the
extra FBO.
Regards,
Gwenole.
More information about the Libva
mailing list