VA-API  2.22.0
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_hevc.h>
#include <va/va_dec_jpeg.h>
#include <va/va_dec_vp8.h>
#include <va/va_dec_vp9.h>
#include <va/va_dec_av1.h>
#include <va/va_dec_vvc.h>
#include <va/va_enc_hevc.h>
#include <va/va_fei_hevc.h>
#include <va/va_enc_h264.h>
#include <va/va_enc_jpeg.h>
#include <va/va_enc_mpeg2.h>
#include <va/va_enc_vp8.h>
#include <va/va_enc_vp9.h>
#include <va/va_enc_av1.h>
#include <va/va_fei.h>
#include <va/va_fei_h264.h>
#include <va/va_vpp.h>
#include <va/va_prot.h>

Go to the source code of this file.

Classes

struct  VARectangle
 Structure to describe rectangle. More...
 
struct  VAMotionVector
 Generic motion vector data structure. More...
 
struct  VAConfigAttrib
 
union  VAConfigAttribValMaxFrameSize
 Attribute value for VAConfigAttribMaxFrameSize. More...
 
union  VAConfigAttribValEncJPEG
 Attribute value for VAConfigAttribEncJPEG. More...
 
union  VAConfigAttribValEncROI
 Attribute value for VAConfigAttribEncROI. More...
 
union  VAConfigAttribValEncRateControlExt
 Attribute value for VAConfigAttribEncRateControlExt. More...
 
union  VAConfigAttribValMultipleFrame
 Attribute value for VAConfigAttribMultipleFrame. More...
 
union  VAConfigAttribValContextPriority
 
union  VAConfigAttribValEncPerBlockControl
 
struct  VAGenericValue
 Generic value. More...
 
struct  VASurfaceAttrib
 Surface attribute. More...
 
union  VASurfaceAttribAlignmentStruct
 VASurfaceAttribAlignmentStruct structure for the VASurfaceAttribAlignmentSize attribute. More...
 
struct  VASurfaceAttribExternalBuffers
 VASurfaceAttribExternalBuffers structure for the VASurfaceAttribExternalBufferDescriptor attribute. More...
 
struct  VAContextParameterUpdateBuffer
 update the context parameter this structure is used to update context parameters, such as priority of the context backend driver should keep the parameter unchanged if there no new parameter updated. More...
 
struct  VAEncryptionSegmentInfo
 structure for encrypted segment info. More...
 
struct  VAEncryptionParameters
 Encryption parameters buffer for VAEncryptionParameterBufferType. More...
 
struct  VAProcessingRateParameterEnc
 
struct  VAProcessingRateParameterDec
 
struct  VAEncPackedHeaderParameterBuffer
 Packed header parameter. More...
 
struct  VAEncMiscParameterBuffer
 
struct  VAEncMiscParameterTemporalLayerStructure
 Temporal layer Structure. More...
 
struct  VAEncMiscParameterRateControl
 Rate control parameters. More...
 
struct  VAEncMiscParameterFrameRate
 
struct  VAEncMiscParameterMaxSliceSize
 
struct  VAEncMiscParameterHRD
 
struct  VAEncMiscParameterBufferMaxFrameSize
 Defines a maximum frame size (in bits). More...
 
struct  VAEncMiscParameterBufferMultiPassFrameSize
 Maximum frame size (in bytes) settings for multiple pass. More...
 
struct  VAEncMiscParameterBufferQualityLevel
 Encoding quality level. More...
 
struct  VAEncMiscParameterQuantization
 Quantization settings for encoding. More...
 
struct  VAEncMiscParameterSkipFrame
 Encoding skip frame. More...
 
struct  VAEncROI
 Encoding region-of-interest (ROI). More...
 
struct  VAEncMiscParameterParallelRateControl
 Attribute value for VAConfigAttribEncParallelRateControl. More...
 
struct  VAEncMiscParameterEncQuality
 
