XMColorRGBToYUV_HD 函数 (directxmath.h)

将 RGB 颜色值转换为 YUV HD 颜色值。

语法

XMVECTOR XM_CALLCONV XMColorRGBToYUV_HD(
  [in] FXMVECTOR rgb
) noexcept;

参数

[in] rgb

要转换的颜色值。 X 元素为 Red,Y 元素为 Green,Z 元素为 Blue,W 元素为 Alpha。 每个的范围为 0.0 到 1.0。

返回值

以 Luma-Chrominance (YUV) 又名 YCbCr 返回转换的颜色值。 X 元素包含 Luma (Y, 0.0 到 1.0) ,Y 元素包含 blue-difference chroma (-0.5 到 0.5) ,Z 元素包含 Red-difference chroma (-0.5 到 0.5) ,W 元素包含 alpha (rgb.w) 的副本。

注解

使用 ITU-R BT.709 W (r) = 0.2126 W (b) = 0.0722 U (max) = 0.436 V (max) = 0.615 进行转换。

注意XMColorRGBToYUV_HD 是 DirectXMath 的新增功能,不适用于 XNAMath 2.x。
 

平台要求

Microsoft Visual Studio 2010 或 Microsoft Visual Studio 2012 以及 Windows SDK for Windows 8。 支持 Win32 桌面应用、Windows 应用商店应用和 Windows Phone 8 应用。

要求

要求
目标平台 Windows
标头 directxmath.h

另请参阅

DirectXMath 库颜色函数

XMColorYUVToRGB_HD