Expand Minimize

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 pixel
  • Cs = The color value of the source pixel
  • As = The per-pixel source alpha
  • Ap = The planar alpha value
  • Ae = 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.

Windows Phone 8: This API is supported.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

D3d11.h

See also

ID3D11VideoContext

 

 

Community Additions

ADD
Show:
© 2014 Microsoft