|
VA-API
|
Classes | |
| struct | VAProcPipelineCaps |
| Video processing pipeline capabilities. More... | |
| struct | VAProcFilterValueRange |
| Specification of values supported by the filter. 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 | 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... | |
Functions | |
| VAStatus | vaQueryVideoProcFilters (VADisplay dpy, VAContextID context, VAProcFilterType *filters, unsigned int *num_filters) |
| Queries video processing filters. More... | |
| VAStatus | vaQueryVideoProcFilterCaps (VADisplay dpy, VAContextID context, VAProcFilterType type, void *filter_caps, unsigned int *num_filter_caps) |
| Queries video filter capabilities. More... | |
| VAStatus | vaQueryVideoProcPipelineCaps (VADisplay dpy, VAContextID context, VABufferID *filters, unsigned int num_filters, VAProcPipelineCaps *pipeline_caps) |
| Queries video processing pipeline capabilities. More... | |
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. More... | |
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. | |
De-interlacing flags | |
| #define | VA_DEINTERLACING_BOTTOM_FIELD_FIRST 0x0001 |
| Bottom field first in the input frame. if this is not set then assumes top field first. | |
| #define | VA_DEINTERLACING_BOTTOM_FIELD 0x0002 |
| Bottom field used in deinterlacing. if this is not set then assumes top field is used. | |
| #define | VA_DEINTERLACING_ONE_FIELD 0x0004 |
| A single field is stored in the input frame. if this is not set then assumes the frame contains two interleaved fields. | |
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_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.
Color balance types.
Color standard types.
Deinterlacing types.
| enum VAProcFilterType |
| 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 |
1.8.8