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/userspace-api/media/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}|
33 .. flat-table:: RGB Image Formats
39 - :cspan:`7` Byte 0 in memory
80 * .. _V4L2-PIX-FMT-RGB332:
82 - ``V4L2_PIX_FMT_RGB332``
94 * .. _V4L2-PIX-FMT-ARGB444:
96 - ``V4L2_PIX_FMT_ARGB444``
117 * .. _V4L2-PIX-FMT-XRGB444:
119 - ``V4L2_PIX_FMT_XRGB444``
140 * .. _V4L2-PIX-FMT-RGBA444:
142 - ``V4L2_PIX_FMT_RGBA444``
163 * .. _V4L2-PIX-FMT-RGBX444:
165 - ``V4L2_PIX_FMT_RGBX444``
186 * .. _V4L2-PIX-FMT-ABGR444:
188 - ``V4L2_PIX_FMT_ABGR444``
209 * .. _V4L2-PIX-FMT-XBGR444:
211 - ``V4L2_PIX_FMT_XBGR444``
232 * .. _V4L2-PIX-FMT-BGRA444:
234 - ``V4L2_PIX_FMT_BGRA444``
255 * .. _V4L2-PIX-FMT-BGRX444:
257 - ``V4L2_PIX_FMT_BGRX444``
278 * .. _V4L2-PIX-FMT-ARGB555:
280 - ``V4L2_PIX_FMT_ARGB555``
301 * .. _V4L2-PIX-FMT-XRGB555:
303 - ``V4L2_PIX_FMT_XRGB555``
324 * .. _V4L2-PIX-FMT-RGBA555:
326 - ``V4L2_PIX_FMT_RGBA555``
347 * .. _V4L2-PIX-FMT-RGBX555:
349 - ``V4L2_PIX_FMT_RGBX555``
370 * .. _V4L2-PIX-FMT-ABGR555:
372 - ``V4L2_PIX_FMT_ABGR555``
393 * .. _V4L2-PIX-FMT-XBGR555:
395 - ``V4L2_PIX_FMT_XBGR555``
416 * .. _V4L2-PIX-FMT-BGRA555:
418 - ``V4L2_PIX_FMT_BGRA555``
439 * .. _V4L2-PIX-FMT-BGRX555:
441 - ``V4L2_PIX_FMT_BGRX555``
462 * .. _V4L2-PIX-FMT-RGB565:
464 - ``V4L2_PIX_FMT_RGB565``
485 * .. _V4L2-PIX-FMT-ARGB555X:
487 - ``V4L2_PIX_FMT_ARGB555X``
508 * .. _V4L2-PIX-FMT-XRGB555X:
510 - ``V4L2_PIX_FMT_XRGB555X``
531 * .. _V4L2-PIX-FMT-RGB565X:
533 - ``V4L2_PIX_FMT_RGB565X``
554 * .. _V4L2-PIX-FMT-BGR24:
556 - ``V4L2_PIX_FMT_BGR24``
586 * .. _V4L2-PIX-FMT-RGB24:
588 - ``V4L2_PIX_FMT_RGB24``
618 * .. _V4L2-PIX-FMT-BGR666:
620 - ``V4L2_PIX_FMT_BGR666``
658 * .. _V4L2-PIX-FMT-ABGR32:
660 - ``V4L2_PIX_FMT_ABGR32``
698 * .. _V4L2-PIX-FMT-XBGR32:
700 - ``V4L2_PIX_FMT_XBGR32``
738 * .. _V4L2-PIX-FMT-BGRA32:
740 - ``V4L2_PIX_FMT_BGRA32``
778 * .. _V4L2-PIX-FMT-BGRX32:
780 - ``V4L2_PIX_FMT_BGRX32``
818 * .. _V4L2-PIX-FMT-RGBA32:
820 - ``V4L2_PIX_FMT_RGBA32``
858 * .. _V4L2-PIX-FMT-RGBX32:
860 - ``V4L2_PIX_FMT_RGBX32``
898 * .. _V4L2-PIX-FMT-ARGB32:
900 - ``V4L2_PIX_FMT_ARGB32``
938 * .. _V4L2-PIX-FMT-XRGB32:
940 - ``V4L2_PIX_FMT_XRGB32``
983 .. note:: Bit 7 is the most significant bit.
985 The usage and value of the alpha bits (a) in the ARGB and ABGR formats
986 (collectively referred to as alpha formats) depend on the device type
987 and hardware operation. :ref:`Capture <capture>` devices (including
988 capture queues of mem-to-mem devices) fill the alpha component in
989 memory. When the device outputs an alpha channel the alpha component
990 will have a meaningful value. Otherwise, when the device doesn't output
991 an alpha channel but can set the alpha bit to a user-configurable value,
992 the :ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control
993 is used to specify that alpha value, and the alpha component of all
994 pixels will be set to the value specified by that control. Otherwise a
995 corresponding format without an alpha component (XRGB or XBGR) must be
996 used instead of an alpha format.
998 :ref:`Output <output>` devices (including output queues of mem-to-mem
999 devices and :ref:`video output overlay <osd>` devices) read the alpha
1000 component from memory. When the device processes the alpha channel the
1001 alpha component must be filled with meaningful values by applications.
1002 Otherwise a corresponding format without an alpha component (XRGB or
1003 XBGR) must be used instead of an alpha format.
1005 The XRGB and XBGR formats contain undefined bits (-). Applications,
1006 devices and drivers must ignore those bits, for both
1007 :ref:`capture` and :ref:`output` devices.
1010 Each cell is one byte.
1017 .. 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}|
1019 .. flat-table:: RGB byte order
1022 :widths: 11 3 3 3 3 3 3 3 3 3 3 3 3
1081 Formats defined in :ref:`pixfmt-rgb-deprecated` are deprecated and
1082 must not be used by new drivers. They are documented here for reference.
1083 The meaning of their alpha bits ``(a)`` are ill-defined and interpreted as in
1084 either the corresponding ARGB or XRGB format, depending on the driver.
1091 \setlength{\tabcolsep}{2pt}
1093 .. 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}|
1095 .. _pixfmt-rgb-deprecated:
1097 .. flat-table:: Deprecated Packed RGB Image Formats
1103 - :cspan:`7` Byte 0 in memory
1147 * .. _V4L2-PIX-FMT-RGB444:
1149 - ``V4L2_PIX_FMT_RGB444``
1170 * .. _V4L2-PIX-FMT-RGB555:
1172 - ``V4L2_PIX_FMT_RGB555``
1193 * .. _V4L2-PIX-FMT-RGB555X:
1195 - ``V4L2_PIX_FMT_RGB555X``
1216 * .. _V4L2-PIX-FMT-BGR32:
1218 - ``V4L2_PIX_FMT_BGR32``
1256 * .. _V4L2-PIX-FMT-RGB32:
1258 - ``V4L2_PIX_FMT_RGB32``
1301 A test utility to determine which RGB formats a driver actually supports
1302 is available from the LinuxTV v4l-dvb repository. See
1303 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access