1 .. -*- coding: utf-8; mode: rst -*-
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.
19 \newline\newline\begin{adjustbox}{width=\columnwidth}
23 .. tabularcolumns:: |p{4.5cm}|p{3.3cm}|p{0.7cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{1.7cm}|
25 .. flat-table:: Packed RGB Image Formats
37 - :cspan:`7` Byte 0 in memory
121 - .. _V4L2-PIX-FMT-RGB332:
123 - ``V4L2_PIX_FMT_RGB332``
144 - .. _V4L2-PIX-FMT-ARGB444:
146 - ``V4L2_PIX_FMT_ARGB444``
184 - .. _V4L2-PIX-FMT-XRGB444:
186 - ``V4L2_PIX_FMT_XRGB444``
224 - .. _V4L2-PIX-FMT-ARGB555:
226 - ``V4L2_PIX_FMT_ARGB555``
264 - .. _V4L2-PIX-FMT-XRGB555:
266 - ``V4L2_PIX_FMT_XRGB555``
304 - .. _V4L2-PIX-FMT-RGB565:
306 - ``V4L2_PIX_FMT_RGB565``
344 - .. _V4L2-PIX-FMT-ARGB555X:
346 - ``V4L2_PIX_FMT_ARGB555X``
384 - .. _V4L2-PIX-FMT-XRGB555X:
386 - ``V4L2_PIX_FMT_XRGB555X``
424 - .. _V4L2-PIX-FMT-RGB565X:
426 - ``V4L2_PIX_FMT_RGB565X``
464 - .. _V4L2-PIX-FMT-BGR24:
466 - ``V4L2_PIX_FMT_BGR24``
521 - .. _V4L2-PIX-FMT-RGB24:
523 - ``V4L2_PIX_FMT_RGB24``
578 - .. _V4L2-PIX-FMT-BGR666:
580 - ``V4L2_PIX_FMT_BGR666``
652 - .. _V4L2-PIX-FMT-ABGR32:
654 - ``V4L2_PIX_FMT_ABGR32``
726 - .. _V4L2-PIX-FMT-XBGR32:
728 - ``V4L2_PIX_FMT_XBGR32``
800 - .. _V4L2-PIX-FMT-ARGB32:
802 - ``V4L2_PIX_FMT_ARGB32``
874 - .. _V4L2-PIX-FMT-XRGB32:
876 - ``V4L2_PIX_FMT_XRGB32``
950 \end{adjustbox}\newline\newline
952 .. note:: Bit 7 is the most significant bit.
954 The usage and value of the alpha bits (a) in the ARGB and ABGR formats
955 (collectively referred to as alpha formats) depend on the device type
956 and hardware operation. :ref:`Capture <capture>` devices (including
957 capture queues of mem-to-mem devices) fill the alpha component in
958 memory. When the device outputs an alpha channel the alpha component
959 will have a meaningful value. Otherwise, when the device doesn't output
960 an alpha channel but can set the alpha bit to a user-configurable value,
961 the :ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control
962 is used to specify that alpha value, and the alpha component of all
963 pixels will be set to the value specified by that control. Otherwise a
964 corresponding format without an alpha component (XRGB or XBGR) must be
965 used instead of an alpha format.
967 :ref:`Output <output>` devices (including output queues of mem-to-mem
968 devices and :ref:`video output overlay <osd>` devices) read the alpha
969 component from memory. When the device processes the alpha channel the
970 alpha component must be filled with meaningful values by applications.
971 Otherwise a corresponding format without an alpha component (XRGB or
972 XBGR) must be used instead of an alpha format.
974 The XRGB and XBGR formats contain undefined bits (-). Applications,
975 devices and drivers must ignore those bits, for both
976 :ref:`capture` and :ref:`output` devices.
979 Each cell is one byte.
984 \newline\newline\begin{adjustbox}{width=\columnwidth}
986 .. tabularcolumns:: |p{4.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.3cm}|
988 .. flat-table:: RGB byte order
991 :widths: 11 3 3 3 3 3 3 3 3 3 3 3 3
1108 \end{adjustbox}\newline\newline
1110 Formats defined in :ref:`rgb-formats-deprecated` are deprecated and
1111 must not be used by new drivers. They are documented here for reference.
1112 The meaning of their alpha bits (a) is ill-defined and interpreted as in
1113 either the corresponding ARGB or XRGB format, depending on the driver.
1116 .. _rgb-formats-deprecated:
1121 \begin{adjustbox}{width=\columnwidth}
1123 .. tabularcolumns:: |p{4.2cm}|p{1.0cm}|p{0.7cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{1.7cm}|
1125 .. flat-table:: Deprecated Packed RGB Image Formats
1137 - :cspan:`7` Byte 0 in memory
1221 - .. _V4L2-PIX-FMT-RGB444:
1223 - ``V4L2_PIX_FMT_RGB444``
1261 - .. _V4L2-PIX-FMT-RGB555:
1263 - ``V4L2_PIX_FMT_RGB555``
1301 - .. _V4L2-PIX-FMT-RGB555X:
1303 - ``V4L2_PIX_FMT_RGB555X``
1341 - .. _V4L2-PIX-FMT-BGR32:
1343 - ``V4L2_PIX_FMT_BGR32``
1415 - .. _V4L2-PIX-FMT-RGB32:
1417 - ``V4L2_PIX_FMT_RGB32``
1491 \end{adjustbox}\newline\newline
1493 A test utility to determine which RGB formats a driver actually supports
1494 is available from the LinuxTV v4l-dvb repository. See
1495 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access