struct  VAEncMiscParameterCustomRoundingControl
 Custom Encoder Rounding Offset Control. Application may use this structure to set customized rounding offset parameters for quantization. Valid when VAConfigAttribCustomRoundingControl equals 1. More...
 
struct  VAHuffmanTableBufferJPEGBaseline
 Huffman table for JPEG decoding. More...
 
struct  VAIQMatrixBufferMPEG2
 
struct  VASliceParameterBufferMPEG2
 
struct  VAMacroblockParameterBufferMPEG2
 
struct  VAPictureParameterBufferMPEG4
 
struct  VAIQMatrixBufferMPEG4
 
struct  VASliceParameterBufferMPEG4
 
struct  VAPictureParameterBufferVC1
 
struct  VASliceParameterBufferVC1
 
struct  VAPictureParameterBufferH264
 
struct  VAIQMatrixBufferH264
 
struct  VASliceParameterBufferH264
 
struct  VAEncSliceParameterBuffer
 Encode Slice Parameter Buffer. More...
 
struct  VACodedBufferSegment
 Coded buffer segment. More...
 
struct  VABufferInfo
 VA buffer information. More...
 
struct  VASurfaceDecodeMBErrors
 
union  VADisplayAttribValSubDevice
 sub device info Sub-device is the concept basing on the "device" behind "vaDisplay". If a device could be divided to several sub devices, the task of decode/encode/vpp could be assigned on one sub-device. So, application could choose the sub device before any other operations. After that, all of the task execution/resource allocation will be dispatched to the sub device. If application does not choose the sub device, driver will assign one as default. More...
 
struct  VAPictureHEVC
 Description of picture properties of those in DPB surfaces. More...
 
struct  VAPictureVVC
 Description of picture properties of those in DPB surfaces. More...
 

Macros

#define va_deprecated_enum   = 0x80000000
 Misc packed header. See codec-specific definitions. More...
 
#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_STATUS_ERROR_NOT_ENOUGH_BUFFER   0x00000025
 Indicate allocated buffer size is not enough for input or output.
 
#define VA_STATUS_ERROR_TIMEDOUT   0x00000026
 Indicate an operation isn't completed because time-out interval elapsed.
 
#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_COLOR_MASK   0x000000f0
 
#define VA_FILTER_SCALING_DEFAULT   0x00000000
 
#define VA_FILTER_INTERPOLATION_DEFAULT   0x00000000
 
#define VA_PADDING_LOW   4
 
#define VA_EXEC_SYNC   0x0
 
#define VA_EXEC_ASYNC   0x1
 
#define VA_EXEC_MODE_DEFAULT   0x0
 
#define VA_FEATURE_NOT_SUPPORTED   0
 
#define VA_FEATURE_SUPPORTED   1
 
#define VA_FEATURE_REQUIRED   2
 
#define VA_RT_FORMAT_YUV420   0x00000001
 YUV 4:2:0 8-bit.
 
#define VA_RT_FORMAT_YUV422   0x00000002
 YUV 4:2:2 8-bit.
 
#define VA_RT_FORMAT_YUV444   0x00000004
 YUV 4:4:4 8-bit.
 
#define VA_RT_FORMAT_YUV411   0x00000008
 YUV 4:1:1 8-bit.
 
#define VA_RT_FORMAT_YUV400   0x00000010
 Greyscale 8-bit.
 
#define VA_RT_FORMAT_YUV420_10   0x00000100
 YUV 4:2:0 10-bit.
 
#define VA_RT_FORMAT_YUV422_10   0x00000200
 YUV 4:2:2 10-bit.
 
#define VA_RT_FORMAT_YUV444_10   0x00000400
 YUV 4:4:4 10-bit.
 
#define VA_RT_FORMAT_YUV420_12   0x00001000
 YUV 4:2:0 12-bit.
 
#define VA_RT_FORMAT_YUV422_12   0x00002000
 YUV 4:2:2 12-bit.
 
#define VA_RT_FORMAT_YUV444_12   0x00004000
 YUV 4:4:4 12-bit.
 
