xbmc/xbmc — pull request #1302 by gbeauchesne (2012-08-18 05:03:29+00:00)
Title: Add VA/EGL/GLESv2 support

Hi,

This patch series adds support for VA-API over EGL/GLESv2. There are four main parts:

- Configury preparatory work. Use pkg-config wherever possible. Note that I opted for a mixed approach whereby we first try with pkg-config, so that to allow stacks to be installed into non-standard locations like /opt/something/*, and next fallback to the old-school AC_CHECK_LIB() only macros, that assumes standard search paths or correctly amended INCLUDES/LIBS variables first.

- Plug a few bugs related to EGL/X11. i.e. fix compilation, fix crash while loading the XBMC icon texture, and fix RGB32 rendering mode. Note for the latter: not that I get a clear crash, I did not try actually; but for 32-bit pixel modes, I'd expect to use depth = 24.

- Add general purpose rendering of VA surfaces to GL textures through texture-from-pixmap. This is the same approach than for VA/GLX, but is not fully efficient. While effort is made to use a minimally sized Pixmap, this still makes it an indirection. At least this solution works with both the Intel GenX driver (Sandy Bridge, Ivy Bridge et al.) but also with the Intel PowerVR driver for Cedar Trail.

- Add support for new VA/EGL API that allows for zero-copy rendering from a VA surface. The idea here is to map each individual plane of the VA surface as a texture. This normally makes it possible to re-use existing rendering pipelines with XBMC specific post-processing filters in GLSL. This solution works only with the Intel GenX driver, currently. It requires a patched Mesa.

I will probably split this pull request but I was undecided on the number of parts. While writing this pull request, it became apparent that 4 to 6 parts would probably be needed. Just let me know your preference. :)

Thanks,
Gwenole.