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 \begin{adjustbox}{width=\columnwidth}
21 .. 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
32 - :cspan:`7` Byte 0 in memory
77 * .. _V4L2-PIX-FMT-RGB332:
79 - ``V4L2_PIX_FMT_RGB332``
90 * .. _V4L2-PIX-FMT-ARGB444:
92 - ``V4L2_PIX_FMT_ARGB444``
112 * .. _V4L2-PIX-FMT-XRGB444:
114 - ``V4L2_PIX_FMT_XRGB444``
134 * .. _V4L2-PIX-FMT-ARGB555:
136 - ``V4L2_PIX_FMT_ARGB555``
156 * .. _V4L2-PIX-FMT-XRGB555:
158 - ``V4L2_PIX_FMT_XRGB555``
178 * .. _V4L2-PIX-FMT-RGB565:
180 - ``V4L2_PIX_FMT_RGB565``
200 * .. _V4L2-PIX-FMT-ARGB555X:
202 - ``V4L2_PIX_FMT_ARGB555X``
222 * .. _V4L2-PIX-FMT-XRGB555X:
224 - ``V4L2_PIX_FMT_XRGB555X``
244 * .. _V4L2-PIX-FMT-RGB565X:
246 - ``V4L2_PIX_FMT_RGB565X``
266 * .. _V4L2-PIX-FMT-BGR24:
268 - ``V4L2_PIX_FMT_BGR24``
297 * .. _V4L2-PIX-FMT-RGB24:
299 - ``V4L2_PIX_FMT_RGB24``
328 * .. _V4L2-PIX-FMT-BGR666:
330 - ``V4L2_PIX_FMT_BGR666``
368 * .. _V4L2-PIX-FMT-ABGR32:
370 - ``V4L2_PIX_FMT_ABGR32``
408 * .. _V4L2-PIX-FMT-XBGR32:
410 - ``V4L2_PIX_FMT_XBGR32``
448 * .. _V4L2-PIX-FMT-ARGB32:
450 - ``V4L2_PIX_FMT_ARGB32``
488 * .. _V4L2-PIX-FMT-XRGB32:
490 - ``V4L2_PIX_FMT_XRGB32``
531 \end{adjustbox}\newline\newline
533 .. note:: Bit 7 is the most significant bit.
535 The usage and value of the alpha bits (a) in the ARGB and ABGR formats
536 (collectively referred to as alpha formats) depend on the device type
537 and hardware operation. :ref:`Capture <capture>` devices (including
538 capture queues of mem-to-mem devices) fill the alpha component in
539 memory. When the device outputs an alpha channel the alpha component
540 will have a meaningful value. Otherwise, when the device doesn't output
541 an alpha channel but can set the alpha bit to a user-configurable value,
542 the :ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control
543 is used to specify that alpha value, and the alpha component of all
544 pixels will be set to the value specified by that control. Otherwise a
545 corresponding format without an alpha component (XRGB or XBGR) must be
546 used instead of an alpha format.
548 :ref:`Output <output>` devices (including output queues of mem-to-mem
549 devices and :ref:`video output overlay <osd>` devices) read the alpha
550 component from memory. When the device processes the alpha channel the
551 alpha component must be filled with meaningful values by applications.
552 Otherwise a corresponding format without an alpha component (XRGB or
553 XBGR) must be used instead of an alpha format.
555 The XRGB and XBGR formats contain undefined bits (-). Applications,
556 devices and drivers must ignore those bits, for both
557 :ref:`capture` and :ref:`output` devices.
560 Each cell is one byte.
565 \newline\newline\begin{adjustbox}{width=\columnwidth}
567 .. 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}|
569 .. flat-table:: RGB byte order
572 :widths: 11 3 3 3 3 3 3 3 3 3 3 3 3
629 \end{adjustbox}\newline\newline
631 Formats defined in :ref:`rgb-formats-deprecated` are deprecated and
632 must not be used by new drivers. They are documented here for reference.
633 The meaning of their alpha bits (a) is ill-defined and interpreted as in
634 either the corresponding ARGB or XRGB format, depending on the driver.
639 \begin{adjustbox}{width=\columnwidth}
641 .. 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}|
643 .. _rgb-formats-deprecated:
645 .. flat-table:: Deprecated Packed RGB Image Formats
652 - :cspan:`7` Byte 0 in memory
697 * .. _V4L2-PIX-FMT-RGB444:
699 - ``V4L2_PIX_FMT_RGB444``
719 * .. _V4L2-PIX-FMT-RGB555:
721 - ``V4L2_PIX_FMT_RGB555``
741 * .. _V4L2-PIX-FMT-RGB555X:
743 - ``V4L2_PIX_FMT_RGB555X``
763 * .. _V4L2-PIX-FMT-BGR32:
765 - ``V4L2_PIX_FMT_BGR32``
803 * .. _V4L2-PIX-FMT-RGB32:
805 - ``V4L2_PIX_FMT_RGB32``
846 \end{adjustbox}\newline\newline
848 A test utility to determine which RGB formats a driver actually supports
849 is available from the LinuxTV v4l-dvb repository. See
850 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access