#define VA_RT_FORMAT_RGB16   0x00010000
 Packed RGB, 16 bits per pixel.
 
#define VA_RT_FORMAT_RGB32   0x00020000
 Packed RGB, 32 bits per pixel, 8 bits per colour sample.
 
#define VA_RT_FORMAT_RGBP   0x00100000
 Planar RGB, 8 bits per sample.
 
#define VA_RT_FORMAT_RGB32_10   0x00200000
 Packed RGB, 32 bits per pixel, 10 bits per colour sample.
 
#define VA_RT_FORMAT_RGB32_10BPP   VA_RT_FORMAT_RGB32_10
 
#define VA_RT_FORMAT_YUV420_10BPP   VA_RT_FORMAT_YUV420_10
 
#define VA_ATTRIB_NOT_SUPPORTED   0x80000000
 
#define VA_ENCRYPTION_TYPE_FULLSAMPLE_CTR   0x00000001 /* AES CTR fullsample */
 
#define VA_SLICE_DATA_FLAG_ALL   0x00 /* whole slice is in the buffer */
 
#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_BAD_BITSTREAM   0x8000
 the bitstream is bad or corrupt.
 
#define VA_CODED_BUF_STATUS_NUMBER_PASSES_MASK   0xf000000
 The coded buffer segment status contains frame encoding passes number. More...
 
#define VA_CODED_BUF_STATUS_SINGLE_NALU   0x10000000
 The coded buffer segment contains a single NAL unit. More...
 
#define VA_MAPBUFFER_FLAG_DEFAULT   0
 VA_MAPBUFFER_FLAG_DEFAULT is used when there are no flag specified same as VA_MAPBUFFER_FLAG_READ | VA_MAPBUFFER_FLAG_WRITE. More...
 
#define VA_MAPBUFFER_FLAG_READ   1
 application will read the surface after map
 
#define VA_MAPBUFFER_FLAG_WRITE   2
 application will write the surface after map
 
#define VA_TIMEOUT_INFINITE   0xFFFFFFFFFFFFFFFF
 Indicates an infinite timeout.
 
#define VA_FOURCC(ch0, ch1, ch2, ch3)
 
#define VA_FOURCC_NV12   0x3231564E
 
#define VA_FOURCC_NV21   0x3132564E
 
#define VA_FOURCC_AI44   0x34344149
 
#define VA_FOURCC_RGBA   0x41424752
 
#define VA_FOURCC_RGBX   0x58424752
 
#define VA_FOURCC_BGRA   0x41524742
 
#define VA_FOURCC_BGRX   0x58524742
 
#define VA_FOURCC_ARGB   0x42475241
 
#define VA_FOURCC_XRGB   0x42475258
 
#define VA_FOURCC_ABGR   0x52474241
 
#define VA_FOURCC_XBGR   0x52474258
 
#define VA_FOURCC_UYVY   0x59565955
 
#define VA_FOURCC_YUY2   0x32595559
 
#define VA_FOURCC_AYUV   0x56555941
 
#define VA_FOURCC_NV11   0x3131564e
 
#define VA_FOURCC_YV12   0x32315659
 
#define VA_FOURCC_P208   0x38303250
 
#define VA_FOURCC_I420   0x30323449
 
#define VA_FOURCC_YV24   0x34325659
 
#define VA_FOURCC_YV32   0x32335659
 
#define VA_FOURCC_Y800   0x30303859
 
#define VA_FOURCC_IMC3   0x33434D49
 
#define VA_FOURCC_411P   0x50313134
 
#define VA_FOURCC_411R   0x52313134
 
#define VA_FOURCC_422H   0x48323234
 
#define VA_FOURCC_422V   0x56323234
 
#define VA_FOURCC_444P   0x50343434
 
#define VA_FOURCC_RGBP   0x50424752
 
#define VA_FOURCC_BGRP   0x50524742
 
#define VA_FOURCC_RGB565   0x36314752
 
#define VA_FOURCC_BGR565   0x36314742
 
