VA-API  2.13.0.pre1
Public Attributes | List of all members
VAProcPipelineParameterBuffer Struct Reference

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...
 
VABufferIDfilters
 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 VABlendStateblend_state
 blending state. See "Video blending state definition". More...
 
uint32_t mirror_state
 
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".
 
VAHdrMetaDataoutput_hdr_metadata
 Output High Dynamic Metadata. More...
 
uint32_t va_reserved [VA_PADDING_LARGE - 13]
 Reserved bytes for future use, must be zero.
 

Detailed Description

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:

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.

Member Data Documentation

◆ blend_state

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:

  • RGB: per-pixel alpha blending ;
  • YUV: no blending, i.e override the underlying pixels.

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.

◆ filter_flags

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:

  • Bob-deinterlacing: VA_FRAME_PICTURE, VA_TOP_FIELD, VA_BOTTOM_FIELD. Note that any deinterlacing filter (VAProcFilterDeinterlacing) will override those flags.
  • Color space conversion: VA_SRC_BT601, VA_SRC_BT709, VA_SRC_SMPTE_240.
  • Scaling: VA_FILTER_SCALING_DEFAULT, VA_FILTER_SCALING_FAST, VA_FILTER_SCALING_HQ, VA_FILTER_SCALING_NL_ANAMORPHIC.
  • Interpolation Method: VA_FILTER_INTERPOLATION_DEFAULT, VA_FILTER_INTERPOLATION_NEAREST_NEIGHBOR, VA_FILTER_INTERPOLATION_BILINEAR, VA_FILTER_INTERPOLATION_ADVANCED.

◆ filters

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.

◆ input_surface_flag

uint32_t VAProcPipelineParameterBuffer::input_surface_flag

Flag to indicate the input surface flag.

bit0~3: Surface sample type

  • 0000: Progressive –> VA_FRAME_PICTURE
  • 0001: Single Top Field –> VA_TOP_FIELD
  • 0010: Single Bottom Field –> VA_BOTTOM_FIELD
  • 0100: Interleaved Top Field First –> VA_TOP_FIELD_FIRST
  • 1000: Interleaved Bottom Field First –> VA_BOTTOM_FIELD_FIRST

For interlaced scaling, examples as follow:

  • 1. Interleaved to Interleaved (Suppose input is top field first) – set input_surface_flag as VA_TOP_FIELD_FIRST – set output_surface_flag as VA_TOP_FIELD_FIRST
  • 2. Interleaved to Field (Suppose input is top field first) An interleaved frame need to be passed twice. First cycle to get the first field: – set input_surface_flag as VA_TOP_FIELD_FIRST – set output_surface_flag as VA_TOP_FIELD Second cycle to get the second field: – set input_surface_flag as VA_TOP_FIELD_FIRST – set output_surface_flag as VA_BOTTOM_FIELD
  • 3. Field to Interleaved (Suppose first field is top field) – create two surfaces, one for top field, the other for bottom field – set surface with the first field surface id – set backward_reference with the second field surface id – set input_surface_flag as VA_TOP_FIELD – set output_surface_flag as VA_TOP_FIELD_FIRST
  • 4. Field to Field: – set flag according to each frame.

bit31: Surface encryption

  • 0: non-protected
  • 1: protected

bit4~30 for future

◆ mirror_state

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.

◆ output_background_color

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.

◆ output_color_standard

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.

◆ output_hdr_metadata

VAHdrMetaData* VAProcPipelineParameterBuffer::output_hdr_metadata

Output High Dynamic Metadata.

If output_metadata is NULL, then output default to SDR.

◆ output_region

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.

◆ output_surface_flag

uint32_t VAProcPipelineParameterBuffer::output_surface_flag

Flag to indicate the output surface flag.

bit0~3: Surface sample type

  • 0000: Progressive –> VA_FRAME_PICTURE
  • 0001: Top Field –> VA_TOP_FIELD
  • 0010: Bottom Field –> VA_BOTTOM_FIELD
  • 0100: Top Field First –> VA_TOP_FIELD_FIRST
  • 1000: Bottom Field First –> VA_BOTTOM_FIELD_FIRST

bit31: Surface encryption

  • 0: non-protected
  • 1: protected

bit4~30 for future

◆ pipeline_flags

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.

◆ rotation_state

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:

  • VA_ROTATION_NONE: (0,0) is the top left corner of the source surface – no rotation is performed ;
  • VA_ROTATION_90: (0,0) is the bottom-left corner of the source surface ;
  • VA_ROTATION_180: (0,0) is the bottom-right corner of the source surface – the surface is flipped around the X axis ;
  • VA_ROTATION_270: (0,0) is the top-right corner of the source surface.

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.

◆ surface

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.

◆ surface_color_standard

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.

◆ surface_region

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.


The documentation for this struct was generated from the following file: