A packed layout keeps the components together, with the samples for a small group of
pixels, called a macropixel, in a fixed order. There is one plane, stored row by row. Files
with these layouts more often have an extension such as .yuy2 or
.uyvy, but the .yuv extension is used for them as well.
4:2:2, 8 bits
Each 4-byte macropixel covers two pixels, so a frame takes W × H × 2 bytes and the width must be even.
| FourCC | Byte 0 | Byte 1 | Byte 2 | Byte 3 |
|---|---|---|---|---|
YUY2, YUYV | Y0 | U | Y1 | V |
YVYU | Y0 | V | Y1 | U |
UYVY | U | Y0 | V | Y1 |
VYUY | V | Y0 | U | Y1 |
Y42T | U | Y0 | V | Y1 |
Y42T is UYVY with the lowest bit of each Y sample used as a chroma key,
where 0 is transparent and 1 is opaque.
4:2:2, above 8 bits
These use 16-bit little-endian words in the order Y0, Cb, Y1, Cr, 8 bytes per two pixels.
| FourCC | Bits of value | Value position |
|---|---|---|
Y210 | 10 | bits 15 to 6 |
Y212 | 12 | bits 15 to 4 |
Y216 | 16 | all 16 bits |
4:4:4
| FourCC | Bytes per pixel | Byte order |
|---|---|---|
AYUV | 4 | A, Y, Cb, Cr in V4L2’s AYUV32. Microsoft shows its AYUV only in a diagram |
XYUV | 4 | padding, Y, Cb, Cr |
VUYA | 4 | Cr, Cb, Y, A |
VUYX | 4 | Cr, Cb, Y, padding |
YUVA | 4 | Y, Cb, Cr, A |
YUVX | 4 | Y, Cb, Cr, padding |
YUV3 | 3 | Y, Cb, Cr with no padding (V4L2’s YUV24) |
4:1:1
Y41P stores eight pixels in 12 bytes:
U0 Y0 V0 Y1 U4 Y2 V4 Y3 Y4 Y5 Y6 Y7
A frame takes W × H × 3/2 bytes. Y41T is the same, with the lowest bit of
each Y sample used as a chroma key, as for Y42T.
Other layouts
V4L2 also defines packed formats with fewer than 8 bits per component, such as
YUV565 (YUVP), and the palette-based AI44 is used
for overlay images under Windows. None are known to be saved as plain video files in
practice.
Worked example
Two pixels of YUY2 with luma 80 and 90 and chroma U = 100, V = 150:
00000000 50 64 5A 96
The same pixels in UYVY are 64 50 96 5A.