#define VA_FOURCC_Y210   0x30313259
 
#define VA_FOURCC_Y212   0x32313259
 
#define VA_FOURCC_Y216   0x36313259
 
#define VA_FOURCC_Y410   0x30313459
 
#define VA_FOURCC_Y412   0x32313459
 
#define VA_FOURCC_Y416   0x36313459
 
#define VA_FOURCC_YV16   0x36315659
 
#define VA_FOURCC_P010   0x30313050
 
#define VA_FOURCC_P012   0x32313050
 
#define VA_FOURCC_P016   0x36313050
 
#define VA_FOURCC_I010   0x30313049
 
#define VA_FOURCC_IYUV   0x56555949
 
#define VA_FOURCC_A2R10G10B10   0x30335241 /* VA_FOURCC('A','R','3','0') */
 
#define VA_FOURCC_A2B10G10R10   0x30334241 /* VA_FOURCC('A','B','3','0') */
 
#define VA_FOURCC_X2R10G10B10   0x30335258 /* VA_FOURCC('X','R','3','0') */
 
#define VA_FOURCC_X2B10G10R10   0x30334258 /* VA_FOURCC('X','B','3','0') */
 
#define VA_FOURCC_Y8   0x20203859
 
#define VA_FOURCC_Y16   0x20363159
 
#define VA_FOURCC_VYUY   0x59555956
 
#define VA_FOURCC_YVYU   0x55595659
 
#define VA_FOURCC_ARGB64   0x34475241
 
#define VA_FOURCC_ABGR64   0x34474241
 
#define VA_FOURCC_XYUV   0x56555958
 
#define VA_FOURCC_Q416   0x36313451
 
#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.
 
#define VA_PICTURE_VVC_LONG_TERM_REFERENCE   0x00000002
 Long term reference picture.
 
#define VA_PICTURE_VVC_UNAVAILABLE_REFERENCE   0x00000004
 Unavailable reference picture This flag indicates the situation that the process of "generating unavailable reference pictures" (spec section 8.3.4) is required.
 
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.
 
#define VA_RC_ICQ   0x00000040
 Intelligent Constant Quality. Provided an initial ICQ_quality_factor, adjusts QP at a frame and MB level based on motion to improve subjective quality.
 
#define VA_RC_MB   0x00000080
 Macroblock based rate control. Per MB control is decided internally in the encoder. It may be combined with other RC modes, except CQP.
 
#define VA_RC_CFS   0x00000100
 Constant Frame Size, it is used for small tolerent

 
#define VA_RC_PARALLEL   0x00000200
 Parallel BRC, for hierachical B. More...
 
#define VA_RC_QVBR   0x00000400
 Quality defined VBR Use Quality factor to determine the good enough QP for each MB such that good enough quality can be obtained without waste of bits for this BRC mode, you must set all legacy VBR parameters and reuse quality_factor in VAEncMiscParameterRateControl.
 
#define VA_RC_AVBR   0x00000800
 Average VBR Average variable bitrate control algorithm focuses on overall encoding quality while meeting the specified target bitrate, within the accuracy range, after a convergence period. bits_per_second in VAEncMiscParameterRateControl is target bitrate for AVBR. Convergence is specified in the unit of frame. window_size in VAEncMiscParameterRateControl is equal to convergence for AVBR. Accuracy is in the range of [1,100], 1 means one percent, and so on. target_percentage in VAEncMiscParameterRateControl is equal to accuracy for AVBR.
 
#define VA_RC_TCBRC   0x00001000
 Transport Controlled BRC Specific bitrate control for real time streaming. TCBRC can instantly react to channel change to remove or significantly reduce the delay. Application (transport) provides channel feedback to driver through TargetFrameSize. When channel condition is very good (almost no constraint on instant frame size), the app should set target frame size as zero. Otherwise, channel capacity divided by fps should be used.
 
Attribute values for VAConfigAttribDecSliceMode
#define VA_DEC_SLICE_MODE_NORMAL   0x00000001
 Driver supports normal mode for slice decoding.
 
