This topic describes the 10- and 16-bit YUV formats that are recommended for capturing, processing, and displaying video in the Microsoft Windows operating system.
这个主题描述了10 -推荐用于捕获和16位YUV格式,处理和显示视频在Microsoft Windows操作系统。
The 16-bit representations described here use little-endian WORD values for each channel. The 10-bit formats also use 16 bits for each channel, with the lowest 6 bits set to zero, as shown in the following diagram.
这里描述的16位表示为每个通道使用little - endian词值。10位格式也使用16位每通道,最低的6位设置为0,如下列图所示。
Because the 10-bit and 16-bit representations of the same YUV format have the same memory layout, it is possible to cast a 10-bit representation to a 16-representation with no loss of precision. It is also possible to cast a 16-bit representation down to a 10-bit representation. (The Y416 and Y410 formats are an exception to this general rule, however, because they do not share the same memory layout.)
When the graphics hardware reads a surface that contains a 10-bit representation, it should ignore the low-order 6 bits of each channel. If a surface contains valid 16-bit data, however, it should be identified as a 16-bit surface.
For images in video memory, the graphics driver selects the memory alignment of the surface. The surface must be DWORD aligned. That is, individual lines within a surface are guaranteed to start at a 32-bit boundary, although the alignment can be larger than 32 bits. The origin (0,0) is always the upper-left corner of the surface.
The FOURCC codes for the formats described here use the following convention:
- If the format is planar, the first character in the FOURCC code is ‘P’. If the format is packed, the first character is ‘Y’.
- The second character in the FOURCC code is determined by the chroma sampling, as shown in the following table.
|Chroma sampling||FOURCC code letter|
- The final two characters in the FOURCC indicate the number of bits per channel, either ‘16’ for 16 bits or ‘10’ for 10 bits.
Using this scheme, the following FOURCC codes have been defined. No 4:2:1 formats for 10-bit or 16-bit YUV have been defined at this time.
|P016||Planar, 4:2:0, 16-bit.|
|P010||Planar, 4:2:0, 10-bit.|
|P216||Planar, 4:2:2, 16-bit.|
|P210||Planar, 4:2:2, 10-bit.|
|Y216||Packed, 4:2:2, 16-bit.|
|Y210||Packed, 4:2:2, 10-bit.|
|Y416||Packed, 4:4:4, 16-bit|
|Y410||Packed, 4:4:4, 10-bit.|