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, Cr 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, Cr 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_NV16 113 - 'NV16' 114 - 8 115 - 4:2:2 116 - Cb, Cr 117 - Yes 118 - Linear 119 * - V4L2_PIX_FMT_NV61 120 - 'NV61' 121 - 8 122 - 4:2:2 123 - Cr, Cr 124 - Yes 125 - Linear 126 * - V4L2_PIX_FMT_NV16M 127 - 'NM16' 128 - 8 129 - 4:2:2 130 - Cb, Cr 131 - No 132 - Linear 133 * - V4L2_PIX_FMT_NV61M 134 - 'NM61' 135 - 8 136 - 4:2:2 137 - Cr, Cr 138 - No 139 - Linear 140 * - V4L2_PIX_FMT_NV24 141 - 'NV24' 142 - 8 143 - 4:4:4 144 - Cb, Cr 145 - Yes 146 - Linear 147 * - V4L2_PIX_FMT_NV42 148 - 'NV42' 149 - 8 150 - 4:4:4 151 - Cr, Cr 152 - Yes 153 - Linear 154 155.. raw:: latex 156 157 \normalsize 158 159.. [1] Order of chroma samples in the second plane 160.. [2] Indicates if planes have to be contiguous in memory or can be 161 disjoint 162.. [3] Macroblock size in pixels 163 164 165**Color Sample Location:** 166Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>` 167horizontally. 168 169 170.. _V4L2-PIX-FMT-NV12: 171.. _V4L2-PIX-FMT-NV21: 172.. _V4L2-PIX-FMT-NV12M: 173.. _V4L2-PIX-FMT-NV21M: 174 175NV12, NV21, NV12M and NV21M 176--------------------------- 177 178Semi-planar YUV 4:2:0 formats. The chroma plane is subsampled by 2 in each 179direction. Chroma lines contain half the number of pixels and the same number 180of bytes as luma lines, and the chroma plane contains half the number of lines 181of the luma plane. 182 183.. flat-table:: Sample 4x4 NV12 Image 184 :header-rows: 0 185 :stub-columns: 0 186 187 * - start + 0: 188 - Y'\ :sub:`00` 189 - Y'\ :sub:`01` 190 - Y'\ :sub:`02` 191 - Y'\ :sub:`03` 192 * - start + 4: 193 - Y'\ :sub:`10` 194 - Y'\ :sub:`11` 195 - Y'\ :sub:`12` 196 - Y'\ :sub:`13` 197 * - start + 8: 198 - Y'\ :sub:`20` 199 - Y'\ :sub:`21` 200 - Y'\ :sub:`22` 201 - Y'\ :sub:`23` 202 * - start + 12: 203 - Y'\ :sub:`30` 204 - Y'\ :sub:`31` 205 - Y'\ :sub:`32` 206 - Y'\ :sub:`33` 207 * - start + 16: 208 - Cb\ :sub:`00` 209 - Cr\ :sub:`00` 210 - Cb\ :sub:`01` 211 - Cr\ :sub:`01` 212 * - start + 20: 213 - Cb\ :sub:`10` 214 - Cr\ :sub:`10` 215 - Cb\ :sub:`11` 216 - Cr\ :sub:`11` 217 218.. flat-table:: Sample 4x4 NV12M Image 219 :header-rows: 0 220 :stub-columns: 0 221 222 * - start0 + 0: 223 - Y'\ :sub:`00` 224 - Y'\ :sub:`01` 225 - Y'\ :sub:`02` 226 - Y'\ :sub:`03` 227 * - start0 + 4: 228 - Y'\ :sub:`10` 229 - Y'\ :sub:`11` 230 - Y'\ :sub:`12` 231 - Y'\ :sub:`13` 232 * - start0 + 8: 233 - Y'\ :sub:`20` 234 - Y'\ :sub:`21` 235 - Y'\ :sub:`22` 236 - Y'\ :sub:`23` 237 * - start0 + 12: 238 - Y'\ :sub:`30` 239 - Y'\ :sub:`31` 240 - Y'\ :sub:`32` 241 - Y'\ :sub:`33` 242 * - 243 * - start1 + 0: 244 - Cb\ :sub:`00` 245 - Cr\ :sub:`00` 246 - Cb\ :sub:`01` 247 - Cr\ :sub:`01` 248 * - start1 + 4: 249 - Cb\ :sub:`10` 250 - Cr\ :sub:`10` 251 - Cb\ :sub:`11` 252 - Cr\ :sub:`11` 253 254 255.. _V4L2-PIX-FMT-NV12MT: 256.. _V4L2-PIX-FMT-NV12MT-16X16: 257.. _V4L2-PIX-FMT-NV12-4L4: 258.. _V4L2-PIX-FMT-NV12-16L16: 259.. _V4L2-PIX-FMT-NV12-32L32: 260 261Tiled NV12 262---------- 263 264Semi-planar YUV 4:2:0 formats, using macroblock tiling. The chroma plane is 265subsampled by 2 in each direction. Chroma lines contain half the number of 266pixels and the same number of bytes as luma lines, and the chroma plane 267contains half the number of lines of the luma plane. Each tile follows the 268previous one linearly in memory (from left to right, top to bottom). 269 270``V4L2_PIX_FMT_NV12MT_16X16`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 271pixels in 2D 16x16 tiles, and stores tiles linearly in memory. 272The line stride and image height must be aligned to a multiple of 16. 273The layouts of the luma and chroma planes are identical. 274 275``V4L2_PIX_FMT_NV12MT`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 276pixels in 2D 64x32 tiles, and stores 2x2 groups of tiles in 277Z-order in memory, alternating Z and mirrored Z shapes horizontally. 278The line stride must be a multiple of 128 pixels to ensure an 279integer number of Z shapes. The image height must be a multiple of 32 pixels. 280If the vertical resolution is an odd number of tiles, the last row of 281tiles is stored in linear order. The layouts of the luma and chroma 282planes are identical. 283 284``V4L2_PIX_FMT_NV12_4L4`` stores pixel in 4x4 tiles, and stores 285tiles linearly in memory. The line stride and image height must be 286aligned to a multiple of 4. The layouts of the luma and chroma planes are 287identical. 288 289``V4L2_PIX_FMT_NV12_16L16`` stores pixel in 16x16 tiles, and stores 290tiles linearly in memory. The line stride and image height must be 291aligned to a multiple of 16. The layouts of the luma and chroma planes are 292identical. 293 294``V4L2_PIX_FMT_NV12_32L32`` stores pixel in 32x32 tiles, and stores 295tiles linearly in memory. The line stride and image height must be 296aligned to a multiple of 32. The layouts of the luma and chroma planes are 297identical. 298 299.. _nv12mt: 300 301.. kernel-figure:: nv12mt.svg 302 :alt: nv12mt.svg 303 :align: center 304 305 V4L2_PIX_FMT_NV12MT macroblock Z shape memory layout 306 307.. _nv12mt_ex: 308 309.. kernel-figure:: nv12mt_example.svg 310 :alt: nv12mt_example.svg 311 :align: center 312 313 Example V4L2_PIX_FMT_NV12MT memory layout of tiles 314 315 316.. _V4L2-PIX-FMT-NV16: 317.. _V4L2-PIX-FMT-NV61: 318.. _V4L2-PIX-FMT-NV16M: 319.. _V4L2-PIX-FMT-NV61M: 320 321NV16, NV61, NV16M and NV61M 322--------------------------- 323 324Semi-planar YUV 4:2:2 formats. The chroma plane is subsampled by 2 in the 325horizontal direction. Chroma lines contain half the number of pixels and the 326same number of bytes as luma lines, and the chroma plane contains the same 327number of lines as the luma plane. 328 329.. flat-table:: Sample 4x4 NV16 Image 330 :header-rows: 0 331 :stub-columns: 0 332 333 * - start + 0: 334 - Y'\ :sub:`00` 335 - Y'\ :sub:`01` 336 - Y'\ :sub:`02` 337 - Y'\ :sub:`03` 338 * - start + 4: 339 - Y'\ :sub:`10` 340 - Y'\ :sub:`11` 341 - Y'\ :sub:`12` 342 - Y'\ :sub:`13` 343 * - start + 8: 344 - Y'\ :sub:`20` 345 - Y'\ :sub:`21` 346 - Y'\ :sub:`22` 347 - Y'\ :sub:`23` 348 * - start + 12: 349 - Y'\ :sub:`30` 350 - Y'\ :sub:`31` 351 - Y'\ :sub:`32` 352 - Y'\ :sub:`33` 353 * - start + 16: 354 - Cb\ :sub:`00` 355 - Cr\ :sub:`00` 356 - Cb\ :sub:`01` 357 - Cr\ :sub:`01` 358 * - start + 20: 359 - Cb\ :sub:`10` 360 - Cr\ :sub:`10` 361 - Cb\ :sub:`11` 362 - Cr\ :sub:`11` 363 * - start + 24: 364 - Cb\ :sub:`20` 365 - Cr\ :sub:`20` 366 - Cb\ :sub:`21` 367 - Cr\ :sub:`21` 368 * - start + 28: 369 - Cb\ :sub:`30` 370 - Cr\ :sub:`30` 371 - Cb\ :sub:`31` 372 - Cr\ :sub:`31` 373 374.. flat-table:: Sample 4x4 NV16M Image 375 :header-rows: 0 376 :stub-columns: 0 377 378 * - start0 + 0: 379 - Y'\ :sub:`00` 380 - Y'\ :sub:`01` 381 - Y'\ :sub:`02` 382 - Y'\ :sub:`03` 383 * - start0 + 4: 384 - Y'\ :sub:`10` 385 - Y'\ :sub:`11` 386 - Y'\ :sub:`12` 387 - Y'\ :sub:`13` 388 * - start0 + 8: 389 - Y'\ :sub:`20` 390 - Y'\ :sub:`21` 391 - Y'\ :sub:`22` 392 - Y'\ :sub:`23` 393 * - start0 + 12: 394 - Y'\ :sub:`30` 395 - Y'\ :sub:`31` 396 - Y'\ :sub:`32` 397 - Y'\ :sub:`33` 398 * - 399 * - start1 + 0: 400 - Cb\ :sub:`00` 401 - Cr\ :sub:`00` 402 - Cb\ :sub:`02` 403 - Cr\ :sub:`02` 404 * - start1 + 4: 405 - Cb\ :sub:`10` 406 - Cr\ :sub:`10` 407 - Cb\ :sub:`12` 408 - Cr\ :sub:`12` 409 * - start1 + 8: 410 - Cb\ :sub:`20` 411 - Cr\ :sub:`20` 412 - Cb\ :sub:`22` 413 - Cr\ :sub:`22` 414 * - start1 + 12: 415 - Cb\ :sub:`30` 416 - Cr\ :sub:`30` 417 - Cb\ :sub:`32` 418 - Cr\ :sub:`32` 419 420 421.. _V4L2-PIX-FMT-NV24: 422.. _V4L2-PIX-FMT-NV42: 423 424NV24 and NV42 425------------- 426 427Semi-planar YUV 4:4:4 formats. The chroma plane is not subsampled. 428Chroma lines contain the same number of pixels and twice the 429number of bytes as luma lines, and the chroma plane contains the same 430number of lines as the luma plane. 431 432.. flat-table:: Sample 4x4 NV24 Image 433 :header-rows: 0 434 :stub-columns: 0 435 436 * - start + 0: 437 - Y'\ :sub:`00` 438 - Y'\ :sub:`01` 439 - Y'\ :sub:`02` 440 - Y'\ :sub:`03` 441 * - start + 4: 442 - Y'\ :sub:`10` 443 - Y'\ :sub:`11` 444 - Y'\ :sub:`12` 445 - Y'\ :sub:`13` 446 * - start + 8: 447 - Y'\ :sub:`20` 448 - Y'\ :sub:`21` 449 - Y'\ :sub:`22` 450 - Y'\ :sub:`23` 451 * - start + 12: 452 - Y'\ :sub:`30` 453 - Y'\ :sub:`31` 454 - Y'\ :sub:`32` 455 - Y'\ :sub:`33` 456 * - start + 16: 457 - Cb\ :sub:`00` 458 - Cr\ :sub:`00` 459 - Cb\ :sub:`01` 460 - Cr\ :sub:`01` 461 - Cb\ :sub:`02` 462 - Cr\ :sub:`02` 463 - Cb\ :sub:`03` 464 - Cr\ :sub:`03` 465 * - start + 24: 466 - Cb\ :sub:`10` 467 - Cr\ :sub:`10` 468 - Cb\ :sub:`11` 469 - Cr\ :sub:`11` 470 - Cb\ :sub:`12` 471 - Cr\ :sub:`12` 472 - Cb\ :sub:`13` 473 - Cr\ :sub:`13` 474 * - start + 32: 475 - Cb\ :sub:`20` 476 - Cr\ :sub:`20` 477 - Cb\ :sub:`21` 478 - Cr\ :sub:`21` 479 - Cb\ :sub:`22` 480 - Cr\ :sub:`22` 481 - Cb\ :sub:`23` 482 - Cr\ :sub:`23` 483 * - start + 40: 484 - Cb\ :sub:`30` 485 - Cr\ :sub:`30` 486 - Cb\ :sub:`31` 487 - Cr\ :sub:`31` 488 - Cb\ :sub:`32` 489 - Cr\ :sub:`32` 490 - Cb\ :sub:`33` 491 - Cr\ :sub:`33` 492 493 494Fully Planar YUV Formats 495======================== 496 497These formats store the Y, Cb and Cr components in three separate planes. The 498luma plane comes first, and the order of the two chroma planes varies between 499formats. The two chroma planes always use the same subsampling. 500 501For memory contiguous formats, the number of padding pixels at the end of the 502chroma lines is identical to the padding of the luma lines. The chroma line 503stride (in bytes) is thus equal to the luma line stride divided by the 504horizontal subsampling factor. Vertical subsampling doesn't affect the line 505stride. 506 507For non-contiguous formats, no constraints are enforced by the format on the 508relationship between the luma and chroma line padding and stride. 509 510All components are stored with the same number of bits per component. 511 512.. raw:: latex 513 514 \small 515 516.. tabularcolumns:: |p{5.0cm}|p{1.1cm}|p{1.5cm}|p{2.2cm}|p{1.2cm}|p{3.7cm}| 517 518.. flat-table:: Overview of Fully Planar YUV Formats 519 :header-rows: 1 520 :stub-columns: 0 521 522 * - Identifier 523 - Code 524 - Bits per component 525 - Subsampling 526 - Planes order [4]_ 527 - Contiguous [5]_ 528 529 * - V4L2_PIX_FMT_YUV410 530 - 'YUV9' 531 - 8 532 - 4:1:0 533 - Y, Cb, Cr 534 - Yes 535 * - V4L2_PIX_FMT_YVU410 536 - 'YVU9' 537 - 8 538 - 4:1:0 539 - Y, Cr, Cb 540 - Yes 541 * - V4L2_PIX_FMT_YUV411P 542 - '411P' 543 - 8 544 - 4:1:1 545 - Y, Cb, Cr 546 - Yes 547 * - V4L2_PIX_FMT_YUV420M 548 - 'YM12' 549 - 8 550 - 4:2:0 551 - Y, Cb, Cr 552 - No 553 * - V4L2_PIX_FMT_YVU420M 554 - 'YM21' 555 - 8 556 - 4:2:0 557 - Y, Cr, Cb 558 - No 559 * - V4L2_PIX_FMT_YUV420 560 - 'YU12' 561 - 8 562 - 4:2:0 563 - Y, Cb, Cr 564 - Yes 565 * - V4L2_PIX_FMT_YVU420 566 - 'YV12' 567 - 8 568 - 4:2:0 569 - Y, Cr, Cb 570 - Yes 571 * - V4L2_PIX_FMT_YUV422P 572 - '422P' 573 - 8 574 - 4:2:2 575 - Y, Cb, Cr 576 - Yes 577 * - V4L2_PIX_FMT_YUV422M 578 - 'YM16' 579 - 8 580 - 4:2:2 581 - Y, Cb, Cr 582 - No 583 * - V4L2_PIX_FMT_YVU422M 584 - 'YM61' 585 - 8 586 - 4:2:2 587 - Y, Cr, Cb 588 - No 589 * - V4L2_PIX_FMT_YUV444M 590 - 'YM24' 591 - 8 592 - 4:4:4 593 - Y, Cb, Cr 594 - No 595 * - V4L2_PIX_FMT_YVU444M 596 - 'YM42' 597 - 8 598 - 4:4:4 599 - Y, Cr, Cb 600 - No 601 602.. raw:: latex 603 604 \normalsize 605 606.. [4] Order of luma and chroma planes 607.. [5] Indicates if planes have to be contiguous in memory or can be 608 disjoint 609 610 611**Color Sample Location:** 612Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>` 613horizontally. 614 615.. _V4L2-PIX-FMT-YUV410: 616.. _V4L2-PIX-FMT-YVU410: 617 618YUV410 and YVU410 619----------------- 620 621Planar YUV 4:1:0 formats. The chroma planes are subsampled by 4 in each 622direction. Chroma lines contain a quarter of the number of pixels and bytes of 623the luma lines, and the chroma planes contain a quarter of the number of lines 624of the luma plane. 625 626.. flat-table:: Sample 4x4 YUV410 Image 627 :header-rows: 0 628 :stub-columns: 0 629 630 * - start + 0: 631 - Y'\ :sub:`00` 632 - Y'\ :sub:`01` 633 - Y'\ :sub:`02` 634 - Y'\ :sub:`03` 635 * - start + 4: 636 - Y'\ :sub:`10` 637 - Y'\ :sub:`11` 638 - Y'\ :sub:`12` 639 - Y'\ :sub:`13` 640 * - start + 8: 641 - Y'\ :sub:`20` 642 - Y'\ :sub:`21` 643 - Y'\ :sub:`22` 644 - Y'\ :sub:`23` 645 * - start + 12: 646 - Y'\ :sub:`30` 647 - Y'\ :sub:`31` 648 - Y'\ :sub:`32` 649 - Y'\ :sub:`33` 650 * - start + 16: 651 - Cr\ :sub:`00` 652 * - start + 17: 653 - Cb\ :sub:`00` 654 655 656.. _V4L2-PIX-FMT-YUV411P: 657 658YUV411P 659------- 660 661Planar YUV 4:1:1 formats. The chroma planes are subsampled by 4 in the 662horizontal direction. Chroma lines contain a quarter of the number of pixels 663and bytes of the luma lines, and the chroma planes contain the same number of 664lines as the luma plane. 665 666.. flat-table:: Sample 4x4 YUV411P Image 667 :header-rows: 0 668 :stub-columns: 0 669 670 * - start + 0: 671 - Y'\ :sub:`00` 672 - Y'\ :sub:`01` 673 - Y'\ :sub:`02` 674 - Y'\ :sub:`03` 675 * - start + 4: 676 - Y'\ :sub:`10` 677 - Y'\ :sub:`11` 678 - Y'\ :sub:`12` 679 - Y'\ :sub:`13` 680 * - start + 8: 681 - Y'\ :sub:`20` 682 - Y'\ :sub:`21` 683 - Y'\ :sub:`22` 684 - Y'\ :sub:`23` 685 * - start + 12: 686 - Y'\ :sub:`30` 687 - Y'\ :sub:`31` 688 - Y'\ :sub:`32` 689 - Y'\ :sub:`33` 690 * - start + 16: 691 - Cb\ :sub:`00` 692 * - start + 17: 693 - Cb\ :sub:`10` 694 * - start + 18: 695 - Cb\ :sub:`20` 696 * - start + 19: 697 - Cb\ :sub:`30` 698 * - start + 20: 699 - Cr\ :sub:`00` 700 * - start + 21: 701 - Cr\ :sub:`10` 702 * - start + 22: 703 - Cr\ :sub:`20` 704 * - start + 23: 705 - Cr\ :sub:`30` 706 707 708.. _V4L2-PIX-FMT-YUV420: 709.. _V4L2-PIX-FMT-YVU420: 710.. _V4L2-PIX-FMT-YUV420M: 711.. _V4L2-PIX-FMT-YVU420M: 712 713YUV420, YVU420, YUV420M and YVU420M 714----------------------------------- 715 716Planar YUV 4:2:0 formats. The chroma planes are subsampled by 2 in each 717direction. Chroma lines contain half of the number of pixels and bytes of the 718luma lines, and the chroma planes contain half of the number of lines of the 719luma plane. 720 721.. flat-table:: Sample 4x4 YUV420 Image 722 :header-rows: 0 723 :stub-columns: 0 724 725 * - start + 0: 726 - Y'\ :sub:`00` 727 - Y'\ :sub:`01` 728 - Y'\ :sub:`02` 729 - Y'\ :sub:`03` 730 * - start + 4: 731 - Y'\ :sub:`10` 732 - Y'\ :sub:`11` 733 - Y'\ :sub:`12` 734 - Y'\ :sub:`13` 735 * - start + 8: 736 - Y'\ :sub:`20` 737 - Y'\ :sub:`21` 738 - Y'\ :sub:`22` 739 - Y'\ :sub:`23` 740 * - start + 12: 741 - Y'\ :sub:`30` 742 - Y'\ :sub:`31` 743 - Y'\ :sub:`32` 744 - Y'\ :sub:`33` 745 * - start + 16: 746 - Cr\ :sub:`00` 747 - Cr\ :sub:`01` 748 * - start + 18: 749 - Cr\ :sub:`10` 750 - Cr\ :sub:`11` 751 * - start + 20: 752 - Cb\ :sub:`00` 753 - Cb\ :sub:`01` 754 * - start + 22: 755 - Cb\ :sub:`10` 756 - Cb\ :sub:`11` 757 758.. flat-table:: Sample 4x4 YUV420M Image 759 :header-rows: 0 760 :stub-columns: 0 761 762 * - start0 + 0: 763 - Y'\ :sub:`00` 764 - Y'\ :sub:`01` 765 - Y'\ :sub:`02` 766 - Y'\ :sub:`03` 767 * - start0 + 4: 768 - Y'\ :sub:`10` 769 - Y'\ :sub:`11` 770 - Y'\ :sub:`12` 771 - Y'\ :sub:`13` 772 * - start0 + 8: 773 - Y'\ :sub:`20` 774 - Y'\ :sub:`21` 775 - Y'\ :sub:`22` 776 - Y'\ :sub:`23` 777 * - start0 + 12: 778 - Y'\ :sub:`30` 779 - Y'\ :sub:`31` 780 - Y'\ :sub:`32` 781 - Y'\ :sub:`33` 782 * - 783 * - start1 + 0: 784 - Cb\ :sub:`00` 785 - Cb\ :sub:`01` 786 * - start1 + 2: 787 - Cb\ :sub:`10` 788 - Cb\ :sub:`11` 789 * - 790 * - start2 + 0: 791 - Cr\ :sub:`00` 792 - Cr\ :sub:`01` 793 * - start2 + 2: 794 - Cr\ :sub:`10` 795 - Cr\ :sub:`11` 796 797 798.. _V4L2-PIX-FMT-YUV422P: 799.. _V4L2-PIX-FMT-YUV422M: 800.. _V4L2-PIX-FMT-YVU422M: 801 802YUV422P, YUV422M and YVU422M 803---------------------------- 804 805Planar YUV 4:2:2 formats. The chroma planes are subsampled by 2 in the 806horizontal direction. Chroma lines contain half of the number of pixels and 807bytes of the luma lines, and the chroma planes contain the same number of lines 808as the luma plane. 809 810.. flat-table:: Sample 4x4 YUV422P Image 811 :header-rows: 0 812 :stub-columns: 0 813 814 * - start + 0: 815 - Y'\ :sub:`00` 816 - Y'\ :sub:`01` 817 - Y'\ :sub:`02` 818 - Y'\ :sub:`03` 819 * - start + 4: 820 - Y'\ :sub:`10` 821 - Y'\ :sub:`11` 822 - Y'\ :sub:`12` 823 - Y'\ :sub:`13` 824 * - start + 8: 825 - Y'\ :sub:`20` 826 - Y'\ :sub:`21` 827 - Y'\ :sub:`22` 828 - Y'\ :sub:`23` 829 * - start + 12: 830 - Y'\ :sub:`30` 831 - Y'\ :sub:`31` 832 - Y'\ :sub:`32` 833 - Y'\ :sub:`33` 834 * - start + 16: 835 - Cb\ :sub:`00` 836 - Cb\ :sub:`01` 837 * - start + 18: 838 - Cb\ :sub:`10` 839 - Cb\ :sub:`11` 840 * - start + 20: 841 - Cb\ :sub:`20` 842 - Cb\ :sub:`21` 843 * - start + 22: 844 - Cb\ :sub:`30` 845 - Cb\ :sub:`31` 846 * - start + 24: 847 - Cr\ :sub:`00` 848 - Cr\ :sub:`01` 849 * - start + 26: 850 - Cr\ :sub:`10` 851 - Cr\ :sub:`11` 852 * - start + 28: 853 - Cr\ :sub:`20` 854 - Cr\ :sub:`21` 855 * - start + 30: 856 - Cr\ :sub:`30` 857 - Cr\ :sub:`31` 858 859.. flat-table:: Sample 4x4 YUV422M Image 860 :header-rows: 0 861 :stub-columns: 0 862 863 * - start0 + 0: 864 - Y'\ :sub:`00` 865 - Y'\ :sub:`01` 866 - Y'\ :sub:`02` 867 - Y'\ :sub:`03` 868 * - start0 + 4: 869 - Y'\ :sub:`10` 870 - Y'\ :sub:`11` 871 - Y'\ :sub:`12` 872 - Y'\ :sub:`13` 873 * - start0 + 8: 874 - Y'\ :sub:`20` 875 - Y'\ :sub:`21` 876 - Y'\ :sub:`22` 877 - Y'\ :sub:`23` 878 * - start0 + 12: 879 - Y'\ :sub:`30` 880 - Y'\ :sub:`31` 881 - Y'\ :sub:`32` 882 - Y'\ :sub:`33` 883 * - 884 * - start1 + 0: 885 - Cb\ :sub:`00` 886 - Cb\ :sub:`01` 887 * - start1 + 2: 888 - Cb\ :sub:`10` 889 - Cb\ :sub:`11` 890 * - start1 + 4: 891 - Cb\ :sub:`20` 892 - Cb\ :sub:`21` 893 * - start1 + 6: 894 - Cb\ :sub:`30` 895 - Cb\ :sub:`31` 896 * - 897 * - start2 + 0: 898 - Cr\ :sub:`00` 899 - Cr\ :sub:`01` 900 * - start2 + 2: 901 - Cr\ :sub:`10` 902 - Cr\ :sub:`11` 903 * - start2 + 4: 904 - Cr\ :sub:`20` 905 - Cr\ :sub:`21` 906 * - start2 + 6: 907 - Cr\ :sub:`30` 908 - Cr\ :sub:`31` 909 910 911.. _V4L2-PIX-FMT-YUV444M: 912.. _V4L2-PIX-FMT-YVU444M: 913 914YUV444M and YVU444M 915------------------- 916 917Planar YUV 4:4:4 formats. The chroma planes are no subsampled. Chroma lines 918contain the same number of pixels and bytes of the luma lines, and the chroma 919planes contain the same number of lines as the luma plane. 920 921.. flat-table:: Sample 4x4 YUV444M Image 922 :header-rows: 0 923 :stub-columns: 0 924 925 * - start0 + 0: 926 - Y'\ :sub:`00` 927 - Y'\ :sub:`01` 928 - Y'\ :sub:`02` 929 - Y'\ :sub:`03` 930 * - start0 + 4: 931 - Y'\ :sub:`10` 932 - Y'\ :sub:`11` 933 - Y'\ :sub:`12` 934 - Y'\ :sub:`13` 935 * - start0 + 8: 936 - Y'\ :sub:`20` 937 - Y'\ :sub:`21` 938 - Y'\ :sub:`22` 939 - Y'\ :sub:`23` 940 * - start0 + 12: 941 - Y'\ :sub:`30` 942 - Y'\ :sub:`31` 943 - Y'\ :sub:`32` 944 - Y'\ :sub:`33` 945 * - 946 * - start1 + 0: 947 - Cb\ :sub:`00` 948 - Cb\ :sub:`01` 949 - Cb\ :sub:`02` 950 - Cb\ :sub:`03` 951 * - start1 + 4: 952 - Cb\ :sub:`10` 953 - Cb\ :sub:`11` 954 - Cb\ :sub:`12` 955 - Cb\ :sub:`13` 956 * - start1 + 8: 957 - Cb\ :sub:`20` 958 - Cb\ :sub:`21` 959 - Cb\ :sub:`22` 960 - Cb\ :sub:`23` 961 * - start1 + 12: 962 - Cb\ :sub:`20` 963 - Cb\ :sub:`21` 964 - Cb\ :sub:`32` 965 - Cb\ :sub:`33` 966 * - 967 * - start2 + 0: 968 - Cr\ :sub:`00` 969 - Cr\ :sub:`01` 970 - Cr\ :sub:`02` 971 - Cr\ :sub:`03` 972 * - start2 + 4: 973 - Cr\ :sub:`10` 974 - Cr\ :sub:`11` 975 - Cr\ :sub:`12` 976 - Cr\ :sub:`13` 977 * - start2 + 8: 978 - Cr\ :sub:`20` 979 - Cr\ :sub:`21` 980 - Cr\ :sub:`22` 981 - Cr\ :sub:`23` 982 * - start2 + 12: 983 - Cr\ :sub:`30` 984 - Cr\ :sub:`31` 985 - Cr\ :sub:`32` 986 - Cr\ :sub:`33` 987