#define VA_DEC_SLICE_MODE_BASE   0x00000002
 Driver supports base mode for slice decoding.
 
Attribute values for VAConfigAttribDecProcessing
#define VA_DEC_PROCESSING_NONE   0x00000000
 No decoding + processing in a single decoding call.
 
#define VA_DEC_PROCESSING   0x00000001
 Decode + processing in a single decoding call.
 
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. More...
 
#define VA_ENC_PACKED_HEADER_PICTURE   0x00000002
 Driver supports packed picture headers. e.g. PPS for H.264. More...
 
#define VA_ENC_PACKED_HEADER_SLICE   0x00000004
 Driver supports packed slice headers. e.g. slice_header() for H.264. More...
 
#define VA_ENC_PACKED_HEADER_MISC   0x00000008
 Driver supports misc packed headers. e.g. SEI for H.264. More...
 
#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_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 macroblocks per slice.
 
#define VA_ENC_SLICE_STRUCTURE_EQUAL_ROWS   0x00000004
 Driver support 1 row per slice.
 
#define VA_ENC_SLICE_STRUCTURE_MAX_SLICE_SIZE   0x00000008
 Driver support max encoded slice size per slice.
 
#define VA_ENC_SLICE_STRUCTURE_ARBITRARY_ROWS   0x00000010
 Driver supports an arbitrary number of rows per slice.
 
#define VA_ENC_SLICE_STRUCTURE_EQUAL_MULTI_ROWS   0x00000020
 Driver supports any number of rows per slice but they must be the same for all slices except for the last one, which must be equal or smaller to the previous slices.
 
Attribute values for VAConfigAttribEncQuantization
#define VA_ENC_QUANTIZATION_NONE   0x00000000
 Driver does not support special types of quantization.
 
#define VA_ENC_QUANTIZATION_TRELLIS_SUPPORTED   0x00000001
 Driver supports trellis quantization.
 
Attribute values for VAConfigAttribPredictionDirection
#define VA_PREDICTION_DIRECTION_PREVIOUS   0x00000001
 Driver support forward reference frame (inter frame for vpx, P frame for H26x MPEG) can work with the VAConfigAttribEncMaxRefFrames. for example: low delay B frame of HEVC. these value can be OR'd together. typical value should be VA_PREDICTION_DIRECTION_PREVIOUS or VA_PREDICTION_DIRECTION_PREVIOUS | VA_PREDICTION_DIRECTION_FUTURE, theoretically, there are no stream only include future reference frame.
 
#define VA_PREDICTION_DIRECTION_FUTURE   0x00000002
 Driver support backward prediction frame/slice.
 
#define VA_PREDICTION_DIRECTION_BI_NOT_EMPTY   0x00000004
 Dirver require both reference list must be not empty for inter frame.
 
Attribute values for VAConfigAttribEncIntraRefresh
#define VA_ENC_INTRA_REFRESH_NONE   0x00000000
 Driver does not support intra refresh.
 
#define VA_ENC_INTRA_REFRESH_ROLLING_COLUMN   0x00000001
 Driver supports column based rolling intra refresh.
 
#define VA_ENC_INTRA_REFRESH_ROLLING_ROW   0x00000002
 Driver supports row based rolling intra refresh.
 
#define VA_ENC_INTRA_REFRESH_ADAPTIVE   0x00000010
 Driver supports adaptive intra refresh.
 
#define VA_ENC_INTRA_REFRESH_CYCLIC   0x00000020
 Driver supports cyclic intra refresh.
 
#define VA_ENC_INTRA_REFRESH_P_FRAME   0x00010000
 Driver supports intra refresh of P frame.
 
#define VA_ENC_INTRA_REFRESH_B_FRAME   0x00020000
 Driver supports intra refresh of B frame.
 
#define VA_ENC_INTRA_REFRESH_MULTI_REF   0x00040000
 Driver supports intra refresh of multiple reference encoder.
 
