1 .. -*- coding: utf-8; mode: rst -*-
9 *man Packed RGB formats(2)*
17 These formats are designed to match the pixel formats of typical PC
18 graphics frame buffers. They occupy 8, 16, 24 or 32 bits per pixel.
19 These are all packed-pixel formats, meaning all the data for a pixel lie
20 next to each other in memory.
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``
949 Bit 7 is the most significant bit.
951 The usage and value of the alpha bits (a) in the ARGB and ABGR formats
952 (collectively referred to as alpha formats) depend on the device type
953 and hardware operation. :ref:`Capture <capture>` devices (including
954 capture queues of mem-to-mem devices) fill the alpha component in
955 memory. When the device outputs an alpha channel the alpha component
956 will have a meaningful value. Otherwise, when the device doesn't output
957 an alpha channel but can set the alpha bit to a user-configurable value,
958 the :ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control
959 is used to specify that alpha value, and the alpha component of all
960 pixels will be set to the value specified by that control. Otherwise a
961 corresponding format without an alpha component (XRGB or XBGR) must be
962 used instead of an alpha format.
964 :ref:`Output <output>` devices (including output queues of mem-to-mem
965 devices and :ref:`video output overlay <osd>` devices) read the alpha
966 component from memory. When the device processes the alpha channel the
967 alpha component must be filled with meaningful values by applications.
968 Otherwise a corresponding format without an alpha component (XRGB or
969 XBGR) must be used instead of an alpha format.
971 The XRGB and XBGR formats contain undefined bits (-). Applications,
972 devices and drivers must ignore those bits, for both
973 :ref:`capture` and :ref:`output` devices.
976 Each cell is one byte.
980 .. tabularcolumns:: |p{2.5cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{0.7cm}|
985 :widths: 2 1 1 1 1 1 1 1 1 1 1 1 1
1101 Formats defined in :ref:`rgb-formats-deprecated` are deprecated and
1102 must not be used by new drivers. They are documented here for reference.
1103 The meaning of their alpha bits (a) is ill-defined and interpreted as in
1104 either the corresponding ARGB or XRGB format, depending on the driver.
1107 .. _rgb-formats-deprecated:
1109 .. flat-table:: Deprecated Packed RGB Image Formats
1121 - :cspan:`7` Byte 0 in memory
1205 - .. _V4L2-PIX-FMT-RGB444:
1207 - ``V4L2_PIX_FMT_RGB444``
1245 - .. _V4L2-PIX-FMT-RGB555:
1247 - ``V4L2_PIX_FMT_RGB555``
1285 - .. _V4L2-PIX-FMT-RGB555X:
1287 - ``V4L2_PIX_FMT_RGB555X``
1325 - .. _V4L2-PIX-FMT-BGR32:
1327 - ``V4L2_PIX_FMT_BGR32``
1399 - .. _V4L2-PIX-FMT-RGB32:
1401 - ``V4L2_PIX_FMT_RGB32``
1474 A test utility to determine which RGB formats a driver actually supports
1475 is available from the LinuxTV v4l-dvb repository. See
1476 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access