Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Specifies the planar alpha value for an input stream, when using Microsoft DirectX Video Acceleration High Definition (DXVA-HD).
Syntax
typedef struct _DXVAHD_STREAM_STATE_ALPHA_DATA {
BOOL Enable;
FLOAT Alpha;
} DXVAHD_STREAM_STATE_ALPHA_DATA;
Members
Enable
If TRUE, alpha blending is enabled. Otherwise, alpha blending is disabled. The default state value is FALSE.
Alpha
Specifies the planar alpha value as a floating-point number from 0.0 (transparent) to 1.0 (opaque).
If the Enable member is FALSE, this member is ignored.
Remarks
For each pixel, the destination color value is computed as follows:
Cd = Cs * (As * Ap * Ae) + Cd * (1.0 - As * Ap * Ae)
where
Cd= Color value of the destination pixel.Cs= Color value of source pixel.As= Per-pixel source alpha.Ap= Planar alpha value.Ae= Palette-entry alpha value, or 1.0 (see Note).
To get the device capabilities, call IDXVAHD_Device::GetVideoProcessorDeviceCaps and check the FeatureCaps member of the DXVAHD_VPDEVCAPS structure.
Examples
HRESULT DXVAHD_SetPlanarAlpha(
IDXVAHD_VideoProcessor *pVP,
UINT stream,
BOOL bEnable,
float fAlpha
)
{
DXVAHD_STREAM_STATE_ALPHA_DATA alpha = { bEnable, fAlpha };
HRESULT hr = pVP->SetVideoProcessStreamState(
stream,
DXVAHD_STREAM_STATE_ALPHA,
sizeof(alpha),
&alpha
);
return hr;
}
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 7 [desktop apps only] |
| Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
| Header | dxvahd.h |