Attribute values for VAConfigAttribProtectedContentCipherAlgorithm
#define VA_PC_CIPHER_AES   0x00000001
 AES cipher.
 
Attribute values for VAConfigAttribProtectedContentCipherBlockSize
#define VA_PC_BLOCK_SIZE_128   0x00000001
 128 bits block size
 
#define VA_PC_BLOCK_SIZE_192   0x00000002
 192 bits block size
 
#define VA_PC_BLOCK_SIZE_256   0x00000004
 256 bits block size
 
Attribute values for VAConfigAttribProtectedContentCipherMode
#define VA_PC_CIPHER_MODE_ECB   0x00000001
 AES ECB.
 
#define VA_PC_CIPHER_MODE_CBC   0x00000002
 AES CBC.
 
#define VA_PC_CIPHER_MODE_CTR   0x00000004
 AES CTR.
 
Attribute values for VAConfigAttribProtectedContentCipherSampleType
#define VA_PC_SAMPLE_TYPE_FULLSAMPLE   0x00000001
 Full sample.
 
#define VA_PC_SAMPLE_TYPE_SUBSAMPLE   0x00000002
 Sub sample.
 
Attribute values for VAConfigAttribProtectedContentUsage
#define VA_PC_USAGE_DEFAULT   0x00000000
 Default usage.
 
#define VA_PC_USAGE_WIDEVINE   0x00000001
 Widevine.
 
Attribute values for VAConfigAttribProcessingRate.
#define VA_PROCESSING_RATE_NONE   0x00000000
 Driver does not support processing rate report.
 
#define VA_PROCESSING_RATE_ENCODE   0x00000001
 Driver supports encode processing rate report

 
#define VA_PROCESSING_RATE_DECODE   0x00000002
 Driver supports decode processing rate report

 
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.

Bits 0:7 are reserved for generic types. Bits 31:28 are reserved for Linux DRM. Bits 23:20 are reserved for Android. Bits 19:16 are reserved for Win32. DRM, Android and Win32 specific types are defined in respective va_*.h 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.
 
#define VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT   0x00000020
 Surface used for export to third-party APIs, e.g. via vaExportSurfaceHandle().
 
vaExportSurfaceHandle() flags
#define VA_EXPORT_SURFACE_READ_ONLY   0x0001
 
#define VA_EXPORT_SURFACE_WRITE_ONLY   0x0002
 
#define VA_EXPORT_SURFACE_READ_WRITE   0x0003
 
#define VA_EXPORT_SURFACE_SEPARATE_LAYERS   0x0004
 
#define VA_EXPORT_SURFACE_COMPOSED_LAYERS   0x0008
 
Mirroring directions

Those values could be used for VADisplayAttribMirror attribute or VAProcPipelineParameterBuffer::mirror_state.

#define VA_MIRROR_NONE   0x00000000
 No Mirroring.
 
#define VA_MIRROR_HORIZONTAL   0x00000001
 Horizontal Mirroring.
 
#define VA_MIRROR_VERTICAL   0x00000002
 Vertical Mirroring.
 

Typedefs

typedef void * VADisplay
 
