18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci.. _V4L2-PIX-FMT-NV24:
48c2ecf20Sopenharmony_ci.. _V4L2-PIX-FMT-NV42:
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci******************************************************
78c2ecf20Sopenharmony_ciV4L2_PIX_FMT_NV24 ('NV24'), V4L2_PIX_FMT_NV42 ('NV42')
88c2ecf20Sopenharmony_ci******************************************************
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciV4L2_PIX_FMT_NV42
118c2ecf20Sopenharmony_ciFormats with full horizontal and vertical chroma resolutions, also known
128c2ecf20Sopenharmony_cias YUV 4:4:4. One luminance and one chrominance plane with alternating
138c2ecf20Sopenharmony_cichroma samples as opposed to ``V4L2_PIX_FMT_YVU420``
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciDescription
178c2ecf20Sopenharmony_ci===========
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciThese are two-plane versions of the YUV 4:4:4 format. The three
208c2ecf20Sopenharmony_cicomponents are separated into two sub-images or planes. The Y plane is
218c2ecf20Sopenharmony_cifirst, with each Y sample stored in one byte per pixel. For
228c2ecf20Sopenharmony_ci``V4L2_PIX_FMT_NV24``, a combined CbCr plane immediately follows the Y
238c2ecf20Sopenharmony_ciplane in memory. The CbCr plane has the same width and height, in
248c2ecf20Sopenharmony_cipixels, as the Y plane (and the image). Each line contains one CbCr pair
258c2ecf20Sopenharmony_ciper pixel, with each Cb and Cr sample stored in one byte.
268c2ecf20Sopenharmony_ci``V4L2_PIX_FMT_NV42`` is the same except that the Cb and Cr samples are
278c2ecf20Sopenharmony_ciswapped, the CrCb plane starts with a Cr sample.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciIf the Y plane has pad bytes after each row, then the CbCr plane has
308c2ecf20Sopenharmony_citwice as many pad bytes after its rows.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci**Byte Order.**
338c2ecf20Sopenharmony_ciEach cell is one byte.
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci.. flat-table::
378c2ecf20Sopenharmony_ci    :header-rows:  0
388c2ecf20Sopenharmony_ci    :stub-columns: 0
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci    * - start + 0:
418c2ecf20Sopenharmony_ci      - Y'\ :sub:`00`
428c2ecf20Sopenharmony_ci      - Y'\ :sub:`01`
438c2ecf20Sopenharmony_ci      - Y'\ :sub:`02`
448c2ecf20Sopenharmony_ci      - Y'\ :sub:`03`
458c2ecf20Sopenharmony_ci    * - start + 4:
468c2ecf20Sopenharmony_ci      - Y'\ :sub:`10`
478c2ecf20Sopenharmony_ci      - Y'\ :sub:`11`
488c2ecf20Sopenharmony_ci      - Y'\ :sub:`12`
498c2ecf20Sopenharmony_ci      - Y'\ :sub:`13`
508c2ecf20Sopenharmony_ci    * - start + 8:
518c2ecf20Sopenharmony_ci      - Y'\ :sub:`20`
528c2ecf20Sopenharmony_ci      - Y'\ :sub:`21`
538c2ecf20Sopenharmony_ci      - Y'\ :sub:`22`
548c2ecf20Sopenharmony_ci      - Y'\ :sub:`23`
558c2ecf20Sopenharmony_ci    * - start + 12:
568c2ecf20Sopenharmony_ci      - Y'\ :sub:`30`
578c2ecf20Sopenharmony_ci      - Y'\ :sub:`31`
588c2ecf20Sopenharmony_ci      - Y'\ :sub:`32`
598c2ecf20Sopenharmony_ci      - Y'\ :sub:`33`
608c2ecf20Sopenharmony_ci    * - start + 16:
618c2ecf20Sopenharmony_ci      - Cb\ :sub:`00`
628c2ecf20Sopenharmony_ci      - Cr\ :sub:`00`
638c2ecf20Sopenharmony_ci      - Cb\ :sub:`01`
648c2ecf20Sopenharmony_ci      - Cr\ :sub:`01`
658c2ecf20Sopenharmony_ci      - Cb\ :sub:`02`
668c2ecf20Sopenharmony_ci      - Cr\ :sub:`02`
678c2ecf20Sopenharmony_ci      - Cb\ :sub:`03`
688c2ecf20Sopenharmony_ci      - Cr\ :sub:`03`
698c2ecf20Sopenharmony_ci    * - start + 24:
708c2ecf20Sopenharmony_ci      - Cb\ :sub:`10`
718c2ecf20Sopenharmony_ci      - Cr\ :sub:`10`
728c2ecf20Sopenharmony_ci      - Cb\ :sub:`11`
738c2ecf20Sopenharmony_ci      - Cr\ :sub:`11`
748c2ecf20Sopenharmony_ci      - Cb\ :sub:`12`
758c2ecf20Sopenharmony_ci      - Cr\ :sub:`12`
768c2ecf20Sopenharmony_ci      - Cb\ :sub:`13`
778c2ecf20Sopenharmony_ci      - Cr\ :sub:`13`
788c2ecf20Sopenharmony_ci    * - start + 32:
798c2ecf20Sopenharmony_ci      - Cb\ :sub:`20`
808c2ecf20Sopenharmony_ci      - Cr\ :sub:`20`
818c2ecf20Sopenharmony_ci      - Cb\ :sub:`21`
828c2ecf20Sopenharmony_ci      - Cr\ :sub:`21`
838c2ecf20Sopenharmony_ci      - Cb\ :sub:`22`
848c2ecf20Sopenharmony_ci      - Cr\ :sub:`22`
858c2ecf20Sopenharmony_ci      - Cb\ :sub:`23`
868c2ecf20Sopenharmony_ci      - Cr\ :sub:`23`
878c2ecf20Sopenharmony_ci    * - start + 40:
888c2ecf20Sopenharmony_ci      - Cb\ :sub:`30`
898c2ecf20Sopenharmony_ci      - Cr\ :sub:`30`
908c2ecf20Sopenharmony_ci      - Cb\ :sub:`31`
918c2ecf20Sopenharmony_ci      - Cr\ :sub:`31`
928c2ecf20Sopenharmony_ci      - Cb\ :sub:`32`
938c2ecf20Sopenharmony_ci      - Cr\ :sub:`32`
948c2ecf20Sopenharmony_ci      - Cb\ :sub:`33`
958c2ecf20Sopenharmony_ci      - Cr\ :sub:`33`
96