Home

YV12

YV12 is a planar video pixel format used to store color frames. It represents luma (Y) and chrominance components (V and U) separately with 4:2:0 chroma subsampling. In YV12, the Y plane contains width × height samples of luma at full resolution. The chroma planes V and U each contain (width/2) × (height/2) samples. The data is stored as three separate planes in memory: first the Y plane, then the V plane, and finally the U plane. This ordering (Y, V, U) distinguishes YV12 from I420, which stores the chroma planes in the order U then V.

Because of 4:2:0 subsampling, chroma resolution is reduced by a factor of 2 in both horizontal and

YV12 is widely used as a raw video pixel format in software libraries and codecs, including FFmpeg/Libav,

Applications include video decoding and processing pipelines for formats such as MPEG-2, MPEG-4 part2, and H.264

vertical
directions;
total
bytes
per
frame
equal
width
×
height
plus
half
of
that
for
chroma
planes
(1.5
×
width
×
height).
where
it
is
represented
as
AV_PIX_FMT_YV12
or
PIX_FMT_YV12.
It
is
a
planar
format,
as
opposed
to
packed
formats
like
YUYV
or
semi-planar
like
NV12,
where
chroma
is
interleaved.
in
4:2:0,
typically
when
uncompressed
frames
are
needed
for
processing.
YV12
is
common
for
8-bit
depth;
variants
exist
for
other
bit
depths,
though
they
may
use
different
names.