Home

NV12

NV12 is a YUV 4:2:0 image format commonly used in video processing and hardware acceleration. It is a semi-planar format in which the luma component is stored in one plane, followed by a second plane that contains interleaved chroma components.

In memory, the Y plane occupies width × height bytes. The chroma plane follows and contains width

Commonly 8-bit per sample, though higher bit depths exist in some pipelines. The color space is Y'CbCr,

NV12 is supported by many APIs and formats, including FFmpeg, OpenCV, Android ImageFormat.NV12, and various hardware

Compared to I420 (planar Y, U, V), NV12 reduces the number of memory accesses for chroma and

×
height
/
2
bytes,
arranged
as
alternating
U
and
V
samples
(UVUV
...).
Each
pair
corresponds
to
a
2×2
block
of
luma
samples.
The
chroma
plane
dimensions
are
half
the
width
and
half
the
height
of
the
Y
plane.
with
standard
conversions
to
RGB
used
in
display
pipelines.
NV12
is
widely
used
in
video
decoders,
camera
capture
paths,
and
GPU-accelerated
software.
video
pipelines
on
NVIDIA,
Intel,
and
ARM
platforms.
It
is
related
to
NV21,
which
interleaves
chroma
as
VU
(VU)
instead
of
U,V
(UV).
improves
cache
locality
in
hardware
pipelines,
at
the
cost
of
being
less
convenient
for
software
that
requires
separate
U
and
V
planes.