P010 stores ten-bit YUV samples in sixteen-bit words. The word width describes storage, while the format’s ten-bit precision describes the significant sample values. Reading a sixteen-bit allocation as evidence of sixteen-bit picture precision confuses these two properties and can produce incorrect sample values during a surface conversion.
Locate the significant bits
Microsoft’s higher-precision YUV format documentation places the ten significant bits in the upper part of each sixteen-bit word, with the low six bits zero. The words are little-endian. Thus a logical ten-bit sample is shifted left by six positions for storage. Reading it requires interpreting the word’s byte order and then the significant-bit placement; simply taking either byte independently does not recover the ten-bit component.
Convert a concrete sample
An illustrative ten-bit value of 512 becomes 512 × 64 = 32,768, or hexadecimal 0x8000, in its P010 word. In little-endian byte order those bytes are 0x00 followed by 0x80. Shifting the interpreted word right by six recovers 512. A converter that keeps only the low ten bits would obtain the wrong result. The value in this example is a component code, not a statement about the display’s emitted luminance.
Keep the surface arrangement
P010 places the Y words first and follows them with interleaved U and V words. The combined chroma plane has half as many lines as luma and the same stride. P016 shares that memory arrangement but uses sixteen-bit component precision. Microsoft notes that matching layouts allow useful precision conversions, while also requiring valid sixteen-bit data to be identified as a sixteen-bit surface. A common allocation does not make the format declaration optional.
Report precision and allocation independently
A surface inventory should include P010, logical precision, sixteen-bit storage words, byte order, plane arrangement and actual stride. The byte footprint is not the same as tightly packing successive ten-bit samples with no spare bits. Padding can increase it further. These distinctions make a buffer export interpretable and prevent a decoder-facing conversion from silently treating storage width, color precision and plane offsets as one undifferentiated ‘bit depth’ property.
