1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
12 These formats are designed to match the pixel formats of typical PC
13 graphics frame buffers. They occupy 8, 16, 24 or 32 bits per pixel.
14 These are all packed-pixel formats, meaning all the data for a pixel lie
15 next to each other in memory.
21 \setlength{\tabcolsep}{2pt}
23 .. 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}|
26 .. flat-table:: RGB Image Formats
32 - :cspan:`7` Byte 0 in memory
73 * .. _V4L2-PIX-FMT-RGB332:
75 - ``V4L2_PIX_FMT_RGB332``
87 * .. _V4L2-PIX-FMT-ARGB444:
89 - ``V4L2_PIX_FMT_ARGB444``
110 * .. _V4L2-PIX-FMT-XRGB444:
112 - ``V4L2_PIX_FMT_XRGB444``
133 * .. _V4L2-PIX-FMT-RGBA444:
135 - ``V4L2_PIX_FMT_RGBA444``
156 * .. _V4L2-PIX-FMT-RGBX444:
158 - ``V4L2_PIX_FMT_RGBX444``
179 * .. _V4L2-PIX-FMT-ABGR444:
181 - ``V4L2_PIX_FMT_ABGR444``
202 * .. _V4L2-PIX-FMT-XBGR444:
204 - ``V4L2_PIX_FMT_XBGR444``
225 * .. _V4L2-PIX-FMT-BGRA444:
227 - ``V4L2_PIX_FMT_BGRA444``
248 * .. _V4L2-PIX-FMT-BGRX444:
250 - ``V4L2_PIX_FMT_BGRX444``
271 * .. _V4L2-PIX-FMT-ARGB555:
273 - ``V4L2_PIX_FMT_ARGB555``
294 * .. _V4L2-PIX-FMT-XRGB555:
296 - ``V4L2_PIX_FMT_XRGB555``
317 * .. _V4L2-PIX-FMT-RGBA555:
319 - ``V4L2_PIX_FMT_RGBA555``
340 * .. _V4L2-PIX-FMT-RGBX555:
342 - ``V4L2_PIX_FMT_RGBX555``
363 * .. _V4L2-PIX-FMT-ABGR555:
365 - ``V4L2_PIX_FMT_ABGR555``
386 * .. _V4L2-PIX-FMT-XBGR555:
388 - ``V4L2_PIX_FMT_XBGR555``
409 * .. _V4L2-PIX-FMT-BGRA555:
411 - ``V4L2_PIX_FMT_BGRA555``
432 * .. _V4L2-PIX-FMT-BGRX555:
434 - ``V4L2_PIX_FMT_BGRX555``
455 * .. _V4L2-PIX-FMT-RGB565:
457 - ``V4L2_PIX_FMT_RGB565``
478 * .. _V4L2-PIX-FMT-ARGB555X:
480 - ``V4L2_PIX_FMT_ARGB555X``
501 * .. _V4L2-PIX-FMT-XRGB555X:
503 - ``V4L2_PIX_FMT_XRGB555X``
524 * .. _V4L2-PIX-FMT-RGB565X:
526 - ``V4L2_PIX_FMT_RGB565X``
547 * .. _V4L2-PIX-FMT-BGR24:
549 - ``V4L2_PIX_FMT_BGR24``
579 * .. _V4L2-PIX-FMT-RGB24:
581 - ``V4L2_PIX_FMT_RGB24``
611 * .. _V4L2-PIX-FMT-BGR666:
613 - ``V4L2_PIX_FMT_BGR666``
651 * .. _V4L2-PIX-FMT-ABGR32:
653 - ``V4L2_PIX_FMT_ABGR32``
691 * .. _V4L2-PIX-FMT-XBGR32:
693 - ``V4L2_PIX_FMT_XBGR32``
731 * .. _V4L2-PIX-FMT-BGRA32:
733 - ``V4L2_PIX_FMT_BGRA32``
771 * .. _V4L2-PIX-FMT-BGRX32:
773 - ``V4L2_PIX_FMT_BGRX32``
811 * .. _V4L2-PIX-FMT-RGBA32:
813 - ``V4L2_PIX_FMT_RGBA32``
851 * .. _V4L2-PIX-FMT-RGBX32:
853 - ``V4L2_PIX_FMT_RGBX32``
891 * .. _V4L2-PIX-FMT-ARGB32:
893 - ``V4L2_PIX_FMT_ARGB32``
931 * .. _V4L2-PIX-FMT-XRGB32:
933 - ``V4L2_PIX_FMT_XRGB32``
976 .. note:: Bit 7 is the most significant bit.
978 The usage and value of the alpha bits (a) in the ARGB and ABGR formats
979 (collectively referred to as alpha formats) depend on the device type
980 and hardware operation. :ref:`Capture <capture>` devices (including
981 capture queues of mem-to-mem devices) fill the alpha component in
982 memory. When the device outputs an alpha channel the alpha component
983 will have a meaningful value. Otherwise, when the device doesn't output
984 an alpha channel but can set the alpha bit to a user-configurable value,
985 the :ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control
986 is used to specify that alpha value, and the alpha component of all
987 pixels will be set to the value specified by that control. Otherwise a
988 corresponding format without an alpha component (XRGB or XBGR) must be
989 used instead of an alpha format.
991 :ref:`Output <output>` devices (including output queues of mem-to-mem
992 devices and :ref:`video output overlay <osd>` devices) read the alpha
993 component from memory. When the device processes the alpha channel the
994 alpha component must be filled with meaningful values by applications.
995 Otherwise a corresponding format without an alpha component (XRGB or
996 XBGR) must be used instead of an alpha format.
998 The XRGB and XBGR formats contain undefined bits (-). Applications,
999 devices and drivers must ignore those bits, for both
1000 :ref:`capture` and :ref:`output` devices.
1003 Each cell is one byte.
1010 .. 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}|
1012 .. flat-table:: RGB byte order
1015 :widths: 11 3 3 3 3 3 3 3 3 3 3 3 3
1074 Formats defined in :ref:`pixfmt-rgb-deprecated` are deprecated and
1075 must not be used by new drivers. They are documented here for reference.
1076 The meaning of their alpha bits ``(a)`` are ill-defined and interpreted as in
1077 either the corresponding ARGB or XRGB format, depending on the driver.
1084 \setlength{\tabcolsep}{2pt}
1086 .. 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}|
1088 .. _pixfmt-rgb-deprecated:
1090 .. flat-table:: Deprecated Packed RGB Image Formats
1096 - :cspan:`7` Byte 0 in memory
1140 * .. _V4L2-PIX-FMT-RGB444:
1142 - ``V4L2_PIX_FMT_RGB444``
1163 * .. _V4L2-PIX-FMT-RGB555:
1165 - ``V4L2_PIX_FMT_RGB555``
1186 * .. _V4L2-PIX-FMT-RGB555X:
1188 - ``V4L2_PIX_FMT_RGB555X``
1209 * .. _V4L2-PIX-FMT-BGR32:
1211 - ``V4L2_PIX_FMT_BGR32``
1249 * .. _V4L2-PIX-FMT-RGB32:
1251 - ``V4L2_PIX_FMT_RGB32``
1294 A test utility to determine which RGB formats a driver actually supports
1295 is available from the LinuxTV v4l-dvb repository. See
1296 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access