VA-API
2.22.0
|
Video processing pipeline configuration. More...
#include <va_vpp.h>
Public Attributes | |
VASurfaceID | surface |
Source surface ID. More... | |
const VARectangle * | surface_region |
Region within the source surface to be processed. More... | |
VAProcColorStandardType | surface_color_standard |
Requested input color standard. More... | |
const VARectangle * | output_region |
Region within the output surface. More... | |
uint32_t | output_background_color |
Background color. More... | |
VAProcColorStandardType | output_color_standard |
Requested output color standard. More... | |
uint32_t | pipeline_flags |
Pipeline filters. See video pipeline flags. More... | |
uint32_t | filter_flags |
Extra filter flags. See vaPutSurface() flags. More... | |
VABufferID * | filters |
Array of filters to apply to the surface. More... | |
uint32_t | num_filters |
Actual number of filters. | |
VASurfaceID * | forward_references |
Array of forward reference frames (past frames). | |
uint32_t | num_forward_references |
Number of forward reference frames that were supplied. | |
VASurfaceID * | backward_references |
Array of backward reference frames (future frames). | |
uint32_t | num_backward_references |
Number of backward reference frames that were supplied. | |
uint32_t | rotation_state |
Rotation state. See rotation angles. More... | |
const VABlendState * | blend_state |
blending state. See "Video blending state definition". More... | |
uint32_t | mirror_state |
mirroring state. See "Mirroring directions". More... | |
VASurfaceID * | additional_outputs |
Array of additional output surfaces. | |
uint32_t | num_additional_outputs |
Number of additional output surfaces. | |
uint32_t | input_surface_flag |
Flag to indicate the input surface flag. More... | |
uint32_t | output_surface_flag |
Flag to indicate the output surface flag. More... | |
VAProcColorProperties | input_color_properties |
Input Color Properties. See "VAProcColorProperties". | |
VAProcColorProperties | output_color_properties |
Output Color Properties. See "VAProcColorProperties". | |
VAProcMode | processing_mode |
Processing mode. See "VAProcMode". | |
VAHdrMetaData * | output_hdr_metadata |
Output High Dynamic Metadata. More... | |
uint32_t | va_reserved [VA_PADDING_LARGE - 13] |
Reserved bytes for future use, must be zero. | |
Video processing pipeline configuration.
This buffer defines a video processing pipeline. The actual filters to be applied are provided in the filters
field, they can be re-used in other processing pipelines.
The target surface is specified by the render_target
argument of vaBeginPicture()
. The general usage model is described as follows:
vaBeginPicture()
: specify the target surface that receives the processed output;vaRenderPicture()
: specify a surface to be processed and composed into the render_target
. Use as many vaRenderPicture()
calls as necessary surfaces to compose ;vaEndPicture()
: tell the driver to start processing the surfaces with the requested filters.If a filter (e.g. noise reduction) needs to be applied with different values for multiple surfaces, the application needs to create as many filter parameter buffers as necessary. i.e. the filter parameters shall not change between two calls to vaRenderPicture()
.
For composition usage models, the first surface to process will generally use an opaque background color, i.e. output_background_color
set with the most significant byte set to 0xff
. For instance, 0xff000000
for a black background. Then, subsequent surfaces would use a transparent background color.
const VABlendState* VAProcPipelineParameterBuffer::blend_state |
blending state. See "Video blending state definition".
If blend_state is NULL, then default operation mode depends on the source surface format:
Otherwise, blend_state is a pointer to a VABlendState structure that shall be live until vaEndPicture().
Implementation note: the driver is responsible for checking the blend state flags against the actual source surface format. e.g. premultiplied alpha blending is only applicable to RGB surfaces, and luma keying is only applicable to YUV surfaces. If a mismatch occurs, then #VA_STATUS_ERROR_INVALID_BLEND_STATE is returned.
uint32_t VAProcPipelineParameterBuffer::filter_flags |
Extra filter flags. See vaPutSurface() flags.
Filter flags are used as a fast path, wherever possible, to use vaPutSurface() flags instead of explicit filter parameter buffers.
Allowed filter flags API-wise. Use vaQueryVideoProcPipelineCaps() to check for implementation details:
VA_FRAME_PICTURE
, VA_TOP_FIELD
, VA_BOTTOM_FIELD
. Note that any deinterlacing filter (VAProcFilterDeinterlacing) will override those flags.VA_SRC_BT601
, VA_SRC_BT709
, VA_SRC_SMPTE_240
.VA_FILTER_SCALING_DEFAULT
, VA_FILTER_SCALING_FAST
, VA_FILTER_SCALING_HQ
, VA_FILTER_SCALING_NL_ANAMORPHIC
.VA_FILTER_INTERPOLATION_DEFAULT
, VA_FILTER_INTERPOLATION_NEAREST_NEIGHBOR
, VA_FILTER_INTERPOLATION_BILINEAR
, VA_FILTER_INTERPOLATION_ADVANCED
. VABufferID* VAProcPipelineParameterBuffer::filters |
Array of filters to apply to the surface.
The list of filters shall be ordered in the same way the driver expects them. i.e. as was returned from vaQueryVideoProcFilters(). Otherwise, a VA_STATUS_ERROR_INVALID_FILTER_CHAIN is returned from vaRenderPicture() with this buffer.
VA_STATUS_ERROR_UNSUPPORTED_FILTER is returned if the list contains an unsupported filter.
uint32_t VAProcPipelineParameterBuffer::input_surface_flag |
Flag to indicate the input surface flag.
bit0~3: Surface sample type
For interlaced scaling, examples as follow:
bit31: Surface encryption
bit4~30 for future
uint32_t VAProcPipelineParameterBuffer::mirror_state |
mirroring state. See "Mirroring directions".
Mirroring of an image can be performed either along the horizontal or vertical axis. It is assumed that the rotation operation is always performed before the mirroring operation.
uint32_t VAProcPipelineParameterBuffer::output_background_color |
Background color.
Background color used to fill in pixels that reside outside of the specified output_region. The color is specified in ARGB format: [31:24] alpha, [23:16] red, [15:8] green, [7:0] blue.
Unless the alpha value is zero or the output_region represents the whole target surface size, implementations shall not render the source surface to the target surface directly. Rather, in order to maintain the exact semantics of output_background_color, the driver shall use a temporary surface and fill it in with the appropriate background color. Next, the driver will blend this temporary surface into the target surface.
VAProcColorStandardType VAProcPipelineParameterBuffer::output_color_standard |
Requested output color standard.
If this is set to VAProcColorStandardExplicit, the color properties are specified explicitly in output_color_properties instead.
VAHdrMetaData* VAProcPipelineParameterBuffer::output_hdr_metadata |
Output High Dynamic Metadata.
If output_metadata is NULL, then output default to SDR.
const VARectangle* VAProcPipelineParameterBuffer::output_region |
Region within the output surface.
Pointer to a VARectangle defining the region within the output surface that receives the processed pixels. If NULL, output_region
implies the whole surface.
Note that any pixels residing outside the specified region will be filled in with the output_background_color.
uint32_t VAProcPipelineParameterBuffer::output_surface_flag |
Flag to indicate the output surface flag.
bit0~3: Surface sample type
bit31: Surface encryption
bit4~30 for future
uint32_t VAProcPipelineParameterBuffer::pipeline_flags |
Pipeline filters. See video pipeline flags.
Flags to control the pipeline, like whether to apply subpictures or not, notify the driver that it can opt for power optimizations, should this be needed.
uint32_t VAProcPipelineParameterBuffer::rotation_state |
Rotation state. See rotation angles.
The rotation angle is clockwise. There is no specific rotation center for this operation. Rather, The source surface is first rotated by the specified angle and then scaled to fit the output_region.
This means that the top-left hand corner (0,0) of the output (rotated) surface is expressed as follows:
Check VAProcPipelineCaps::rotation_flags first prior to defining a specific rotation angle. Otherwise, the hardware can perfectly ignore this variable if it does not support any rotation.
VASurfaceID VAProcPipelineParameterBuffer::surface |
Source surface ID.
ID of the source surface to process. If subpictures are associated with the video surfaces then they shall be rendered to the target surface, if the VA_PROC_PIPELINE_SUBPICTURES pipeline flag is set.
VAProcColorStandardType VAProcPipelineParameterBuffer::surface_color_standard |
Requested input color standard.
Color properties are implicitly converted throughout the processing pipeline. The video processor chooses the best moment to apply this conversion. The set of supported color standards for input shall be queried with vaQueryVideoProcPipelineCaps().
If this is set to VAProcColorStandardExplicit, the color properties are specified explicitly in surface_color_properties instead.
const VARectangle* VAProcPipelineParameterBuffer::surface_region |
Region within the source surface to be processed.
Pointer to a VARectangle defining the region within the source surface to be processed. If NULL, surface_region
implies the whole surface.