关于10位YUV数据格式调研整理

10bit and 16-bit YUV video format

微软操作系统中的10bit和16bit存储方式

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.)
由于相同YUV格式的10位和16位表示具有相同的内存布局,因此可以将10位表示转换为16位表示,而不会丢失精度。也可以将16位表示转换为10位表示。(然而,Y416和Y410格式是此一般规则的例外,因为它们不共享相同的内存布局。)

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.
当图形硬件读取包含10位表示的曲面时,应忽略每个通道的低阶6位。但是,如果曲面包含有效的16位数据,则应将其标识为16位曲面。

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.
对于视频内存中的图像,图形驱动程序选择曲面的内存对齐方式。曲面必须与DWORD对齐。也就是说,虽然对齐可以大于32位,但曲面内的各条线保证从32位边界开始。原点(0,0)始终是曲面的左上角。

The FOURCC codes for the formats described here use the following convention:

  1. If the format is planar, the first character in the FOURCC code is ‘P’. If the format is packed, the first character is ‘Y’.
  2. The second character in the FOURCC code is determined by the chroma sampling, as shown in the following table.
Chroma sampling FOURCC code letter
4:4:4 ‘4’
4:2:2 ‘2’
4:2:1 ‘1’
4:2:0 ‘0’
  1. 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.

FOURCC Description
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.

参考文档:
https://docs.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats?redirectedfrom=MSDN#_420formats


文章作者: YUV420.COM
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 YUV420.COM !
评论
 上一篇
BCompare软件MAC版本免注册破解方法 BCompare软件MAC版本免注册破解方法
BCompare 最好用的对比工具软件。本文记录了通过修改脚本方式,在MAC上免注册破解使用。亲测可用。 原理Beyond Compare每次启动后会先检查注册信息,试用期到期后就不能继续使用。解决方法是在启动前,先删除注册信息,然后再启动
2020-02-19
下一篇 
音频技术基础H264编码入门理解 音频技术基础H264编码入门理解
写在前面 最近入门音视频技术,一直在学习H264编解码标准,了解了不少关于H264的相关知识,对于网上各种类型的资料,始终没有找到一篇适合的知识梳理资料。可能是查找方式不对,所以花费了比较多的时间。经过一段时间的熟悉后结合网上各类大神的指
2020-02-10
  目录