1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 3.. _pixfmt-rgb: 4 5*********** 6RGB Formats 7*********** 8 9These formats encode each pixel as a triplet of RGB values. They are packed 10formats, meaning that the RGB values for one pixel are stored consecutively in 11memory and each pixel consumes an integer number of bytes. When the number of 12bits required to store a pixel is not aligned to a byte boundary, the data is 13padded with additional bits to fill the remaining byte. 14 15The formats differ by the number of bits per RGB component (typically but not 16always the same for all components), the order of components in memory, and the 17presence of an alpha component or additional padding bits. 18 19The usage and value of the alpha bits in formats that support them (named ARGB 20or a permutation thereof, collectively referred to as alpha formats) depend on 21the device type and hardware operation. :ref:`Capture <capture>` devices 22(including capture queues of mem-to-mem devices) fill the alpha component in 23memory. When the device captures an alpha channel the alpha component will have 24a meaningful value. Otherwise, when the device doesn't capture an alpha channel 25but can set the alpha bit to a user-configurable value, the 26:ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control is used to 27specify that alpha value, and the alpha component of all pixels will be set to 28the value specified by that control. Otherwise a corresponding format without 29an alpha component (XRGB or XBGR) must be used instead of an alpha format. 30 31:ref:`Output <output>` devices (including output queues of mem-to-mem devices 32and :ref:`video output overlay <osd>` devices) read the alpha component from 33memory. When the device processes the alpha channel the alpha component must be 34filled with meaningful values by applications. Otherwise a corresponding format 35without an alpha component (XRGB or XBGR) must be used instead of an alpha 36format. 37 38Formats that contain padding bits are named XRGB (or a permutation thereof). 39The padding bits contain undefined values and must be ignored by applications, 40devices and drivers, for both :ref:`capture` and :ref:`output` devices. 41 42.. note:: 43 44 - In all the tables that follow, bit 7 is the most significant bit in a byte. 45 - 'r', 'g' and 'b' denote bits of the red, green and blue components 46 respectively. 'a' denotes bits of the alpha component (if supported by the 47 format), and 'x' denotes padding bits. 48 49 50Less Than 8 Bits Per Component 51============================== 52 53These formats store an RGB triplet in one, two or four bytes. They are named 54based on the order of the RGB components as seen in a 8-, 16- or 32-bit word, 55which is then stored in memory in little endian byte order (unless otherwise 56noted by the presence of bit 31 in the 4CC value), and on the number of bits 57for each component. For instance, the RGB565 format stores a pixel in a 16-bit 58word [15:0] laid out at as [R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1` 59R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3` G\ :sub:`2` G\ :sub:`1` 60G\ :sub:`0` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` B\ :sub:`1` B\ :sub:`0`], and 61stored in memory in two bytes, [R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1` 62R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3`] followed by [G\ :sub:`2` 63G\ :sub:`1` G\ :sub:`0` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` B\ :sub:`1` 64B\ :sub:`0`]. 65 66.. raw:: latex 67 68 \begingroup 69 \tiny 70 \setlength{\tabcolsep}{2pt} 71 72.. tabularcolumns:: |p{2.8cm}|p{2.0cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}| 73 74 75.. flat-table:: RGB Formats With Less Than 8 Bits Per Component 76 :header-rows: 2 77 :stub-columns: 0 78 79 * - Identifier 80 - Code 81 - :cspan:`7` Byte 0 in memory 82 - :cspan:`7` Byte 1 83 - :cspan:`7` Byte 2 84 - :cspan:`7` Byte 3 85 * - 86 - 87 - 7 88 - 6 89 - 5 90 - 4 91 - 3 92 - 2 93 - 1 94 - 0 95 96 - 7 97 - 6 98 - 5 99 - 4 100 - 3 101 - 2 102 - 1 103 - 0 104 105 - 7 106 - 6 107 - 5 108 - 4 109 - 3 110 - 2 111 - 1 112 - 0 113 114 - 7 115 - 6 116 - 5 117 - 4 118 - 3 119 - 2 120 - 1 121 - 0 122 * .. _V4L2-PIX-FMT-RGB332: 123 124 - ``V4L2_PIX_FMT_RGB332`` 125 - 'RGB1' 126 127 - r\ :sub:`2` 128 - r\ :sub:`1` 129 - r\ :sub:`0` 130 - g\ :sub:`2` 131 - g\ :sub:`1` 132 - g\ :sub:`0` 133 - b\ :sub:`1` 134 - b\ :sub:`0` 135 - 136 * .. _V4L2-PIX-FMT-ARGB444: 137 138 - ``V4L2_PIX_FMT_ARGB444`` 139 - 'AR12' 140 141 - g\ :sub:`3` 142 - g\ :sub:`2` 143 - g\ :sub:`1` 144 - g\ :sub:`0` 145 - b\ :sub:`3` 146 - b\ :sub:`2` 147 - b\ :sub:`1` 148 - b\ :sub:`0` 149 150 - a\ :sub:`3` 151 - a\ :sub:`2` 152 - a\ :sub:`1` 153 - a\ :sub:`0` 154 - r\ :sub:`3` 155 - r\ :sub:`2` 156 - r\ :sub:`1` 157 - r\ :sub:`0` 158 - 159 * .. _V4L2-PIX-FMT-XRGB444: 160 161 - ``V4L2_PIX_FMT_XRGB444`` 162 - 'XR12' 163 164 - g\ :sub:`3` 165 - g\ :sub:`2` 166 - g\ :sub:`1` 167 - g\ :sub:`0` 168 - b\ :sub:`3` 169 - b\ :sub:`2` 170 - b\ :sub:`1` 171 - b\ :sub:`0` 172 173 - x 174 - x 175 - x 176 - x 177 - r\ :sub:`3` 178 - r\ :sub:`2` 179 - r\ :sub:`1` 180 - r\ :sub:`0` 181 - 182 * .. _V4L2-PIX-FMT-RGBA444: 183 184 - ``V4L2_PIX_FMT_RGBA444`` 185 - 'RA12' 186 187 - b\ :sub:`3` 188 - b\ :sub:`2` 189 - b\ :sub:`1` 190 - b\ :sub:`0` 191 - a\ :sub:`3` 192 - a\ :sub:`2` 193 - a\ :sub:`1` 194 - a\ :sub:`0` 195 196 - r\ :sub:`3` 197 - r\ :sub:`2` 198 - r\ :sub:`1` 199 - r\ :sub:`0` 200 - g\ :sub:`3` 201 - g\ :sub:`2` 202 - g\ :sub:`1` 203 - g\ :sub:`0` 204 - 205 * .. _V4L2-PIX-FMT-RGBX444: 206 207 - ``V4L2_PIX_FMT_RGBX444`` 208 - 'RX12' 209 210 - b\ :sub:`3` 211 - b\ :sub:`2` 212 - b\ :sub:`1` 213 - b\ :sub:`0` 214 - x 215 - x 216 - x 217 - x 218 219 - r\ :sub:`3` 220 - r\ :sub:`2` 221 - r\ :sub:`1` 222 - r\ :sub:`0` 223 - g\ :sub:`3` 224 - g\ :sub:`2` 225 - g\ :sub:`1` 226 - g\ :sub:`0` 227 - 228 * .. _V4L2-PIX-FMT-ABGR444: 229 230 - ``V4L2_PIX_FMT_ABGR444`` 231 - 'AB12' 232 233 - g\ :sub:`3` 234 - g\ :sub:`2` 235 - g\ :sub:`1` 236 - g\ :sub:`0` 237 - r\ :sub:`3` 238 - r\ :sub:`2` 239 - r\ :sub:`1` 240 - r\ :sub:`0` 241 242 - a\ :sub:`3` 243 - a\ :sub:`2` 244 - a\ :sub:`1` 245 - a\ :sub:`0` 246 - b\ :sub:`3` 247 - b\ :sub:`2` 248 - b\ :sub:`1` 249 - b\ :sub:`0` 250 - 251 * .. _V4L2-PIX-FMT-XBGR444: 252 253 - ``V4L2_PIX_FMT_XBGR444`` 254 - 'XB12' 255 256 - g\ :sub:`3` 257 - g\ :sub:`2` 258 - g\ :sub:`1` 259 - g\ :sub:`0` 260 - r\ :sub:`3` 261 - r\ :sub:`2` 262 - r\ :sub:`1` 263 - r\ :sub:`0` 264 265 - x 266 - x 267 - x 268 - x 269 - b\ :sub:`3` 270 - b\ :sub:`2` 271 - b\ :sub:`1` 272 - b\ :sub:`0` 273 - 274 * .. _V4L2-PIX-FMT-BGRA444: 275 276 - ``V4L2_PIX_FMT_BGRA444`` 277 - 'BA12' 278 279 - r\ :sub:`3` 280 - r\ :sub:`2` 281 - r\ :sub:`1` 282 - r\ :sub:`0` 283 - a\ :sub:`3` 284 - a\ :sub:`2` 285 - a\ :sub:`1` 286 - a\ :sub:`0` 287 288 - b\ :sub:`3` 289 - b\ :sub:`2` 290 - b\ :sub:`1` 291 - b\ :sub:`0` 292 - g\ :sub:`3` 293 - g\ :sub:`2` 294 - g\ :sub:`1` 295 - g\ :sub:`0` 296 - 297 * .. _V4L2-PIX-FMT-BGRX444: 298 299 - ``V4L2_PIX_FMT_BGRX444`` 300 - 'BX12' 301 302 - r\ :sub:`3` 303 - r\ :sub:`2` 304 - r\ :sub:`1` 305 - r\ :sub:`0` 306 - x 307 - x 308 - x 309 - x 310 311 - b\ :sub:`3` 312 - b\ :sub:`2` 313 - b\ :sub:`1` 314 - b\ :sub:`0` 315 - g\ :sub:`3` 316 - g\ :sub:`2` 317 - g\ :sub:`1` 318 - g\ :sub:`0` 319 - 320 * .. _V4L2-PIX-FMT-ARGB555: 321 322 - ``V4L2_PIX_FMT_ARGB555`` 323 - 'AR15' 324 325 - g\ :sub:`2` 326 - g\ :sub:`1` 327 - g\ :sub:`0` 328 - b\ :sub:`4` 329 - b\ :sub:`3` 330 - b\ :sub:`2` 331 - b\ :sub:`1` 332 - b\ :sub:`0` 333 334 - a 335 - r\ :sub:`4` 336 - r\ :sub:`3` 337 - r\ :sub:`2` 338 - r\ :sub:`1` 339 - r\ :sub:`0` 340 - g\ :sub:`4` 341 - g\ :sub:`3` 342 - 343 * .. _V4L2-PIX-FMT-XRGB555: 344 345 - ``V4L2_PIX_FMT_XRGB555`` 346 - 'XR15' 347 348 - g\ :sub:`2` 349 - g\ :sub:`1` 350 - g\ :sub:`0` 351 - b\ :sub:`4` 352 - b\ :sub:`3` 353 - b\ :sub:`2` 354 - b\ :sub:`1` 355 - b\ :sub:`0` 356 357 - x 358 - r\ :sub:`4` 359 - r\ :sub:`3` 360 - r\ :sub:`2` 361 - r\ :sub:`1` 362 - r\ :sub:`0` 363 - g\ :sub:`4` 364 - g\ :sub:`3` 365 - 366 * .. _V4L2-PIX-FMT-RGBA555: 367 368 - ``V4L2_PIX_FMT_RGBA555`` 369 - 'RA15' 370 371 - g\ :sub:`1` 372 - g\ :sub:`0` 373 - b\ :sub:`4` 374 - b\ :sub:`3` 375 - b\ :sub:`2` 376 - b\ :sub:`1` 377 - b\ :sub:`0` 378 - a 379 380 - r\ :sub:`4` 381 - r\ :sub:`3` 382 - r\ :sub:`2` 383 - r\ :sub:`1` 384 - r\ :sub:`0` 385 - g\ :sub:`4` 386 - g\ :sub:`3` 387 - g\ :sub:`2` 388 - 389 * .. _V4L2-PIX-FMT-RGBX555: 390 391 - ``V4L2_PIX_FMT_RGBX555`` 392 - 'RX15' 393 394 - g\ :sub:`1` 395 - g\ :sub:`0` 396 - b\ :sub:`4` 397 - b\ :sub:`3` 398 - b\ :sub:`2` 399 - b\ :sub:`1` 400 - b\ :sub:`0` 401 - x 402 403 - r\ :sub:`4` 404 - r\ :sub:`3` 405 - r\ :sub:`2` 406 - r\ :sub:`1` 407 - r\ :sub:`0` 408 - g\ :sub:`4` 409 - g\ :sub:`3` 410 - g\ :sub:`2` 411 - 412 * .. _V4L2-PIX-FMT-ABGR555: 413 414 - ``V4L2_PIX_FMT_ABGR555`` 415 - 'AB15' 416 417 - g\ :sub:`2` 418 - g\ :sub:`1` 419 - g\ :sub:`0` 420 - r\ :sub:`4` 421 - r\ :sub:`3` 422 - r\ :sub:`2` 423 - r\ :sub:`1` 424 - r\ :sub:`0` 425 426 - a 427 - b\ :sub:`4` 428 - b\ :sub:`3` 429 - b\ :sub:`2` 430 - b\ :sub:`1` 431 - b\ :sub:`0` 432 - g\ :sub:`4` 433 - g\ :sub:`3` 434 - 435 * .. _V4L2-PIX-FMT-XBGR555: 436 437 - ``V4L2_PIX_FMT_XBGR555`` 438 - 'XB15' 439 440 - g\ :sub:`2` 441 - g\ :sub:`1` 442 - g\ :sub:`0` 443 - r\ :sub:`4` 444 - r\ :sub:`3` 445 - r\ :sub:`2` 446 - r\ :sub:`1` 447 - r\ :sub:`0` 448 449 - x 450 - b\ :sub:`4` 451 - b\ :sub:`3` 452 - b\ :sub:`2` 453 - b\ :sub:`1` 454 - b\ :sub:`0` 455 - g\ :sub:`4` 456 - g\ :sub:`3` 457 - 458 * .. _V4L2-PIX-FMT-BGRA555: 459 460 - ``V4L2_PIX_FMT_BGRA555`` 461 - 'BA15' 462 463 - g\ :sub:`1` 464 - g\ :sub:`0` 465 - r\ :sub:`4` 466 - r\ :sub:`3` 467 - r\ :sub:`2` 468 - r\ :sub:`1` 469 - r\ :sub:`0` 470 - a 471 472 - b\ :sub:`4` 473 - b\ :sub:`3` 474 - b\ :sub:`2` 475 - b\ :sub:`1` 476 - b\ :sub:`0` 477 - g\ :sub:`4` 478 - g\ :sub:`3` 479 - g\ :sub:`2` 480 - 481 * .. _V4L2-PIX-FMT-BGRX555: 482 483 - ``V4L2_PIX_FMT_BGRX555`` 484 - 'BX15' 485 486 - g\ :sub:`1` 487 - g\ :sub:`0` 488 - r\ :sub:`4` 489 - r\ :sub:`3` 490 - r\ :sub:`2` 491 - r\ :sub:`1` 492 - r\ :sub:`0` 493 - x 494 495 - b\ :sub:`4` 496 - b\ :sub:`3` 497 - b\ :sub:`2` 498 - b\ :sub:`1` 499 - b\ :sub:`0` 500 - g\ :sub:`4` 501 - g\ :sub:`3` 502 - g\ :sub:`2` 503 - 504 * .. _V4L2-PIX-FMT-RGB565: 505 506 - ``V4L2_PIX_FMT_RGB565`` 507 - 'RGBP' 508 509 - g\ :sub:`2` 510 - g\ :sub:`1` 511 - g\ :sub:`0` 512 - b\ :sub:`4` 513 - b\ :sub:`3` 514 - b\ :sub:`2` 515 - b\ :sub:`1` 516 - b\ :sub:`0` 517 518 - r\ :sub:`4` 519 - r\ :sub:`3` 520 - r\ :sub:`2` 521 - r\ :sub:`1` 522 - r\ :sub:`0` 523 - g\ :sub:`5` 524 - g\ :sub:`4` 525 - g\ :sub:`3` 526 - 527 * .. _V4L2-PIX-FMT-ARGB555X: 528 529 - ``V4L2_PIX_FMT_ARGB555X`` 530 - 'AR15' | (1 << 31) 531 532 - a 533 - r\ :sub:`4` 534 - r\ :sub:`3` 535 - r\ :sub:`2` 536 - r\ :sub:`1` 537 - r\ :sub:`0` 538 - g\ :sub:`4` 539 - g\ :sub:`3` 540 541 - g\ :sub:`2` 542 - g\ :sub:`1` 543 - g\ :sub:`0` 544 - b\ :sub:`4` 545 - b\ :sub:`3` 546 - b\ :sub:`2` 547 - b\ :sub:`1` 548 - b\ :sub:`0` 549 - 550 * .. _V4L2-PIX-FMT-XRGB555X: 551 552 - ``V4L2_PIX_FMT_XRGB555X`` 553 - 'XR15' | (1 << 31) 554 555 - x 556 - r\ :sub:`4` 557 - r\ :sub:`3` 558 - r\ :sub:`2` 559 - r\ :sub:`1` 560 - r\ :sub:`0` 561 - g\ :sub:`4` 562 - g\ :sub:`3` 563 564 - g\ :sub:`2` 565 - g\ :sub:`1` 566 - g\ :sub:`0` 567 - b\ :sub:`4` 568 - b\ :sub:`3` 569 - b\ :sub:`2` 570 - b\ :sub:`1` 571 - b\ :sub:`0` 572 - 573 * .. _V4L2-PIX-FMT-RGB565X: 574 575 - ``V4L2_PIX_FMT_RGB565X`` 576 - 'RGBR' 577 578 - r\ :sub:`4` 579 - r\ :sub:`3` 580 - r\ :sub:`2` 581 - r\ :sub:`1` 582 - r\ :sub:`0` 583 - g\ :sub:`5` 584 - g\ :sub:`4` 585 - g\ :sub:`3` 586 587 - g\ :sub:`2` 588 - g\ :sub:`1` 589 - g\ :sub:`0` 590 - b\ :sub:`4` 591 - b\ :sub:`3` 592 - b\ :sub:`2` 593 - b\ :sub:`1` 594 - b\ :sub:`0` 595 - 596 * .. _V4L2-PIX-FMT-BGR666: 597 598 - ``V4L2_PIX_FMT_BGR666`` 599 - 'BGRH' 600 601 - b\ :sub:`5` 602 - b\ :sub:`4` 603 - b\ :sub:`3` 604 - b\ :sub:`2` 605 - b\ :sub:`1` 606 - b\ :sub:`0` 607 - g\ :sub:`5` 608 - g\ :sub:`4` 609 610 - g\ :sub:`3` 611 - g\ :sub:`2` 612 - g\ :sub:`1` 613 - g\ :sub:`0` 614 - r\ :sub:`5` 615 - r\ :sub:`4` 616 - r\ :sub:`3` 617 - r\ :sub:`2` 618 619 - r\ :sub:`1` 620 - r\ :sub:`0` 621 - x 622 - x 623 - x 624 - x 625 - x 626 - x 627 628 - x 629 - x 630 - x 631 - x 632 - x 633 - x 634 - x 635 - x 636 637.. raw:: latex 638 639 \endgroup 640 641 6428 Bits Per Component 643==================== 644 645These formats store an RGB triplet in three or four bytes. They are named based 646on the order of the RGB components as stored in memory, and on the total number 647of bits per pixel. For instance, RGB24 format stores a pixel with [R\ :sub:`7` 648R\ :sub:`6` R\ :sub:`5` R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1` 649R\ :sub:`0`] in the first byte, [G\ :sub:`7` G\ :sub:`6` G\ :sub:`5` G\ :sub:`4` 650G\ :sub:`3` G\ :sub:`2` G\ :sub:`1` G\ :sub:`0`] in the second byte and 651[B\ :sub:`7` B\ :sub:`6` B\ :sub:`5` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` 652B\ :sub:`1` B\ :sub:`0`] in the third byte. This differs from the DRM format 653nomenclature that instead use the order of components as seen in a 24- or 65432-bit little endian word. 655 656.. raw:: latex 657 658 \begingroup 659 \tiny 660 \setlength{\tabcolsep}{2pt} 661 662.. tabularcolumns:: |p{2.8cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}| 663 664 665.. flat-table:: RGB Formats With 8 Bits Per Component 666 :header-rows: 1 667 :stub-columns: 0 668 669 * - Identifier 670 - Code 671 - Byte 0 in memory 672 - Byte 1 673 - Byte 2 674 - Byte 3 675 * .. _V4L2-PIX-FMT-BGR24: 676 677 - ``V4L2_PIX_FMT_BGR24`` 678 - 'BGR3' 679 680 - G\ :sub:`7-0` 681 - B\ :sub:`7-0` 682 - R\ :sub:`7-0` 683 - 684 * .. _V4L2-PIX-FMT-RGB24: 685 686 - ``V4L2_PIX_FMT_RGB24`` 687 - 'RGB3' 688 689 - R\ :sub:`7-0` 690 - G\ :sub:`7-0` 691 - B\ :sub:`7-0` 692 - 693 * .. _V4L2-PIX-FMT-ABGR32: 694 695 - ``V4L2_PIX_FMT_ABGR32`` 696 - 'AR24' 697 698 - B\ :sub:`7-0` 699 - G\ :sub:`7-0` 700 - R\ :sub:`7-0` 701 - A\ :sub:`7-0` 702 * .. _V4L2-PIX-FMT-XBGR32: 703 704 - ``V4L2_PIX_FMT_XBGR32`` 705 - 'XR24' 706 707 - B\ :sub:`7-0` 708 - G\ :sub:`7-0` 709 - R\ :sub:`7-0` 710 - X\ :sub:`7-0` 711 * .. _V4L2-PIX-FMT-BGRA32: 712 713 - ``V4L2_PIX_FMT_BGRA32`` 714 - 'RA24' 715 716 - A\ :sub:`7-0` 717 - B\ :sub:`7-0` 718 - G\ :sub:`7-0` 719 - R\ :sub:`7-0` 720 * .. _V4L2-PIX-FMT-BGRX32: 721 722 - ``V4L2_PIX_FMT_BGRX32`` 723 - 'RX24' 724 725 - X\ :sub:`7-0` 726 - B\ :sub:`7-0` 727 - G\ :sub:`7-0` 728 - R\ :sub:`7-0` 729 * .. _V4L2-PIX-FMT-RGBA32: 730 731 - ``V4L2_PIX_FMT_RGBA32`` 732 - 'AB24' 733 734 - R\ :sub:`7-0` 735 - G\ :sub:`7-0` 736 - B\ :sub:`7-0` 737 - A\ :sub:`7-0` 738 * .. _V4L2-PIX-FMT-RGBX32: 739 740 - ``V4L2_PIX_FMT_RGBX32`` 741 - 'XB24' 742 743 - R\ :sub:`7-0` 744 - G\ :sub:`7-0` 745 - B\ :sub:`7-0` 746 - X\ :sub:`7-0` 747 * .. _V4L2-PIX-FMT-ARGB32: 748 749 - ``V4L2_PIX_FMT_ARGB32`` 750 - 'BA24' 751 752 - A\ :sub:`7-0` 753 - R\ :sub:`7-0` 754 - G\ :sub:`7-0` 755 - B\ :sub:`7-0` 756 * .. _V4L2-PIX-FMT-XRGB32: 757 758 - ``V4L2_PIX_FMT_XRGB32`` 759 - 'BX24' 760 761 - X\ :sub:`7-0` 762 - R\ :sub:`7-0` 763 - G\ :sub:`7-0` 764 - B\ :sub:`7-0` 765 766.. raw:: latex 767 768 \endgroup 769 770 771Deprecated RGB Formats 772====================== 773 774Formats defined in :ref:`pixfmt-rgb-deprecated` are deprecated and must not be 775used by new drivers. They are documented here for reference. The meaning of 776their alpha bits ``(a)`` is ill-defined and they are interpreted as in either 777the corresponding ARGB or XRGB format, depending on the driver. 778 779.. raw:: latex 780 781 \begingroup 782 \tiny 783 \setlength{\tabcolsep}{2pt} 784 785.. tabularcolumns:: |p{2.6cm}|p{0.70cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}| 786 787.. _pixfmt-rgb-deprecated: 788 789.. flat-table:: Deprecated Packed RGB Image Formats 790 :header-rows: 2 791 :stub-columns: 0 792 793 * - Identifier 794 - Code 795 - :cspan:`7` Byte 0 in memory 796 797 - :cspan:`7` Byte 1 798 799 - :cspan:`7` Byte 2 800 801 - :cspan:`7` Byte 3 802 * - 803 - 804 - 7 805 - 6 806 - 5 807 - 4 808 - 3 809 - 2 810 - 1 811 - 0 812 813 - 7 814 - 6 815 - 5 816 - 4 817 - 3 818 - 2 819 - 1 820 - 0 821 822 - 7 823 - 6 824 - 5 825 - 4 826 - 3 827 - 2 828 - 1 829 - 0 830 831 - 7 832 - 6 833 - 5 834 - 4 835 - 3 836 - 2 837 - 1 838 - 0 839 * .. _V4L2-PIX-FMT-RGB444: 840 841 - ``V4L2_PIX_FMT_RGB444`` 842 - 'R444' 843 844 - g\ :sub:`3` 845 - g\ :sub:`2` 846 - g\ :sub:`1` 847 - g\ :sub:`0` 848 - b\ :sub:`3` 849 - b\ :sub:`2` 850 - b\ :sub:`1` 851 - b\ :sub:`0` 852 853 - a\ :sub:`3` 854 - a\ :sub:`2` 855 - a\ :sub:`1` 856 - a\ :sub:`0` 857 - r\ :sub:`3` 858 - r\ :sub:`2` 859 - r\ :sub:`1` 860 - r\ :sub:`0` 861 - 862 * .. _V4L2-PIX-FMT-RGB555: 863 864 - ``V4L2_PIX_FMT_RGB555`` 865 - 'RGBO' 866 867 - g\ :sub:`2` 868 - g\ :sub:`1` 869 - g\ :sub:`0` 870 - b\ :sub:`4` 871 - b\ :sub:`3` 872 - b\ :sub:`2` 873 - b\ :sub:`1` 874 - b\ :sub:`0` 875 876 - a 877 - r\ :sub:`4` 878 - r\ :sub:`3` 879 - r\ :sub:`2` 880 - r\ :sub:`1` 881 - r\ :sub:`0` 882 - g\ :sub:`4` 883 - g\ :sub:`3` 884 - 885 * .. _V4L2-PIX-FMT-RGB555X: 886 887 - ``V4L2_PIX_FMT_RGB555X`` 888 - 'RGBQ' 889 890 - a 891 - r\ :sub:`4` 892 - r\ :sub:`3` 893 - r\ :sub:`2` 894 - r\ :sub:`1` 895 - r\ :sub:`0` 896 - g\ :sub:`4` 897 - g\ :sub:`3` 898 899 - g\ :sub:`2` 900 - g\ :sub:`1` 901 - g\ :sub:`0` 902 - b\ :sub:`4` 903 - b\ :sub:`3` 904 - b\ :sub:`2` 905 - b\ :sub:`1` 906 - b\ :sub:`0` 907 - 908 * .. _V4L2-PIX-FMT-BGR32: 909 910 - ``V4L2_PIX_FMT_BGR32`` 911 - 'BGR4' 912 913 - b\ :sub:`7` 914 - b\ :sub:`6` 915 - b\ :sub:`5` 916 - b\ :sub:`4` 917 - b\ :sub:`3` 918 - b\ :sub:`2` 919 - b\ :sub:`1` 920 - b\ :sub:`0` 921 922 - g\ :sub:`7` 923 - g\ :sub:`6` 924 - g\ :sub:`5` 925 - g\ :sub:`4` 926 - g\ :sub:`3` 927 - g\ :sub:`2` 928 - g\ :sub:`1` 929 - g\ :sub:`0` 930 931 - r\ :sub:`7` 932 - r\ :sub:`6` 933 - r\ :sub:`5` 934 - r\ :sub:`4` 935 - r\ :sub:`3` 936 - r\ :sub:`2` 937 - r\ :sub:`1` 938 - r\ :sub:`0` 939 940 - a\ :sub:`7` 941 - a\ :sub:`6` 942 - a\ :sub:`5` 943 - a\ :sub:`4` 944 - a\ :sub:`3` 945 - a\ :sub:`2` 946 - a\ :sub:`1` 947 - a\ :sub:`0` 948 * .. _V4L2-PIX-FMT-RGB32: 949 950 - ``V4L2_PIX_FMT_RGB32`` 951 - 'RGB4' 952 953 - a\ :sub:`7` 954 - a\ :sub:`6` 955 - a\ :sub:`5` 956 - a\ :sub:`4` 957 - a\ :sub:`3` 958 - a\ :sub:`2` 959 - a\ :sub:`1` 960 - a\ :sub:`0` 961 962 - r\ :sub:`7` 963 - r\ :sub:`6` 964 - r\ :sub:`5` 965 - r\ :sub:`4` 966 - r\ :sub:`3` 967 - r\ :sub:`2` 968 - r\ :sub:`1` 969 - r\ :sub:`0` 970 971 - g\ :sub:`7` 972 - g\ :sub:`6` 973 - g\ :sub:`5` 974 - g\ :sub:`4` 975 - g\ :sub:`3` 976 - g\ :sub:`2` 977 - g\ :sub:`1` 978 - g\ :sub:`0` 979 980 - b\ :sub:`7` 981 - b\ :sub:`6` 982 - b\ :sub:`5` 983 - b\ :sub:`4` 984 - b\ :sub:`3` 985 - b\ :sub:`2` 986 - b\ :sub:`1` 987 - b\ :sub:`0` 988 989.. raw:: latex 990 991 \endgroup 992 993A test utility to determine which RGB formats a driver actually supports 994is available from the LinuxTV v4l-dvb repository. See 995`https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access 996instructions. 997