Sets the planar alpha for an input stream on the video processor.
public:
void VideoProcessorSetStreamAlpha(
ID3D11VideoProcessor *pVideoProcessor,
UINT StreamIndex,
BOOL Enable,
FLOAT Alpha
)
pVideoProcessor
Type: ID3D11VideoProcessor *
[in] A pointer to the ID3D11VideoProcessor interface. To get this pointer, call ID3D11VideoDevice::CreateVideoProcessor.
StreamIndex
Type: UINT
[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
Type: BOOL
[in] Specifies whether alpha blending is enabled.
Alpha
Type: FLOAT
[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.
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)
Note
Palette-entry alpha values apply only to palettized color formats, and only when the device supports the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE capability. Otherwise, this factor equals 1.0.
The destination alpha value is computed according to the alpha fill mode. For more information, see ID3D11VideoContext::VideoProcessorSetOutputAlphaFillMode.
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).