VA-API
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Classes | Macros | Typedefs | Enumerations | Functions
va.h File Reference

The Core API. More...

#include <stddef.h>
#include <stdint.h>
#include <va/va_version.h>
#include <va/va_dec_jpeg.h>

Go to the source code of this file.

Classes

struct  VAConfigAttrib
 
union  VAConfigAttribValEncJPEG
 Attribute value for VAConfigAttribEncJPEG. More...
 
struct  VAGenericValue
 Generic value. More...
 
struct  VASurfaceAttrib
 Surface attribute. More...
 
struct  VASurfaceAttribExternalBuffers
 VASurfaceAttribExternalBuffers structure for the VASurfaceAttribExternalBufferDescriptor attribute. More...
 
struct  VAEncPackedHeaderParameterBuffer
 Packed header parameter. More...
 
struct  VAEncMiscParameterBuffer
 
struct  VAEncMiscParameterRateControl
 Rate control parameters. More...
 
struct  VAEncMiscParameterMaxSliceSize
 
struct  VAEncMiscParameterBufferMaxFrameSize
 Defines a maximum frame size (in bits). More...
 
struct  VAEncMiscParameterBufferQualityLevel
 Encoding quality level. More...
 
struct  VAIQMatrixBufferMPEG2
 
struct  VASliceParameterBufferMPEG2
 
struct  VAMacroblockParameterBufferMPEG2
 
struct  VAPictureParameterBufferMPEG4
 
struct  VAIQMatrixBufferMPEG4
 
struct  VASliceParameterBufferMPEG4
 
struct  VAPictureParameterBufferVC1
 
struct  VASliceParameterBufferVC1
 
struct  VAPictureParameterBufferH264
 
struct  VAIQMatrixBufferH264
 
struct  VASliceParameterBufferH264
 
struct  VACodedBufferSegment
 Coded buffer segment. More...
 
struct  VABufferInfo
 VA buffer information. More...
 
struct  VASurfaceDecodeMBErrors
 
struct  VAPictureHEVC
 Description of picture properties of those in DPB surfaces. More...
 

Macros

#define VA_STATUS_SUCCESS   0x00000000
 
#define VA_STATUS_ERROR_INVALID_VALUE   0x00000019
 An invalid/unsupported value was supplied. More...
 
#define VA_STATUS_ERROR_UNSUPPORTED_FILTER   0x00000020
 An unsupported filter was supplied.
 
#define VA_STATUS_ERROR_INVALID_FILTER_CHAIN   0x00000021
 An invalid filter chain was supplied.
 
#define VA_STATUS_ERROR_HW_BUSY   0x00000022
 Indicate HW busy (e.g. run multiple encoding simultaneously).
 
#define VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE   0x00000024
 An unsupported memory type was supplied.
 
#define VA_FRAME_PICTURE   0x00000000
 
#define VA_ENABLE_BLEND   0x00000004 /* video area blend with the constant color */
 
#define VA_CLEAR_DRAWABLE   0x00000008
 
#define VA_SRC_BT601   0x00000010
 
#define VA_FILTER_SCALING_DEFAULT   0x00000000
 
#define VA_RT_FORMAT_YUV420   0x00000001
 
#define VA_ATTRIB_NOT_SUPPORTED   0x80000000
 
#define VA_CODED_BUF_STATUS_PICTURE_AVE_QP_MASK   0xff
 
#define VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW   0x1000
 The frame has exceeded the maximum requested size. More...
 
#define VA_CODED_BUF_STATUS_SINGLE_NALU   0x10000000
 The coded buffer segment contains a single NAL unit. More...
 
#define VA_FOURCC(ch0, ch1, ch2, ch3)
 
#define VA_SUBPICTURE_CHROMA_KEYING   0x0001
 
#define VA_ROTATION_NONE   0x00000000
 
#define VA_OOL_DEBLOCKING_FALSE   0x00000000
 
#define VA_RENDER_MODE_UNDEFINED   0
 
#define VA_RENDER_DEVICE_UNDEFINED   0
 
#define VA_PICTURE_HEVC_FIELD_PIC   0x00000002
 indication of interlace scan picture. should take same value for all the pictures in sequence.
 
#define VA_PICTURE_HEVC_BOTTOM_FIELD   0x00000004
 polarity of the field picture. top field takes even lines of buffer surface. bottom field takes odd lines of buffer surface.
 
#define VA_PICTURE_HEVC_LONG_TERM_REFERENCE   0x00000008
 Long term reference picture.
 
#define VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE   0x00000010
 RefPicSetStCurrBefore of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocStCurrBefore. More...
 
#define VA_PICTURE_HEVC_RPS_ST_CURR_AFTER   0x00000020
 RefPicSetStCurrAfter of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocStCurrAfter.
 
#define VA_PICTURE_HEVC_RPS_LT_CURR   0x00000040
 RefPicSetLtCurr of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocLtCurr.
 
Attribute values for VAConfigAttribRateControl
#define VA_RC_NONE   0x00000001
 Driver does not support any form of rate control.
 
#define VA_RC_CBR   0x00000002
 Constant bitrate.
 
#define VA_RC_VBR   0x00000004
 Variable bitrate.
 
#define VA_RC_VCM   0x00000008
 Video conference mode.
 
#define VA_RC_CQP   0x00000010
 Constant QP.
 
#define VA_RC_VBR_CONSTRAINED   0x00000020
 Variable bitrate with peak rate higher than average bitrate.
 
Attribute values for VAConfigAttribEncPackedHeaders
#define VA_ENC_PACKED_HEADER_NONE   0x00000000
 Driver does not support any packed headers mode.
 
#define VA_ENC_PACKED_HEADER_SEQUENCE   0x00000001
 Driver supports packed sequence headers. e.g. SPS for H.264.
 
#define VA_ENC_PACKED_HEADER_PICTURE   0x00000002
 Driver supports packed picture headers. e.g. PPS for H.264.
 
#define VA_ENC_PACKED_HEADER_SLICE   0x00000004
 Driver supports packed slice headers. e.g. slice_header() for H.264.
 
#define VA_ENC_PACKED_HEADER_MISC   0x00000008
 Driver supports misc packed headers. e.g. SEI for H.264.
 
#define VA_ENC_PACKED_HEADER_RAW_DATA   0x00000010
 Driver supports raw packed header, see VAEncPackedHeaderRawData.
 
Attribute values for VAConfigAttribEncInterlaced
#define VA_ENC_INTERLACED_NONE   0x00000000
 Driver does not support interlaced coding.
 
#define VA_ENC_INTERLACED_FRAME   0x00000001
 Driver supports interlaced frame coding.
 
#define VA_ENC_INTERLACED_FIELD   0x00000002
 Driver supports interlaced field coding.
 
#define VA_ENC_INTERLACED_MBAFF   0x00000004
 Driver supports macroblock adaptive frame field coding.
 
#define VA_ENC_INTERLACED_PAFF   0x00000008
 Driver supports picture adaptive frame field coding.
 
Attribute values for VAConfigAttribEncSliceStructure
#define VA_ENC_SLICE_STRUCTURE_ARBITRARY_ROWS   0x00000000
 Driver supports an arbitrary number of rows per slice.
 
#define VA_ENC_SLICE_STRUCTURE_POWER_OF_TWO_ROWS   0x00000001
 Driver supports a power-of-two number of rows per slice.
 
#define VA_ENC_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS   0x00000002
 Driver supports an arbitrary number of rows per slice.
 
Surface attribute flags
#define VA_SURFACE_ATTRIB_NOT_SUPPORTED   0x00000000
 Surface attribute is not supported.
 
