From 3fddb7f937df4e0e15391bd65ae3c7552ea5b3d7 Mon Sep 17 00:00:00 2001 From: pylee Date: Wed, 30 Oct 2013 08:41:33 -0700 Subject: Add vaSurfaceAttribUsageHint to give the driver a hint of intended usage to optimize allocation (e.g. tiling). (cherry picked from commit 6cdc2e54d40afeb1550b920a6a6221bafeec95ec) --- va/va.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/va/va.h b/va/va.h index c82cbdb..979328a 100644 --- a/va/va.h +++ b/va/va.h @@ -663,6 +663,9 @@ typedef enum { VASurfaceAttribMemoryType, /** \brief External buffer descriptor (pointer, write). */ VASurfaceAttribExternalBufferDescriptor, + /** \brief Surface usage hint, gives the driver a hint of intended usage + * to optimize allocation (e.g. tiling) (int, read/write). */ + VASurfaceAttribUsageHint, /** \brief Number of surface attributes. */ VASurfaceAttribCount } VASurfaceAttribType; @@ -734,6 +737,21 @@ typedef struct _VASurfaceAttribExternalBuffers { /** \brief Memory is protected */ #define VA_SURFACE_EXTBUF_DESC_PROTECTED 0x80000000 +/** @name VASurfaceAttribUsageHint attribute usage hint flags */ +/**@{*/ +/** \brief Surface usage not indicated. */ +#define VA_SURFACE_ATTRIB_USAGE_HINT_GENERIC 0x00000000 +/** \brief Surface used by video decoder. */ +#define VA_SURFACE_ATTRIB_USAGE_HINT_DECODER 0x00000001 +/** \brief Surface used by video encoder. */ +#define VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER 0x00000002 +/** \brief Surface read by video post-processing. */ +#define VA_SURFACE_ATTRIB_USAGE_HINT_VPP_READ 0x00000004 +/** \brief Surface written by video post-processing. */ +#define VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE 0x00000008 +/** \brief Surface used for display. */ +#define VA_SURFACE_ATTRIB_USAGE_HINT_DISPLAY 0x00000010 + /**@}*/ /** -- cgit v1.2.3