summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va/va_private.h
diff options
context:
space:
mode:
authorJulien Isorce <j.isorce@samsung.com>2015-10-30 11:42:46 +0000
committerChristian König <christian.koenig@amd.com>2015-10-30 13:19:54 +0100
commitadf11331186b1e63ed3cadbcea102ecdd18627e3 (patch)
treebf1e60d665eb60bd2c0db87d7d5f63f4691fd887 /src/gallium/state_trackers/va/va_private.h
parentd42029d2d9bc6b65ccf847dc9ba2e70b496d0299 (diff)
downloadexternal_mesa3d-adf11331186b1e63ed3cadbcea102ecdd18627e3.zip
external_mesa3d-adf11331186b1e63ed3cadbcea102ecdd18627e3.tar.gz
external_mesa3d-adf11331186b1e63ed3cadbcea102ecdd18627e3.tar.bz2
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>
Diffstat (limited to 'src/gallium/state_trackers/va/va_private.h')
-rw-r--r--src/gallium/state_trackers/va/va_private.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_private.h
index 56c6b02..1fad96a 100644
--- a/src/gallium/state_trackers/va/va_private.h
+++ b/src/gallium/state_trackers/va/va_private.h
@@ -313,5 +313,9 @@ VAStatus vlVaLockSurface(VADriverContextP ctx, VASurfaceID surface, unsigned int
unsigned int *luma_offset, unsigned int *chroma_u_offset, unsigned int *chroma_v_offset,
unsigned int *buffer_name, void **buffer);
VAStatus vlVaUnlockSurface(VADriverContextP ctx, VASurfaceID surface);
-
+VAStatus vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format, unsigned int width, unsigned int height,
+ VASurfaceID *surfaces, unsigned int num_surfaces, VASurfaceAttrib *attrib_list,
+ unsigned int num_attribs);
+VAStatus vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID config, VASurfaceAttrib *attrib_list,
+ unsigned int *num_attribs);
#endif //VA_PRIVATE_H