DXVADDI_AYUVSAMPLE16
TOC
Collapse the table of content
Expand the table of content

DXVADDI_AYUVSAMPLE16 structure

The DXVADDI_AYUVSAMPLE16 structure describes 16-bit Cr, Cb, and Y color values and an associated opacity.

Syntax


typedef struct _DXVADDI_AYUVSAMPLE16 {
  USHORT Cr;
  USHORT Cb;
  USHORT Y;
  USHORT Alpha;
} DXVADDI_AYUVSAMPLE16;

Members

Cr

[in] A 16-bit chrominance (V) sample value.

Cb

[in] A 16-bit chrominance (U) sample value.

Y

[in] A 16-bit luminance (Y) sample value.

Alpha

[in] The 16-bit opacity of the pixel when it is used as a source graphic for blending with another picture.

Remarks

A value of 0 in the Alpha member indicates that the pixel is transparent (so that the other entries have no effect on the resulting blended picture), and a value of 255 indicates that the pixel is opaque (so that the other entries completely determine the value of the resulting blended picture sample).

For nonzero values of Alpha, the blend to use is calculated by the following expression:


( ( ( (Alpha + 1) x (graphic value) ) + ( (255 - Alpha) x (picture value) ) )  + 128 ) >> 8

If Alpha is 0, the specified blend to use is the picture value without alteration.

The color value is scaled according to ITU-R Rec. BT.601, which you can learn about from the International Telecommunication Union website. Therefore, the color black is nominally specified by Y=16, Cb=Cr=128, and the color white is nominally specified by Y=235, Cb=Cr=128.

Note   If the alpha-blending surface originates as a DVD video subpicture, the preferred method for converting from the 4-bit alpha that is used by DVD video to the 8-bit alpha that is specified by Alpha is to map a 4-bit alpha value of zero to an 8-bit alpha value of zero and to convert all of the nonzero 4-bit alphas to 8-bit alphas by performing a left shift of four places and adding the constant 15.
 

The width and height of the AYUV alpha-blending surface are specified in the associated buffer description list that is defined by the DXVADDI_DECODEBUFFERDESC structure.

Requirements

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3dumddi.h (include D3dumddi.h)

See also

DXVADDI_DECODEBUFFERDESC
DXVADDI_VIDEODESC

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft