1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
19 These formats are designed to match the pixel formats of typical PC
20 graphics frame buffers. They occupy 8, 16, 24 or 32 bits per pixel.
21 These are all packed-pixel formats, meaning all the data for a pixel lie
22 next to each other in memory.
28 \setlength{\tabcolsep}{2pt}
30 .. tabularcolumns:: |p{2.3cm}|p{1.6cm}|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}|
35 .. flat-table:: Packed RGB Image Formats
41 - :cspan:`7` Byte 0 in memory
82 * .. _V4L2-PIX-FMT-RGB332:
84 - ``V4L2_PIX_FMT_RGB332``
96 * .. _V4L2-PIX-FMT-ARGB444:
98 - ``V4L2_PIX_FMT_ARGB444``
119 * .. _V4L2-PIX-FMT-XRGB444:
121 - ``V4L2_PIX_FMT_XRGB444``
142 * .. _V4L2-PIX-FMT-ARGB555:
144 - ``V4L2_PIX_FMT_ARGB555``
165 * .. _V4L2-PIX-FMT-XRGB555:
167 - ``V4L2_PIX_FMT_XRGB555``
188 * .. _V4L2-PIX-FMT-RGB565:
190 - ``V4L2_PIX_FMT_RGB565``
211 * .. _V4L2-PIX-FMT-ARGB555X:
213 - ``V4L2_PIX_FMT_ARGB555X``
234 * .. _V4L2-PIX-FMT-XRGB555X:
236 - ``V4L2_PIX_FMT_XRGB555X``
257 * .. _V4L2-PIX-FMT-RGB565X:
259 - ``V4L2_PIX_FMT_RGB565X``
280 * .. _V4L2-PIX-FMT-BGR24:
282 - ``V4L2_PIX_FMT_BGR24``
312 * .. _V4L2-PIX-FMT-RGB24:
314 - ``V4L2_PIX_FMT_RGB24``
344 * .. _V4L2-PIX-FMT-BGR666:
346 - ``V4L2_PIX_FMT_BGR666``
384 * .. _V4L2-PIX-FMT-ABGR32:
386 - ``V4L2_PIX_FMT_ABGR32``
424 * .. _V4L2-PIX-FMT-XBGR32:
426 - ``V4L2_PIX_FMT_XBGR32``
464 * .. _V4L2-PIX-FMT-ARGB32:
466 - ``V4L2_PIX_FMT_ARGB32``
504 * .. _V4L2-PIX-FMT-XRGB32:
506 - ``V4L2_PIX_FMT_XRGB32``
549 .. note:: Bit 7 is the most significant bit.
551 The usage and value of the alpha bits (a) in the ARGB and ABGR formats
552 (collectively referred to as alpha formats) depend on the device type
553 and hardware operation. :ref:`Capture <capture>` devices (including
554 capture queues of mem-to-mem devices) fill the alpha component in
555 memory. When the device outputs an alpha channel the alpha component
556 will have a meaningful value. Otherwise, when the device doesn't output
557 an alpha channel but can set the alpha bit to a user-configurable value,
558 the :ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control
559 is used to specify that alpha value, and the alpha component of all
560 pixels will be set to the value specified by that control. Otherwise a
561 corresponding format without an alpha component (XRGB or XBGR) must be
562 used instead of an alpha format.
564 :ref:`Output <output>` devices (including output queues of mem-to-mem
565 devices and :ref:`video output overlay <osd>` devices) read the alpha
566 component from memory. When the device processes the alpha channel the
567 alpha component must be filled with meaningful values by applications.
568 Otherwise a corresponding format without an alpha component (XRGB or
569 XBGR) must be used instead of an alpha format.
571 The XRGB and XBGR formats contain undefined bits (-). Applications,
572 devices and drivers must ignore those bits, for both
573 :ref:`capture` and :ref:`output` devices.
576 Each cell is one byte.
583 .. tabularcolumns:: |p{3.1cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|p{0.8cm}|
585 .. flat-table:: RGB byte order
588 :widths: 11 3 3 3 3 3 3 3 3 3 3 3 3
647 Formats defined in :ref:`rgb-formats-deprecated` are deprecated and
648 must not be used by new drivers. They are documented here for reference.
649 The meaning of their alpha bits ``(a)`` are ill-defined and interpreted as in
650 either the corresponding ARGB or XRGB format, depending on the driver.
657 \setlength{\tabcolsep}{2pt}
659 .. tabularcolumns:: |p{2.2cm}|p{0.60cm}|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}|
661 .. _rgb-formats-deprecated:
663 .. flat-table:: Deprecated Packed RGB Image Formats
669 - :cspan:`7` Byte 0 in memory
713 * .. _V4L2-PIX-FMT-RGB444:
715 - ``V4L2_PIX_FMT_RGB444``
736 * .. _V4L2-PIX-FMT-RGB555:
738 - ``V4L2_PIX_FMT_RGB555``
759 * .. _V4L2-PIX-FMT-RGB555X:
761 - ``V4L2_PIX_FMT_RGB555X``
782 * .. _V4L2-PIX-FMT-BGR32:
784 - ``V4L2_PIX_FMT_BGR32``
822 * .. _V4L2-PIX-FMT-RGB32:
824 - ``V4L2_PIX_FMT_RGB32``
867 A test utility to determine which RGB formats a driver actually supports
868 is available from the LinuxTV v4l-dvb repository. See
869 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access