Emby Emby Emby Learn
  • Emby Home
  • Video
  • Audio
  • Media Files
    • Subtitles and captions
    • Photos and images
    • Metadata and discovery
    • Libraries and media collections
    • Playback and streaming
    • Media hardware acceleration
    • Displays and AV connections
    • Live TV and recording
  1. Emby Learn
  2. Video
  3. Color and pixel formats
  4. Pixel layouts
  5. P010
Search Results for

    Show / Hide Table of Contents

    P010 Pixel Format

    P010 stores 10-bit 4:2:0 video in 16-bit words, with a luma plane and an interleaved Cb/Cr plane.

    The ten meaningful bits of a P010 sample occupy the high end of a sixteen-bit word; its little-endian bytes are shown separately.

    P010 gives every 10-bit component sample a 16-bit storage word. The ten meaningful bits occupy bits 15 through 6, with the low six bits zero in the defined representation. In the little-endian P010 layout described here, the low byte is stored first.

    For the illustrated sample 940, shifting the sample left by six positions gives 940 × 64 = 60,160 = 0xEB00. Its two bytes, in increasing address order, are 0x00, 0xEB.

    A processing format for ten-bit values

    P010 and a fully planar 10-bit format can represent equivalent component values while organizing and aligning their bits differently. A conversion between them moves and places the values correctly. It does not need to reduce their ten-bit precision.

    In an Emby processing description, P010 can identify a working surface used after decoding or between filters and an encoder. It describes the sample layout at that boundary. The color description establishes whether those samples represent SDR, PQ, HLG, or another intended interpretation. Those properties together determine the next stage's reading and processing of the picture.

    Sample numbers and stored words

    10-bit sample value Stored 16-bit word Bytes, low address first
    64 4,096 = 0x1000 00 10
    512 32,768 = 0x8000 00 80
    513 32,832 = 0x8040 40 80
    940 60,160 = 0xEB00 00 EB

    These codes include common limited-range black, neutral chroma, and nominal white values. The example 513 also shows that increasing the sample by one increases its stored word by 64, not one.

    Reading a P010 word as an ordinary unshifted 10-bit sample consequently produces the wrong value. A CPU reader of this defined representation obtains the code by shifting the word right by six. The value's range interpretation is a subsequent calculation.

    Two planes, wider elements

    P010 retains the semiplanar organization familiar from NV12: all Y samples in one plane and interleaved Cb/Cr samples in another. For an even W × H picture, each chroma component has W/2 × H/2 samples.

    A 4 × 2 picture has eight Y words and four chroma words, or 24 active bytes. With a tight 8-byte pitch, Y rows start at offsets 0 and 8; the interleaved chroma row starts at 16. Its Cb0, Cr0, Cb1, Cr1 words start at byte offsets 16, 18, 20, and 22.

    The active byte width of a Y row is 2W. A chroma row holds W/2 pairs, each four bytes, so its active width is also 2W. Padding or extra allocated rows can enlarge a real surface; the API's supplied strides and offsets describe that allocation.

    See Also

    • NV12 Pixel Format
    • Pixel Formats and Memory Layout
    • Video Bit Depth
    • Video Color Tags and Signaling

    References

    • Microsoft: 10-bit and 16-bit YUV formats, including P010
    • Linux V4L2: P010 significant bits and byte order
    • FFmpeg 8.1: P010 and planar 10-bit format definitions
    On this Page
    2026 © EMBY LLC. Please see our terms of use and privacy policy.
    Back to Top