st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes
authorJulien Isorce <j.isorce@samsung.com>
Fri, 30 Oct 2015 11:42:46 +0000 (11:42 +0000)
committerChristian König <christian.koenig@amd.com>
Fri, 30 Oct 2015 12:19:54 +0000 (13:19 +0100)
commitadf11331186b1e63ed3cadbcea102ecdd18627e3
treebf1e60d665eb60bd2c0db87d7d5f63f4691fd887
parentd42029d2d9bc6b65ccf847dc9ba2e70b496d0299
st/va: implement VaCreateSurfaces2 and VaQuerySurfaceAttributes

Inspired from http://cgit.freedesktop.org/vaapi/intel-driver/
especially src/i965_drv_video.c::i965_CreateSurfaces2.

This patch is mainly to support gstreamer-vaapi and tools that uses
this newer libva API. The first advantage of using VaCreateSurfaces2
over existing VaCreateSurfaces, is that it is possible to select which
the pixel format for the surface. Indeed with the simple VaCreateSurfaces
function it is only possible to create a NV12 surface. It can be useful
to create a RGBA surface to use with video post processing.

The avaible pixel formats can be query with VaQuerySurfaceAttributes.

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/context.c
src/gallium/state_trackers/va/surface.c
src/gallium/state_trackers/va/va_private.h