VDPAU
|
Data Structures | |
struct | VdpLayer |
Definition of an additional VdpOutputSurface layer in the composting model. More... | |
Typedefs | |
typedef uint32_t | VdpVideoMixerFeature |
A VdpVideoMixer feature that must be requested at creation time to be used. More... | |
typedef uint32_t | VdpVideoMixerParameter |
A VdpVideoMixer creation parameter. More... | |
typedef uint32_t | VdpVideoMixerAttribute |
An adjustable attribute of VdpVideoMixer operation. More... | |
typedef VdpStatus | VdpVideoMixerQueryFeatureSupport(VdpDevice device, VdpVideoMixerFeature feature, VdpBool *is_supported) |
Query the implementation's support for a specific feature. More... | |
typedef VdpStatus | VdpVideoMixerQueryParameterSupport(VdpDevice device, VdpVideoMixerParameter parameter, VdpBool *is_supported) |
Query the implementation's support for a specific parameter. More... | |
typedef VdpStatus | VdpVideoMixerQueryAttributeSupport(VdpDevice device, VdpVideoMixerAttribute attribute, VdpBool *is_supported) |
Query the implementation's support for a specific attribute. More... | |
typedef VdpStatus | VdpVideoMixerQueryParameterValueRange(VdpDevice device, VdpVideoMixerParameter parameter, void *min_value, void *max_value) |
Query the implementation's supported for a specific parameter. More... | |
typedef VdpStatus | VdpVideoMixerQueryAttributeValueRange(VdpDevice device, VdpVideoMixerAttribute attribute, void *min_value, void *max_value) |
Query the implementation's supported for a specific attribute. More... | |
typedef uint32_t | VdpVideoMixer |
An opaque handle representing a VdpVideoMixer object. More... | |
typedef VdpStatus | VdpVideoMixerCreate(VdpDevice device, uint32_t feature_count, VdpVideoMixerFeature const *features, uint32_t parameter_count, VdpVideoMixerParameter const *parameters, void const *const *parameter_values, VdpVideoMixer *mixer) |
Create a VdpVideoMixer. More... | |
typedef VdpStatus | VdpVideoMixerSetFeatureEnables(VdpVideoMixer mixer, uint32_t feature_count, VdpVideoMixerFeature const *features, VdpBool const *feature_enables) |
Enable or disable features. More... | |
typedef VdpStatus | VdpVideoMixerSetAttributeValues(VdpVideoMixer mixer, uint32_t attribute_count, VdpVideoMixerAttribute const *attributes, void const *const *attribute_values) |
Set attribute values. More... | |
typedef VdpStatus | VdpVideoMixerGetFeatureSupport(VdpVideoMixer mixer, uint32_t feature_count, VdpVideoMixerFeature const *features, VdpBool *feature_supports) |
Retrieve whether features were requested at creation time. More... | |
typedef VdpStatus | VdpVideoMixerGetFeatureEnables(VdpVideoMixer mixer, uint32_t feature_count, VdpVideoMixerFeature const *features, VdpBool *feature_enables) |
Retrieve whether features are enabled. More... | |
typedef VdpStatus | VdpVideoMixerGetParameterValues(VdpVideoMixer mixer, uint32_t parameter_count, VdpVideoMixerParameter const *parameters, void *const *parameter_values) |
Retrieve parameter values given at creation time. More... | |
typedef VdpStatus | VdpVideoMixerGetAttributeValues(VdpVideoMixer mixer, uint32_t attribute_count, VdpVideoMixerAttribute const *attributes, void *const *attribute_values) |
Retrieve current attribute values. More... | |
typedef VdpStatus | VdpVideoMixerDestroy(VdpVideoMixer mixer) |
Destroy a VdpVideoMixer. More... | |
typedef VdpStatus | VdpVideoMixerRender(VdpVideoMixer mixer, VdpOutputSurface background_surface, VdpRect const *background_source_rect, VdpVideoMixerPictureStructure current_picture_structure, uint32_t video_surface_past_count, VdpVideoSurface const *video_surface_past, VdpVideoSurface video_surface_current, uint32_t video_surface_future_count, VdpVideoSurface const *video_surface_future, VdpRect const *video_source_rect, VdpOutputSurface destination_surface, VdpRect const *destination_rect, VdpRect const *destination_video_rect, uint32_t layer_count, VdpLayer const *layers) |
Perform a video post-processing and compositing operation. More... | |
Enumerations | |
enum | VdpVideoMixerPictureStructure { VDP_VIDEO_MIXER_PICTURE_STRUCTURE_TOP_FIELD, VDP_VIDEO_MIXER_PICTURE_STRUCTURE_BOTTOM_FIELD, VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME } |
The structure of the picture present in a VdpVideoSurface. More... | |
VdpVideoMixer can perform some subset of the following post-processing steps on video:
A VdpVideoMixer takes a source VdpVideoSurface VdpVideoSurface and performs various video processing steps on it (potentially using information from past or future video surfaces). It scales the video and converts it to RGB, then optionally composites it with multiple auxiliary VdpOutputSurfaces before writing the result to the destination VdpOutputSurface.
The video mixer compositing model is as follows:
#define VDP_LAYER_VERSION 0 |
#define VDP_VIDEO_MIXER_ATTRIBUTE_BACKGROUND_COLOR |
The background color in the VdpVideoMixer's compositing model.
This attribute's type is VdpColor.
This parameter defaults to black (all color components 0.0 and alpha 1.0).
The application may not query this parameter's supported range, since the type is not scalar.
#define VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX |
The color-space conversion matrix used by the VdpVideoMixer.
This attribute's type is VdpCSCMatrix; CSC Matrix Manipulation.
Note: When using VdpVideoMixerGetAttributeValues to retrieve the current CSC matrix, the attribute_values array must contain a pointer to a pointer a VdpCSCMatrix (VdpCSCMatrix** as a void *). The get function will either initialize the referenced CSC matrix to the current value, or clear the supplied pointer to NULL, if the previous set call supplied a value of NULL in parameter_values, to request the default matrix.
This parameter defaults to a matrix suitable for ITU-R BT.601 input surfaces, with no procamp adjustments.
The application may not query this parameter's supported range, since the type is not scalar.
#define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MAX_LUMA |
The maximum luma value for the luma key algorithm.
This attribute's type is float.
This parameter defaults to 1.0.
The application may query this parameter's supported range. However, the range is fixed as 0.0...1.0.
#define VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA |
The minimum luma value for the luma key algorithm.
This attribute's type is float.
This parameter defaults to 0.0.
The application may query this parameter's supported range. However, the range is fixed as 0.0...1.0.
#define VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL |
The amount of noise reduction algorithm to apply.
This attribute's type is float.
This parameter defaults to 0.0, which equates to no noise reduction.
The application may query this parameter's supported range. However, the range is fixed as 0.0...1.0.
#define VDP_VIDEO_MIXER_ATTRIBUTE_SHARPNESS_LEVEL |
The amount of sharpening, or blurring, to apply.
This attribute's type is float.
This parameter defaults to 0.0, which equates to no sharpening.
Positive values request sharpening. Negative values request blurring.
The application may query this parameter's supported range. However, the range is fixed as -1.0...1.0.
#define VDP_VIDEO_MIXER_ATTRIBUTE_SKIP_CHROMA_DEINTERLACE |
Whether de-interlacers should operate solely on luma, and bob chroma.
Note: This attribute only affects advanced de-interlacing algorithms, not bob or weave.
This attribute's type is uint8_t.
This parameter defaults to 0.
The application may query this parameter's supported range. However, the range is fixed as 0 (no/off) ... 1 (yes/on).
#define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL |
A VdpVideoMixerFeature.
When requested and enabled, motion adaptive temporal deinterlacing will be used on interlaced content.
When multiple de-interlacing options are requested and enabled, the back-end implementation chooses the best algorithm to apply.
#define VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL |
A VdpVideoMixerFeature.
When requested and enabled, this enables a more advanced version of temporal de-interlacing, that additionally uses edge-guided spatial interpolation.
When multiple de-interlacing options are requested and enabled, the back-end implementation chooses the best algorithm to apply.
#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 |
A VdpVideoMixerFeature.
A VDPAU implementation may support multiple scaling algorithms of differing quality, and may potentially support a different subset of algorithms on different hardware.
In some cases, higher quality algorithms may require more resources (memory size, memory bandwidth, etc.) to operate. Hence, these high quality algorithms must be explicitly requested and enabled by the client application. This allows applications operating in a resource-constrained environment to have some level of control over resource usage.
Basic scaling is always built into any video mixer, and is known as level 0. Scaling quality increases beginning with optional level 1, through optional level 9.
If an application requests and enables multiple high quality scaling algorithms, the highest level enabled scaling algorithm will be used.
#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L2 |
A VdpVideoMixerFeature.
See VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3 |
A VdpVideoMixerFeature.
See VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L4 |
A VdpVideoMixerFeature.
See VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5 |
A VdpVideoMixerFeature.
See VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L6 |
A VdpVideoMixerFeature.
See VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L7 |
A VdpVideoMixerFeature.
See VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L8 |
A VdpVideoMixerFeature.
See VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
#define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L9 |
A VdpVideoMixerFeature.
See VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
#define VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE |
A VdpVideoMixerFeature.
When requested and enabled, cadence detection will be enabled on interlaced content and the video mixer will try to extract progressive frames from pull-down material.
#define VDP_VIDEO_MIXER_FEATURE_LUMA_KEY |
A VdpVideoMixerFeature.
When requested and enabled, the alpha of the rendered surface, which is normally set to the alpha of the background color, will be forced to 0.0 on pixels corresponding to source video surface luminance values in the range specified by attributes VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MIN_LUMA to VDP_VIDEO_MIXER_ATTRIBUTE_LUMA_KEY_MAX_LUMA. This keying is performed after scaling and de-interlacing.
#define VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION |
A VdpVideoMixerFeature.
When requested and enabled, a noise reduction algorithm will be applied to the video.
#define VDP_VIDEO_MIXER_FEATURE_SHARPNESS |
A VdpVideoMixerFeature.
When requested and enabled, a sharpening algorithm will be applied to the video.
#define VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE |
The chroma type of the input video surfaces the will process.
This parameter's type is VdpChromaType.
If not specified, this parameter defaults to VDP_CHROMA_TYPE_420.
The application may not query this application's supported range, since it is a potentially disjoint enumeration.
#define VDP_VIDEO_MIXER_PARAMETER_LAYERS |
The number of auxiliary layers in the mixer's compositing model.
Note that this indicates the maximum number of layers that may be processed by a given VdpVideoMixer object. Each individual VdpVideoMixerRender invocation may choose to use a different number of actual layers, from 0 up to this limit.
This attribute's type is uint32_t.
If not specified, this parameter defaults to 0.
The application may query this parameter's supported range.
#define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_HEIGHT |
The exact height of input video surfaces.
This parameter's type is uint32_t.
This parameter defaults to 0 if not specified, which entails that it must be specified.
The application may query this parameter's supported range.
#define VDP_VIDEO_MIXER_PARAMETER_VIDEO_SURFACE_WIDTH |
The exact width of input video surfaces.
This parameter's type is uint32_t.
This parameter defaults to 0 if not specified, which entails that it must be specified.
The application may query this parameter's supported range.
typedef uint32_t VdpVideoMixer |
An opaque handle representing a VdpVideoMixer object.
typedef uint32_t VdpVideoMixerAttribute |
An adjustable attribute of VdpVideoMixer operation.
Various attributes of VdpVideoMixer operation may be adjusted at any time. Each attribute is named via a specific VdpVideoMixerAttribute value.
Each attribute has a specific type, and specific default value if not specified at VdpVideoMixer creation time. The application may query the legal supported range for some attributes.
typedef VdpStatus VdpVideoMixerCreate(VdpDevice device,uint32_t feature_count, VdpVideoMixerFeature const *features,uint32_t parameter_count, VdpVideoMixerParameter const *parameters, void const *const *parameter_values,VdpVideoMixer *mixer) |
Create a VdpVideoMixer.
[in] | device | The device that will contain the mixer. |
[in] | feature_count | The number of features to request. |
[in] | features | The list of features to request. |
[in] | parameter_count | The number of parameters to set. |
[in] | parameters | The list of parameters to set. |
[in] | parameter_values | The values for the parameters. Note that each entry in the value array is a pointer to the actual value. In other words, the values themselves are not cast to "void *" and passed "inside" the array. |
[out] | mixer | The new mixer's handle. |
Initially, all requested features will be disabled. They can be enabled using VdpVideoMixerSetFeatureEnables.
Initially, all attributes will have default values. Values can be changed using VdpVideoMixerSetAttributeValues.
typedef VdpStatus VdpVideoMixerDestroy(VdpVideoMixer mixer) |
Destroy a VdpVideoMixer.
[in] | device | The device to destroy. |
typedef uint32_t VdpVideoMixerFeature |
A VdpVideoMixer feature that must be requested at creation time to be used.
Certain advanced VdpVideoMixer features are optional, and the ability to use those features at all must be requested when the VdpVideoMixer object is created. Each feature is named via a specific VdpVideoMixerFeature value.
Once requested, these features are permanently available within that specific VdpVideoMixer object. All features that are not explicitly requested at creation time default to being permanently unavailable.
Even when requested, all features default to being initially disabled. However, applications can subsequently enable and disable features at any time. See VdpVideoMixerSetFeatureEnables.
Some features allow configuration of their operation. Each configurable item is an VdpVideoMixerAttribute. These attributes may be manipulated at any time using VdpVideoMixerSetAttributeValues.
typedef VdpStatus VdpVideoMixerGetAttributeValues(VdpVideoMixer mixer, uint32_t attribute_count, VdpVideoMixerAttribute const *attributes,void *const *attribute_values) |
Retrieve current attribute values.
[in] | mixer | The mixer to manipulate. |
[in] | attribute_count | The number of attributes to query. |
[in] | attributes | The list of attributes to query. |
[out] | attribute_values | The list of current values for the attributes. Note that each entry in the value array is a pointer to storage that will receive the actual value. If the attribute's type is a pointer itself, please closely read the documentation for that attribute type for any other data passing requirements. |
typedef VdpStatus VdpVideoMixerGetFeatureEnables(VdpVideoMixer mixer, uint32_t feature_count, VdpVideoMixerFeature const *features,VdpBool *feature_enables) |
Retrieve whether features are enabled.
[in] | mixer | The mixer to manipulate. |
[in] | feature_count | The number of features to query. |
[in] | features | The list of features to query. |
[out] | feature_enabled | A list of values indicating whether the feature is enabled. |
typedef VdpStatus VdpVideoMixerGetFeatureSupport(VdpVideoMixer mixer, uint32_t feature_count, VdpVideoMixerFeature const *features,VdpBool *feature_supports) |
Retrieve whether features were requested at creation time.
[in] | mixer | The mixer to query. |
[in] | feature_count | The number of features to query. |
[in] | features | The list of features to query. |
[out] | feature_supported | A list of values indicating whether the feature was requested, and hence is available. |
typedef VdpStatus VdpVideoMixerGetParameterValues(VdpVideoMixer mixer, uint32_t parameter_count, VdpVideoMixerParameter const *parameters,void *const *parameter_values) |
Retrieve parameter values given at creation time.
[in] | mixer | The mixer to manipulate. |
[in] | parameter_count | The number of parameters to query. |
[in] | parameters | The list of parameters to query. |
[out] | parameter_values | The list of current values for the parameters. Note that each entry in the value array is a pointer to storage that will receive the actual value. If the attribute's type is a pointer itself, please closely read the documentation for that attribute type for any other data passing requirements. |
typedef uint32_t VdpVideoMixerParameter |
A VdpVideoMixer creation parameter.
When a VdpVideoMixer is created, certain parameters may be supplied. Each parameter is named via a specific VdpVideoMixerParameter value.
Each parameter has a specific type, and specific default value if not specified at VdpVideoMixer creation time. The application may query the legal supported range for some parameters.
typedef VdpStatus VdpVideoMixerQueryAttributeSupport(VdpDevice device, VdpVideoMixerAttribute attribute,VdpBool *is_supported) |
Query the implementation's support for a specific attribute.
[in] | device | The device to query. |
[in] | feature | The feature for which support is to be queried. |
[out] | is_supported | Is the specified feature supported? |
typedef VdpStatus VdpVideoMixerQueryAttributeValueRange(VdpDevice device, VdpVideoMixerAttribute attribute,void *min_value, void *max_value) |
Query the implementation's supported for a specific attribute.
[in] | device | The device to query. |
[in] | attribute | The attribute for which support is to be queried. |
[out] | min_value | The minimum supported value. |
[out] | max_value | The maximum supported value. |
typedef VdpStatus VdpVideoMixerQueryFeatureSupport(VdpDevice device, VdpVideoMixerFeature feature,VdpBool *is_supported) |
Query the implementation's support for a specific feature.
[in] | device | The device to query. |
[in] | feature | The feature for which support is to be queried. |
[out] | is_supported | Is the specified feature supported? |
typedef VdpStatus VdpVideoMixerQueryParameterSupport(VdpDevice device, VdpVideoMixerParameter parameter,VdpBool *is_supported) |
Query the implementation's support for a specific parameter.
[in] | device | The device to query. |
[in] | parameter | The parameter for which support is to be queried. |
[out] | is_supported | Is the specified parameter supported? |
typedef VdpStatus VdpVideoMixerQueryParameterValueRange(VdpDevice device, VdpVideoMixerParameter parameter,void *min_value, void *max_value) |
Query the implementation's supported for a specific parameter.
[in] | device | The device to query. |
[in] | parameter | The parameter for which support is to be queried. |
[out] | min_value | The minimum supported value. |
[out] | max_value | The maximum supported value. |
typedef VdpStatus VdpVideoMixerRender(VdpVideoMixer mixer, VdpOutputSurface background_surface, VdpRect const *background_source_rect, VdpVideoMixerPictureStructure current_picture_structure, uint32_t video_surface_past_count, VdpVideoSurface const *video_surface_past, VdpVideoSurface video_surface_current, uint32_t video_surface_future_count, VdpVideoSurface const *video_surface_future, VdpRect const *video_source_rect, VdpOutputSurface destination_surface, VdpRect const *destination_rect, VdpRect const *destination_video_rect, uint32_t layer_count, VdpLayer const *layers) |
Perform a video post-processing and compositing operation.
[in] | mixer | The mixer object that will perform the mixing/rendering operation. |
[in] | background_surface | A background image. If set to any value other than VDP_INVALID_HANDLE, the specific surface will be used instead of the background color as the first layer in the mixer's compositing process. |
[in] | background_source_rect | When background_surface is specified, this parameter indicates the portion of background_surface that will be used as the background layer. The specified region will be extracted and scaled to match the size of destination_rect. If NULL, the entire background_surface will be used. |
[in] | current_picture_structure | The picture structure of the field/frame to be processed. This field/frame is presented in the video_surface_current parameter. If frame, then all video_surface_* parameters are assumed to be frames. If field, then all video_surface_* parameters are assumed to be fields, with alternating top/bottom-ness derived from video_surface_current. |
[in] | video_surfaces_past_count | The number of provided fields/frames prior to the current picture. |
[in] | video_surfaces_past | The fields/frames prior to the current field/frame. Note that array index 0 is the field/frame temporally nearest to the current field/frame, with increasing array indices used for older frames. Unavailable entries may be set to VDP_INVALID_HANDLE. |
[in] | video_surface_current | The field/frame to be processed. |
[in] | video_surfaces_future_count | The number of provided fields/frames following the current picture. |
[in] | video_surfaces_future | The fields/frames that follow the current field/frame. Note that array index 0 is the field/frame temporally nearest to the current field/frame, with increasing array indices used for newer frames. Unavailable entries may be set to VDP_INVALID_HANDLE. |
[in] | video_source_rect | The sub-rectangle of the source video surface to extract and process. If NULL, the entire surface will be used. Left/right and/or top/bottom co-ordinates may be swapped to flip the source. Values from outside the video surface are valid and samples at those locations will be taken from the nearest edge. |
[in] | destination_surface | |
[in] | destination_rect | The sub-rectangle of the destination surface to modify. Note that rectangle clips all other actions. |
[in] | destination_video_rect | The sub-rectangle of the destination surface that will contain the processed video. This rectangle is relative to the entire destination surface. This rectangle is clipped by destination_rect. If NULL, the destination rectangle will be sized to match the source rectangle, and will be located at the origin. |
[in] | layer_count | The number of additional layers to composite above the video. |
[in] | layers | The array of additional layers to composite above the video. |
For a complete discussion of how to use this API, please see Video Mixer Usage.
typedef VdpStatus VdpVideoMixerSetAttributeValues(VdpVideoMixer mixer, uint32_t attribute_count, VdpVideoMixerAttribute const *attributes, void const *const *attribute_values) |
Set attribute values.
[in] | mixer | The mixer to manipulate. |
[in] | attribute_count | The number of attributes to set. |
[in] | attributes | The list of attributes to set. |
[in] | attribute_values | The values for the attributes. Note that each entry in the value array is a pointer to the actual value. In other words, the values themselves are not cast to "void *" and passed "inside" the array. A NULL pointer requests that the default value be set for that attribute. |
typedef VdpStatus VdpVideoMixerSetFeatureEnables(VdpVideoMixer mixer, uint32_t feature_count, VdpVideoMixerFeature const *features, VdpBool const *feature_enables) |
Enable or disable features.
[in] | mixer | The mixer to manipulate. |
[in] | feature_count | The number of features to enable/disable. |
[in] | features | The list of features to enable/disable. |
[in] | feature_enables | The list of new feature enable values. |
The structure of the picture present in a VdpVideoSurface.