#define VA_SURFACE_ATTRIB_GETTABLE   0x00000001
 Surface attribute can be got through vaQuerySurfaceAttributes().
 
#define VA_SURFACE_ATTRIB_SETTABLE   0x00000002
 Surface attribute can be set through vaCreateSurfaces().
 
VASurfaceAttribMemoryType values in bit fields.

Bit 0:7 are reserved for generic types, Bit 31:28 are reserved for Linux DRM, Bit 23:20 are reserved for Android. DRM and Android specific types are defined in DRM and Android header files.

#define VA_SURFACE_ATTRIB_MEM_TYPE_VA   0x00000001
 VA memory type (default) is supported.
 
#define VA_SURFACE_ATTRIB_MEM_TYPE_V4L2   0x00000002
 V4L2 buffer memory type is supported.
 
#define VA_SURFACE_ATTRIB_MEM_TYPE_USER_PTR   0x00000004
 User pointer memory type is supported.
 
VASurfaceAttribExternalBuffers flags
#define VA_SURFACE_EXTBUF_DESC_ENABLE_TILING   0x00000001
 Enable memory tiling.
 
#define VA_SURFACE_EXTBUF_DESC_CACHED   0x00000002
 Memory is cacheable.
 
#define VA_SURFACE_EXTBUF_DESC_UNCACHED   0x00000004
 Memory is non-cacheable.
 
#define VA_SURFACE_EXTBUF_DESC_WC   0x00000008
 Memory is write-combined.
 
#define VA_SURFACE_EXTBUF_DESC_PROTECTED   0x80000000
 Memory is protected.
 
VASurfaceAttribUsageHint attribute usage hint flags
#define VA_SURFACE_ATTRIB_USAGE_HINT_GENERIC   0x00000000
 Surface usage not indicated.
 
#define VA_SURFACE_ATTRIB_USAGE_HINT_DECODER   0x00000001
 Surface used by video decoder.
 
#define VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER   0x00000002
 Surface used by video encoder.
 
#define VA_SURFACE_ATTRIB_USAGE_HINT_VPP_READ   0x00000004
 Surface read by video post-processing.
 
#define VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE   0x00000008
 Surface written by video post-processing.
 
#define VA_SURFACE_ATTRIB_USAGE_HINT_DISPLAY   0x00000010
 Surface used for display.
 

Typedefs

typedef void * VADisplay
 
typedef void * VANativeDisplay
 
typedef unsigned int VAGenericID
 
typedef VAGenericID VAContextID
 
typedef void(* VAGenericFunc )(void)
 Generic function type.
 
typedef VAGenericID VABufferID
 
typedef VAGenericID VASubpictureID
 

Enumerations

enum  VAProfile { VAProfileNone = -1 }
 
enum  VAEntrypoint { , VAEntrypointVideoProc = 10 }
 
enum  VAConfigAttribType { ,
  VAConfigAttribEncPackedHeaders = 10,
  VAConfigAttribEncInterlaced = 11,
  VAConfigAttribEncMaxRefFrames = 13,
  VAConfigAttribEncMaxSlices = 14,
  VAConfigAttribEncSliceStructure = 15,
  VAConfigAttribEncMacroblockInfo = 16,
  VAConfigAttribEncJPEG = 20,
  VAConfigAttribEncQualityRange = 21
}
 
enum  VAGenericValueType {
  VAGenericValueTypeInteger = 1,
  VAGenericValueTypeFloat,
  VAGenericValueTypePointer,
  VAGenericValueTypeFunc
}
 Generic value types. More...
 
enum  VASurfaceAttribType { ,
  VASurfaceAttribPixelFormat,
  VASurfaceAttribMinWidth,
  VASurfaceAttribMaxWidth,
  VASurfaceAttribMinHeight,
  VASurfaceAttribMaxHeight,
  VASurfaceAttribMemoryType,
  VASurfaceAttribExternalBufferDescriptor,
  VASurfaceAttribUsageHint,
  VASurfaceAttribCount
}
 Surface attribute types. More...
 
enum  VABufferType { ,
  VAProcPipelineParameterBufferType = 41,
  VAProcFilterParameterBufferType = 42
}
 
enum  VAEncMiscParameterType { ,
  VAEncMiscParameterTypeMaxFrameSize = 4,
  VAEncMiscParameterTypeHRD = 5
}
 
enum  VAEncPackedHeaderType {
  VAEncPackedHeaderSequence = 1,
  VAEncPackedHeaderPicture = 2,
  VAEncPackedHeaderSlice = 3,
  VAEncPackedHeaderRawData = 4,
  VAEncPackedHeaderMiscMask = 0x80000000
}
 Packed header type. More...
 
enum  VAMvModeVC1
 
enum  VADisplayAttribBLEMode
 
enum  VADisplayAttribType
 

Functions

const char * vaErrorStr (VAStatus error_status)
 
VAStatus vaInitialize (VADisplay dpy, int *major_version, int *minor_version)
 
VAStatus vaTerminate (VADisplay dpy)
 
const char * vaQueryVendorString (VADisplay dpy)
 
VAPrivFunc vaGetLibFunc (VADisplay dpy, const char *func)
 
int vaMaxNumProfiles (VADisplay dpy)
 
int vaMaxNumEntrypoints (VADisplay dpy)
 
int vaMaxNumConfigAttributes (VADisplay dpy)
 
VAStatus vaQueryConfigProfiles (VADisplay dpy, VAProfile *profile_list, int *num_profiles)
 
VAStatus vaQueryConfigEntrypoints (VADisplay dpy, VAProfile profile, VAEntrypoint *entrypoint_list, int *num_entrypoints)
 
VAStatus vaGetConfigAttributes (VADisplay dpy, VAProfile profile, VAEntrypoint entrypoint, VAConfigAttrib *attrib_list, int num_attribs)
 
VAStatus vaCreateConfig (VADisplay dpy, VAProfile profile, VAEntrypoint entrypoint, VAConfigAttrib *attrib_list, int num_attribs, VAConfigID *config_id)
 
VAStatus vaDestroyConfig (VADisplay dpy, VAConfigID config_id)
 
VAStatus vaQueryConfigAttributes (VADisplay dpy, VAConfigID config_id, VAProfile *profile, VAEntrypoint *entrypoint, VAConfigAttrib *attrib_list, int *num_attribs)
 
VAStatus vaQuerySurfaceAttributes (VADisplay dpy, VAConfigID config, VASurfaceAttrib *attrib_list, unsigned int *num_attribs)
 Queries surface attributes for the supplied config. More...
 
VAStatus vaCreateSurfaces (VADisplay dpy, unsigned int format, unsigned int width, unsigned int height, VASurfaceID *surfaces, unsigned int num_surfaces, VASurfaceAttrib *attrib_list, unsigned int num_attribs)
 Creates an array of surfaces. More...
 
VAStatus vaDestroySurfaces (VADisplay dpy, VASurfaceID *surfaces, int num_surfaces)
 
VAStatus vaCreateContext (VADisplay dpy, VAConfigID config_id, int picture_width, int picture_height, int flag, VASurfaceID *render_targets, int num_render_targets, VAContextID *context)
 
VAStatus vaDestroyContext (VADisplay dpy, VAContextID context)
 
VAStatus vaCreateBuffer (VADisplay dpy, VAContextID context, VABufferType type, unsigned int size, unsigned int num_elements, void *data, VABufferID *buf_id)
 
VAStatus vaBufferSetNumElements (VADisplay dpy, VABufferID buf_id, unsigned int num_elements)
 
VAStatus vaMapBuffer (VADisplay dpy, VABufferID buf_id, void **pbuf)
 
VAStatus vaUnmapBuffer (VADisplay dpy, VABufferID buf_id)
 
