ID3D11VideoContext::VideoProcessorSetStreamAlpha method
Sets the planar alpha for an input stream on the video processor.
Syntax
void VideoProcessorSetStreamAlpha( [in] ID3D11VideoProcessor *pVideoProcessor, [in] UINT StreamIndex, [in] BOOL Enable, [in] FLOAT Alpha );
Parameters
- pVideoProcessor [in]
-
A pointer to the ID3D11VideoProcessor interface. To get this pointer, call ID3D11VideoDevice::CreateVideoProcessor.
- StreamIndex [in]
-
The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.
- Enable [in]
-
Specifies whether alpha blending is enabled.
- Alpha [in]
-
The planar alpha value. The value can range from 0.0 (transparent) to 1.0 (opaque). If Enable is FALSE, this parameter is ignored.
Return value
This method does not return a value.
Remarks
To use this feature, the driver must support stereo video, indicated by the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALHPA_STREAM capability flag. To query for this capability, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps.
Alpha blending is disabled by default.
For each pixel, the destination color value is computed as follows:
Cd = Cs * (As * Ap * Ae) + Cd * (1.0 - As * Ap * Ae)
where:
Cd= The color value of the destination pixelCs= The color value of the source pixelAs= The per-pixel source alphaAp= The planar alpha valueAe= The palette-entry alpha value, or 1.0 (see Note)
The destination alpha value is computed according to the alpha fill mode. For more information, see ID3D11VideoContext::VideoProcessorSetOutputAlphaFillMode.
Requirements
|
Minimum supported client |
Windows 8 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2012 [desktop apps | Windows Store apps] |
|
Minimum supported phone |
Windows Phone 8 |
|
Header |
|
See also