va.h   va.h 
skipping to change at line 101 skipping to change at line 101
* \section intro Introduction * \section intro Introduction
* *
* The main motivation for VA-API (Video Acceleration API) is to * The main motivation for VA-API (Video Acceleration API) is to
* enable hardware accelerated video decode and encode at various * enable hardware accelerated video decode and encode at various
* entry-points (VLD, IDCT, Motion Compensation etc.) for the * entry-points (VLD, IDCT, Motion Compensation etc.) for the
* prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 * prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4
* AVC/H.264, VC-1/VMW3, and JPEG). * AVC/H.264, VC-1/VMW3, and JPEG).
* *
* VA-API is split into several modules: * VA-API is split into several modules:
* - \ref api_core * - \ref api_core
* - \ref api_enc_core
* - \ref api_enc_h264 * - \ref api_enc_h264
* - \ref api_vpp * - \ref api_vpp
*/ */
/** /**
* \defgroup api_core Core API * \defgroup api_core Core API
* *
* @{ * @{
*/ */
/* /**
Overview Overview
The VA API is intended to provide an interface between a video decode/encod e/display The VA API is intended to provide an interface between a video decode/encod e/display
application (client) and a hardware accelerator (server), to off-load application (client) and a hardware accelerator (server), to off-load
video decode/encode/display operations from the host to the hardware accele rator at various video decode/encode/display operations from the host to the hardware accele rator at various
entry-points. entry-points.
The basic operation steps are: The basic operation steps are:
- Negotiate a mutually acceptable configuration with the server to lock - Negotiate a mutually acceptable configuration with the server to lock
skipping to change at line 142 skipping to change at line 141
- Find out supported profiles - Find out supported profiles
- Find out entrypoints for a given profile - Find out entrypoints for a given profile
- Find out configuration attributes for a given profile/entrypoint pair - Find out configuration attributes for a given profile/entrypoint pair
- Create a configuration for use by the decoder - Create a configuration for use by the decoder
*/ */
typedef void* VADisplay; /* window system dependent */ typedef void* VADisplay; /* window system dependent */
typedef int VAStatus; /* Return status type from functions */ typedef int VAStatus; /** Return status type from functions */
/* Values for the return status */ /** Values for the return status */
#define VA_STATUS_SUCCESS 0x00000000 #define VA_STATUS_SUCCESS 0x00000000
#define VA_STATUS_ERROR_OPERATION_FAILED 0x00000001 #define VA_STATUS_ERROR_OPERATION_FAILED 0x00000001
#define VA_STATUS_ERROR_ALLOCATION_FAILED 0x00000002 #define VA_STATUS_ERROR_ALLOCATION_FAILED 0x00000002
#define VA_STATUS_ERROR_INVALID_DISPLAY 0x00000003 #define VA_STATUS_ERROR_INVALID_DISPLAY 0x00000003
#define VA_STATUS_ERROR_INVALID_CONFIG 0x00000004 #define VA_STATUS_ERROR_INVALID_CONFIG 0x00000004
#define VA_STATUS_ERROR_INVALID_CONTEXT 0x00000005 #define VA_STATUS_ERROR_INVALID_CONTEXT 0x00000005
#define VA_STATUS_ERROR_INVALID_SURFACE 0x00000006 #define VA_STATUS_ERROR_INVALID_SURFACE 0x00000006
#define VA_STATUS_ERROR_INVALID_BUFFER 0x00000007 #define VA_STATUS_ERROR_INVALID_BUFFER 0x00000007
#define VA_STATUS_ERROR_INVALID_IMAGE 0x00000008 #define VA_STATUS_ERROR_INVALID_IMAGE 0x00000008
#define VA_STATUS_ERROR_INVALID_SUBPICTURE 0x00000009 #define VA_STATUS_ERROR_INVALID_SUBPICTURE 0x00000009
skipping to change at line 185 skipping to change at line 184
*/ */
#define VA_STATUS_ERROR_INVALID_VALUE 0x00000019 #define VA_STATUS_ERROR_INVALID_VALUE 0x00000019
/** \brief An unsupported filter was supplied. */ /** \brief An unsupported filter was supplied. */
#define VA_STATUS_ERROR_UNSUPPORTED_FILTER 0x00000020 #define VA_STATUS_ERROR_UNSUPPORTED_FILTER 0x00000020
/** \brief An invalid filter chain was supplied. */ /** \brief An invalid filter chain was supplied. */
#define VA_STATUS_ERROR_INVALID_FILTER_CHAIN 0x00000021 #define VA_STATUS_ERROR_INVALID_FILTER_CHAIN 0x00000021
/** \brief Indicate HW busy (e.g. run multiple encoding simultaneously). */ /** \brief Indicate HW busy (e.g. run multiple encoding simultaneously). */
#define VA_STATUS_ERROR_HW_BUSY 0x00000022 #define VA_STATUS_ERROR_HW_BUSY 0x00000022
#define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF #define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF
/* De-interlacing flags for vaPutSurface() */ /** De-interlacing flags for vaPutSurface() */
#define VA_FRAME_PICTURE 0x00000000 #define VA_FRAME_PICTURE 0x00000000
#define VA_TOP_FIELD 0x00000001 #define VA_TOP_FIELD 0x00000001
#define VA_BOTTOM_FIELD 0x00000002 #define VA_BOTTOM_FIELD 0x00000002
/* /**
* Enabled the positioning/cropping/blending feature: * Enabled the positioning/cropping/blending feature:
* 1, specify the video playback position in the isurface * 1, specify the video playback position in the isurface
* 2, specify the cropping info for video playback * 2, specify the cropping info for video playback
* 3, encoded video will blend with background color * 3, encoded video will blend with background color
*/ */
#define VA_ENABLE_BLEND 0x00000004 /* video area blend with the con stant color */ #define VA_ENABLE_BLEND 0x00000004 /* video area blend with the con stant color */
/* /**
* Clears the drawable with background color. * Clears the drawable with background color.
* for hardware overlay based implementation this flag * for hardware overlay based implementation this flag
* can be used to turn off the overlay * can be used to turn off the overlay
*/ */
#define VA_CLEAR_DRAWABLE 0x00000008 #define VA_CLEAR_DRAWABLE 0x00000008
/* Color space conversion flags for vaPutSurface() */ /** Color space conversion flags for vaPutSurface() */
#define VA_SRC_BT601 0x00000010 #define VA_SRC_BT601 0x00000010
#define VA_SRC_BT709 0x00000020 #define VA_SRC_BT709 0x00000020
#define VA_SRC_SMPTE_240 0x00000040 #define VA_SRC_SMPTE_240 0x00000040
/* Scaling flags for vaPutSurface() */ /** Scaling flags for vaPutSurface() */
#define VA_FILTER_SCALING_DEFAULT 0x00000000 #define VA_FILTER_SCALING_DEFAULT 0x00000000
#define VA_FILTER_SCALING_FAST 0x00000100 #define VA_FILTER_SCALING_FAST 0x00000100
#define VA_FILTER_SCALING_HQ 0x00000200 #define VA_FILTER_SCALING_HQ 0x00000200
#define VA_FILTER_SCALING_NL_ANAMORPHIC 0x00000300 #define VA_FILTER_SCALING_NL_ANAMORPHIC 0x00000300
#define VA_FILTER_SCALING_MASK 0x00000f00 #define VA_FILTER_SCALING_MASK 0x00000f00
/* /**
* Returns a short english description of error_status * Returns a short english description of error_status
*/ */
const char *vaErrorStr(VAStatus error_status); const char *vaErrorStr(VAStatus error_status);
/* /**
* Initialization: * Initialization:
* A display must be obtained by calling vaGetDisplay() before calling * A display must be obtained by calling vaGetDisplay() before calling
* vaInitialize() and other functions. This connects the API to the * vaInitialize() and other functions. This connects the API to the
* native window system. * native window system.
* For X Windows, native_dpy would be from XOpenDisplay() * For X Windows, native_dpy would be from XOpenDisplay()
*/ */
typedef void* VANativeDisplay; /* window system dependent */ typedef void* VANativeDisplay; /* window system dependent */
int vaDisplayIsValid(VADisplay dpy); int vaDisplayIsValid(VADisplay dpy);
/* /**
* Initialize the library * Initialize the library
*/ */
VAStatus vaInitialize ( VAStatus vaInitialize (
VADisplay dpy, VADisplay dpy,
int *major_version, /* out */ int *major_version, /* out */
int *minor_version /* out */ int *minor_version /* out */
); );
/* /**
* After this call, all library internal resources will be cleaned up * After this call, all library internal resources will be cleaned up
*/ */
VAStatus vaTerminate ( VAStatus vaTerminate (
VADisplay dpy VADisplay dpy
); );
/* /**
* vaQueryVendorString returns a pointer to a zero-terminated string * vaQueryVendorString returns a pointer to a zero-terminated string
* describing some aspects of the VA implemenation on a specific * describing some aspects of the VA implemenation on a specific
* hardware accelerator. The format of the returned string is vendor * hardware accelerator. The format of the returned string is vendor
* specific and at the discretion of the implementer. * specific and at the discretion of the implementer.
* e.g. for the Intel GMA500 implementation, an example would be: * e.g. for the Intel GMA500 implementation, an example would be:
* "Intel GMA500 - 2.0.0.32L.0005" * "Intel GMA500 - 2.0.0.32L.0005"
*/ */
const char *vaQueryVendorString ( const char *vaQueryVendorString (
VADisplay dpy VADisplay dpy
); );
typedef int (*VAPrivFunc)(); typedef int (*VAPrivFunc)();
/* /**
* Return a function pointer given a function name in the library. * Return a function pointer given a function name in the library.
* This allows private interfaces into the library * This allows private interfaces into the library
*/ */
VAPrivFunc vaGetLibFunc ( VAPrivFunc vaGetLibFunc (
VADisplay dpy, VADisplay dpy,
const char *func const char *func
); );
/* Currently defined profiles */ /** Currently defined profiles */
typedef enum typedef enum
{ {
/** \brief Profile ID used for video processing. */ /** \brief Profile ID used for video processing. */
VAProfileNone = -1, VAProfileNone = -1,
VAProfileMPEG2Simple = 0, VAProfileMPEG2Simple = 0,
VAProfileMPEG2Main = 1, VAProfileMPEG2Main = 1,
VAProfileMPEG4Simple = 2, VAProfileMPEG4Simple = 2,
VAProfileMPEG4AdvancedSimple = 3, VAProfileMPEG4AdvancedSimple = 3,
VAProfileMPEG4Main = 4, VAProfileMPEG4Main = 4,
VAProfileH264Baseline = 5, VAProfileH264Baseline = 5,
skipping to change at line 294 skipping to change at line 293
VAProfileH264High = 7, VAProfileH264High = 7,
VAProfileVC1Simple = 8, VAProfileVC1Simple = 8,
VAProfileVC1Main = 9, VAProfileVC1Main = 9,
VAProfileVC1Advanced = 10, VAProfileVC1Advanced = 10,
VAProfileH263Baseline = 11, VAProfileH263Baseline = 11,
VAProfileJPEGBaseline = 12, VAProfileJPEGBaseline = 12,
VAProfileH264ConstrainedBaseline = 13, VAProfileH264ConstrainedBaseline = 13,
VAProfileVP8Version0_3 = 14 VAProfileVP8Version0_3 = 14
} VAProfile; } VAProfile;
/* /**
* Currently defined entrypoints * Currently defined entrypoints
*/ */
typedef enum typedef enum
{ {
VAEntrypointVLD = 1, VAEntrypointVLD = 1,
VAEntrypointIZZ = 2, VAEntrypointIZZ = 2,
VAEntrypointIDCT = 3, VAEntrypointIDCT = 3,
VAEntrypointMoComp = 4, VAEntrypointMoComp = 4,
VAEntrypointDeblocking = 5, VAEntrypointDeblocking = 5,
VAEntrypointEncSlice = 6, /* slice level encode */ VAEntrypointEncSlice = 6, /* slice level encode */
VAEntrypointEncPicture = 7, /* pictuer encode, JPEG, etc */ VAEntrypointEncPicture = 7, /* pictuer encode, JPEG, etc */
VAEntrypointVideoProc = 10, /**< Video pre/post-processing. */ VAEntrypointVideoProc = 10, /**< Video pre/post-processing. */
} VAEntrypoint; } VAEntrypoint;
/* Currently defined configuration attribute types */ /** Currently defined configuration attribute types */
typedef enum typedef enum
{ {
VAConfigAttribRTFormat = 0, VAConfigAttribRTFormat = 0,
VAConfigAttribSpatialResidual = 1, VAConfigAttribSpatialResidual = 1,
VAConfigAttribSpatialClipping = 2, VAConfigAttribSpatialClipping = 2,
VAConfigAttribIntraResidual = 3, VAConfigAttribIntraResidual = 3,
VAConfigAttribEncryption = 4, VAConfigAttribEncryption = 4,
VAConfigAttribRateControl = 5, VAConfigAttribRateControl = 5,
/** @name Attributes for encoding */ /** @name Attributes for encoding */
skipping to change at line 392 skipping to change at line 391
* More specifically, for H.264 encoding, if the driver returns a non-z ero * More specifically, for H.264 encoding, if the driver returns a non-z ero
* value for this attribute, this means the application can create * value for this attribute, this means the application can create
* additional #VAEncMacroblockParameterBufferH264 buffers referenced * additional #VAEncMacroblockParameterBufferH264 buffers referenced
* through VAEncSliceParameterBufferH264::macroblock_info. * through VAEncSliceParameterBufferH264::macroblock_info.
*/ */
VAConfigAttribEncMacroblockInfo = 16, VAConfigAttribEncMacroblockInfo = 16,
/**@}*/ /**@}*/
VAConfigAttribTypeMax VAConfigAttribTypeMax
} VAConfigAttribType; } VAConfigAttribType;
/* /**
* Configuration attributes * Configuration attributes
* If there is more than one value for an attribute, a default * If there is more than one value for an attribute, a default
* value will be assigned to the attribute if the client does not * value will be assigned to the attribute if the client does not
* specify the attribute when creating a configuration * specify the attribute when creating a configuration
*/ */
typedef struct _VAConfigAttrib { typedef struct _VAConfigAttrib {
VAConfigAttribType type; VAConfigAttribType type;
unsigned int value; /* OR'd flags (bits) for this attribute */ unsigned int value; /* OR'd flags (bits) for this attribute */
} VAConfigAttrib; } VAConfigAttrib;
/* attribute value for VAConfigAttribRTFormat */ /** attribute value for VAConfigAttribRTFormat */
#define VA_RT_FORMAT_YUV420 0x00000001 #define VA_RT_FORMAT_YUV420 0x00000001
#define VA_RT_FORMAT_YUV422 0x00000002 #define VA_RT_FORMAT_YUV422 0x00000002
#define VA_RT_FORMAT_YUV444 0x00000004 #define VA_RT_FORMAT_YUV444 0x00000004
#define VA_RT_FORMAT_YUV411 0x00000008 #define VA_RT_FORMAT_YUV411 0x00000008
#define VA_RT_FORMAT_YUV400 0x00000010 #define VA_RT_FORMAT_YUV400 0x00000010
#define VA_RT_FORMAT_RGB16 0x00010000 #define VA_RT_FORMAT_RGB16 0x00010000
#define VA_RT_FORMAT_RGB32 0x00020000 #define VA_RT_FORMAT_RGB32 0x00020000
/* RGBP covers RGBP and BGRP fourcc */ /* RGBP covers RGBP and BGRP fourcc */
#define VA_RT_FORMAT_RGBP 0x00100000 #define VA_RT_FORMAT_RGBP 0x00100000
#define VA_RT_FORMAT_PROTECTED 0x80000000 #define VA_RT_FORMAT_PROTECTED 0x80000000
skipping to change at line 444 skipping to change at line 443
#define VA_ENC_PACKED_HEADER_NONE 0x00000000 #define VA_ENC_PACKED_HEADER_NONE 0x00000000
/** \brief Driver supports packed sequence headers. e.g. SPS for H.264. */ /** \brief Driver supports packed sequence headers. e.g. SPS for H.264. */
#define VA_ENC_PACKED_HEADER_SEQUENCE 0x00000001 #define VA_ENC_PACKED_HEADER_SEQUENCE 0x00000001
/** \brief Driver supports packed picture headers. e.g. PPS for H.264. */ /** \brief Driver supports packed picture headers. e.g. PPS for H.264. */
#define VA_ENC_PACKED_HEADER_PICTURE 0x00000002 #define VA_ENC_PACKED_HEADER_PICTURE 0x00000002
/** \brief Driver supports packed slice headers. e.g. \c slice_header() for H.264. */ /** \brief Driver supports packed slice headers. e.g. \c slice_header() for H.264. */
#define VA_ENC_PACKED_HEADER_SLICE 0x00000004 #define VA_ENC_PACKED_HEADER_SLICE 0x00000004
/** \brief Driver supports misc packed headers. e.g. SEI for H.264. */ /** \brief Driver supports misc packed headers. e.g. SEI for H.264. */
#define VA_ENC_PACKED_HEADER_MISC 0x00000008 #define VA_ENC_PACKED_HEADER_MISC 0x00000008
/** \brief Driver supports raw packed header, see VAEncPackedHeaderRawData */ /** \brief Driver supports raw packed header, see VAEncPackedHeaderRawData */
#define VA_ENC_PACKED_HEADER_RAW_DATA 0x0000000C #define VA_ENC_PACKED_HEADER_RAW_DATA 0x00000010
/**@}*/ /**@}*/
/** @name Attribute values for VAConfigAttribEncInterlaced */ /** @name Attribute values for VAConfigAttribEncInterlaced */
/**@{*/ /**@{*/
/** \brief Driver does not support interlaced coding. */ /** \brief Driver does not support interlaced coding. */
#define VA_ENC_INTERLACED_NONE 0x00000000 #define VA_ENC_INTERLACED_NONE 0x00000000
/** \brief Driver supports interlaced frame coding. */ /** \brief Driver supports interlaced frame coding. */
#define VA_ENC_INTERLACED_FRAME 0x00000001 #define VA_ENC_INTERLACED_FRAME 0x00000001
/** \brief Driver supports interlaced field coding. */ /** \brief Driver supports interlaced field coding. */
#define VA_ENC_INTERLACED_FIELD 0x00000002 #define VA_ENC_INTERLACED_FIELD 0x00000002
skipping to change at line 471 skipping to change at line 470
/** @name Attribute values for VAConfigAttribEncSliceStructure */ /** @name Attribute values for VAConfigAttribEncSliceStructure */
/**@{*/ /**@{*/
/** \brief Driver supports an arbitrary number of rows per slice. */ /** \brief Driver supports an arbitrary number of rows per slice. */
#define VA_ENC_SLICE_STRUCTURE_ARBITRARY_ROWS 0x00000000 #define VA_ENC_SLICE_STRUCTURE_ARBITRARY_ROWS 0x00000000
/** \brief Driver supports a power-of-two number of rows per slice. */ /** \brief Driver supports a power-of-two number of rows per slice. */
#define VA_ENC_SLICE_STRUCTURE_POWER_OF_TWO_ROWS 0x00000001 #define VA_ENC_SLICE_STRUCTURE_POWER_OF_TWO_ROWS 0x00000001
/** \brief Driver supports an arbitrary number of rows per slice. */ /** \brief Driver supports an arbitrary number of rows per slice. */
#define VA_ENC_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS 0x00000002 #define VA_ENC_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS 0x00000002
/**@}*/ /**@}*/
/* /**
* if an attribute is not applicable for a given * if an attribute is not applicable for a given
* profile/entrypoint pair, then set the value to the following * profile/entrypoint pair, then set the value to the following
*/ */
#define VA_ATTRIB_NOT_SUPPORTED 0x80000000 #define VA_ATTRIB_NOT_SUPPORTED 0x80000000
/* Get maximum number of profiles supported by the implementation */ /** Get maximum number of profiles supported by the implementation */
int vaMaxNumProfiles ( int vaMaxNumProfiles (
VADisplay dpy VADisplay dpy
); );
/* Get maximum number of entrypoints supported by the implementation */ /** Get maximum number of entrypoints supported by the implementation */
int vaMaxNumEntrypoints ( int vaMaxNumEntrypoints (
VADisplay dpy VADisplay dpy
); );
/* Get maximum number of attributs supported by the implementation */ /** Get maximum number of attributs supported by the implementation */
int vaMaxNumConfigAttributes ( int vaMaxNumConfigAttributes (
VADisplay dpy VADisplay dpy
); );
/* /**
* Query supported profiles * Query supported profiles
* The caller must provide a "profile_list" array that can hold at * The caller must provide a "profile_list" array that can hold at
* least vaMaxNumProfile() entries. The actual number of profiles * least vaMaxNumProfile() entries. The actual number of profiles
* returned in "profile_list" is returned in "num_profile". * returned in "profile_list" is returned in "num_profile".
*/ */
VAStatus vaQueryConfigProfiles ( VAStatus vaQueryConfigProfiles (
VADisplay dpy, VADisplay dpy,
VAProfile *profile_list, /* out */ VAProfile *profile_list, /* out */
int *num_profiles /* out */ int *num_profiles /* out */
); );
/* /**
* Query supported entrypoints for a given profile * Query supported entrypoints for a given profile
* The caller must provide an "entrypoint_list" array that can hold at * The caller must provide an "entrypoint_list" array that can hold at
* least vaMaxNumEntrypoints() entries. The actual number of entrypoints * least vaMaxNumEntrypoints() entries. The actual number of entrypoints
* returned in "entrypoint_list" is returned in "num_entrypoints". * returned in "entrypoint_list" is returned in "num_entrypoints".
*/ */
VAStatus vaQueryConfigEntrypoints ( VAStatus vaQueryConfigEntrypoints (
VADisplay dpy, VADisplay dpy,
VAProfile profile, VAProfile profile,
VAEntrypoint *entrypoint_list, /* out */ VAEntrypoint *entrypoint_list, /* out */
int *num_entrypoints /* out */ int *num_entrypoints /* out */
); );
/* /**
* Get attributes for a given profile/entrypoint pair * Get attributes for a given profile/entrypoint pair
* The caller must provide an "attrib_list" with all attributes to be * The caller must provide an "attrib_list" with all attributes to be
* retrieved. Upon return, the attributes in "attrib_list" have been * retrieved. Upon return, the attributes in "attrib_list" have been
* updated with their value. Unknown attributes or attributes that are * updated with their value. Unknown attributes or attributes that are
* not supported for the given profile/entrypoint pair will have their * not supported for the given profile/entrypoint pair will have their
* value set to VA_ATTRIB_NOT_SUPPORTED * value set to VA_ATTRIB_NOT_SUPPORTED
*/ */
VAStatus vaGetConfigAttributes ( VAStatus vaGetConfigAttributes (
VADisplay dpy, VADisplay dpy,
VAProfile profile, VAProfile profile,
VAEntrypoint entrypoint, VAEntrypoint entrypoint,
VAConfigAttrib *attrib_list, /* in/out */ VAConfigAttrib *attrib_list, /* in/out */
int num_attribs int num_attribs
); );
/* Generic ID type, can be re-typed for specific implementation */ /** Generic ID type, can be re-typed for specific implementation */
typedef unsigned int VAGenericID; typedef unsigned int VAGenericID;
typedef VAGenericID VAConfigID; typedef VAGenericID VAConfigID;
/* /**
* Create a configuration for the decode pipeline * Create a configuration for the decode pipeline
* it passes in the attribute list that specifies the attributes it cares * it passes in the attribute list that specifies the attributes it cares
* about, with the rest taking default values. * about, with the rest taking default values.
*/ */
VAStatus vaCreateConfig ( VAStatus vaCreateConfig (
VADisplay dpy, VADisplay dpy,
VAProfile profile, VAProfile profile,
VAEntrypoint entrypoint, VAEntrypoint entrypoint,
VAConfigAttrib *attrib_list, VAConfigAttrib *attrib_list,
int num_attribs, int num_attribs,
VAConfigID *config_id /* out */ VAConfigID *config_id /* out */
); );
/* /**
* Free resources associdated with a given config * Free resources associdated with a given config
*/ */
VAStatus vaDestroyConfig ( VAStatus vaDestroyConfig (
VADisplay dpy, VADisplay dpy,
VAConfigID config_id VAConfigID config_id
); );
/* /**
* Query all attributes for a given configuration * Query all attributes for a given configuration
* The profile of the configuration is returned in "profile" * The profile of the configuration is returned in "profile"
* The entrypoint of the configuration is returned in "entrypoint" * The entrypoint of the configuration is returned in "entrypoint"
* The caller must provide an "attrib_list" array that can hold at least * The caller must provide an "attrib_list" array that can hold at least
* vaMaxNumConfigAttributes() entries. The actual number of attributes * vaMaxNumConfigAttributes() entries. The actual number of attributes
* returned in "attrib_list" is returned in "num_attribs" * returned in "attrib_list" is returned in "num_attribs"
*/ */
VAStatus vaQueryConfigAttributes ( VAStatus vaQueryConfigAttributes (
VADisplay dpy, VADisplay dpy,
VAConfigID config_id, VAConfigID config_id,
VAProfile *profile, /* out */ VAProfile *profile, /* out */
VAEntrypoint *entrypoint, /* out */ VAEntrypoint *entrypoint, /* out */
VAConfigAttrib *attrib_list,/* out */ VAConfigAttrib *attrib_list,/* out */
int *num_attribs /* out */ int *num_attribs /* out */
); );
/* /**
* Contexts and Surfaces * Contexts and Surfaces
* *
* Context represents a "virtual" video decode pipeline. Surfaces are rende r * Context represents a "virtual" video decode pipeline. Surfaces are rende r
* targets for a given context. The data in the surfaces are not accessible * targets for a given context. The data in the surfaces are not accessible
* to the client and the internal data format of the surface is implementat in * to the client and the internal data format of the surface is implementat in
* specific. * specific.
* *
* Surfaces will be bound to a context when the context is created. Once * Surfaces will be bound to a context when the context is created. Once
* a surface is bound to a given context, it can not be used to create * a surface is bound to a given context, it can not be used to create
* another context. The association is removed when the context is destroye d * another context. The association is removed when the context is destroye d
skipping to change at line 803 skipping to change at line 802
VADisplay dpy, VADisplay dpy,
unsigned int format, unsigned int format,
unsigned int width, unsigned int width,
unsigned int height, unsigned int height,
VASurfaceID *surfaces, VASurfaceID *surfaces,
unsigned int num_surfaces, unsigned int num_surfaces,
VASurfaceAttrib *attrib_list, VASurfaceAttrib *attrib_list,
unsigned int num_attribs unsigned int num_attribs
); );
/* /**
* vaDestroySurfaces - Destroy resources associated with surfaces. * vaDestroySurfaces - Destroy resources associated with surfaces.
* Surfaces can only be destroyed after the context associated has been * Surfaces can only be destroyed after the context associated has been
* destroyed. * destroyed.
* dpy: display * dpy: display
* surfaces: array of surfaces to destroy * surfaces: array of surfaces to destroy
* num_surfaces: number of surfaces in the array to be destroyed. * num_surfaces: number of surfaces in the array to be destroyed.
*/ */
VAStatus vaDestroySurfaces ( VAStatus vaDestroySurfaces (
VADisplay dpy, VADisplay dpy,
VASurfaceID *surfaces, VASurfaceID *surfaces,
int num_surfaces int num_surfaces
); );
#define VA_PROGRESSIVE 0x1 #define VA_PROGRESSIVE 0x1
/* /**
* vaCreateContext - Create a context * vaCreateContext - Create a context
* dpy: display * dpy: display
* config_id: configuration for the context * config_id: configuration for the context
* picture_width: coded picture width * picture_width: coded picture width
* picture_height: coded picture height * picture_height: coded picture height
* flag: any combination of the following: * flag: any combination of the following:
* VA_PROGRESSIVE (only progressive frame pictures in the sequence when set) * VA_PROGRESSIVE (only progressive frame pictures in the sequence when set)
* render_targets: render targets (surfaces) tied to the context * render_targets: render targets (surfaces) tied to the context
* num_render_targets: number of render targets in the above array * num_render_targets: number of render targets in the above array
* context: created context id upon return * context: created context id upon return
skipping to change at line 841 skipping to change at line 840
VADisplay dpy, VADisplay dpy,
VAConfigID config_id, VAConfigID config_id,
int picture_width, int picture_width,
int picture_height, int picture_height,
int flag, int flag,
VASurfaceID *render_targets, VASurfaceID *render_targets,
int num_render_targets, int num_render_targets,
VAContextID *context /* out */ VAContextID *context /* out */
); );
/* /**
* vaDestroyContext - Destroy a context * vaDestroyContext - Destroy a context
* dpy: display * dpy: display
* context: context to be destroyed * context: context to be destroyed
*/ */
VAStatus vaDestroyContext ( VAStatus vaDestroyContext (
VADisplay dpy, VADisplay dpy,
VAContextID context VAContextID context
); );
/* /**
* Buffers * Buffers
* Buffers are used to pass various types of data from the * Buffers are used to pass various types of data from the
* client to the server. The server maintains a data store * client to the server. The server maintains a data store
* for each buffer created, and the client idenfies a buffer * for each buffer created, and the client idenfies a buffer
* through a unique buffer id assigned by the server. * through a unique buffer id assigned by the server.
*/ */
typedef VAGenericID VABufferID; typedef VAGenericID VABufferID;
typedef enum typedef enum
skipping to change at line 954 skipping to change at line 953
/** \brief Packed header parameter. */ /** \brief Packed header parameter. */
typedef struct _VAEncPackedHeaderParameterBuffer { typedef struct _VAEncPackedHeaderParameterBuffer {
/** Type of the packed header buffer. See #VAEncPackedHeaderType. */ /** Type of the packed header buffer. See #VAEncPackedHeaderType. */
unsigned int type; unsigned int type;
/** \brief Size of the #VAEncPackedHeaderDataBuffer in bits. */ /** \brief Size of the #VAEncPackedHeaderDataBuffer in bits. */
unsigned int bit_length; unsigned int bit_length;
/** \brief Flag: buffer contains start code emulation prevention bytes? */ /** \brief Flag: buffer contains start code emulation prevention bytes? */
unsigned char has_emulation_bytes; unsigned char has_emulation_bytes;
} VAEncPackedHeaderParameterBuffer; } VAEncPackedHeaderParameterBuffer;
/* /**
* For application, e.g. set a new bitrate * For application, e.g. set a new bitrate
* VABufferID buf_id; * VABufferID buf_id;
* VAEncMiscParameterBuffer *misc_param; * VAEncMiscParameterBuffer *misc_param;
* VAEncMiscParameterRateControl *misc_rate_ctrl; * VAEncMiscParameterRateControl *misc_rate_ctrl;
* *
* vaCreateBuffer(dpy, context, VAEncMiscParameterBufferType, * vaCreateBuffer(dpy, context, VAEncMiscParameterBufferType,
* sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParamete rRateControl), * sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParamete rRateControl),
* 1, NULL, &buf_id); * 1, NULL, &buf_id);
* *
* vaMapBuffer(dpy,buf_id,(void **)&misc_param); * vaMapBuffer(dpy,buf_id,(void **)&misc_param);
skipping to change at line 1012 skipping to change at line 1011
} bits; } bits;
unsigned int value; unsigned int value;
} rc_flags; } rc_flags;
} VAEncMiscParameterRateControl; } VAEncMiscParameterRateControl;
typedef struct _VAEncMiscParameterFrameRate typedef struct _VAEncMiscParameterFrameRate
{ {
unsigned int framerate; unsigned int framerate;
} VAEncMiscParameterFrameRate; } VAEncMiscParameterFrameRate;
/* /**
* Allow a maximum slice size to be specified (in bits). * Allow a maximum slice size to be specified (in bits).
* The encoder will attempt to make sure that individual slices do not exce ed this size * The encoder will attempt to make sure that individual slices do not exce ed this size
* Or to signal applicate if the slice size exceed this size, see "status" of VACodedBufferSegment * Or to signal applicate if the slice size exceed this size, see "status" of VACodedBufferSegment
*/ */
typedef struct _VAEncMiscParameterMaxSliceSize typedef struct _VAEncMiscParameterMaxSliceSize
{ {
unsigned int max_slice_size; unsigned int max_slice_size;
} VAEncMiscParameterMaxSliceSize; } VAEncMiscParameterMaxSliceSize;
typedef struct _VAEncMiscParameterAIR typedef struct _VAEncMiscParameterAIR
skipping to change at line 1051 skipping to change at line 1050
* the \c status flag of #VACodedBufferSegment will contain * the \c status flag of #VACodedBufferSegment will contain
* #VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW. * #VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW.
*/ */
typedef struct _VAEncMiscParameterBufferMaxFrameSize { typedef struct _VAEncMiscParameterBufferMaxFrameSize {
/** \brief Type. Shall be set to #VAEncMiscParameterTypeMaxFrameSize. * / /** \brief Type. Shall be set to #VAEncMiscParameterTypeMaxFrameSize. * /
VAEncMiscParameterType type; VAEncMiscParameterType type;
/** \brief Maximum size of a frame (in bits). */ /** \brief Maximum size of a frame (in bits). */
unsigned int max_frame_size; unsigned int max_frame_size;
} VAEncMiscParameterBufferMaxFrameSize; } VAEncMiscParameterBufferMaxFrameSize;
/* /**
* There will be cases where the bitstream buffer will not have enough room to hold * There will be cases where the bitstream buffer will not have enough room to hold
* the data for the entire slice, and the following flags will be used in t he slice * the data for the entire slice, and the following flags will be used in t he slice
* parameter to signal to the server for the possible cases. * parameter to signal to the server for the possible cases.
* If a slice parameter buffer and slice data buffer pair is sent to the se rver with * If a slice parameter buffer and slice data buffer pair is sent to the se rver with
* the slice data partially in the slice data buffer (BEGIN and MIDDLE case s below), * the slice data partially in the slice data buffer (BEGIN and MIDDLE case s below),
* then a slice parameter and data buffer needs to be sent again to complet e this slice. * then a slice parameter and data buffer needs to be sent again to complet e this slice.
*/ */
#define VA_SLICE_DATA_FLAG_ALL 0x00 /* whole slice is in the buf fer */ #define VA_SLICE_DATA_FLAG_ALL 0x00 /* whole slice is in the buf fer */
#define VA_SLICE_DATA_FLAG_BEGIN 0x01 /* The beginning of the slic e is in the buffer but the end if not */ #define VA_SLICE_DATA_FLAG_BEGIN 0x01 /* The beginning of the slic e is in the buffer but the end if not */
#define VA_SLICE_DATA_FLAG_MIDDLE 0x02 /* Neither beginning nor end of the slice is in the buffer */ #define VA_SLICE_DATA_FLAG_MIDDLE 0x02 /* Neither beginning nor end of the slice is in the buffer */
skipping to change at line 1131 skipping to change at line 1130
unsigned int repeat_first_field : 1; unsigned int repeat_first_field : 1;
unsigned int progressive_frame : 1; unsigned int progressive_frame : 1;
unsigned int is_first_field : 1; /* indi cate whether the current field unsigned int is_first_field : 1; /* indi cate whether the current field
* is the firs t field for field picture * is the firs t field for field picture
*/ */
} bits; } bits;
unsigned int value; unsigned int value;
} picture_coding_extension; } picture_coding_extension;
} VAPictureParameterBufferMPEG2; } VAPictureParameterBufferMPEG2;
/* MPEG-2 Inverse Quantization Matrix Buffer */ /** MPEG-2 Inverse Quantization Matrix Buffer */
typedef struct _VAIQMatrixBufferMPEG2 typedef struct _VAIQMatrixBufferMPEG2
{ {
int load_intra_quantiser_matrix; int load_intra_quantiser_matrix;
int load_non_intra_quantiser_matrix; int load_non_intra_quantiser_matrix;
int load_chroma_intra_quantiser_matrix; int load_chroma_intra_quantiser_matrix;
int load_chroma_non_intra_quantiser_matrix; int load_chroma_non_intra_quantiser_matrix;
unsigned char intra_quantiser_matrix[64]; unsigned char intra_quantiser_matrix[64];
unsigned char non_intra_quantiser_matrix[64]; unsigned char non_intra_quantiser_matrix[64];
unsigned char chroma_intra_quantiser_matrix[64]; unsigned char chroma_intra_quantiser_matrix[64];
unsigned char chroma_non_intra_quantiser_matrix[64]; unsigned char chroma_non_intra_quantiser_matrix[64];
} VAIQMatrixBufferMPEG2; } VAIQMatrixBufferMPEG2;
/* MPEG-2 Slice Parameter Buffer */ /** MPEG-2 Slice Parameter Buffer */
typedef struct _VASliceParameterBufferMPEG2 typedef struct _VASliceParameterBufferMPEG2
{ {
unsigned int slice_data_size;/* number of bytes in the slice data buffe r for this slice */ unsigned int slice_data_size;/* number of bytes in the slice data buffe r for this slice */
unsigned int slice_data_offset;/* the offset to the first byte of slice data */ unsigned int slice_data_offset;/* the offset to the first byte of slice data */
unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
unsigned int macroblock_offset;/* the offset to the first bit of MB fro m the first byte of slice data */ unsigned int macroblock_offset;/* the offset to the first bit of MB fro m the first byte of slice data */
unsigned int slice_horizontal_position; unsigned int slice_horizontal_position;
unsigned int slice_vertical_position; unsigned int slice_vertical_position;
int quantiser_scale_code; int quantiser_scale_code;
int intra_slice_flag; int intra_slice_flag;
} VASliceParameterBufferMPEG2; } VASliceParameterBufferMPEG2;
/* MPEG-2 Macroblock Parameter Buffer */ /** MPEG-2 Macroblock Parameter Buffer */
typedef struct _VAMacroblockParameterBufferMPEG2 typedef struct _VAMacroblockParameterBufferMPEG2
{ {
unsigned short macroblock_address; unsigned short macroblock_address;
/* /*
* macroblock_address (in raster scan order) * macroblock_address (in raster scan order)
* top-left: 0 * top-left: 0
* bottom-right: picture-height-in-mb*picture-width-in-mb - 1 * bottom-right: picture-height-in-mb*picture-width-in-mb - 1
*/ */
unsigned char macroblock_type; /* see definition below */ unsigned char macroblock_type; /* see definition below */
union { union {
skipping to change at line 1204 skipping to change at line 1203
} VAMacroblockParameterBufferMPEG2; } VAMacroblockParameterBufferMPEG2;
/* /*
* OR'd flags for macroblock_type (section 6.3.17.1 in the spec) * OR'd flags for macroblock_type (section 6.3.17.1 in the spec)
*/ */
#define VA_MB_TYPE_MOTION_FORWARD 0x02 #define VA_MB_TYPE_MOTION_FORWARD 0x02
#define VA_MB_TYPE_MOTION_BACKWARD 0x04 #define VA_MB_TYPE_MOTION_BACKWARD 0x04
#define VA_MB_TYPE_MOTION_PATTERN 0x08 #define VA_MB_TYPE_MOTION_PATTERN 0x08
#define VA_MB_TYPE_MOTION_INTRA 0x10 #define VA_MB_TYPE_MOTION_INTRA 0x10
/* /**
* MPEG-2 Residual Data Buffer * MPEG-2 Residual Data Buffer
* For each macroblock, there wil be 64 shorts (16-bit) in the * For each macroblock, there wil be 64 shorts (16-bit) in the
* residual data buffer * residual data buffer
*/ */
/**************************** /****************************
* MPEG-4 Part 2 data structures * MPEG-4 Part 2 data structures
****************************/ ****************************/
/* MPEG-4 Picture Parameter Buffer */ /* MPEG-4 Picture Parameter Buffer */
skipping to change at line 1267 skipping to change at line 1266
unsigned char vop_fcode_backward; unsigned char vop_fcode_backward;
unsigned short vop_time_increment_resolution; unsigned short vop_time_increment_resolution;
/* short header related */ /* short header related */
unsigned char num_gobs_in_vop; unsigned char num_gobs_in_vop;
unsigned char num_macroblocks_in_gob; unsigned char num_macroblocks_in_gob;
/* for direct mode prediction */ /* for direct mode prediction */
short TRB; short TRB;
short TRD; short TRD;
} VAPictureParameterBufferMPEG4; } VAPictureParameterBufferMPEG4;
/* MPEG-4 Inverse Quantization Matrix Buffer */ /** MPEG-4 Inverse Quantization Matrix Buffer */
typedef struct _VAIQMatrixBufferMPEG4 typedef struct _VAIQMatrixBufferMPEG4
{ {
int load_intra_quant_mat; int load_intra_quant_mat;
int load_non_intra_quant_mat; int load_non_intra_quant_mat;
unsigned char intra_quant_mat[64]; unsigned char intra_quant_mat[64];
unsigned char non_intra_quant_mat[64]; unsigned char non_intra_quant_mat[64];
} VAIQMatrixBufferMPEG4; } VAIQMatrixBufferMPEG4;
/* MPEG-4 Slice Parameter Buffer */ /** MPEG-4 Slice Parameter Buffer */
typedef struct _VASliceParameterBufferMPEG4 typedef struct _VASliceParameterBufferMPEG4
{ {
unsigned int slice_data_size;/* number of bytes in the slice data buffe r for this slice */ unsigned int slice_data_size;/* number of bytes in the slice data buffe r for this slice */
unsigned int slice_data_offset;/* the offset to the first byte of slice data */ unsigned int slice_data_offset;/* the offset to the first byte of slice data */
unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
unsigned int macroblock_offset;/* the offset to the first bit of MB fro m the first byte of slice data */ unsigned int macroblock_offset;/* the offset to the first bit of MB fro m the first byte of slice data */
unsigned int macroblock_number; unsigned int macroblock_number;
int quant_scale; int quant_scale;
} VASliceParameterBufferMPEG4; } VASliceParameterBufferMPEG4;
/* /**
VC-1 data structures VC-1 data structures
*/ */
typedef enum /* see 7.1.1.32 */ typedef enum /* see 7.1.1.32 */
{ {
VAMvMode1Mv = 0, VAMvMode1Mv = 0,
VAMvMode1MvHalfPel = 1, VAMvMode1MvHalfPel = 1,
VAMvMode1MvHalfPelBilinear = 2, VAMvMode1MvHalfPelBilinear = 2,
VAMvModeMixedMv = 3, VAMvModeMixedMv = 3,
VAMvModeIntensityCompensation = 4 VAMvModeIntensityCompensation = 4
} VAMvModeVC1; } VAMvModeVC1;
/* VC-1 Picture Parameter Buffer */ /** VC-1 Picture Parameter Buffer */
/* /*
* For each picture, and before any slice data, a picture parameter * For each picture, and before any slice data, a picture parameter
* buffer must be send. Multiple picture parameter buffers may be * buffer must be send. Multiple picture parameter buffers may be
* sent for a single picture. In that case picture parameters will * sent for a single picture. In that case picture parameters will
* apply to all slice data that follow it until a new picture * apply to all slice data that follow it until a new picture
* parameter buffer is sent. * parameter buffer is sent.
* *
* Notes: * Notes:
* pic_quantizer_type should be set to the applicable quantizer * pic_quantizer_type should be set to the applicable quantizer
* type as defined by QUANTIZER (J.1.19) and either * type as defined by QUANTIZER (J.1.19) and either
skipping to change at line 1459 skipping to change at line 1458
unsigned int mb_level_transform_type_flag : 1;/* PICTURE_LAYER ::TTMBF */ unsigned int mb_level_transform_type_flag : 1;/* PICTURE_LAYER ::TTMBF */
unsigned int frame_level_transform_type : 2;/* PICTURE_LAYER ::TTFRM */ unsigned int frame_level_transform_type : 2;/* PICTURE_LAYER ::TTFRM */
unsigned int transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER ::TRANSACFRM */ unsigned int transform_ac_codingset_idx1 : 2;/* PICTURE_LAYER ::TRANSACFRM */
unsigned int transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER ::TRANSACFRM2 */ unsigned int transform_ac_codingset_idx2 : 2;/* PICTURE_LAYER ::TRANSACFRM2 */
unsigned int intra_transform_dc_table : 1;/* PICTURE_LAYER ::TRANSDCTAB */ unsigned int intra_transform_dc_table : 1;/* PICTURE_LAYER ::TRANSDCTAB */
} bits; } bits;
unsigned int value; unsigned int value;
} transform_fields; } transform_fields;
} VAPictureParameterBufferVC1; } VAPictureParameterBufferVC1;
/* VC-1 Bitplane Buffer /** VC-1 Bitplane Buffer
There will be at most three bitplanes coded in any picture header. To send There will be at most three bitplanes coded in any picture header. To send
the bitplane data more efficiently, each byte is divided in two nibbles, wi th the bitplane data more efficiently, each byte is divided in two nibbles, wi th
each nibble carrying three bitplanes for one macroblock. The following tab le each nibble carrying three bitplanes for one macroblock. The following tab le
shows the bitplane data arrangement within each nibble based on the picture shows the bitplane data arrangement within each nibble based on the picture
type. type.
Picture Type Bit3 Bit2 Bit1 Bit0 Picture Type Bit3 Bit2 Bit1 Bit0
I or BI OVERFLAGS ACPRED FIEL DTX I or BI OVERFLAGS ACPRED FIEL DTX
P MYTYPEMB SKIPMB DIRECTMB P MYTYPEMB SKIPMB DIRECTMB
B FORWARDMB SKIPMB DIRECTMB B FORWARDMB SKIPMB DIRECTMB
skipping to change at line 1511 skipping to change at line 1510
signed int TopFieldOrderCnt; signed int TopFieldOrderCnt;
signed int BottomFieldOrderCnt; signed int BottomFieldOrderCnt;
} VAPictureH264; } VAPictureH264;
/* flags in VAPictureH264 could be OR of the following */ /* flags in VAPictureH264 could be OR of the following */
#define VA_PICTURE_H264_INVALID 0x00000001 #define VA_PICTURE_H264_INVALID 0x00000001
#define VA_PICTURE_H264_TOP_FIELD 0x00000002 #define VA_PICTURE_H264_TOP_FIELD 0x00000002
#define VA_PICTURE_H264_BOTTOM_FIELD 0x00000004 #define VA_PICTURE_H264_BOTTOM_FIELD 0x00000004
#define VA_PICTURE_H264_SHORT_TERM_REFERENCE 0x00000008 #define VA_PICTURE_H264_SHORT_TERM_REFERENCE 0x00000008
#define VA_PICTURE_H264_LONG_TERM_REFERENCE 0x00000010 #define VA_PICTURE_H264_LONG_TERM_REFERENCE 0x00000010
/* H.264 Picture Parameter Buffer */ /** H.264 Picture Parameter Buffer */
/* /*
* For each picture, and before any slice data, a single * For each picture, and before any slice data, a single
* picture parameter buffer must be send. * picture parameter buffer must be send.
*/ */
typedef struct _VAPictureParameterBufferH264 typedef struct _VAPictureParameterBufferH264
{ {
VAPictureH264 CurrPic; VAPictureH264 CurrPic;
VAPictureH264 ReferenceFrames[16]; /* in DPB */ VAPictureH264 ReferenceFrames[16]; /* in DPB */
unsigned short picture_width_in_mbs_minus1; unsigned short picture_width_in_mbs_minus1;
unsigned short picture_height_in_mbs_minus1; unsigned short picture_height_in_mbs_minus1;
skipping to change at line 1566 skipping to change at line 1565
unsigned int pic_order_present_flag : 1; unsigned int pic_order_present_flag : 1;
unsigned int deblocking_filter_control_present_flag : 1; unsigned int deblocking_filter_control_present_flag : 1;
unsigned int redundant_pic_cnt_present_flag : 1; unsigned int redundant_pic_cnt_present_flag : 1;
unsigned int reference_pic_flag : 1; /* nal_ ref_idc != 0 */ unsigned int reference_pic_flag : 1; /* nal_ ref_idc != 0 */
} bits; } bits;
unsigned int value; unsigned int value;
} pic_fields; } pic_fields;
unsigned short frame_num; unsigned short frame_num;
} VAPictureParameterBufferH264; } VAPictureParameterBufferH264;
/* H.264 Inverse Quantization Matrix Buffer */ /** H.264 Inverse Quantization Matrix Buffer */
typedef struct _VAIQMatrixBufferH264 typedef struct _VAIQMatrixBufferH264
{ {
unsigned char ScalingList4x4[6][16]; unsigned char ScalingList4x4[6][16];
unsigned char ScalingList8x8[2][64]; unsigned char ScalingList8x8[2][64];
} VAIQMatrixBufferH264; } VAIQMatrixBufferH264;
/* /**
* H.264 Slice Group Map Buffer * H.264 Slice Group Map Buffer
* When VAPictureParameterBufferH264::num_slice_group_minus1 is not equal t o 0, * When VAPictureParameterBufferH264::num_slice_group_minus1 is not equal t o 0,
* A slice group map buffer should be sent for each picture if required. Th e buffer * A slice group map buffer should be sent for each picture if required. Th e buffer
* is sent only when there is a change in the mapping values. * is sent only when there is a change in the mapping values.
* The slice group map buffer map "map units" to slice groups as specified in * The slice group map buffer map "map units" to slice groups as specified in
* section 8.2.2 of the H.264 spec. The buffer will contain one byte for ea ch macroblock * section 8.2.2 of the H.264 spec. The buffer will contain one byte for ea ch macroblock
* in raster scan order * in raster scan order
*/ */
/* H.264 Slice Parameter Buffer */ /** H.264 Slice Parameter Buffer */
typedef struct _VASliceParameterBufferH264 typedef struct _VASliceParameterBufferH264
{ {
unsigned int slice_data_size;/* number of bytes in the slice data buffe r for this slice */ unsigned int slice_data_size;/* number of bytes in the slice data buffe r for this slice */
/** \brief Byte offset to the NAL Header Unit for this slice. */ /** \brief Byte offset to the NAL Header Unit for this slice. */
unsigned int slice_data_offset; unsigned int slice_data_offset;
unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */ unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
/** /**
* \brief Bit offset from NAL Header Unit to the begining of slice_data (). * \brief Bit offset from NAL Header Unit to the begining of slice_data ().
* *
* This bit offset is relative to and includes the NAL unit byte * This bit offset is relative to and includes the NAL unit byte
skipping to change at line 1709 skipping to change at line 1708
VASurfaceID reference_picture; VASurfaceID reference_picture;
VASurfaceID reconstructed_picture; VASurfaceID reconstructed_picture;
VABufferID coded_buf; VABufferID coded_buf;
unsigned short picture_width; unsigned short picture_width;
unsigned short picture_height; unsigned short picture_height;
unsigned int modulo_time_base; /* number of 1s */ unsigned int modulo_time_base; /* number of 1s */
unsigned int vop_time_increment; unsigned int vop_time_increment;
VAEncPictureType picture_type; VAEncPictureType picture_type;
} VAEncPictureParameterBufferMPEG4; } VAEncPictureParameterBufferMPEG4;
/* Buffer functions */ /** Buffer functions */
/* /**
* Creates a buffer for "num_elements" elements of "size" bytes and * Creates a buffer for "num_elements" elements of "size" bytes and
* initalize with "data". * initalize with "data".
* if "data" is null, then the contents of the buffer data store * if "data" is null, then the contents of the buffer data store
* are undefined. * are undefined.
* Basically there are two ways to get buffer data to the server side. One is * Basically there are two ways to get buffer data to the server side. One is
* to call vaCreateBuffer() with a non-null "data", which results the data being * to call vaCreateBuffer() with a non-null "data", which results the data being
* copied to the data store on the server side. A different method that * copied to the data store on the server side. A different method that
* eliminates this copy is to pass null as "data" when calling vaCreateBuff er(), * eliminates this copy is to pass null as "data" when calling vaCreateBuff er(),
* and then use vaMapBuffer() to map the data store from the server side to the * and then use vaMapBuffer() to map the data store from the server side to the
* client address space for access. * client address space for access.
skipping to change at line 1735 skipping to change at line 1734
VAStatus vaCreateBuffer ( VAStatus vaCreateBuffer (
VADisplay dpy, VADisplay dpy,
VAContextID context, VAContextID context,
VABufferType type, /* in */ VABufferType type, /* in */
unsigned int size, /* in */ unsigned int size, /* in */
unsigned int num_elements, /* in */ unsigned int num_elements, /* in */
void *data, /* in */ void *data, /* in */
VABufferID *buf_id /* out */ VABufferID *buf_id /* out */
); );
/* /**
* Convey to the server how many valid elements are in the buffer. * Convey to the server how many valid elements are in the buffer.
* e.g. if multiple slice parameters are being held in a single buffer, * e.g. if multiple slice parameters are being held in a single buffer,
* this will communicate to the server the number of slice parameters * this will communicate to the server the number of slice parameters
* that are valid in the buffer. * that are valid in the buffer.
*/ */
VAStatus vaBufferSetNumElements ( VAStatus vaBufferSetNumElements (
VADisplay dpy, VADisplay dpy,
VABufferID buf_id, /* in */ VABufferID buf_id, /* in */
unsigned int num_elements /* in */ unsigned int num_elements /* in */
); );
/* /**
* device independent data structure for codedbuffer * device independent data structure for codedbuffer
*/ */
/* /*
* FICTURE_AVE_QP(bit7-0): The average Qp value used during this frame * FICTURE_AVE_QP(bit7-0): The average Qp value used during this frame
* LARGE_SLICE(bit8):At least one slice in the current frame was large * LARGE_SLICE(bit8):At least one slice in the current frame was large
* enough for the encoder to attempt to limit its size. * enough for the encoder to attempt to limit its size.
* SLICE_OVERFLOW(bit9): At least one slice in the current frame has * SLICE_OVERFLOW(bit9): At least one slice in the current frame has
* exceeded the maximum slice size specified. * exceeded the maximum slice size specified.
* BITRATE_OVERFLOW(bit10): The peak bitrate was exceeded for this frame. * BITRATE_OVERFLOW(bit10): The peak bitrate was exceeded for this frame.
skipping to change at line 1815 skipping to change at line 1814
unsigned int reserved; unsigned int reserved;
/** \brief Pointer to the start of the data buffer. */ /** \brief Pointer to the start of the data buffer. */
void *buf; void *buf;
/** /**
* \brief Pointer to the next #VACodedBufferSegment element, * \brief Pointer to the next #VACodedBufferSegment element,
* or \c NULL if there is none. * or \c NULL if there is none.
*/ */
void *next; void *next;
} VACodedBufferSegment; } VACodedBufferSegment;
/* /**
* Map data store of the buffer into the client's address space * Map data store of the buffer into the client's address space
* vaCreateBuffer() needs to be called with "data" set to NULL before * vaCreateBuffer() needs to be called with "data" set to NULL before
* calling vaMapBuffer() * calling vaMapBuffer()
* *
* if buffer type is VAEncCodedBufferType, pbuf points to link-list of * if buffer type is VAEncCodedBufferType, pbuf points to link-list of
* VACodedBufferSegment, and the list is terminated if "next" is NULL * VACodedBufferSegment, and the list is terminated if "next" is NULL
*/ */
VAStatus vaMapBuffer ( VAStatus vaMapBuffer (
VADisplay dpy, VADisplay dpy,
VABufferID buf_id, /* in */ VABufferID buf_id, /* in */
void **pbuf /* out */ void **pbuf /* out */
); );
/* /**
* After client making changes to a mapped data store, it needs to * After client making changes to a mapped data store, it needs to
* "Unmap" it to let the server know that the data is ready to be * "Unmap" it to let the server know that the data is ready to be
* consumed by the server * consumed by the server
*/ */
VAStatus vaUnmapBuffer ( VAStatus vaUnmapBuffer (
VADisplay dpy, VADisplay dpy,
VABufferID buf_id /* in */ VABufferID buf_id /* in */
); );
/* /**
* After this call, the buffer is deleted and this buffer_id is no longer v alid * After this call, the buffer is deleted and this buffer_id is no longer v alid
* Only call this if the buffer is not going to be passed to vaRenderBuffer * Only call this if the buffer is not going to be passed to vaRenderBuffer
*/ */
VAStatus vaDestroyBuffer ( VAStatus vaDestroyBuffer (
VADisplay dpy, VADisplay dpy,
VABufferID buffer_id VABufferID buffer_id
); );
/* /*
Render (Decode) Pictures Render (Decode) Pictures
A picture represents either a frame or a field. A picture represents either a frame or a field.
The Begin/Render/End sequence sends the decode buffers to the server The Begin/Render/End sequence sends the decode buffers to the server
*/ */
/* /**
* Get ready to decode a picture to a target surface * Get ready to decode a picture to a target surface
*/ */
VAStatus vaBeginPicture ( VAStatus vaBeginPicture (
VADisplay dpy, VADisplay dpy,
VAContextID context, VAContextID context,
VASurfaceID render_target VASurfaceID render_target
); );
/* /**
* Send decode buffers to the server. * Send decode buffers to the server.
* Buffers are automatically destroyed afterwards * Buffers are automatically destroyed afterwards
*/ */
VAStatus vaRenderPicture ( VAStatus vaRenderPicture (
VADisplay dpy, VADisplay dpy,
VAContextID context, VAContextID context,
VABufferID *buffers, VABufferID *buffers,
int num_buffers int num_buffers
); );
/* /**
* Make the end of rendering for a picture. * Make the end of rendering for a picture.
* The server should start processing all pending operations for this * The server should start processing all pending operations for this
* surface. This call is non-blocking. The client can start another * surface. This call is non-blocking. The client can start another
* Begin/Render/End sequence on a different render target. * Begin/Render/End sequence on a different render target.
*/ */
VAStatus vaEndPicture ( VAStatus vaEndPicture (
VADisplay dpy, VADisplay dpy,
VAContextID context VAContextID context
); );
/* /*
Synchronization Synchronization
*/ */
/* /**
* This function blocks until all pending operations on the render target * This function blocks until all pending operations on the render target
* have been completed. Upon return it is safe to use the render target fo r a * have been completed. Upon return it is safe to use the render target fo r a
* different picture. * different picture.
*/ */
VAStatus vaSyncSurface ( VAStatus vaSyncSurface (
VADisplay dpy, VADisplay dpy,
VASurfaceID render_target VASurfaceID render_target
); );
typedef enum typedef enum
{ {
VASurfaceRendering = 1, /* Rendering in progress */ VASurfaceRendering = 1, /* Rendering in progress */
VASurfaceDisplaying = 2, /* Displaying in progress (not safe to render into it) */ VASurfaceDisplaying = 2, /* Displaying in progress (not safe to render into it) */
/* this status is useful if surface is used as the source */ /* this status is useful if surface is used as the source */
/* of an overlay */ /* of an overlay */
VASurfaceReady = 4, /* not being rendered or displayed */ VASurfaceReady = 4, /* not being rendered or displayed */
VASurfaceSkipped = 8 /* Indicate a skipped frame during encode */ VASurfaceSkipped = 8 /* Indicate a skipped frame during encode */
} VASurfaceStatus; } VASurfaceStatus;
/* /**
* Find out any pending ops on the render target * Find out any pending ops on the render target
*/ */
VAStatus vaQuerySurfaceStatus ( VAStatus vaQuerySurfaceStatus (
VADisplay dpy, VADisplay dpy,
VASurfaceID render_target, VASurfaceID render_target,
VASurfaceStatus *status /* out */ VASurfaceStatus *status /* out */
); );
typedef enum typedef enum
{ {
VADecodeSliceMissing = 0, VADecodeSliceMissing = 0,
VADecodeMBError = 1, VADecodeMBError = 1,
} VADecodeErrorType; } VADecodeErrorType;
/* /**
* Client calls vaQuerySurfaceError with VA_STATUS_ERROR_DECODING_ERROR, se rver side returns * Client calls vaQuerySurfaceError with VA_STATUS_ERROR_DECODING_ERROR, se rver side returns
* an array of structure VASurfaceDecodeMBErrors, and the array is terminat ed by setting status=-1 * an array of structure VASurfaceDecodeMBErrors, and the array is terminat ed by setting status=-1
*/ */
typedef struct _VASurfaceDecodeMBErrors typedef struct _VASurfaceDecodeMBErrors
{ {
int status; /* 1 if hardware has returned detailed info below, -1 means this record is invalid */ int status; /* 1 if hardware has returned detailed info below, -1 means this record is invalid */
unsigned int start_mb; /* start mb address with errors */ unsigned int start_mb; /* start mb address with errors */
unsigned int end_mb; /* end mb address with errors */ unsigned int end_mb; /* end mb address with errors */
VADecodeErrorType decode_error_type; VADecodeErrorType decode_error_type;
} VASurfaceDecodeMBErrors; } VASurfaceDecodeMBErrors;
/* /**
* After the application gets VA_STATUS_ERROR_DECODING_ERROR after calling vaSyncSurface(), * After the application gets VA_STATUS_ERROR_DECODING_ERROR after calling vaSyncSurface(),
* it can call vaQuerySurfaceError to find out further details on the parti cular error. * it can call vaQuerySurfaceError to find out further details on the parti cular error.
* VA_STATUS_ERROR_DECODING_ERROR should be passed in as "error_status", * VA_STATUS_ERROR_DECODING_ERROR should be passed in as "error_status",
* upon the return, error_info will point to an array of _VASurfaceDecodeMB Errors structure, * upon the return, error_info will point to an array of _VASurfaceDecodeMB Errors structure,
* which is allocated and filled by libVA with detailed information on the missing or error macroblocks. * which is allocated and filled by libVA with detailed information on the missing or error macroblocks.
* The array is terminated if "status==-1" is detected. * The array is terminated if "status==-1" is detected.
*/ */
VAStatus vaQuerySurfaceError( VAStatus vaQuerySurfaceError(
VADisplay dpy, VADisplay dpy,
VASurfaceID surface, VASurfaceID surface,
VAStatus error_status, VAStatus error_status,
void **error_info void **error_info
); );
/* /**
* Images and Subpictures * Images and Subpictures
* VAImage is used to either get the surface data to client memory, or * VAImage is used to either get the surface data to client memory, or
* to copy image data in client memory to a surface. * to copy image data in client memory to a surface.
* Both images, subpictures and surfaces follow the same 2D coordinate syst em where origin * Both images, subpictures and surfaces follow the same 2D coordinate syst em where origin
* is at the upper left corner with positive X to the right and positive Y down * is at the upper left corner with positive X to the right and positive Y down
*/ */
#define VA_FOURCC(ch0, ch1, ch2, ch3) \ #define VA_FOURCC(ch0, ch1, ch2, ch3) \
((unsigned long)(unsigned char) (ch0) | ((unsigned long)(unsigned char) (ch1) << 8) | \ ((unsigned long)(unsigned char) (ch0) | ((unsigned long)(unsigned char) (ch1) << 8) | \
((unsigned long)(unsigned char) (ch2) << 16) | ((unsigned long)(unsigne d char) (ch3) << 24 )) ((unsigned long)(unsigned char) (ch2) << 16) | ((unsigned long)(unsigne d char) (ch3) << 24 ))
skipping to change at line 2058 skipping to change at line 2057
* each entry (eg. 3 for YUV palette entries). set to zero for non-pale tte images * each entry (eg. 3 for YUV palette entries). set to zero for non-pale tte images
*/ */
int entry_bytes; int entry_bytes;
/* /*
* An array of ascii characters describing the order of the components within the bytes. * An array of ascii characters describing the order of the components within the bytes.
* Only entry_bytes characters of the string are used. * Only entry_bytes characters of the string are used.
*/ */
char component_order[4]; char component_order[4];
} VAImage; } VAImage;
/* Get maximum number of image formats supported by the implementation */ /** Get maximum number of image formats supported by the implementation */
int vaMaxNumImageFormats ( int vaMaxNumImageFormats (
VADisplay dpy VADisplay dpy
); );
/* /**
* Query supported image formats * Query supported image formats
* The caller must provide a "format_list" array that can hold at * The caller must provide a "format_list" array that can hold at
* least vaMaxNumImageFormats() entries. The actual number of formats * least vaMaxNumImageFormats() entries. The actual number of formats
* returned in "format_list" is returned in "num_formats". * returned in "format_list" is returned in "num_formats".
*/ */
VAStatus vaQueryImageFormats ( VAStatus vaQueryImageFormats (
VADisplay dpy, VADisplay dpy,
VAImageFormat *format_list, /* out */ VAImageFormat *format_list, /* out */
int *num_formats /* out */ int *num_formats /* out */
); );
/* /**
* Create a VAImage structure * Create a VAImage structure
* The width and height fields returned in the VAImage structure may get * The width and height fields returned in the VAImage structure may get
* enlarged for some YUV formats. Upon return from this function, * enlarged for some YUV formats. Upon return from this function,
* image->buf has been created and proper storage allocated by the library. * image->buf has been created and proper storage allocated by the library.
* The client can access the image through the Map/Unmap calls. * The client can access the image through the Map/Unmap calls.
*/ */
VAStatus vaCreateImage ( VAStatus vaCreateImage (
VADisplay dpy, VADisplay dpy,
VAImageFormat *format, VAImageFormat *format,
int width, int width,
int height, int height,
VAImage *image /* out */ VAImage *image /* out */
); );
/* /**
* Should call DestroyImage before destroying the surface it is bound to * Should call DestroyImage before destroying the surface it is bound to
*/ */
VAStatus vaDestroyImage ( VAStatus vaDestroyImage (
VADisplay dpy, VADisplay dpy,
VAImageID image VAImageID image
); );
VAStatus vaSetImagePalette ( VAStatus vaSetImagePalette (
VADisplay dpy, VADisplay dpy,
VAImageID image, VAImageID image,
/* /*
* pointer to an array holding the palette data. The size of the array is * pointer to an array holding the palette data. The size of the array is
* num_palette_entries * entry_bytes in size. The order of the compone nts * num_palette_entries * entry_bytes in size. The order of the compone nts
* in the palette is described by the component_order in VAImage struct * in the palette is described by the component_order in VAImage struct
*/ */
unsigned char *palette unsigned char *palette
); );
/* /**
* Retrive surface data into a VAImage * Retrive surface data into a VAImage
* Image must be in a format supported by the implementation * Image must be in a format supported by the implementation
*/ */
VAStatus vaGetImage ( VAStatus vaGetImage (
VADisplay dpy, VADisplay dpy,
VASurfaceID surface, VASurfaceID surface,
int x, /* coordinates of the upper left source pixel */ int x, /* coordinates of the upper left source pixel */
int y, int y,
unsigned int width, /* width and height of the region */ unsigned int width, /* width and height of the region */
unsigned int height, unsigned int height,
VAImageID image VAImageID image
); );
/* /**
* Copy data from a VAImage to a surface * Copy data from a VAImage to a surface
* Image must be in a format supported by the implementation * Image must be in a format supported by the implementation
* Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface * Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface
* shouldn't be rendered into when this is called * shouldn't be rendered into when this is called
*/ */
VAStatus vaPutImage ( VAStatus vaPutImage (
VADisplay dpy, VADisplay dpy,
VASurfaceID surface, VASurfaceID surface,
VAImageID image, VAImageID image,
int src_x, int src_x,
int src_y, int src_y,
unsigned int src_width, unsigned int src_width,
unsigned int src_height, unsigned int src_height,
int dest_x, int dest_x,
int dest_y, int dest_y,
unsigned int dest_width, unsigned int dest_width,
unsigned int dest_height unsigned int dest_height
); );
/* /**
* Derive an VAImage from an existing surface. * Derive an VAImage from an existing surface.
* This interface will derive a VAImage and corresponding image buffer from * This interface will derive a VAImage and corresponding image buffer from
* an existing VA Surface. The image buffer can then be mapped/unmapped for * an existing VA Surface. The image buffer can then be mapped/unmapped for
* direct CPU access. This operation is only possible on implementations wi th * direct CPU access. This operation is only possible on implementations wi th
* direct rendering capabilities and internal surface formats that can be * direct rendering capabilities and internal surface formats that can be
* represented with a VAImage. When the operation is not possible this inte rface * represented with a VAImage. When the operation is not possible this inte rface
* will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall b ack * will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall b ack
* to using vaCreateImage + vaPutImage to accomplish the same task in an * to using vaCreateImage + vaPutImage to accomplish the same task in an
* indirect manner. * indirect manner.
* *
skipping to change at line 2180 skipping to change at line 2179
* An image created with vaDeriveImage should be freed with vaDestroyImage. The * An image created with vaDeriveImage should be freed with vaDestroyImage. The
* image and image buffer structures will be destroyed; however, the underl ying * image and image buffer structures will be destroyed; however, the underl ying
* surface will remain unchanged until freed with vaDestroySurfaces. * surface will remain unchanged until freed with vaDestroySurfaces.
*/ */
VAStatus vaDeriveImage ( VAStatus vaDeriveImage (
VADisplay dpy, VADisplay dpy,
VASurfaceID surface, VASurfaceID surface,
VAImage *image /* out */ VAImage *image /* out */
); );
/* /**
* Subpictures * Subpictures
* Subpicture is a special type of image that can be blended * Subpicture is a special type of image that can be blended
* with a surface during vaPutSurface(). Subpicture can be used to render * with a surface during vaPutSurface(). Subpicture can be used to render
* DVD sub-titles or closed captioning text etc. * DVD sub-titles or closed captioning text etc.
*/ */
typedef VAGenericID VASubpictureID; typedef VAGenericID VASubpictureID;
/* Get maximum number of subpicture formats supported by the implementation */ /** Get maximum number of subpicture formats supported by the implementatio n */
int vaMaxNumSubpictureFormats ( int vaMaxNumSubpictureFormats (
VADisplay dpy VADisplay dpy
); );
/* flags for subpictures */ /** flags for subpictures */
#define VA_SUBPICTURE_CHROMA_KEYING 0x0001 #define VA_SUBPICTURE_CHROMA_KEYING 0x0001
#define VA_SUBPICTURE_GLOBAL_ALPHA 0x0002 #define VA_SUBPICTURE_GLOBAL_ALPHA 0x0002
#define VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD 0x0004 #define VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD 0x0004
/* /**
* Query supported subpicture formats * Query supported subpicture formats
* The caller must provide a "format_list" array that can hold at * The caller must provide a "format_list" array that can hold at
* least vaMaxNumSubpictureFormats() entries. The flags arrary holds the fl ag * least vaMaxNumSubpictureFormats() entries. The flags arrary holds the fl ag
* for each format to indicate additional capabilities for that format. The actual * for each format to indicate additional capabilities for that format. The actual
* number of formats returned in "format_list" is returned in "num_formats" . * number of formats returned in "format_list" is returned in "num_formats" .
* flags: returned value to indicate addtional capabilities * flags: returned value to indicate addtional capabilities
* VA_SUBPICTURE_CHROMA_KEYING - supports chroma-keying * VA_SUBPICTURE_CHROMA_KEYING - supports chroma-keying
* VA_SUBPICTURE_GLOBAL_ALPHA - supports global alpha * VA_SUBPICTURE_GLOBAL_ALPHA - supports global alpha
* VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD - supports unscaled scr een relative subpictures for On Screen Display * VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD - supports unscaled scr een relative subpictures for On Screen Display
*/ */
VAStatus vaQuerySubpictureFormats ( VAStatus vaQuerySubpictureFormats (
VADisplay dpy, VADisplay dpy,
VAImageFormat *format_list, /* out */ VAImageFormat *format_list, /* out */
unsigned int *flags, /* out */ unsigned int *flags, /* out */
unsigned int *num_formats /* out */ unsigned int *num_formats /* out */
); );
/* /**
* Subpictures are created with an image associated. * Subpictures are created with an image associated.
*/ */
VAStatus vaCreateSubpicture ( VAStatus vaCreateSubpicture (
VADisplay dpy, VADisplay dpy,
VAImageID image, VAImageID image,
VASubpictureID *subpicture /* out */ VASubpictureID *subpicture /* out */
); );
/* /**
* Destroy the subpicture before destroying the image it is assocated to * Destroy the subpicture before destroying the image it is assocated to
*/ */
VAStatus vaDestroySubpicture ( VAStatus vaDestroySubpicture (
VADisplay dpy, VADisplay dpy,
VASubpictureID subpicture VASubpictureID subpicture
); );
/* /**
* Bind an image to the subpicture. This image will now be associated with * Bind an image to the subpicture. This image will now be associated with
* the subpicture instead of the one at creation. * the subpicture instead of the one at creation.
*/ */
VAStatus vaSetSubpictureImage ( VAStatus vaSetSubpictureImage (
VADisplay dpy, VADisplay dpy,
VASubpictureID subpicture, VASubpictureID subpicture,
VAImageID image VAImageID image
); );
/* /**
* If chromakey is enabled, then the area where the source value falls with in * If chromakey is enabled, then the area where the source value falls with in
* the chromakey [min, max] range is transparent * the chromakey [min, max] range is transparent
* The chromakey component format is the following: * The chromakey component format is the following:
* For RGB: [0:7] Red [8:15] Blue [16:23] Green * For RGB: [0:7] Red [8:15] Blue [16:23] Green
* For YUV: [0:7] V [8:15] U [16:23] Y * For YUV: [0:7] V [8:15] U [16:23] Y
* The chromakey mask can be used to mask out certain components for chroma key * The chromakey mask can be used to mask out certain components for chroma key
* comparision * comparision
*/ */
VAStatus vaSetSubpictureChromakey ( VAStatus vaSetSubpictureChromakey (
VADisplay dpy, VADisplay dpy,
VASubpictureID subpicture, VASubpictureID subpicture,
unsigned int chromakey_min, unsigned int chromakey_min,
unsigned int chromakey_max, unsigned int chromakey_max,
unsigned int chromakey_mask unsigned int chromakey_mask
); );
/* /**
* Global alpha value is between 0 and 1. A value of 1 means fully opaque a nd * Global alpha value is between 0 and 1. A value of 1 means fully opaque a nd
* a value of 0 means fully transparent. If per-pixel alpha is also specifi ed then * a value of 0 means fully transparent. If per-pixel alpha is also specifi ed then
* the overall alpha is per-pixel alpha multiplied by the global alpha * the overall alpha is per-pixel alpha multiplied by the global alpha
*/ */
VAStatus vaSetSubpictureGlobalAlpha ( VAStatus vaSetSubpictureGlobalAlpha (
VADisplay dpy, VADisplay dpy,
VASubpictureID subpicture, VASubpictureID subpicture,
float global_alpha float global_alpha
); );
/* /**
* vaAssociateSubpicture associates the subpicture with target_surfaces. * vaAssociateSubpicture associates the subpicture with target_surfaces.
* It defines the region mapping between the subpicture and the target * It defines the region mapping between the subpicture and the target
* surfaces through source and destination rectangles (with the same width and height). * surfaces through source and destination rectangles (with the same width and height).
* Both will be displayed at the next call to vaPutSurface. Additional * Both will be displayed at the next call to vaPutSurface. Additional
* associations before the call to vaPutSurface simply overrides the associ ation. * associations before the call to vaPutSurface simply overrides the associ ation.
*/ */
VAStatus vaAssociateSubpicture ( VAStatus vaAssociateSubpicture (
VADisplay dpy, VADisplay dpy,
VASubpictureID subpicture, VASubpictureID subpicture,
VASurfaceID *target_surfaces, VASurfaceID *target_surfaces,
skipping to change at line 2299 skipping to change at line 2298
short dest_y, short dest_y,
unsigned short dest_width, unsigned short dest_width,
unsigned short dest_height, unsigned short dest_height,
/* /*
* whether to enable chroma-keying, global-alpha, or screen relative mo de * whether to enable chroma-keying, global-alpha, or screen relative mo de
* see VA_SUBPICTURE_XXX values * see VA_SUBPICTURE_XXX values
*/ */
unsigned int flags unsigned int flags
); );
/* /**
* vaDeassociateSubpicture removes the association of the subpicture with t arget_surfaces. * vaDeassociateSubpicture removes the association of the subpicture with t arget_surfaces.
*/ */
VAStatus vaDeassociateSubpicture ( VAStatus vaDeassociateSubpicture (
VADisplay dpy, VADisplay dpy,
VASubpictureID subpicture, VASubpictureID subpicture,
VASurfaceID *target_surfaces, VASurfaceID *target_surfaces,
int num_surfaces int num_surfaces
); );
typedef struct _VARectangle typedef struct _VARectangle
{ {
short x; short x;
short y; short y;
unsigned short width; unsigned short width;
unsigned short height; unsigned short height;
} VARectangle; } VARectangle;
/* /**
* Display attributes * Display attributes
* Display attributes are used to control things such as contrast, hue, sat uration, * Display attributes are used to control things such as contrast, hue, sat uration,
* brightness etc. in the rendering process. The application can query wha t * brightness etc. in the rendering process. The application can query wha t
* attributes are supported by the driver, and then set the appropriate att ributes * attributes are supported by the driver, and then set the appropriate att ributes
* before calling vaPutSurface() * before calling vaPutSurface()
*/ */
/* PowerVR IEP Lite attributes */ /* PowerVR IEP Lite attributes */
typedef enum typedef enum
{ {
VADISPLAYATTRIB_BLE_OFF = 0x00, VADISPLAYATTRIB_BLE_OFF = 0x00,
VADISPLAYATTRIB_BLE_LOW, VADISPLAYATTRIB_BLE_LOW,
VADISPLAYATTRIB_BLE_MEDIUM, VADISPLAYATTRIB_BLE_MEDIUM,
VADISPLAYATTRIB_BLE_HIGH, VADISPLAYATTRIB_BLE_HIGH,
VADISPLAYATTRIB_BLE_NONE, VADISPLAYATTRIB_BLE_NONE,
} VADisplayAttribBLEMode; } VADisplayAttribBLEMode;
/* attribute value for VADisplayAttribRotation */ /** attribute value for VADisplayAttribRotation */
#define VA_ROTATION_NONE 0x00000000 #define VA_ROTATION_NONE 0x00000000
#define VA_ROTATION_90 0x00000001 #define VA_ROTATION_90 0x00000001
#define VA_ROTATION_180 0x00000002 #define VA_ROTATION_180 0x00000002
#define VA_ROTATION_270 0x00000003 #define VA_ROTATION_270 0x00000003
/* attribute value for VADisplayAttribOutOfLoopDeblock */ /** attribute value for VADisplayAttribOutOfLoopDeblock */
#define VA_OOL_DEBLOCKING_FALSE 0x00000000 #define VA_OOL_DEBLOCKING_FALSE 0x00000000
#define VA_OOL_DEBLOCKING_TRUE 0x00000001 #define VA_OOL_DEBLOCKING_TRUE 0x00000001
/* Render mode */ /** Render mode */
#define VA_RENDER_MODE_UNDEFINED 0 #define VA_RENDER_MODE_UNDEFINED 0
#define VA_RENDER_MODE_LOCAL_OVERLAY 1 #define VA_RENDER_MODE_LOCAL_OVERLAY 1
#define VA_RENDER_MODE_LOCAL_GPU 2 #define VA_RENDER_MODE_LOCAL_GPU 2
#define VA_RENDER_MODE_EXTERNAL_OVERLAY 4 #define VA_RENDER_MODE_EXTERNAL_OVERLAY 4
#define VA_RENDER_MODE_EXTERNAL_GPU 8 #define VA_RENDER_MODE_EXTERNAL_GPU 8
/* Render device */ /** Render device */
#define VA_RENDER_DEVICE_UNDEFINED 0 #define VA_RENDER_DEVICE_UNDEFINED 0
#define VA_RENDER_DEVICE_LOCAL 1 #define VA_RENDER_DEVICE_LOCAL 1
#define VA_RENDER_DEVICE_EXTERNAL 2 #define VA_RENDER_DEVICE_EXTERNAL 2
/* Currently defined display attribute types */ /** Currently defined display attribute types */
typedef enum typedef enum
{ {
VADisplayAttribBrightness = 0, VADisplayAttribBrightness = 0,
VADisplayAttribContrast = 1, VADisplayAttribContrast = 1,
VADisplayAttribHue = 2, VADisplayAttribHue = 2,
VADisplayAttribSaturation = 3, VADisplayAttribSaturation = 3,
/* client can specifiy a background color for the target window /* client can specifiy a background color for the target window
* the new feature of video conference, * the new feature of video conference,
* the uncovered area of the surface is filled by this color * the uncovered area of the surface is filled by this color
* also it will blend with the decoded video color * also it will blend with the decoded video color
skipping to change at line 2445 skipping to change at line 2444
typedef struct _VADisplayAttribute typedef struct _VADisplayAttribute
{ {
VADisplayAttribType type; VADisplayAttribType type;
int min_value; int min_value;
int max_value; int max_value;
int value; /* used by the set/get attribute functions */ int value; /* used by the set/get attribute functions */
/* flags can be VA_DISPLAY_ATTRIB_GETTABLE or VA_DISPLAY_ATTRIB_SETTABLE or OR'd together */ /* flags can be VA_DISPLAY_ATTRIB_GETTABLE or VA_DISPLAY_ATTRIB_SETTABLE or OR'd together */
unsigned int flags; unsigned int flags;
} VADisplayAttribute; } VADisplayAttribute;
/* Get maximum number of display attributs supported by the implementation */ /** Get maximum number of display attributs supported by the implementation */
int vaMaxNumDisplayAttributes ( int vaMaxNumDisplayAttributes (
VADisplay dpy VADisplay dpy
); );
/* /**
* Query display attributes * Query display attributes
* The caller must provide a "attr_list" array that can hold at * The caller must provide a "attr_list" array that can hold at
* least vaMaxNumDisplayAttributes() entries. The actual number of attribut es * least vaMaxNumDisplayAttributes() entries. The actual number of attribut es
* returned in "attr_list" is returned in "num_attributes". * returned in "attr_list" is returned in "num_attributes".
*/ */
VAStatus vaQueryDisplayAttributes ( VAStatus vaQueryDisplayAttributes (
VADisplay dpy, VADisplay dpy,
VADisplayAttribute *attr_list, /* out */ VADisplayAttribute *attr_list, /* out */
int *num_attributes /* out */ int *num_attributes /* out */
); );
/* /**
* Get display attributes * Get display attributes
* This function returns the current attribute values in "attr_list". * This function returns the current attribute values in "attr_list".
* Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the "fla gs" field * Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the "fla gs" field
* from vaQueryDisplayAttributes() can have their values retrieved. * from vaQueryDisplayAttributes() can have their values retrieved.
*/ */
VAStatus vaGetDisplayAttributes ( VAStatus vaGetDisplayAttributes (
VADisplay dpy, VADisplay dpy,
VADisplayAttribute *attr_list, /* in/out */ VADisplayAttribute *attr_list, /* in/out */
int num_attributes int num_attributes
); );
/* /**
* Set display attributes * Set display attributes
* Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the "fla gs" field * Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the "fla gs" field
* from vaQueryDisplayAttributes() can be set. If the attribute is not set table or * from vaQueryDisplayAttributes() can be set. If the attribute is not set table or
* the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT _SUPPORTED * the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT _SUPPORTED
*/ */
VAStatus vaSetDisplayAttributes ( VAStatus vaSetDisplayAttributes (
VADisplay dpy, VADisplay dpy,
VADisplayAttribute *attr_list, VADisplayAttribute *attr_list,
int num_attributes int num_attributes
); );
 End of changes. 95 change blocks. 