VAStatus vaDestroyBuffer (VADisplay dpy, VABufferID buffer_id)
 
VAStatus vaAcquireBufferHandle (VADisplay dpy, VABufferID buf_id, VABufferInfo *buf_info)
 Acquires buffer handle for external API usage. More...
 
VAStatus vaReleaseBufferHandle (VADisplay dpy, VABufferID buf_id)
 Releases buffer after usage from external API. More...
 
VAStatus vaBeginPicture (VADisplay dpy, VAContextID context, VASurfaceID render_target)
 
VAStatus vaRenderPicture (VADisplay dpy, VAContextID context, VABufferID *buffers, int num_buffers)
 
VAStatus vaEndPicture (VADisplay dpy, VAContextID context)
 
VAStatus vaSyncSurface (VADisplay dpy, VASurfaceID render_target)
 
VAStatus vaQuerySurfaceStatus (VADisplay dpy, VASurfaceID render_target, VASurfaceStatus *status)
 
VAStatus vaQuerySurfaceError (VADisplay dpy, VASurfaceID surface, VAStatus error_status, void **error_info)
 
int vaMaxNumImageFormats (VADisplay dpy)
 
VAStatus vaQueryImageFormats (VADisplay dpy, VAImageFormat *format_list, int *num_formats)
 
VAStatus vaCreateImage (VADisplay dpy, VAImageFormat *format, int width, int height, VAImage *image)
 
VAStatus vaDestroyImage (VADisplay dpy, VAImageID image)
 
VAStatus vaGetImage (VADisplay dpy, VASurfaceID surface, int x, int y, unsigned int width, unsigned int height, VAImageID image)
 
VAStatus vaPutImage (VADisplay dpy, VASurfaceID surface, VAImageID image, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y, unsigned int dest_width, unsigned int dest_height)
 
VAStatus vaDeriveImage (VADisplay dpy, VASurfaceID surface, VAImage *image)
 
int vaMaxNumSubpictureFormats (VADisplay dpy)
 
VAStatus vaQuerySubpictureFormats (VADisplay dpy, VAImageFormat *format_list, unsigned int *flags, unsigned int *num_formats)
 
VAStatus vaCreateSubpicture (VADisplay dpy, VAImageID image, VASubpictureID *subpicture)
 
VAStatus vaDestroySubpicture (VADisplay dpy, VASubpictureID subpicture)
 
VAStatus vaSetSubpictureImage (VADisplay dpy, VASubpictureID subpicture, VAImageID image)
 
VAStatus vaSetSubpictureChromakey (VADisplay dpy, VASubpictureID subpicture, unsigned int chromakey_min, unsigned int chromakey_max, unsigned int chromakey_mask)
 
VAStatus vaSetSubpictureGlobalAlpha (VADisplay dpy, VASubpictureID subpicture, float global_alpha)
 
VAStatus vaAssociateSubpicture (VADisplay dpy, VASubpictureID subpicture, VASurfaceID *target_surfaces, int num_surfaces, short src_x, short src_y, unsigned short src_width, unsigned short src_height, short dest_x, short dest_y, unsigned short dest_width, unsigned short dest_height, unsigned int flags)
 
VAStatus vaDeassociateSubpicture (VADisplay dpy, VASubpictureID subpicture, VASurfaceID *target_surfaces, int num_surfaces)
 
int vaMaxNumDisplayAttributes (VADisplay dpy)
 
VAStatus vaQueryDisplayAttributes (VADisplay dpy, VADisplayAttribute *attr_list, int *num_attributes)
 
VAStatus vaGetDisplayAttributes (VADisplay dpy, VADisplayAttribute *attr_list, int num_attributes)
 
VAStatus vaSetDisplayAttributes (VADisplay dpy, VADisplayAttribute *attr_list, int num_attributes)
 

Detailed Description

The Core API.

This file contains the Core API.