VA-API 2.21.0
|
Classes | |
struct | VABlendState |
Video blending state definition. More... | |
struct | VAProcPipelineCaps |
Video processing pipeline capabilities. More... | |
struct | VAProcFilterValueRange |
Specification of values supported by the filter. More... | |
struct | VAHdrMetaDataHDR10 |
Describes High Dynamic Range Meta Data for HDR10. More... | |
struct | VAProcFilterCapHighDynamicRange |
Capabilities specification for the High Dynamic Range filter. More... | |
struct | VAHdrMetaData |
High Dynamic Range Meta Data. More... | |
struct | VAProcPipelineParameterBuffer |
Video processing pipeline configuration. More... | |
struct | VAProcFilterParameterBufferBase |
Filter parameter buffer base. More... | |
struct | VAProcFilterParameterBuffer |
Default filter parametrization. More... | |
struct | VAProcFilterParameterBufferDeinterlacing |
Deinterlacing filter parametrization. More... | |
struct | VAProcFilterParameterBufferColorBalance |
Color balance filter parametrization. More... | |
struct | VAProcFilterParameterBufferTotalColorCorrection |
Total color correction filter parametrization. More... | |
struct | VAProcFilterParameterBufferHVSNoiseReduction |
Human Vision System(HVS) Noise reduction filter parametrization. More... | |
struct | VAProcFilterParameterBufferHDRToneMapping |
High Dynamic Range(HDR) Tone Mapping filter parametrization. More... | |
struct | VAProcFilterParameterBuffer3DLUT |
3DLUT filter parametrization. More... | |
struct | VAProcFilterCap3DLUT |
Capabilities specification for the 3DLUT filter. More... | |
struct | VAProcFilterCap |
Default filter cap specification (single range value). More... | |
struct | VAProcFilterCapDeinterlacing |
Capabilities specification for the deinterlacing filter. More... | |
struct | VAProcFilterCapColorBalance |
Capabilities specification for the color balance filter. More... | |
struct | VAProcFilterCapTotalColorCorrection |
Capabilities specification for the Total Color Correction filter. More... | |
Macros | |
#define | VA_SOURCE_RANGE_UNKNOWN 0 |
Enumerations | |
enum | VAProcFilterType { } |
Video filter types. More... | |
enum | VAProcDeinterlacingType { } |
Deinterlacing types. More... | |
enum | VAProcColorBalanceType { } |
Color balance types. More... | |
enum | VAProcColorStandardType { } |
Color standard types. More... | |
enum | VAProcTotalColorCorrectionType { } |
Total color correction types. More... | |
enum | VAProcHighDynamicRangeMetadataType { } |
High Dynamic Range Metadata types. More... | |
enum | VAProcMode { VAProcDefaultMode = 0 , VAProcPowerSavingMode , VAProcPerformanceMode } |
Video Processing Mode. More... | |
Functions | |
VAStatus | vaQueryVideoProcFilters (VADisplay dpy, VAContextID context, VAProcFilterType *filters, unsigned int *num_filters) |
Queries video processing filters. | |
VAStatus | vaQueryVideoProcFilterCaps (VADisplay dpy, VAContextID context, VAProcFilterType type, void *filter_caps, unsigned int *num_filter_caps) |
Queries video filter capabilities. | |
VAStatus | vaQueryVideoProcPipelineCaps (VADisplay dpy, VAContextID context, VABufferID *filters, unsigned int num_filters, VAProcPipelineCaps *pipeline_caps) |
Queries video processing pipeline capabilities. | |
Video pipeline flags | |
#define | VA_PROC_PIPELINE_SUBPICTURES 0x00000001 |
Specifies whether to apply subpictures when processing a surface. | |
#define | VA_PROC_PIPELINE_FAST 0x00000002 |
Specifies whether to apply power or performance optimizations to a pipeline. | |
Video filter flags | |
#define | VA_PROC_FILTER_MANDATORY 0x00000001 |
Specifies whether the filter shall be present in the pipeline. | |
Pipeline end flags | |
#define | VA_PIPELINE_FLAG_END 0x00000004 |
Specifies the pipeline is the last. | |
Chroma Siting flag | |
#define | VA_CHROMA_SITING_UNKNOWN 0x00 |
#define | VA_CHROMA_SITING_VERTICAL_TOP 0x01 |
Chroma samples are co-sited vertically on the top with the luma samples. | |
#define | VA_CHROMA_SITING_VERTICAL_CENTER 0x02 |
Chroma samples are not co-sited vertically with the luma samples. | |
#define | VA_CHROMA_SITING_VERTICAL_BOTTOM 0x03 |
Chroma samples are co-sited vertically on the bottom with the luma samples. | |
#define | VA_CHROMA_SITING_HORIZONTAL_LEFT 0x04 |
Chroma samples are co-sited horizontally on the left with the luma samples. | |
#define | VA_CHROMA_SITING_HORIZONTAL_CENTER 0x08 |
Chroma samples are not co-sited horizontally with the luma samples. | |
The video processing API uses the same paradigm as for decoding:
Checking whether video processing is supported can be performed with vaQueryConfigEntrypoints() and the profile argument set to VAProfileNone. If video processing is supported, then the list of returned entry-points will include VAEntrypointVideoProc.
Then, the vaQueryVideoProcFilters() function is used to query the list of video processing filters.
Finally, individual filter capabilities can be checked with vaQueryVideoProcFilterCaps().
A video processing pipeline buffer is created for each source surface we want to process. However, buffers holding filter parameters can be created once and for all. Rationale is to avoid multiple creation/destruction chains of filter buffers and also because filter parameters generally won't change frame after frame. e.g. this makes it possible to implement a checkerboard of videos where the same filters are applied to each video source.
The general control flow is demonstrated by the following pseudo-code:
Once the video processing pipeline is set up, the caller shall check the implied capabilities and requirements with vaQueryVideoProcPipelineCaps(). This function can be used to validate the number of reference frames are needed by the specified deinterlacing algorithm, the supported color primaries, etc.
Video processing pipeline parameters are submitted for each source surface to process. Video filter parameters can also change, per-surface. e.g. the list of reference frames used for deinterlacing.
#define VA_CHROMA_SITING_UNKNOWN 0x00 |
vertical chroma sitting take bit 0-1, horizontal chroma sitting take bit 2-3 vertical chromma siting | horizontal chroma sitting to be chroma sitting
#define VA_PROC_PIPELINE_FAST 0x00000002 |
Specifies whether to apply power or performance optimizations to a pipeline.
When processing several surfaces, it may be necessary to prioritize more certain pipelines than others. This flag is only a hint to the video processor so that it can omit certain filters to save power for example. Typically, this flag could be used with video surfaces decoded from a secondary bitstream.
#define VA_SOURCE_RANGE_UNKNOWN 0 |
This is to indicate that the color-space conversion uses full range or reduced range. VA_SOURCE_RANGE_FULL(Full range): Y/Cb/Cr is in [0, 255]. It is mainly used for JPEG/JFIF formats. The combination with the BT601 flag means that JPEG/JFIF color-space conversion matrix is used. VA_SOURCE_RANGE_REDUCED(Reduced range): Y is in [16, 235] and Cb/Cr is in [16, 240]. It is mainly used for the YUV->RGB color-space conversion in SDTV/HDTV/UHDTV.
Color balance types.
Color standard types.
These define a set of color properties corresponding to particular video standards.
Where matrix_coefficients is specified, it applies only to YUV data - RGB data always use the identity matrix (matrix_coefficients = 0).
Deinterlacing types.
enum VAProcFilterType |
Video filter types.
enum VAProcMode |
Video Processing Mode.
Total color correction types.
VAStatus vaQueryVideoProcFilterCaps | ( | VADisplay | dpy, |
VAContextID | context, | ||
VAProcFilterType | type, | ||
void * | filter_caps, | ||
unsigned int * | num_filter_caps | ||
) |
Queries video filter capabilities.
This function returns the list of capabilities supported by the driver for a specific video filter. The filter_caps
array is allocated by the user and num_filter_caps
shall be initialized to the number of allocated elements in that array. Upon successful return, the actual number of filters will be overwritten into num_filter_caps
. Otherwise, VA_STATUS_ERROR_MAX_NUM_EXCEEDED
is returned and num_filter_caps
is adjusted to the number of elements that would be returned if enough space was available.
[in] | dpy | the VA display |
[in] | context | the video processing context |
[in] | type | the video filter type |
[out] | filter_caps | the output array of VAProcFilterCap elements |
[in,out] | num_filter_caps | the number of elements allocated on input, the number of elements actually filled in output |
VAStatus vaQueryVideoProcFilters | ( | VADisplay | dpy, |
VAContextID | context, | ||
VAProcFilterType * | filters, | ||
unsigned int * | num_filters | ||
) |
Queries video processing filters.
This function returns the list of video processing filters supported by the driver. The filters
array is allocated by the user and num_filters
shall be initialized to the number of allocated elements in that array. Upon successful return, the actual number of filters will be overwritten into num_filters
. Otherwise, VA_STATUS_ERROR_MAX_NUM_EXCEEDED
is returned and num_filters
is adjusted to the number of elements that would be returned if enough space was available.
The list of video processing filters supported by the driver shall be ordered in the way they can be iteratively applied. This is needed for both correctness, i.e. some filters would not mean anything if applied at the beginning of the pipeline; but also for performance since some filters can be applied in a single pass (e.g. noise reduction + deinterlacing).
[in] | dpy | the VA display |
[in] | context | the video processing context |
[out] | filters | the output array of VAProcFilterType elements |
[in,out] | num_filters | the number of elements allocated on input, the number of elements actually filled in on output |
VAStatus vaQueryVideoProcPipelineCaps | ( | VADisplay | dpy, |
VAContextID | context, | ||
VABufferID * | filters, | ||
unsigned int | num_filters, | ||
VAProcPipelineCaps * | pipeline_caps | ||
) |
Queries video processing pipeline capabilities.
This function returns the video processing pipeline capabilities. The filters
array defines the video processing pipeline and is an array of buffers holding filter parameters.
Note: the VAProcPipelineCaps structure contains user-provided arrays. If non-NULL, the corresponding num_*
fields shall be filled in on input with the number of elements allocated. Upon successful return, the actual number of elements will be overwritten into the num_*
fields. Otherwise, VA_STATUS_ERROR_MAX_NUM_EXCEEDED
is returned and num_*
fields are adjusted to the number of elements that would be returned if enough space was available.
[in] | dpy | the VA display |
[in] | context | the video processing context |
[in] | filters | the array of VA buffers defining the video processing pipeline |
[in] | num_filters | the number of elements in filters |
[in,out] | pipeline_caps | the video processing pipeline capabilities |