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.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}|
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-RGBA444:
144 - ``V4L2_PIX_FMT_RGBA444``
165 * .. _V4L2-PIX-FMT-RGBX444:
167 - ``V4L2_PIX_FMT_RGBX444``
188 * .. _V4L2-PIX-FMT-ABGR444:
190 - ``V4L2_PIX_FMT_ABGR444``
211 * .. _V4L2-PIX-FMT-XBGR444:
213 - ``V4L2_PIX_FMT_XBGR444``
234 * .. _V4L2-PIX-FMT-BGRA444:
236 - ``V4L2_PIX_FMT_BGRA444``
257 * .. _V4L2-PIX-FMT-BGRX444:
259 - ``V4L2_PIX_FMT_BGRX444``
280 * .. _V4L2-PIX-FMT-ARGB555:
282 - ``V4L2_PIX_FMT_ARGB555``
303 * .. _V4L2-PIX-FMT-XRGB555:
305 - ``V4L2_PIX_FMT_XRGB555``
326 * .. _V4L2-PIX-FMT-RGB565:
328 - ``V4L2_PIX_FMT_RGB565``
349 * .. _V4L2-PIX-FMT-ARGB555X:
351 - ``V4L2_PIX_FMT_ARGB555X``
372 * .. _V4L2-PIX-FMT-XRGB555X:
374 - ``V4L2_PIX_FMT_XRGB555X``
395 * .. _V4L2-PIX-FMT-RGB565X:
397 - ``V4L2_PIX_FMT_RGB565X``
418 * .. _V4L2-PIX-FMT-BGR24:
420 - ``V4L2_PIX_FMT_BGR24``
450 * .. _V4L2-PIX-FMT-RGB24:
452 - ``V4L2_PIX_FMT_RGB24``
482 * .. _V4L2-PIX-FMT-BGR666:
484 - ``V4L2_PIX_FMT_BGR666``
522 * .. _V4L2-PIX-FMT-ABGR32:
524 - ``V4L2_PIX_FMT_ABGR32``
562 * .. _V4L2-PIX-FMT-XBGR32:
564 - ``V4L2_PIX_FMT_XBGR32``
602 * .. _V4L2-PIX-FMT-BGRA32:
604 - ``V4L2_PIX_FMT_BGRA32``
642 * .. _V4L2-PIX-FMT-BGRX32:
644 - ``V4L2_PIX_FMT_BGRX32``
682 * .. _V4L2-PIX-FMT-RGBA32:
684 - ``V4L2_PIX_FMT_RGBA32``
722 * .. _V4L2-PIX-FMT-RGBX32:
724 - ``V4L2_PIX_FMT_RGBX32``
762 * .. _V4L2-PIX-FMT-ARGB32:
764 - ``V4L2_PIX_FMT_ARGB32``
802 * .. _V4L2-PIX-FMT-XRGB32:
804 - ``V4L2_PIX_FMT_XRGB32``
847 .. note:: Bit 7 is the most significant bit.
849 The usage and value of the alpha bits (a) in the ARGB and ABGR formats
850 (collectively referred to as alpha formats) depend on the device type
851 and hardware operation. :ref:`Capture <capture>` devices (including
852 capture queues of mem-to-mem devices) fill the alpha component in
853 memory. When the device outputs an alpha channel the alpha component
854 will have a meaningful value. Otherwise, when the device doesn't output
855 an alpha channel but can set the alpha bit to a user-configurable value,
856 the :ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control
857 is used to specify that alpha value, and the alpha component of all
858 pixels will be set to the value specified by that control. Otherwise a
859 corresponding format without an alpha component (XRGB or XBGR) must be
860 used instead of an alpha format.
862 :ref:`Output <output>` devices (including output queues of mem-to-mem
863 devices and :ref:`video output overlay <osd>` devices) read the alpha
864 component from memory. When the device processes the alpha channel the
865 alpha component must be filled with meaningful values by applications.
866 Otherwise a corresponding format without an alpha component (XRGB or
867 XBGR) must be used instead of an alpha format.
869 The XRGB and XBGR formats contain undefined bits (-). Applications,
870 devices and drivers must ignore those bits, for both
871 :ref:`capture` and :ref:`output` devices.
874 Each cell is one byte.
881 .. 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}|
883 .. flat-table:: RGB byte order
886 :widths: 11 3 3 3 3 3 3 3 3 3 3 3 3
945 Formats defined in :ref:`rgb-formats-deprecated` are deprecated and
946 must not be used by new drivers. They are documented here for reference.
947 The meaning of their alpha bits ``(a)`` are ill-defined and interpreted as in
948 either the corresponding ARGB or XRGB format, depending on the driver.
955 \setlength{\tabcolsep}{2pt}
957 .. 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}|
959 .. _rgb-formats-deprecated:
961 .. flat-table:: Deprecated Packed RGB Image Formats
967 - :cspan:`7` Byte 0 in memory
1011 * .. _V4L2-PIX-FMT-RGB444:
1013 - ``V4L2_PIX_FMT_RGB444``
1034 * .. _V4L2-PIX-FMT-RGB555:
1036 - ``V4L2_PIX_FMT_RGB555``
1057 * .. _V4L2-PIX-FMT-RGB555X:
1059 - ``V4L2_PIX_FMT_RGB555X``
1080 * .. _V4L2-PIX-FMT-BGR32:
1082 - ``V4L2_PIX_FMT_BGR32``
1120 * .. _V4L2-PIX-FMT-RGB32:
1122 - ``V4L2_PIX_FMT_RGB32``
1165 A test utility to determine which RGB formats a driver actually supports
1166 is available from the LinuxTV v4l-dvb repository. See
1167 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access