18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci.. _V4L2-PIX-FMT-YUYV:
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci**************************
68c2ecf20Sopenharmony_ciV4L2_PIX_FMT_YUYV ('YUYV')
78c2ecf20Sopenharmony_ci**************************
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciPacked format with ½ horizontal chroma resolution, also known as YUV
118c2ecf20Sopenharmony_ci4:2:2
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciDescription
158c2ecf20Sopenharmony_ci===========
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciIn this format each four bytes is two pixels. Each four bytes is two
188c2ecf20Sopenharmony_ciY's, a Cb and a Cr. Each Y goes to one of the pixels, and the Cb and Cr
198c2ecf20Sopenharmony_cibelong to both pixels. As you can see, the Cr and Cb components have
208c2ecf20Sopenharmony_cihalf the horizontal resolution of the Y component. ``V4L2_PIX_FMT_YUYV``
218c2ecf20Sopenharmony_ciis known in the Windows environment as YUY2.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci**Byte Order.**
248c2ecf20Sopenharmony_ciEach cell is one byte.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci.. flat-table::
308c2ecf20Sopenharmony_ci    :header-rows:  0
318c2ecf20Sopenharmony_ci    :stub-columns: 0
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci    * - start + 0:
348c2ecf20Sopenharmony_ci      - Y'\ :sub:`00`
358c2ecf20Sopenharmony_ci      - Cb\ :sub:`00`
368c2ecf20Sopenharmony_ci      - Y'\ :sub:`01`
378c2ecf20Sopenharmony_ci      - Cr\ :sub:`00`
388c2ecf20Sopenharmony_ci      - Y'\ :sub:`02`
398c2ecf20Sopenharmony_ci      - Cb\ :sub:`01`
408c2ecf20Sopenharmony_ci      - Y'\ :sub:`03`
418c2ecf20Sopenharmony_ci      - Cr\ :sub:`01`
428c2ecf20Sopenharmony_ci    * - start + 8:
438c2ecf20Sopenharmony_ci      - Y'\ :sub:`10`
448c2ecf20Sopenharmony_ci      - Cb\ :sub:`10`
458c2ecf20Sopenharmony_ci      - Y'\ :sub:`11`
468c2ecf20Sopenharmony_ci      - Cr\ :sub:`10`
478c2ecf20Sopenharmony_ci      - Y'\ :sub:`12`
488c2ecf20Sopenharmony_ci      - Cb\ :sub:`11`
498c2ecf20Sopenharmony_ci      - Y'\ :sub:`13`
508c2ecf20Sopenharmony_ci      - Cr\ :sub:`11`
518c2ecf20Sopenharmony_ci    * - start + 16:
528c2ecf20Sopenharmony_ci      - Y'\ :sub:`20`
538c2ecf20Sopenharmony_ci      - Cb\ :sub:`20`
548c2ecf20Sopenharmony_ci      - Y'\ :sub:`21`
558c2ecf20Sopenharmony_ci      - Cr\ :sub:`20`
568c2ecf20Sopenharmony_ci      - Y'\ :sub:`22`
578c2ecf20Sopenharmony_ci      - Cb\ :sub:`21`
588c2ecf20Sopenharmony_ci      - Y'\ :sub:`23`
598c2ecf20Sopenharmony_ci      - Cr\ :sub:`21`
608c2ecf20Sopenharmony_ci    * - start + 24:
618c2ecf20Sopenharmony_ci      - Y'\ :sub:`30`
628c2ecf20Sopenharmony_ci      - Cb\ :sub:`30`
638c2ecf20Sopenharmony_ci      - Y'\ :sub:`31`
648c2ecf20Sopenharmony_ci      - Cr\ :sub:`30`
658c2ecf20Sopenharmony_ci      - Y'\ :sub:`32`
668c2ecf20Sopenharmony_ci      - Cb\ :sub:`31`
678c2ecf20Sopenharmony_ci      - Y'\ :sub:`33`
688c2ecf20Sopenharmony_ci      - Cr\ :sub:`31`
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci**Color Sample Location:**
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci.. flat-table::
768c2ecf20Sopenharmony_ci    :header-rows:  0
778c2ecf20Sopenharmony_ci    :stub-columns: 0
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ci    * -
808c2ecf20Sopenharmony_ci      - 0
818c2ecf20Sopenharmony_ci      -
828c2ecf20Sopenharmony_ci      - 1
838c2ecf20Sopenharmony_ci      -
848c2ecf20Sopenharmony_ci      - 2
858c2ecf20Sopenharmony_ci      -
868c2ecf20Sopenharmony_ci      - 3
878c2ecf20Sopenharmony_ci    * - 0
888c2ecf20Sopenharmony_ci      - Y
898c2ecf20Sopenharmony_ci      - C
908c2ecf20Sopenharmony_ci      - Y
918c2ecf20Sopenharmony_ci      -
928c2ecf20Sopenharmony_ci      - Y
938c2ecf20Sopenharmony_ci      - C
948c2ecf20Sopenharmony_ci      - Y
958c2ecf20Sopenharmony_ci    * - 1
968c2ecf20Sopenharmony_ci      - Y
978c2ecf20Sopenharmony_ci      - C
988c2ecf20Sopenharmony_ci      - Y
998c2ecf20Sopenharmony_ci      -
1008c2ecf20Sopenharmony_ci      - Y
1018c2ecf20Sopenharmony_ci      - C
1028c2ecf20Sopenharmony_ci      - Y
1038c2ecf20Sopenharmony_ci    * - 2
1048c2ecf20Sopenharmony_ci      - Y
1058c2ecf20Sopenharmony_ci      - C
1068c2ecf20Sopenharmony_ci      - Y
1078c2ecf20Sopenharmony_ci      -
1088c2ecf20Sopenharmony_ci      - Y
1098c2ecf20Sopenharmony_ci      - C
1108c2ecf20Sopenharmony_ci      - Y
1118c2ecf20Sopenharmony_ci    * - 3
1128c2ecf20Sopenharmony_ci      - Y
1138c2ecf20Sopenharmony_ci      - C
1148c2ecf20Sopenharmony_ci      - Y
1158c2ecf20Sopenharmony_ci      -
1168c2ecf20Sopenharmony_ci      - Y
1178c2ecf20Sopenharmony_ci      - C
1188c2ecf20Sopenharmony_ci      - Y
119