DXGI_COLOR_SPACE_TYPE enumeration
Specifies color space types.
Syntax
typedef enum DXGI_COLOR_SPACE_TYPE { DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 = 0, DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 = 1, DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 = 2, DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 = 3, DXGI_COLOR_SPACE_RESERVED = 4, DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 = 5, DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 = 6, DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 = 7, DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 = 8, DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 = 9, DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 = 10, DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 = 11, DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 = 12, DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020 = 13, DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020 = 14, DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020 = 15, DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020 = 16, DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020 = 17, DXGI_COLOR_SPACE_CUSTOM = 0xFFFFFFFF } DXGI_COLOR_SPACE_TYPE;
Constants
- DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
-
Property Value Colorspace RGB Range 0-255 Gamma 2.2 Siting Image Primaries BT.709 This is the standard definition for sRGB. Note that this is often implemented with a linear segment, but in that case the exponent is corrected to stay aligned with a gamma 2.2 curve. This is usually used with 8 bit and 10 bit color channels.
- DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
-
Property Value Colorspace RGB Range 0-255 Gamma 1.0 Siting Image Primaries BT.709 This is the standard definition for scRGB, and is usually used with 16 bit integer, 16 bit floating point, and 32 bit floating point channels.
- DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709
-
Property Value Colorspace RGB Range 16-235 Gamma 2.2 Siting Image Primaries BT.709 This is the standard definition for ITU-R Recommendation BT.709. Note that due to the inclusion of a linear segment, the transfer curve looks similar to a pure exponential gamma of 1.9. This is usually used with 8 bit and 10 bit color channels.
- DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020
-
Property Value Colorspace RGB Range 16-235 Gamma 2.2 Siting Image Primaries BT.2020 This is usually used with 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_RESERVED
-
Reserved.
- DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601
-
Property Value Colorspace YCbCr Range 0-255 Gamma 2.2 Siting Image Primaries BT.709 Transfer Matrix BT.601 This definition is commonly used for JPG, and is usually used with 8, 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601
-
Property Value Colorspace YCbCr Range 16-235 Gamma 2.2 Siting Video Primaries BT.601 This definition is commonly used for MPEG2, and is usually used with 8, 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601
-
Property Value Colorspace YCbCr Range 0-255 Gamma 2.2 Siting Video Primaries BT.601 This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709
-
Property Value Colorspace YCbCr Range 16-235 Gamma 2.2 Siting Video Primaries BT.709 This definition is commonly used for H.264 and HEVC, and is usually used with 8, 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709
-
Property Value Colorspace YCbCr Range 0-255 Gamma 2.2 Siting Video Primaries BT.709 This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020
-
Property Value Colorspace YCbCr Range 16-235 Gamma 2.2 Siting Video Primaries BT.2020 This definition may be used by HEVC, and is usually used with 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
-
Property Value Colorspace YCbCr Range 0-255 Gamma 2.2 Siting Video Primaries BT.2020 This is usually used with 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
-
Property Value Colorspace RGB Range 0-255 Gamma 2084 Siting Image Primaries BT.2020 This is usually used with 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020
-
Property Value Colorspace YCbCr Range 16-235 Gamma 2084 Siting Video Primaries BT.2020 This is usually used with 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020
-
Property Value Colorspace RGB Range 16-235 Gamma 2084 Siting Image Primaries BT.2020 This is usually used with 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020
-
Property Value Colorspace YCbCr Range 16-235 Gamma 2.2 Siting Video Primaries BT.2020 This is usually used with 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020
-
Property Value Colorspace YCbCr Range 16-235 Gamma 2084 Siting Video Primaries BT.2020 This is usually used with 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020
-
Property Value Colorspace RGB Range 0-255 Gamma 2.2 Siting Image Primaries BT.2020 This is usually used with 10, 12, or 16 bit color channels.
- DXGI_COLOR_SPACE_CUSTOM
-
A custom color definition is used.
Remarks
This enum is used within DXGI in the CheckColorSpaceSupport, SetColorSpace1 and CheckOverlayColorSpaceSupport methods. It is also referenced in D3D11 video methods such as ID3D11VideoContext1::VideoProcessorSetOutputColorSpace1, and D2D methods such as ID2D1DeviceContext2::CreateImageSourceFromDxgi.
The following color parameters are defined:
Colorspace
Defines the color space of the color channel data.
| Defined Values | Notation in color space enumeration | Comments |
| RGB | _RGB_ | The red/green/blue color space color channel. |
| YCbCr | _YCbCr_ | Three channel color model which splits luma (brightness) from chroma (color). YUV technically refers to analog signals and YCbCr to digital, but they are used interchangeably. |
Range
Indicates which integer range corresponds to the floating point [0..1] range of the data. For video, integer YCbCr data with ranges of [16..235] or [8..247] are usually mapped to normalized YCbCr with ranges of [0..1] or [-0.5..0.5].
| Defined_Values | Notation in color space numeration | Comments |
| _FULL_ | PC desktop content and images. |
| _STUDIO_ | Often used in video. Enables the calibration of white and black between displays. |
Gamma
| Defined Values | Notation in color space numeration | Comments |
| 1.0 | _G10_ | Linear light levels. |
| 2.2 | _G22_ | Commonly used for sRGB and BT.709 (linear segment + 2.222). |
| 2084 | _G2084_ | See SMPTE ST.2084 (Perceptual Quantization) |
Siting
"Siting" indicates a horizontal or vertical shift of the chrominance channels relative to the luminance channel. "Cositing" indicates values are sited between pixels in the vertical or horizontal direction (also known as being "sited interstitially").
| Defined Values | Notation in color space enumeration | Comments | For Example |
| Image | _NONE_ | The U and V planes are aligned vertically. | MPEG1, JPG |
| Video | _LEFT_ | Chroma samples are aligned horizontally with the luma samples, or with multiples of the luma samples. The U and V planes are aligned vertically. | MPEG2, MPEG4 |
| Video | _TOPLEFT_ | "Top left" means that the sampling point is the top left pixel (usually of a 2x2 pixel block). Chroma samples are aligned horizontally with the luma samples, or with multiples of the luma samples. Chroma samples are also aligned vertically with the luma samples, or with multiples of the luma samples. | UHD Blu-Ray |
For more information on siting, refer to the MFVideoChromaSubsampling enum.
Primaries
| Defined Values | Notation in color space enumeration | Comments |
| BT.601 | _P601 | Standard defining digital encoding of SDTV video. |
| BT.709 | _P709 | Standard defining digital encoding of HDTV video. |
| BT.2020 | _P2020 | Standard defining ultra-high definition television (UHDTV). |
Transfer Matrix
In most cases, the transfer matrix can be determined from the primaries. For some cases it must be explicitly specified as described below:
| Defined Values | Notation in color space enumeration | Comments |
| BT.601 | _X601 | Standard defining digital encoding of SDTV video. |
| BT.709 | _X709 | Standard defining digital encoding of HDTV video. |
| BT.2020 | _X2020 | Standard defining ultra-high definition television (UHDTV). |
Subsampling and the layout of the color channels are inferred from the surface format.
Requirements
|
Minimum supported client |
Windows 10 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2016 [desktop apps only] |
|
Header |
|
See also