typedef void(* VAMessageCallback) (void *user_context, const char *message)
 
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 , VAProfileMPEG2Simple = 0 , VAProfileMPEG2Main = 1 , VAProfileMPEG4Simple = 2 , VAProfileMPEG4AdvancedSimple = 3 , VAProfileMPEG4Main = 4 , va_deprecated_enum = 5 , VAProfileH264Main = 6 , VAProfileH264High = 7 , VAProfileVC1Simple = 8 , VAProfileVC1Main = 9 , VAProfileVC1Advanced = 10 , VAProfileH263Baseline = 11 , VAProfileJPEGBaseline = 12 , VAProfileH264ConstrainedBaseline = 13 , VAProfileVP8Version0_3 = 14 , VAProfileH264MultiviewHigh = 15 , VAProfileH264StereoHigh = 16 , VAProfileHEVCMain = 17 , VAProfileHEVCMain10 = 18 , VAProfileVP9Profile0 = 19 , VAProfileVP9Profile1 = 20 , VAProfileVP9Profile2 = 21 , VAProfileVP9Profile3 = 22 , VAProfileHEVCMain12 = 23 , VAProfileHEVCMain422_10 = 24 , VAProfileHEVCMain422_12 = 25 , VAProfileHEVCMain444 = 26 , VAProfileHEVCMain444_10 = 27 , VAProfileHEVCMain444_12 = 28 , VAProfileHEVCSccMain = 29 , VAProfileHEVCSccMain10 = 30 , VAProfileHEVCSccMain444 = 31 , VAProfileAV1Profile0 = 32 , VAProfileAV1Profile1 = 33 , VAProfileHEVCSccMain444_10 = 34 , VAProfileProtected = 35 , VAProfileH264High10 = 36 , VAProfileVVCMain10 = 37 , VAProfileVVCMultilayerMain10 = 38 }
 
enum  VAEntrypoint {
}
 
enum  VAConfigAttribType {
}
 
enum  VAGenericValueType { VAGenericValueTypeInteger = 1 , VAGenericValueTypeFloat , VAGenericValueTypePointer , VAGenericValueTypeFunc }
 Generic value types. More...
 
enum  VASurfaceAttribType {
}
 Surface attribute types. More...
 
enum  VABufferType {
}
 
enum  VAEncMiscParameterType {
}
 
enum  VAEncPackedHeaderType {
  VAEncPackedHeaderSequence = 1 , VAEncPackedHeaderPicture = 2 , VAEncPackedHeaderSlice = 3 , VAEncPackedHeaderRawData = 4 ,
  va_deprecated_enum = 5
}
 Packed header type. More...
 
enum  VAMvModeVC1
 
enum  VADisplayAttribBLEMode
 
enum  VADisplayAttribType
 

Functions

const char * vaErrorStr (VAStatus error_status)
 
VAMessageCallback vaSetErrorCallback (VADisplay dpy, VAMessageCallback callback, void *user_context)
 
VAMessageCallback vaSetInfoCallback (VADisplay dpy, VAMessageCallback callback, void *user_context)
 
VAStatus vaSetDriverName (VADisplay dpy, char *driver_name)
 
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 vaCreateMFContext (VADisplay dpy, VAMFContextID *mf_context)
 
VAStatus vaMFAddContext (VADisplay dpy, VAMFContextID mf_context, VAContextID context)
 
VAStatus vaMFReleaseContext (VADisplay dpy, VAMFContextID mf_context, VAContextID context)
 
VAStatus vaQueryProcessingRate (VADisplay dpy, VAConfigID config, VAProcessingRateParameter *proc_buf, unsigned int *processing_rate)
 Queries processing rate for the supplied config. More...
 
VAStatus vaCreateBuffer (VADisplay dpy, VAContextID context, VABufferType type, unsigned int size, unsigned int num_elements, void *data, VABufferID *buf_id)
 
VAStatus vaCreateBuffer2 (VADisplay dpy, VAContextID context, VABufferType type, unsigned int width, unsigned int height, unsigned int *unit_size, unsigned int *pitch, 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 vaExportSurfaceHandle (VADisplay dpy, VASurfaceID surface_id, uint32_t mem_type, uint32_t flags, void *descriptor)
 Export a handle to a surface for use with an 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 vaMFSubmit (VADisplay dpy, VAMFContextID mf_context, VAContextID *contexts, int num_contexts)
 
VAStatus vaSyncSurface (VADisplay dpy, VASurfaceID render_target)
 
VAStatus vaSyncSurface2 (VADisplay dpy, VASurfaceID surface, uint64_t timeout_ns)
 Synchronizes pending operations associated with the supplied surface. More...
 
VAStatus vaQuerySurfaceStatus (VADisplay dpy, VASurfaceID render_target, VASurfaceStatus *status)
 
VAStatus vaQuerySurfaceError (VADisplay dpy, VASurfaceID surface, VAStatus error_status, void **error_info)
 
VAStatus vaSyncBuffer (VADisplay dpy, VABufferID buf_id, uint64_t timeout_ns)
 Synchronizes pending operations associated with the supplied buffer. More...
 
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, int16_t src_x, int16_t src_y, uint16_t src_width, uint16_t src_height, int16_t dest_x, int16_t dest_y, uint16_t dest_width, uint16_t dest_height, uint32_t 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)
 
VAStatus vaCopy (VADisplay dpy, VACopyObject *dst, VACopyObject *src, VACopyOption option)
 Copies an object. More...
 

Detailed Description

The Core API.

This file contains the Core API.

Macro Definition Documentation

◆ va_deprecated_enum

va_deprecated_enum   = 0x80000000

Misc packed header. See codec-specific definitions.

Deprecated:
This is a deprecated packed header type. All applications can use VAEncPackedHeaderRawData to insert a codec-specific packed header

◆ VA_OOL_DEBLOCKING_FALSE

#define VA_OOL_DEBLOCKING_FALSE   0x00000000

attribute value for VADisplayAttribOutOfLoopDeblock

◆ VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE

#define VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE   0x00000010

RefPicSetStCurrBefore of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocStCurrBefore.

VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE, VA_PICTURE_HEVC_RPS_ST_CURR_AFTER and VA_PICTURE_HEVC_RPS_LT_CURR of any picture in ReferenceFrames[] should be exclusive. No more than one of them can be set for any picture. Sum of NumPocStCurrBefore, NumPocStCurrAfter and NumPocLtCurr equals NumPocTotalCurr, which should be equal to or smaller than 8. Application should provide valid values for both short format and long format. The pictures in DPB with any of these three flags turned on are referred by the current picture.

◆ VA_RENDER_DEVICE_UNDEFINED

#define VA_RENDER_DEVICE_UNDEFINED   0

Render device

◆ VA_RENDER_MODE_UNDEFINED

#define VA_RENDER_MODE_UNDEFINED   0

Render mode

Enumeration Type Documentation

◆ VADisplayAttribType

Currently defined display attribute types

Function Documentation

◆ vaCopy()

VAStatus vaCopy ( VADisplay  dpy,
VACopyObject *  dst,
VACopyObject *  src,
VACopyOption  option 
)

Copies an object.

Copies specified object (surface or buffer). If non-blocking copy is requested (VA_COPY_NONBLOCK), then need vaSyncBuffer or vaSyncSurface/vaSyncSurface2 to sync the destination object.

Parameters
[in]dpythe VA display
[in]dstDestination object to copy to
[in]srcSource object to copy from
[in]optionVA copy option
Returns
VA_STATUS_SUCCESS if successful

◆ vaGetDisplayAttributes()

VAStatus vaGetDisplayAttributes ( VADisplay  dpy,
VADisplayAttribute *  attr_list,
int  num_attributes 
)

Get display attributes This function returns the current attribute values in "attr_list". Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the "flags" field from vaQueryDisplayAttributes() can have their values retrieved.

◆ vaMaxNumDisplayAttributes()

int vaMaxNumDisplayAttributes ( VADisplay  dpy)

Get maximum number of display attributs supported by the implementation

◆ vaQueryDisplayAttributes()

VAStatus vaQueryDisplayAttributes ( VADisplay  dpy,
VADisplayAttribute *  attr_list,
int *  num_attributes 
)

Query display attributes The caller must provide a "attr_list" array that can hold at least vaMaxNumDisplayAttributes() entries. The actual number of attributes returned in "attr_list" is returned in "num_attributes".

◆ vaSetDisplayAttributes()

VAStatus vaSetDisplayAttributes ( VADisplay  dpy,
VADisplayAttribute *  attr_list,
int  num_attributes 
)

Set display attributes Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the "flags" field from vaQueryDisplayAttributes() can be set. If the attribute is not settable or the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT_SUPPORTED