96 lines changed or deleted 95 lines changed or added


 va_version.h   va_version.h 
skipping to change at line 47 skipping to change at line 47
* *
* The minor version of VA-API (2, if %VA_VERSION is 1.2.3) * The minor version of VA-API (2, if %VA_VERSION is 1.2.3)
*/ */
#define VA_MINOR_VERSION 35 #define VA_MINOR_VERSION 35
/** /**
* VA_MICRO_VERSION: * VA_MICRO_VERSION:
* *
* The micro version of VA-API (3, if %VA_VERSION is 1.2.3) * The micro version of VA-API (3, if %VA_VERSION is 1.2.3)
*/ */
#define VA_MICRO_VERSION 0 #define VA_MICRO_VERSION 1
/** /**
* VA_VERSION: * VA_VERSION:
* *
* The full version of VA-API, like 1.2.3 * The full version of VA-API, like 1.2.3
*/ */
#define VA_VERSION 0.35.0 #define VA_VERSION 0.35.1
/** /**
* VA_VERSION_S: * VA_VERSION_S:
* *
* The full version of VA-API, in string form (suited for string * The full version of VA-API, in string form (suited for string
* concatenation) * concatenation)
*/ */
#define VA_VERSION_S "0.35.0" #define VA_VERSION_S "0.35.1"
/** /**
* VA_VERSION_HEX: * VA_VERSION_HEX:
* *
* Numerically encoded version of VA-API, like 0x010203 * Numerically encoded version of VA-API, like 0x010203
*/ */
#define VA_VERSION_HEX ((VA_MAJOR_VERSION << 24) | \ #define VA_VERSION_HEX ((VA_MAJOR_VERSION << 24) | \
(VA_MINOR_VERSION << 16) | \ (VA_MINOR_VERSION << 16) | \
(VA_MICRO_VERSION << 8)) (VA_MICRO_VERSION << 8))
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 va_vpp.h   va_vpp.h 
skipping to change at line 248 skipping to change at line 248
typedef enum _VAProcFilterType { typedef enum _VAProcFilterType {
VAProcFilterNone = 0, VAProcFilterNone = 0,
/** \brief Noise reduction filter. */ /** \brief Noise reduction filter. */
VAProcFilterNoiseReduction, VAProcFilterNoiseReduction,
/** \brief Deinterlacing filter. */ /** \brief Deinterlacing filter. */
VAProcFilterDeinterlacing, VAProcFilterDeinterlacing,
/** \brief Sharpening filter. */ /** \brief Sharpening filter. */
VAProcFilterSharpening, VAProcFilterSharpening,
/** \brief Color balance parameters. */ /** \brief Color balance parameters. */
VAProcFilterColorBalance, VAProcFilterColorBalance,
/** \brief Skin Tone Enhancement. */
VAProcFilterSkinToneEnhancement,
VAProcFilterCount VAProcFilterCount
} VAProcFilterType; } VAProcFilterType;
/** \brief Deinterlacing types. */ /** \brief Deinterlacing types. */
typedef enum _VAProcDeinterlacingType { typedef enum _VAProcDeinterlacingType {
VAProcDeinterlacingNone = 0, VAProcDeinterlacingNone = 0,
/** \brief Bob deinterlacing algorithm. */ /** \brief Bob deinterlacing algorithm. */
VAProcDeinterlacingBob, VAProcDeinterlacingBob,
/** \brief Weave deinterlacing algorithm. */ /** \brief Weave deinterlacing algorithm. */
VAProcDeinterlacingWeave, VAProcDeinterlacingWeave,
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/