1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 3.. planar-yuv: 4 5****************** 6Planar YUV formats 7****************** 8 9Planar formats split luma and chroma data in separate memory regions. They 10exist in two variants: 11 12- Semi-planar formats use two planes. The first plane is the luma plane and 13 stores the Y components. The second plane is the chroma plane and stores the 14 Cb and Cr components interleaved. 15 16- Fully planar formats use three planes to store the Y, Cb and Cr components 17 separately. 18 19Within a plane, components are stored in pixel order, which may be linear or 20tiled. Padding may be supported at the end of the lines, and the line stride of 21the chroma planes may be constrained by the line stride of the luma plane. 22 23Some planar formats allow planes to be placed in independent memory locations. 24They are identified by an 'M' suffix in their name (such as in 25``V4L2_PIX_FMT_NV12M``). Those formats are intended to be used only in drivers 26and applications that support the multi-planar API, described in 27:ref:`planar-apis`. Unless explicitly documented as supporting non-contiguous 28planes, formats require the planes to follow each other immediately in memory. 29 30 31Semi-Planar YUV Formats 32======================= 33 34These formats are commonly referred to as NV formats (NV12, NV16, ...). They 35use two planes, and store the luma components in the first plane and the chroma 36components in the second plane. The Cb and Cr components are interleaved in the 37chroma plane, with Cb and Cr always stored in pairs. The chroma order is 38exposed as different formats. 39 40For memory contiguous formats, the number of padding pixels at the end of the 41chroma lines is identical to the padding of the luma lines. Without horizontal 42subsampling, the chroma line stride (in bytes) is thus equal to twice the luma 43line stride. With horizontal subsampling by 2, the chroma line stride is equal 44to the luma line stride. Vertical subsampling doesn't affect the line stride. 45 46For non-contiguous formats, no constraints are enforced by the format on the 47relationship between the luma and chroma line padding and stride. 48 49All components are stored with the same number of bits per component. 50 51.. raw:: latex 52 53 \footnotesize 54 55.. tabularcolumns:: |p{5.2cm}|p{1.0cm}|p{1.5cm}|p{1.9cm}|p{1.2cm}|p{1.8cm}|p{2.7cm}| 56 57.. flat-table:: Overview of Semi-Planar YUV Formats 58 :header-rows: 1 59 :stub-columns: 0 60 61 * - Identifier 62 - Code 63 - Bits per component 64 - Subsampling 65 - Chroma order [1]_ 66 - Contiguous [2]_ 67 - Tiling [3]_ 68 * - V4L2_PIX_FMT_NV12 69 - 'NV12' 70 - 8 71 - 4:2:0 72 - Cb, Cr 73 - Yes 74 - Linear 75 * - V4L2_PIX_FMT_NV21 76 - 'NV21' 77 - 8 78 - 4:2:0 79 - Cr, Cb 80 - Yes 81 - Linear 82 * - V4L2_PIX_FMT_NV12M 83 - 'NM12' 84 - 8 85 - 4:2:0 86 - Cb, Cr 87 - No 88 - Linear 89 * - V4L2_PIX_FMT_NV21M 90 - 'NM21' 91 - 8 92 - 4:2:0 93 - Cr, Cb 94 - No 95 - Linear 96 * - V4L2_PIX_FMT_NV12MT 97 - 'TM12' 98 - 8 99 - 4:2:0 100 - Cb, Cr 101 - No 102 - 64x32 tiles 103 104 Horizontal Z order 105 * - V4L2_PIX_FMT_NV12MT_16X16 106 - 'VM12' 107 - 8 108 - 4:2:2 109 - Cb, Cr 110 - No 111 - 16x16 tiles 112 * - V4L2_PIX_FMT_P010 113 - 'P010' 114 - 10 115 - 4:2:0 116 - Cb, Cr 117 - Yes 118 - Linear 119 * - V4L2_PIX_FMT_P010_4L4 120 - 'T010' 121 - 10 122 - 4:2:0 123 - Cb, Cr 124 - Yes 125 - 4x4 tiles 126 * - V4L2_PIX_FMT_P012 127 - 'P012' 128 - 12 129 - 4:2:0 130 - Cb, Cr 131 - Yes 132 - Linear 133 * - V4L2_PIX_FMT_P012M 134 - 'PM12' 135 - 12 136 - 4:2:0 137 - Cb, Cr 138 - No 139 - Linear 140 * - V4L2_PIX_FMT_NV15 141 - 'NV15' 142 - 10 143 - 4:2:0 144 - Cb, Cr 145 - Yes 146 - Linear 147 * - V4L2_PIX_FMT_NV15_4L4 148 - 'VT15' 149 - 15 150 - 4:2:0 151 - Cb, Cr 152 - Yes 153 - 4x4 tiles 154 * - V4L2_PIX_FMT_MT2110T 155 - 'MT2T' 156 - 15 157 - 4:2:0 158 - Cb, Cr 159 - No 160 - 16x32 / 16x16 tiles tiled low bits 161 * - V4L2_PIX_FMT_MT2110R 162 - 'MT2R' 163 - 15 164 - 4:2:0 165 - Cb, Cr 166 - No 167 - 16x32 / 16x16 tiles raster low bits 168 * - V4L2_PIX_FMT_NV16 169 - 'NV16' 170 - 8 171 - 4:2:2 172 - Cb, Cr 173 - Yes 174 - Linear 175 * - V4L2_PIX_FMT_NV61 176 - 'NV61' 177 - 8 178 - 4:2:2 179 - Cr, Cb 180 - Yes 181 - Linear 182 * - V4L2_PIX_FMT_NV16M 183 - 'NM16' 184 - 8 185 - 4:2:2 186 - Cb, Cr 187 - No 188 - Linear 189 * - V4L2_PIX_FMT_NV61M 190 - 'NM61' 191 - 8 192 - 4:2:2 193 - Cr, Cb 194 - No 195 - Linear 196 * - V4L2_PIX_FMT_NV20 197 - 'NV20' 198 - 10 199 - 4:2:2 200 - Cb, Cr 201 - Yes 202 - Linear 203 * - V4L2_PIX_FMT_NV24 204 - 'NV24' 205 - 8 206 - 4:4:4 207 - Cb, Cr 208 - Yes 209 - Linear 210 * - V4L2_PIX_FMT_NV42 211 - 'NV42' 212 - 8 213 - 4:4:4 214 - Cr, Cb 215 - Yes 216 - Linear 217 218.. raw:: latex 219 220 \normalsize 221 222.. [1] Order of chroma samples in the second plane 223.. [2] Indicates if planes have to be contiguous in memory or can be 224 disjoint 225.. [3] Macroblock size in pixels 226 227 228**Color Sample Location:** 229Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>` 230horizontally. 231 232 233.. _V4L2-PIX-FMT-NV12: 234.. _V4L2-PIX-FMT-NV21: 235.. _V4L2-PIX-FMT-NV12M: 236.. _V4L2-PIX-FMT-NV21M: 237.. _V4L2-PIX-FMT-P010: 238 239NV12, NV21, NV12M and NV21M 240--------------------------- 241 242Semi-planar YUV 4:2:0 formats. The chroma plane is subsampled by 2 in each 243direction. Chroma lines contain half the number of pixels and the same number 244of bytes as luma lines, and the chroma plane contains half the number of lines 245of the luma plane. 246 247.. flat-table:: Sample 4x4 NV12 Image 248 :header-rows: 0 249 :stub-columns: 0 250 251 * - start + 0: 252 - Y'\ :sub:`00` 253 - Y'\ :sub:`01` 254 - Y'\ :sub:`02` 255 - Y'\ :sub:`03` 256 * - start + 4: 257 - Y'\ :sub:`10` 258 - Y'\ :sub:`11` 259 - Y'\ :sub:`12` 260 - Y'\ :sub:`13` 261 * - start + 8: 262 - Y'\ :sub:`20` 263 - Y'\ :sub:`21` 264 - Y'\ :sub:`22` 265 - Y'\ :sub:`23` 266 * - start + 12: 267 - Y'\ :sub:`30` 268 - Y'\ :sub:`31` 269 - Y'\ :sub:`32` 270 - Y'\ :sub:`33` 271 * - start + 16: 272 - Cb\ :sub:`00` 273 - Cr\ :sub:`00` 274 - Cb\ :sub:`01` 275 - Cr\ :sub:`01` 276 * - start + 20: 277 - Cb\ :sub:`10` 278 - Cr\ :sub:`10` 279 - Cb\ :sub:`11` 280 - Cr\ :sub:`11` 281 282.. flat-table:: Sample 4x4 NV12M Image 283 :header-rows: 0 284 :stub-columns: 0 285 286 * - start0 + 0: 287 - Y'\ :sub:`00` 288 - Y'\ :sub:`01` 289 - Y'\ :sub:`02` 290 - Y'\ :sub:`03` 291 * - start0 + 4: 292 - Y'\ :sub:`10` 293 - Y'\ :sub:`11` 294 - Y'\ :sub:`12` 295 - Y'\ :sub:`13` 296 * - start0 + 8: 297 - Y'\ :sub:`20` 298 - Y'\ :sub:`21` 299 - Y'\ :sub:`22` 300 - Y'\ :sub:`23` 301 * - start0 + 12: 302 - Y'\ :sub:`30` 303 - Y'\ :sub:`31` 304 - Y'\ :sub:`32` 305 - Y'\ :sub:`33` 306 * - 307 * - start1 + 0: 308 - Cb\ :sub:`00` 309 - Cr\ :sub:`00` 310 - Cb\ :sub:`01` 311 - Cr\ :sub:`01` 312 * - start1 + 4: 313 - Cb\ :sub:`10` 314 - Cr\ :sub:`10` 315 - Cb\ :sub:`11` 316 - Cr\ :sub:`11` 317 318 319.. _V4L2-PIX-FMT-NV15: 320 321NV15 322---- 323 324Semi-planar 10-bit YUV 4:2:0 format similar to NV12, using 10-bit components 325with no padding between each component. A group of 4 components are stored over 3265 bytes in little endian order. 327 328.. flat-table:: Sample 4x4 NV15 Image (1 byte per cell) 329 :header-rows: 0 330 :stub-columns: 0 331 332 * - start + 0: 333 - Y'\ :sub:`00[7:0]` 334 - Y'\ :sub:`01[5:0]`\ Y'\ :sub:`00[9:8]` 335 - Y'\ :sub:`02[3:0]`\ Y'\ :sub:`01[9:6]` 336 - Y'\ :sub:`03[1:0]`\ Y'\ :sub:`02[9:4]` 337 - Y'\ :sub:`03[9:2]` 338 * - start + 5: 339 - Y'\ :sub:`10[7:0]` 340 - Y'\ :sub:`11[5:0]`\ Y'\ :sub:`10[9:8]` 341 - Y'\ :sub:`12[3:0]`\ Y'\ :sub:`11[9:6]` 342 - Y'\ :sub:`13[1:0]`\ Y'\ :sub:`12[9:4]` 343 - Y'\ :sub:`13[9:2]` 344 * - start + 10: 345 - Y'\ :sub:`20[7:0]` 346 - Y'\ :sub:`21[5:0]`\ Y'\ :sub:`20[9:8]` 347 - Y'\ :sub:`22[3:0]`\ Y'\ :sub:`21[9:6]` 348 - Y'\ :sub:`23[1:0]`\ Y'\ :sub:`22[9:4]` 349 - Y'\ :sub:`23[9:2]` 350 * - start + 15: 351 - Y'\ :sub:`30[7:0]` 352 - Y'\ :sub:`31[5:0]`\ Y'\ :sub:`30[9:8]` 353 - Y'\ :sub:`32[3:0]`\ Y'\ :sub:`31[9:6]` 354 - Y'\ :sub:`33[1:0]`\ Y'\ :sub:`32[9:4]` 355 - Y'\ :sub:`33[9:2]` 356 * - start + 20: 357 - Cb\ :sub:`00[7:0]` 358 - Cr\ :sub:`00[5:0]`\ Cb\ :sub:`00[9:8]` 359 - Cb\ :sub:`01[3:0]`\ Cr\ :sub:`00[9:6]` 360 - Cr\ :sub:`01[1:0]`\ Cb\ :sub:`01[9:4]` 361 - Cr\ :sub:`01[9:2]` 362 * - start + 25: 363 - Cb\ :sub:`10[7:0]` 364 - Cr\ :sub:`10[5:0]`\ Cb\ :sub:`10[9:8]` 365 - Cb\ :sub:`11[3:0]`\ Cr\ :sub:`10[9:6]` 366 - Cr\ :sub:`11[1:0]`\ Cb\ :sub:`11[9:4]` 367 - Cr\ :sub:`11[9:2]` 368 369 370.. _V4L2-PIX-FMT-NV12MT: 371.. _V4L2-PIX-FMT-NV12MT-16X16: 372.. _V4L2-PIX-FMT-NV12-4L4: 373.. _V4L2-PIX-FMT-NV12-16L16: 374.. _V4L2-PIX-FMT-NV12-32L32: 375.. _V4L2-PIX-FMT-NV12M-8L128: 376.. _V4L2-PIX-FMT-NV12-8L128: 377.. _V4L2-PIX-FMT-MM21: 378 379Tiled NV12 380---------- 381 382Semi-planar YUV 4:2:0 formats, using macroblock tiling. The chroma plane is 383subsampled by 2 in each direction. Chroma lines contain half the number of 384pixels and the same number of bytes as luma lines, and the chroma plane 385contains half the number of lines of the luma plane. Each tile follows the 386previous one linearly in memory (from left to right, top to bottom). 387 388``V4L2_PIX_FMT_NV12MT_16X16`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 389pixels in 2D 16x16 tiles, and stores tiles linearly in memory. 390The line stride and image height must be aligned to a multiple of 16. 391The layouts of the luma and chroma planes are identical. 392 393``V4L2_PIX_FMT_NV12MT`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 394pixels in 2D 64x32 tiles, and stores 2x2 groups of tiles in 395Z-order in memory, alternating Z and mirrored Z shapes horizontally. 396The line stride must be a multiple of 128 pixels to ensure an 397integer number of Z shapes. The image height must be a multiple of 32 pixels. 398If the vertical resolution is an odd number of tiles, the last row of 399tiles is stored in linear order. The layouts of the luma and chroma 400planes are identical. 401 402.. _nv12mt: 403 404.. kernel-figure:: nv12mt.svg 405 :alt: nv12mt.svg 406 :align: center 407 408 V4L2_PIX_FMT_NV12MT macroblock Z shape memory layout 409 410.. _nv12mt_ex: 411 412.. kernel-figure:: nv12mt_example.svg 413 :alt: nv12mt_example.svg 414 :align: center 415 416 Example V4L2_PIX_FMT_NV12MT memory layout of tiles 417 418``V4L2_PIX_FMT_NV12_4L4`` stores pixels in 4x4 tiles, and stores 419tiles linearly in memory. The line stride and image height must be 420aligned to a multiple of 4. The layouts of the luma and chroma planes are 421identical. 422 423``V4L2_PIX_FMT_NV12_16L16`` stores pixels in 16x16 tiles, and stores 424tiles linearly in memory. The line stride and image height must be 425aligned to a multiple of 16. The layouts of the luma and chroma planes are 426identical. 427 428``V4L2_PIX_FMT_NV12_32L32`` stores pixels in 32x32 tiles, and stores 429tiles linearly in memory. The line stride and image height must be 430aligned to a multiple of 32. The layouts of the luma and chroma planes are 431identical. 432 433``V4L2_PIX_FMT_NV12M_8L128`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 434pixels in 2D 8x128 tiles, and stores tiles linearly in memory. 435The image height must be aligned to a multiple of 128. 436The layouts of the luma and chroma planes are identical. 437 438``V4L2_PIX_FMT_NV12_8L128`` is similar to ``V4L2_PIX_FMT_NV12M_8L128`` but stores 439two planes in one memory. 440 441``V4L2_PIX_FMT_MM21`` store luma pixel in 16x32 tiles, and chroma pixels 442in 16x16 tiles. The line stride must be aligned to a multiple of 16 and the 443image height must be aligned to a multiple of 32. The number of luma and chroma 444tiles are identical, even though the tile size differ. The image is formed of 445two non-contiguous planes. 446 447 448.. _V4L2-PIX-FMT-NV15-4L4: 449.. _V4L2-PIX-FMT-NV12M-10BE-8L128: 450.. _V4L2-PIX-FMT-NV12-10BE-8L128: 451.. _V4L2-PIX-FMT-MT2110T: 452.. _V4L2-PIX-FMT-MT2110R: 453 454Tiled NV15 455---------- 456 457``V4L2_PIX_FMT_NV15_4L4`` Semi-planar 10-bit YUV 4:2:0 formats, using 4x4 tiling. 458All components are packed without any padding between each other. 459As a side-effect, each group of 4 components are stored over 5 bytes 460(YYYY or UVUV = 4 * 10 bits = 40 bits = 5 bytes). 461 462``V4L2_PIX_FMT_NV12M_10BE_8L128`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 46310 bits pixels in 2D 8x128 tiles, and stores tiles linearly in memory. 464the data is arranged in big endian order. 465The image height must be aligned to a multiple of 128. 466The layouts of the luma and chroma planes are identical. 467Note the tile size is 8bytes multiplied by 128 bytes, 468it means that the low bits and high bits of one pixel may be in different tiles. 469The 10 bit pixels are packed, so 5 bytes contain 4 10-bit pixels layout like 470this (for luma): 471byte 0: Y0(bits 9-2) 472byte 1: Y0(bits 1-0) Y1(bits 9-4) 473byte 2: Y1(bits 3-0) Y2(bits 9-6) 474byte 3: Y2(bits 5-0) Y3(bits 9-8) 475byte 4: Y3(bits 7-0) 476 477``V4L2_PIX_FMT_NV12_10BE_8L128`` is similar to ``V4L2_PIX_FMT_NV12M_10BE_8L128`` but stores 478two planes in one memory. 479 480``V4L2_PIX_FMT_MT2110T`` is one of Mediatek packed 10bit YUV 4:2:0 formats. 481It is fully packed 10bit 4:2:0 format like NV15 (15 bits per pixel), except 482that the lower two bits data is stored in separate partitions. The format is 483composed of 16x32 luma tiles, and 16x16 chroma tiles. Each tiles is 640 bytes 484long, divided into 8 partitions of 80 bytes. The first 16 bytes of the 485partition represent the 2 least significant bits of pixel data. The remaining 48664 bytes represent the 8 most significant bits of pixel data. 487 488.. kernel-figure:: mt2110t.svg 489 :alt: mt2110t.svg 490 :align: center 491 492 Layout of MT2110T Chroma Tile 493 494Filtering out the upper part of each partitions results in a valid 495``V4L2_PIX_FMT_MM21`` frame. A partition is a sub-tile of size 16 x 4. The 496lower two bits is said to be tiled since each bytes contains the lower two 497bits of the column of for pixel matching the same index. The chroma tiles 498only have 4 partitions. 499 500.. flat-table:: MT2110T LSB bits layout 501 :header-rows: 1 502 :stub-columns: 1 503 504 * - 505 - start + 0: 506 - start + 1: 507 - . . . 508 - start\ +\ 15: 509 * - Bits 1:0 510 - Y'\ :sub:`0:0` 511 - Y'\ :sub:`0:1` 512 - . . . 513 - Y'\ :sub:`0:15` 514 * - Bit 3:2 515 - Y'\ :sub:`1:0` 516 - Y'\ :sub:`1:1` 517 - . . . 518 - Y'\ :sub:`1:15` 519 * - Bits 5:4 520 - Y'\ :sub:`2:0` 521 - Y'\ :sub:`2:1` 522 - . . . 523 - Y'\ :sub:`2:15` 524 * - Bits 7:6 525 - Y'\ :sub:`3:0` 526 - Y'\ :sub:`3:1` 527 - . . . 528 - Y'\ :sub:`3:15` 529 530``V4L2_PIX_FMT_MT2110R`` is identical to ``V4L2_PIX_FMT_MT2110T`` except that 531the least significant two bits layout is in raster order. This means the first byte 532contains 4 pixels of the first row, with 4 bytes per line. 533 534.. flat-table:: MT2110R LSB bits layout 535 :header-rows: 2 536 :stub-columns: 1 537 538 * - 539 - :cspan:`3` Byte 0 540 - ... 541 - :cspan:`3` Byte 3 542 * - 543 - 7:6 544 - 5:4 545 - 3:2 546 - 1:0 547 - ... 548 - 7:6 549 - 5:4 550 - 3:2 551 - 1:0 552 * - start + 0: 553 - Y'\ :sub:`0:3` 554 - Y'\ :sub:`0:2` 555 - Y'\ :sub:`0:1` 556 - Y'\ :sub:`0:0` 557 - ... 558 - Y'\ :sub:`0:15` 559 - Y'\ :sub:`0:14` 560 - Y'\ :sub:`0:13` 561 - Y'\ :sub:`0:12` 562 * - start + 4: 563 - Y'\ :sub:`1:3` 564 - Y'\ :sub:`1:2` 565 - Y'\ :sub:`1:1` 566 - Y'\ :sub:`1:0` 567 - ... 568 - Y'\ :sub:`1:15` 569 - Y'\ :sub:`1:14` 570 - Y'\ :sub:`1:13` 571 - Y'\ :sub:`1:12` 572 * - start + 8: 573 - Y'\ :sub:`2:3` 574 - Y'\ :sub:`2:2` 575 - Y'\ :sub:`2:1` 576 - Y'\ :sub:`2:0` 577 - ... 578 - Y'\ :sub:`2:15` 579 - Y'\ :sub:`2:14` 580 - Y'\ :sub:`2:13` 581 - Y'\ :sub:`2:12` 582 * - start\ +\ 12: 583 - Y'\ :sub:`3:3` 584 - Y'\ :sub:`3:2` 585 - Y'\ :sub:`3:1` 586 - Y'\ :sub:`3:0` 587 - ... 588 - Y'\ :sub:`3:15` 589 - Y'\ :sub:`3:14` 590 - Y'\ :sub:`3:13` 591 - Y'\ :sub:`3:12` 592 593 594.. _V4L2-PIX-FMT-NV16: 595.. _V4L2-PIX-FMT-NV61: 596.. _V4L2-PIX-FMT-NV16M: 597.. _V4L2-PIX-FMT-NV61M: 598 599NV16, NV61, NV16M and NV61M 600--------------------------- 601 602Semi-planar YUV 4:2:2 formats. The chroma plane is subsampled by 2 in the 603horizontal direction. Chroma lines contain half the number of pixels and the 604same number of bytes as luma lines, and the chroma plane contains the same 605number of lines as the luma plane. 606 607.. flat-table:: Sample 4x4 NV16 Image 608 :header-rows: 0 609 :stub-columns: 0 610 611 * - start + 0: 612 - Y'\ :sub:`00` 613 - Y'\ :sub:`01` 614 - Y'\ :sub:`02` 615 - Y'\ :sub:`03` 616 * - start + 4: 617 - Y'\ :sub:`10` 618 - Y'\ :sub:`11` 619 - Y'\ :sub:`12` 620 - Y'\ :sub:`13` 621 * - start + 8: 622 - Y'\ :sub:`20` 623 - Y'\ :sub:`21` 624 - Y'\ :sub:`22` 625 - Y'\ :sub:`23` 626 * - start + 12: 627 - Y'\ :sub:`30` 628 - Y'\ :sub:`31` 629 - Y'\ :sub:`32` 630 - Y'\ :sub:`33` 631 * - start + 16: 632 - Cb\ :sub:`00` 633 - Cr\ :sub:`00` 634 - Cb\ :sub:`01` 635 - Cr\ :sub:`01` 636 * - start + 20: 637 - Cb\ :sub:`10` 638 - Cr\ :sub:`10` 639 - Cb\ :sub:`11` 640 - Cr\ :sub:`11` 641 * - start + 24: 642 - Cb\ :sub:`20` 643 - Cr\ :sub:`20` 644 - Cb\ :sub:`21` 645 - Cr\ :sub:`21` 646 * - start + 28: 647 - Cb\ :sub:`30` 648 - Cr\ :sub:`30` 649 - Cb\ :sub:`31` 650 - Cr\ :sub:`31` 651 652.. flat-table:: Sample 4x4 NV16M Image 653 :header-rows: 0 654 :stub-columns: 0 655 656 * - start0 + 0: 657 - Y'\ :sub:`00` 658 - Y'\ :sub:`01` 659 - Y'\ :sub:`02` 660 - Y'\ :sub:`03` 661 * - start0 + 4: 662 - Y'\ :sub:`10` 663 - Y'\ :sub:`11` 664 - Y'\ :sub:`12` 665 - Y'\ :sub:`13` 666 * - start0 + 8: 667 - Y'\ :sub:`20` 668 - Y'\ :sub:`21` 669 - Y'\ :sub:`22` 670 - Y'\ :sub:`23` 671 * - start0 + 12: 672 - Y'\ :sub:`30` 673 - Y'\ :sub:`31` 674 - Y'\ :sub:`32` 675 - Y'\ :sub:`33` 676 * - 677 * - start1 + 0: 678 - Cb\ :sub:`00` 679 - Cr\ :sub:`00` 680 - Cb\ :sub:`02` 681 - Cr\ :sub:`02` 682 * - start1 + 4: 683 - Cb\ :sub:`10` 684 - Cr\ :sub:`10` 685 - Cb\ :sub:`12` 686 - Cr\ :sub:`12` 687 * - start1 + 8: 688 - Cb\ :sub:`20` 689 - Cr\ :sub:`20` 690 - Cb\ :sub:`22` 691 - Cr\ :sub:`22` 692 * - start1 + 12: 693 - Cb\ :sub:`30` 694 - Cr\ :sub:`30` 695 - Cb\ :sub:`32` 696 - Cr\ :sub:`32` 697 698 699.. _V4L2-PIX-FMT-NV20: 700 701NV20 702---- 703 704Semi-planar 10-bit YUV 4:2:2 format similar to NV16, using 10-bit components 705with no padding between each component. A group of 4 components are stored over 7065 bytes in little endian order. 707 708.. flat-table:: Sample 4x4 NV20 Image (1 byte per cell) 709 :header-rows: 0 710 :stub-columns: 0 711 712 * - start + 0: 713 - Y'\ :sub:`00[7:0]` 714 - Y'\ :sub:`01[5:0]`\ Y'\ :sub:`00[9:8]` 715 - Y'\ :sub:`02[3:0]`\ Y'\ :sub:`01[9:6]` 716 - Y'\ :sub:`03[1:0]`\ Y'\ :sub:`02[9:4]` 717 - Y'\ :sub:`03[9:2]` 718 * - start + 5: 719 - Y'\ :sub:`10[7:0]` 720 - Y'\ :sub:`11[5:0]`\ Y'\ :sub:`10[9:8]` 721 - Y'\ :sub:`12[3:0]`\ Y'\ :sub:`11[9:6]` 722 - Y'\ :sub:`13[1:0]`\ Y'\ :sub:`12[9:4]` 723 - Y'\ :sub:`13[9:2]` 724 * - start + 10: 725 - Y'\ :sub:`20[7:0]` 726 - Y'\ :sub:`21[5:0]`\ Y'\ :sub:`20[9:8]` 727 - Y'\ :sub:`22[3:0]`\ Y'\ :sub:`21[9:6]` 728 - Y'\ :sub:`23[1:0]`\ Y'\ :sub:`22[9:4]` 729 - Y'\ :sub:`23[9:2]` 730 * - start + 15: 731 - Y'\ :sub:`30[7:0]` 732 - Y'\ :sub:`31[5:0]`\ Y'\ :sub:`30[9:8]` 733 - Y'\ :sub:`32[3:0]`\ Y'\ :sub:`31[9:6]` 734 - Y'\ :sub:`33[1:0]`\ Y'\ :sub:`32[9:4]` 735 - Y'\ :sub:`33[9:2]` 736 * - start + 20: 737 - Cb\ :sub:`00[7:0]` 738 - Cr\ :sub:`00[5:0]`\ Cb\ :sub:`00[9:8]` 739 - Cb\ :sub:`01[3:0]`\ Cr\ :sub:`00[9:6]` 740 - Cr\ :sub:`01[1:0]`\ Cb\ :sub:`01[9:4]` 741 - Cr\ :sub:`01[9:2]` 742 * - start + 25: 743 - Cb\ :sub:`10[7:0]` 744 - Cr\ :sub:`10[5:0]`\ Cb\ :sub:`10[9:8]` 745 - Cb\ :sub:`11[3:0]`\ Cr\ :sub:`10[9:6]` 746 - Cr\ :sub:`11[1:0]`\ Cb\ :sub:`11[9:4]` 747 - Cr\ :sub:`11[9:2]` 748 * - start + 30: 749 - Cb\ :sub:`20[7:0]` 750 - Cr\ :sub:`20[5:0]`\ Cb\ :sub:`20[9:8]` 751 - Cb\ :sub:`21[3:0]`\ Cr\ :sub:`20[9:6]` 752 - Cr\ :sub:`21[1:0]`\ Cb\ :sub:`21[9:4]` 753 - Cr\ :sub:`21[9:2]` 754 * - start + 35: 755 - Cb\ :sub:`30[7:0]` 756 - Cr\ :sub:`30[5:0]`\ Cb\ :sub:`30[9:8]` 757 - Cb\ :sub:`31[3:0]`\ Cr\ :sub:`30[9:6]` 758 - Cr\ :sub:`31[1:0]`\ Cb\ :sub:`31[9:4]` 759 - Cr\ :sub:`31[9:2]` 760 761 762.. _V4L2-PIX-FMT-NV24: 763.. _V4L2-PIX-FMT-NV42: 764 765NV24 and NV42 766------------- 767 768Semi-planar YUV 4:4:4 formats. The chroma plane is not subsampled. 769Chroma lines contain the same number of pixels and twice the 770number of bytes as luma lines, and the chroma plane contains the same 771number of lines as the luma plane. 772 773.. flat-table:: Sample 4x4 NV24 Image 774 :header-rows: 0 775 :stub-columns: 0 776 777 * - start + 0: 778 - Y'\ :sub:`00` 779 - Y'\ :sub:`01` 780 - Y'\ :sub:`02` 781 - Y'\ :sub:`03` 782 * - start + 4: 783 - Y'\ :sub:`10` 784 - Y'\ :sub:`11` 785 - Y'\ :sub:`12` 786 - Y'\ :sub:`13` 787 * - start + 8: 788 - Y'\ :sub:`20` 789 - Y'\ :sub:`21` 790 - Y'\ :sub:`22` 791 - Y'\ :sub:`23` 792 * - start + 12: 793 - Y'\ :sub:`30` 794 - Y'\ :sub:`31` 795 - Y'\ :sub:`32` 796 - Y'\ :sub:`33` 797 * - start + 16: 798 - Cb\ :sub:`00` 799 - Cr\ :sub:`00` 800 - Cb\ :sub:`01` 801 - Cr\ :sub:`01` 802 - Cb\ :sub:`02` 803 - Cr\ :sub:`02` 804 - Cb\ :sub:`03` 805 - Cr\ :sub:`03` 806 * - start + 24: 807 - Cb\ :sub:`10` 808 - Cr\ :sub:`10` 809 - Cb\ :sub:`11` 810 - Cr\ :sub:`11` 811 - Cb\ :sub:`12` 812 - Cr\ :sub:`12` 813 - Cb\ :sub:`13` 814 - Cr\ :sub:`13` 815 * - start + 32: 816 - Cb\ :sub:`20` 817 - Cr\ :sub:`20` 818 - Cb\ :sub:`21` 819 - Cr\ :sub:`21` 820 - Cb\ :sub:`22` 821 - Cr\ :sub:`22` 822 - Cb\ :sub:`23` 823 - Cr\ :sub:`23` 824 * - start + 40: 825 - Cb\ :sub:`30` 826 - Cr\ :sub:`30` 827 - Cb\ :sub:`31` 828 - Cr\ :sub:`31` 829 - Cb\ :sub:`32` 830 - Cr\ :sub:`32` 831 - Cb\ :sub:`33` 832 - Cr\ :sub:`33` 833 834.. _V4L2_PIX_FMT_P010: 835.. _V4L2-PIX-FMT-P010-4L4: 836 837P010 and tiled P010 838------------------- 839 840P010 is like NV12 with 10 bits per component, expanded to 16 bits. 841Data in the 10 high bits, zeros in the 6 low bits, arranged in little endian order. 842 843.. flat-table:: Sample 4x4 P010 Image 844 :header-rows: 0 845 :stub-columns: 0 846 847 * - start + 0: 848 - Y'\ :sub:`00` 849 - Y'\ :sub:`01` 850 - Y'\ :sub:`02` 851 - Y'\ :sub:`03` 852 * - start + 8: 853 - Y'\ :sub:`10` 854 - Y'\ :sub:`11` 855 - Y'\ :sub:`12` 856 - Y'\ :sub:`13` 857 * - start + 16: 858 - Y'\ :sub:`20` 859 - Y'\ :sub:`21` 860 - Y'\ :sub:`22` 861 - Y'\ :sub:`23` 862 * - start + 24: 863 - Y'\ :sub:`30` 864 - Y'\ :sub:`31` 865 - Y'\ :sub:`32` 866 - Y'\ :sub:`33` 867 * - start + 32: 868 - Cb\ :sub:`00` 869 - Cr\ :sub:`00` 870 - Cb\ :sub:`01` 871 - Cr\ :sub:`01` 872 * - start + 40: 873 - Cb\ :sub:`10` 874 - Cr\ :sub:`10` 875 - Cb\ :sub:`11` 876 - Cr\ :sub:`11` 877 878.. _V4L2-PIX-FMT-P012: 879.. _V4L2-PIX-FMT-P012M: 880 881P012 and P012M 882-------------- 883 884P012 is like NV12 with 12 bits per component, expanded to 16 bits. 885Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. 886 887.. flat-table:: Sample 4x4 P012 Image 888 :header-rows: 0 889 :stub-columns: 0 890 891 * - start + 0: 892 - Y'\ :sub:`00` 893 - Y'\ :sub:`01` 894 - Y'\ :sub:`02` 895 - Y'\ :sub:`03` 896 * - start + 8: 897 - Y'\ :sub:`10` 898 - Y'\ :sub:`11` 899 - Y'\ :sub:`12` 900 - Y'\ :sub:`13` 901 * - start + 16: 902 - Y'\ :sub:`20` 903 - Y'\ :sub:`21` 904 - Y'\ :sub:`22` 905 - Y'\ :sub:`23` 906 * - start + 24: 907 - Y'\ :sub:`30` 908 - Y'\ :sub:`31` 909 - Y'\ :sub:`32` 910 - Y'\ :sub:`33` 911 * - start + 32: 912 - Cb\ :sub:`00` 913 - Cr\ :sub:`00` 914 - Cb\ :sub:`01` 915 - Cr\ :sub:`01` 916 * - start + 40: 917 - Cb\ :sub:`10` 918 - Cr\ :sub:`10` 919 - Cb\ :sub:`11` 920 - Cr\ :sub:`11` 921 922.. flat-table:: Sample 4x4 P012M Image 923 :header-rows: 0 924 :stub-columns: 0 925 926 * - start0 + 0: 927 - Y'\ :sub:`00` 928 - Y'\ :sub:`01` 929 - Y'\ :sub:`02` 930 - Y'\ :sub:`03` 931 * - start0 + 8: 932 - Y'\ :sub:`10` 933 - Y'\ :sub:`11` 934 - Y'\ :sub:`12` 935 - Y'\ :sub:`13` 936 * - start0 + 16: 937 - Y'\ :sub:`20` 938 - Y'\ :sub:`21` 939 - Y'\ :sub:`22` 940 - Y'\ :sub:`23` 941 * - start0 + 24: 942 - Y'\ :sub:`30` 943 - Y'\ :sub:`31` 944 - Y'\ :sub:`32` 945 - Y'\ :sub:`33` 946 * - 947 * - start1 + 0: 948 - Cb\ :sub:`00` 949 - Cr\ :sub:`00` 950 - Cb\ :sub:`01` 951 - Cr\ :sub:`01` 952 * - start1 + 8: 953 - Cb\ :sub:`10` 954 - Cr\ :sub:`10` 955 - Cb\ :sub:`11` 956 - Cr\ :sub:`11` 957 958 959Fully Planar YUV Formats 960======================== 961 962These formats store the Y, Cb and Cr components in three separate planes. The 963luma plane comes first, and the order of the two chroma planes varies between 964formats. The two chroma planes always use the same subsampling. 965 966For memory contiguous formats, the number of padding pixels at the end of the 967chroma lines is identical to the padding of the luma lines. The chroma line 968stride (in bytes) is thus equal to the luma line stride divided by the 969horizontal subsampling factor. Vertical subsampling doesn't affect the line 970stride. 971 972For non-contiguous formats, no constraints are enforced by the format on the 973relationship between the luma and chroma line padding and stride. 974 975All components are stored with the same number of bits per component. 976 977``V4L2_PIX_FMT_P010_4L4`` stores pixels in 4x4 tiles, and stores tiles linearly 978in memory. The line stride must be aligned to multiple of 8 and image height to 979a multiple of 4. The layouts of the luma and chroma planes are identical. 980 981.. raw:: latex 982 983 \small 984 985.. tabularcolumns:: |p{5.0cm}|p{1.1cm}|p{1.5cm}|p{2.2cm}|p{1.2cm}|p{3.7cm}| 986 987.. flat-table:: Overview of Fully Planar YUV Formats 988 :header-rows: 1 989 :stub-columns: 0 990 991 * - Identifier 992 - Code 993 - Bits per component 994 - Subsampling 995 - Planes order [4]_ 996 - Contiguous [5]_ 997 998 * - V4L2_PIX_FMT_YUV410 999 - 'YUV9' 1000 - 8 1001 - 4:1:0 1002 - Y, Cb, Cr 1003 - Yes 1004 * - V4L2_PIX_FMT_YVU410 1005 - 'YVU9' 1006 - 8 1007 - 4:1:0 1008 - Y, Cr, Cb 1009 - Yes 1010 * - V4L2_PIX_FMT_YUV411P 1011 - '411P' 1012 - 8 1013 - 4:1:1 1014 - Y, Cb, Cr 1015 - Yes 1016 * - V4L2_PIX_FMT_YUV420M 1017 - 'YM12' 1018 - 8 1019 - 4:2:0 1020 - Y, Cb, Cr 1021 - No 1022 * - V4L2_PIX_FMT_YVU420M 1023 - 'YM21' 1024 - 8 1025 - 4:2:0 1026 - Y, Cr, Cb 1027 - No 1028 * - V4L2_PIX_FMT_YUV420 1029 - 'YU12' 1030 - 8 1031 - 4:2:0 1032 - Y, Cb, Cr 1033 - Yes 1034 * - V4L2_PIX_FMT_YVU420 1035 - 'YV12' 1036 - 8 1037 - 4:2:0 1038 - Y, Cr, Cb 1039 - Yes 1040 * - V4L2_PIX_FMT_YUV422P 1041 - '422P' 1042 - 8 1043 - 4:2:2 1044 - Y, Cb, Cr 1045 - Yes 1046 * - V4L2_PIX_FMT_YUV422M 1047 - 'YM16' 1048 - 8 1049 - 4:2:2 1050 - Y, Cb, Cr 1051 - No 1052 * - V4L2_PIX_FMT_YVU422M 1053 - 'YM61' 1054 - 8 1055 - 4:2:2 1056 - Y, Cr, Cb 1057 - No 1058 * - V4L2_PIX_FMT_YUV444M 1059 - 'YM24' 1060 - 8 1061 - 4:4:4 1062 - Y, Cb, Cr 1063 - No 1064 * - V4L2_PIX_FMT_YVU444M 1065 - 'YM42' 1066 - 8 1067 - 4:4:4 1068 - Y, Cr, Cb 1069 - No 1070 1071.. raw:: latex 1072 1073 \normalsize 1074 1075.. [4] Order of luma and chroma planes 1076.. [5] Indicates if planes have to be contiguous in memory or can be 1077 disjoint 1078 1079 1080**Color Sample Location:** 1081Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>` 1082horizontally. 1083 1084.. _V4L2-PIX-FMT-YUV410: 1085.. _V4L2-PIX-FMT-YVU410: 1086 1087YUV410 and YVU410 1088----------------- 1089 1090Planar YUV 4:1:0 formats. The chroma planes are subsampled by 4 in each 1091direction. Chroma lines contain a quarter of the number of pixels and bytes of 1092the luma lines, and the chroma planes contain a quarter of the number of lines 1093of the luma plane. 1094 1095.. flat-table:: Sample 4x4 YUV410 Image 1096 :header-rows: 0 1097 :stub-columns: 0 1098 1099 * - start + 0: 1100 - Y'\ :sub:`00` 1101 - Y'\ :sub:`01` 1102 - Y'\ :sub:`02` 1103 - Y'\ :sub:`03` 1104 * - start + 4: 1105 - Y'\ :sub:`10` 1106 - Y'\ :sub:`11` 1107 - Y'\ :sub:`12` 1108 - Y'\ :sub:`13` 1109 * - start + 8: 1110 - Y'\ :sub:`20` 1111 - Y'\ :sub:`21` 1112 - Y'\ :sub:`22` 1113 - Y'\ :sub:`23` 1114 * - start + 12: 1115 - Y'\ :sub:`30` 1116 - Y'\ :sub:`31` 1117 - Y'\ :sub:`32` 1118 - Y'\ :sub:`33` 1119 * - start + 16: 1120 - Cr\ :sub:`00` 1121 * - start + 17: 1122 - Cb\ :sub:`00` 1123 1124 1125.. _V4L2-PIX-FMT-YUV411P: 1126 1127YUV411P 1128------- 1129 1130Planar YUV 4:1:1 formats. The chroma planes are subsampled by 4 in the 1131horizontal direction. Chroma lines contain a quarter of the number of pixels 1132and bytes of the luma lines, and the chroma planes contain the same number of 1133lines as the luma plane. 1134 1135.. flat-table:: Sample 4x4 YUV411P Image 1136 :header-rows: 0 1137 :stub-columns: 0 1138 1139 * - start + 0: 1140 - Y'\ :sub:`00` 1141 - Y'\ :sub:`01` 1142 - Y'\ :sub:`02` 1143 - Y'\ :sub:`03` 1144 * - start + 4: 1145 - Y'\ :sub:`10` 1146 - Y'\ :sub:`11` 1147 - Y'\ :sub:`12` 1148 - Y'\ :sub:`13` 1149 * - start + 8: 1150 - Y'\ :sub:`20` 1151 - Y'\ :sub:`21` 1152 - Y'\ :sub:`22` 1153 - Y'\ :sub:`23` 1154 * - start + 12: 1155 - Y'\ :sub:`30` 1156 - Y'\ :sub:`31` 1157 - Y'\ :sub:`32` 1158 - Y'\ :sub:`33` 1159 * - start + 16: 1160 - Cb\ :sub:`00` 1161 * - start + 17: 1162 - Cb\ :sub:`10` 1163 * - start + 18: 1164 - Cb\ :sub:`20` 1165 * - start + 19: 1166 - Cb\ :sub:`30` 1167 * - start + 20: 1168 - Cr\ :sub:`00` 1169 * - start + 21: 1170 - Cr\ :sub:`10` 1171 * - start + 22: 1172 - Cr\ :sub:`20` 1173 * - start + 23: 1174 - Cr\ :sub:`30` 1175 1176 1177.. _V4L2-PIX-FMT-YUV420: 1178.. _V4L2-PIX-FMT-YVU420: 1179.. _V4L2-PIX-FMT-YUV420M: 1180.. _V4L2-PIX-FMT-YVU420M: 1181 1182YUV420, YVU420, YUV420M and YVU420M 1183----------------------------------- 1184 1185Planar YUV 4:2:0 formats. The chroma planes are subsampled by 2 in each 1186direction. Chroma lines contain half of the number of pixels and bytes of the 1187luma lines, and the chroma planes contain half of the number of lines of the 1188luma plane. 1189 1190.. flat-table:: Sample 4x4 YUV420 Image 1191 :header-rows: 0 1192 :stub-columns: 0 1193 1194 * - start + 0: 1195 - Y'\ :sub:`00` 1196 - Y'\ :sub:`01` 1197 - Y'\ :sub:`02` 1198 - Y'\ :sub:`03` 1199 * - start + 4: 1200 - Y'\ :sub:`10` 1201 - Y'\ :sub:`11` 1202 - Y'\ :sub:`12` 1203 - Y'\ :sub:`13` 1204 * - start + 8: 1205 - Y'\ :sub:`20` 1206 - Y'\ :sub:`21` 1207 - Y'\ :sub:`22` 1208 - Y'\ :sub:`23` 1209 * - start + 12: 1210 - Y'\ :sub:`30` 1211 - Y'\ :sub:`31` 1212 - Y'\ :sub:`32` 1213 - Y'\ :sub:`33` 1214 * - start + 16: 1215 - Cr\ :sub:`00` 1216 - Cr\ :sub:`01` 1217 * - start + 18: 1218 - Cr\ :sub:`10` 1219 - Cr\ :sub:`11` 1220 * - start + 20: 1221 - Cb\ :sub:`00` 1222 - Cb\ :sub:`01` 1223 * - start + 22: 1224 - Cb\ :sub:`10` 1225 - Cb\ :sub:`11` 1226 1227.. flat-table:: Sample 4x4 YUV420M Image 1228 :header-rows: 0 1229 :stub-columns: 0 1230 1231 * - start0 + 0: 1232 - Y'\ :sub:`00` 1233 - Y'\ :sub:`01` 1234 - Y'\ :sub:`02` 1235 - Y'\ :sub:`03` 1236 * - start0 + 4: 1237 - Y'\ :sub:`10` 1238 - Y'\ :sub:`11` 1239 - Y'\ :sub:`12` 1240 - Y'\ :sub:`13` 1241 * - start0 + 8: 1242 - Y'\ :sub:`20` 1243 - Y'\ :sub:`21` 1244 - Y'\ :sub:`22` 1245 - Y'\ :sub:`23` 1246 * - start0 + 12: 1247 - Y'\ :sub:`30` 1248 - Y'\ :sub:`31` 1249 - Y'\ :sub:`32` 1250 - Y'\ :sub:`33` 1251 * - 1252 * - start1 + 0: 1253 - Cb\ :sub:`00` 1254 - Cb\ :sub:`01` 1255 * - start1 + 2: 1256 - Cb\ :sub:`10` 1257 - Cb\ :sub:`11` 1258 * - 1259 * - start2 + 0: 1260 - Cr\ :sub:`00` 1261 - Cr\ :sub:`01` 1262 * - start2 + 2: 1263 - Cr\ :sub:`10` 1264 - Cr\ :sub:`11` 1265 1266 1267.. _V4L2-PIX-FMT-YUV422P: 1268.. _V4L2-PIX-FMT-YUV422M: 1269.. _V4L2-PIX-FMT-YVU422M: 1270 1271YUV422P, YUV422M and YVU422M 1272---------------------------- 1273 1274Planar YUV 4:2:2 formats. The chroma planes are subsampled by 2 in the 1275horizontal direction. Chroma lines contain half of the number of pixels and 1276bytes of the luma lines, and the chroma planes contain the same number of lines 1277as the luma plane. 1278 1279.. flat-table:: Sample 4x4 YUV422P Image 1280 :header-rows: 0 1281 :stub-columns: 0 1282 1283 * - start + 0: 1284 - Y'\ :sub:`00` 1285 - Y'\ :sub:`01` 1286 - Y'\ :sub:`02` 1287 - Y'\ :sub:`03` 1288 * - start + 4: 1289 - Y'\ :sub:`10` 1290 - Y'\ :sub:`11` 1291 - Y'\ :sub:`12` 1292 - Y'\ :sub:`13` 1293 * - start + 8: 1294 - Y'\ :sub:`20` 1295 - Y'\ :sub:`21` 1296 - Y'\ :sub:`22` 1297 - Y'\ :sub:`23` 1298 * - start + 12: 1299 - Y'\ :sub:`30` 1300 - Y'\ :sub:`31` 1301 - Y'\ :sub:`32` 1302 - Y'\ :sub:`33` 1303 * - start + 16: 1304 - Cb\ :sub:`00` 1305 - Cb\ :sub:`01` 1306 * - start + 18: 1307 - Cb\ :sub:`10` 1308 - Cb\ :sub:`11` 1309 * - start + 20: 1310 - Cb\ :sub:`20` 1311 - Cb\ :sub:`21` 1312 * - start + 22: 1313 - Cb\ :sub:`30` 1314 - Cb\ :sub:`31` 1315 * - start + 24: 1316 - Cr\ :sub:`00` 1317 - Cr\ :sub:`01` 1318 * - start + 26: 1319 - Cr\ :sub:`10` 1320 - Cr\ :sub:`11` 1321 * - start + 28: 1322 - Cr\ :sub:`20` 1323 - Cr\ :sub:`21` 1324 * - start + 30: 1325 - Cr\ :sub:`30` 1326 - Cr\ :sub:`31` 1327 1328.. flat-table:: Sample 4x4 YUV422M Image 1329 :header-rows: 0 1330 :stub-columns: 0 1331 1332 * - start0 + 0: 1333 - Y'\ :sub:`00` 1334 - Y'\ :sub:`01` 1335 - Y'\ :sub:`02` 1336 - Y'\ :sub:`03` 1337 * - start0 + 4: 1338 - Y'\ :sub:`10` 1339 - Y'\ :sub:`11` 1340 - Y'\ :sub:`12` 1341 - Y'\ :sub:`13` 1342 * - start0 + 8: 1343 - Y'\ :sub:`20` 1344 - Y'\ :sub:`21` 1345 - Y'\ :sub:`22` 1346 - Y'\ :sub:`23` 1347 * - start0 + 12: 1348 - Y'\ :sub:`30` 1349 - Y'\ :sub:`31` 1350 - Y'\ :sub:`32` 1351 - Y'\ :sub:`33` 1352 * - 1353 * - start1 + 0: 1354 - Cb\ :sub:`00` 1355 - Cb\ :sub:`01` 1356 * - start1 + 2: 1357 - Cb\ :sub:`10` 1358 - Cb\ :sub:`11` 1359 * - start1 + 4: 1360 - Cb\ :sub:`20` 1361 - Cb\ :sub:`21` 1362 * - start1 + 6: 1363 - Cb\ :sub:`30` 1364 - Cb\ :sub:`31` 1365 * - 1366 * - start2 + 0: 1367 - Cr\ :sub:`00` 1368 - Cr\ :sub:`01` 1369 * - start2 + 2: 1370 - Cr\ :sub:`10` 1371 - Cr\ :sub:`11` 1372 * - start2 + 4: 1373 - Cr\ :sub:`20` 1374 - Cr\ :sub:`21` 1375 * - start2 + 6: 1376 - Cr\ :sub:`30` 1377 - Cr\ :sub:`31` 1378 1379 1380.. _V4L2-PIX-FMT-YUV444M: 1381.. _V4L2-PIX-FMT-YVU444M: 1382 1383YUV444M and YVU444M 1384------------------- 1385 1386Planar YUV 4:4:4 formats. The chroma planes are no subsampled. Chroma lines 1387contain the same number of pixels and bytes of the luma lines, and the chroma 1388planes contain the same number of lines as the luma plane. 1389 1390.. flat-table:: Sample 4x4 YUV444M Image 1391 :header-rows: 0 1392 :stub-columns: 0 1393 1394 * - start0 + 0: 1395 - Y'\ :sub:`00` 1396 - Y'\ :sub:`01` 1397 - Y'\ :sub:`02` 1398 - Y'\ :sub:`03` 1399 * - start0 + 4: 1400 - Y'\ :sub:`10` 1401 - Y'\ :sub:`11` 1402 - Y'\ :sub:`12` 1403 - Y'\ :sub:`13` 1404 * - start0 + 8: 1405 - Y'\ :sub:`20` 1406 - Y'\ :sub:`21` 1407 - Y'\ :sub:`22` 1408 - Y'\ :sub:`23` 1409 * - start0 + 12: 1410 - Y'\ :sub:`30` 1411 - Y'\ :sub:`31` 1412 - Y'\ :sub:`32` 1413 - Y'\ :sub:`33` 1414 * - 1415 * - start1 + 0: 1416 - Cb\ :sub:`00` 1417 - Cb\ :sub:`01` 1418 - Cb\ :sub:`02` 1419 - Cb\ :sub:`03` 1420 * - start1 + 4: 1421 - Cb\ :sub:`10` 1422 - Cb\ :sub:`11` 1423 - Cb\ :sub:`12` 1424 - Cb\ :sub:`13` 1425 * - start1 + 8: 1426 - Cb\ :sub:`20` 1427 - Cb\ :sub:`21` 1428 - Cb\ :sub:`22` 1429 - Cb\ :sub:`23` 1430 * - start1 + 12: 1431 - Cb\ :sub:`20` 1432 - Cb\ :sub:`21` 1433 - Cb\ :sub:`32` 1434 - Cb\ :sub:`33` 1435 * - 1436 * - start2 + 0: 1437 - Cr\ :sub:`00` 1438 - Cr\ :sub:`01` 1439 - Cr\ :sub:`02` 1440 - Cr\ :sub:`03` 1441 * - start2 + 4: 1442 - Cr\ :sub:`10` 1443 - Cr\ :sub:`11` 1444 - Cr\ :sub:`12` 1445 - Cr\ :sub:`13` 1446 * - start2 + 8: 1447 - Cr\ :sub:`20` 1448 - Cr\ :sub:`21` 1449 - Cr\ :sub:`22` 1450 - Cr\ :sub:`23` 1451 * - start2 + 12: 1452 - Cr\ :sub:`30` 1453 - Cr\ :sub:`31` 1454 - Cr\ :sub:`32` 1455 - Cr\ :sub:`33` 1456