요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _pixfmt-rgb:
***********
RGB Formats
***********
These formats encode each pixel as a triplet of RGB values. They are packed
formats, meaning that the RGB values for one pixel are stored consecutively in
memory and each pixel consumes an integer number of bytes. When the number of
bits required to store a pixel is not aligned to a byte boundary, the data is
padded with additional bits to fill the remaining byte.
The formats differ by the number of bits per RGB component (typically but not
always the same for all components), the order of components in memory, and the
presence of an alpha component or additional padding bits.
The usage and value of the alpha bits in formats that support them (named ARGB
or a permutation thereof, collectively referred to as alpha formats) depend on
the device type and hardware operation. :ref:`Capture <capture>` devices
(including capture queues of mem-to-mem devices) fill the alpha component in
memory. When the device captures an alpha channel the alpha component will have
a meaningful value. Otherwise, when the device doesn't capture an alpha channel
but can set the alpha bit to a user-configurable value, the
:ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control is used to
specify that alpha value, and the alpha component of all pixels will be set to
the value specified by that control. Otherwise a corresponding format without
an alpha component (XRGB or XBGR) must be used instead of an alpha format.
:ref:`Output <output>` devices (including output queues of mem-to-mem devices
and :ref:`video output overlay <osd>` devices) read the alpha component from
memory. When the device processes the alpha channel the alpha component must be
filled with meaningful values by applications. Otherwise a corresponding format
without an alpha component (XRGB or XBGR) must be used instead of an alpha
format.
Formats that contain padding bits are named XRGB (or a permutation thereof).
The padding bits contain undefined values and must be ignored by applications,
devices and drivers, for both :ref:`capture` and :ref:`output` devices.
.. note::
- In all the tables that follow, bit 7 is the most significant bit in a byte.
- 'r', 'g' and 'b' denote bits of the red, green and blue components
respectively. 'a' denotes bits of the alpha component (if supported by the
format), and 'x' denotes padding bits.
Less Than 8 Bits Per Component
==============================
These formats store an RGB triplet in one, two or four bytes. They are named
based on the order of the RGB components as seen in a 8-, 16- or 32-bit word,
which is then stored in memory in little endian byte order (unless otherwise
noted by the presence of bit 31 in the 4CC value), and on the number of bits
for each component. For instance, the RGB565 format stores a pixel in a 16-bit
word [15:0] laid out at as [R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1`
R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3` G\ :sub:`2` G\ :sub:`1`
G\ :sub:`0` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` B\ :sub:`1` B\ :sub:`0`], and
stored in memory in two bytes, [R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1`
R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3`] followed by [G\ :sub:`2`
G\ :sub:`1` G\ :sub:`0` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` B\ :sub:`1`
B\ :sub:`0`].
.. raw:: latex
\begingroup
\tiny
\setlength{\tabcolsep}{2pt}
.. 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}|
.. flat-table:: RGB Formats With Less Than 8 Bits Per Component
:header-rows: 2
:stub-columns: 0
* - Identifier
- Code
- :cspan:`7` Byte 0 in memory
- :cspan:`7` Byte 1
- :cspan:`7` Byte 2
- :cspan:`7` Byte 3
* -
-
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
* .. _V4L2-PIX-FMT-RGB332:
- ``V4L2_PIX_FMT_RGB332``
- 'RGB1'
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-ARGB444:
- ``V4L2_PIX_FMT_ARGB444``
- 'AR12'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
-
* .. _V4L2-PIX-FMT-XRGB444:
- ``V4L2_PIX_FMT_XRGB444``
- 'XR12'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- x
- x
- x
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
-
* .. _V4L2-PIX-FMT-RGBA444:
- ``V4L2_PIX_FMT_RGBA444``
- 'RA12'
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
-
* .. _V4L2-PIX-FMT-RGBX444:
- ``V4L2_PIX_FMT_RGBX444``
- 'RX12'
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- x
- x
- x
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
-
* .. _V4L2-PIX-FMT-ABGR444:
- ``V4L2_PIX_FMT_ABGR444``
- 'AB12'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-XBGR444:
- ``V4L2_PIX_FMT_XBGR444``
- 'XB12'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- x
- x
- x
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-BGRA444:
- ``V4L2_PIX_FMT_BGRA444``
- 'BA12'
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
-
* .. _V4L2-PIX-FMT-BGRX444:
- ``V4L2_PIX_FMT_BGRX444``
- 'BX12'
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- x
- x
- x
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
-
* .. _V4L2-PIX-FMT-ARGB555:
- ``V4L2_PIX_FMT_ARGB555``
- 'AR15'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-XRGB555:
- ``V4L2_PIX_FMT_XRGB555``
- 'XR15'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-RGBA555:
- ``V4L2_PIX_FMT_RGBA555``
- 'RA15'
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
-
* .. _V4L2-PIX-FMT-RGBX555:
- ``V4L2_PIX_FMT_RGBX555``
- 'RX15'
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
-
* .. _V4L2-PIX-FMT-ABGR555:
- ``V4L2_PIX_FMT_ABGR555``
- 'AB15'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-XBGR555:
- ``V4L2_PIX_FMT_XBGR555``
- 'XB15'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-BGRA555:
- ``V4L2_PIX_FMT_BGRA555``
- 'BA15'
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
-
* .. _V4L2-PIX-FMT-BGRX555:
- ``V4L2_PIX_FMT_BGRX555``
- 'BX15'
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
-
* .. _V4L2-PIX-FMT-RGB565:
- ``V4L2_PIX_FMT_RGB565``
- 'RGBP'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-ARGB555X:
- ``V4L2_PIX_FMT_ARGB555X``
- 'AR15' | (1 << 31)
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-XRGB555X:
- ``V4L2_PIX_FMT_XRGB555X``
- 'XR15' | (1 << 31)
- x
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-RGB565X:
- ``V4L2_PIX_FMT_RGB565X``
- 'RGBR'
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-BGR666:
- ``V4L2_PIX_FMT_BGR666``
- 'BGRH'
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
.. raw:: latex
\endgroup
8 Bits Per Component
====================
These formats store an RGB triplet in three or four bytes. They are named based
on the order of the RGB components as stored in memory, and on the total number
of bits per pixel. For instance, RGB24 format stores a pixel with [R\ :sub:`7`
R\ :sub:`6` R\ :sub:`5` R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1`
R\ :sub:`0`] in the first byte, [G\ :sub:`7` G\ :sub:`6` G\ :sub:`5` G\ :sub:`4`
G\ :sub:`3` G\ :sub:`2` G\ :sub:`1` G\ :sub:`0`] in the second byte and
[B\ :sub:`7` B\ :sub:`6` B\ :sub:`5` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2`
B\ :sub:`1` B\ :sub:`0`] in the third byte. This differs from the DRM format
nomenclature that instead use the order of components as seen in a 24- or
32-bit little endian word.
.. raw:: latex
\small
.. flat-table:: RGB Formats With 8 Bits Per Component
:header-rows: 1
:stub-columns: 0
* - Identifier
- Code
- Byte 0 in memory
- Byte 1
- Byte 2
- Byte 3
* .. _V4L2-PIX-FMT-BGR24:
- ``V4L2_PIX_FMT_BGR24``
- 'BGR3'
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
-
* .. _V4L2-PIX-FMT-RGB24:
- ``V4L2_PIX_FMT_RGB24``
- 'RGB3'
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
-
* .. _V4L2-PIX-FMT-ABGR32:
- ``V4L2_PIX_FMT_ABGR32``
- 'AR24'
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
- A\ :sub:`7-0`
* .. _V4L2-PIX-FMT-XBGR32:
- ``V4L2_PIX_FMT_XBGR32``
- 'XR24'
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
- X\ :sub:`7-0`
* .. _V4L2-PIX-FMT-BGRA32:
- ``V4L2_PIX_FMT_BGRA32``
- 'RA24'
- A\ :sub:`7-0`
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
* .. _V4L2-PIX-FMT-BGRX32:
- ``V4L2_PIX_FMT_BGRX32``
- 'RX24'
- X\ :sub:`7-0`
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
* .. _V4L2-PIX-FMT-RGBA32:
- ``V4L2_PIX_FMT_RGBA32``
- 'AB24'
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
- A\ :sub:`7-0`
* .. _V4L2-PIX-FMT-RGBX32:
- ``V4L2_PIX_FMT_RGBX32``
- 'XB24'
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
- X\ :sub:`7-0`
* .. _V4L2-PIX-FMT-ARGB32:
- ``V4L2_PIX_FMT_ARGB32``
- 'BA24'
- A\ :sub:`7-0`
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
* .. _V4L2-PIX-FMT-XRGB32:
- ``V4L2_PIX_FMT_XRGB32``
- 'BX24'
- X\ :sub:`7-0`
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
.. raw:: latex
\normalsize
10 Bits Per Component
=====================
These formats store a 30-bit RGB triplet with an optional 2 bit alpha in four
bytes. They are named based on the order of the RGB components as seen in a
32-bit word, which is then stored in memory in little endian byte order
(unless otherwise noted by the presence of bit 31 in the 4CC value), and on the
number of bits for each component.
.. raw:: latex
\begingroup
\tiny
\setlength{\tabcolsep}{2pt}
.. tabularcolumns:: |p{3.2cm}|p{0.8cm}|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}|
.. flat-table:: RGB Formats 10 Bits Per Color Component
:header-rows: 2
:stub-columns: 0
* - Identifier
- Code
- :cspan:`7` Byte 0 in memory
- :cspan:`7` Byte 1
- :cspan:`7` Byte 2
- :cspan:`7` Byte 3
* -
-
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
* .. _V4L2-PIX-FMT-RGBX1010102:
- ``V4L2_PIX_FMT_RGBX1010102``
- 'RX30'
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- x
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`9`
- b\ :sub:`8`
- b\ :sub:`7`
- b\ :sub:`6`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`9`
- g\ :sub:`8`
- g\ :sub:`7`
- g\ :sub:`6`
- g\ :sub:`5`
- g\ :sub:`4`
- r\ :sub:`9`
- r\ :sub:`8`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
* .. _V4L2-PIX-FMT-RGBA1010102:
- ``V4L2_PIX_FMT_RGBA1010102``
- 'RA30'
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a\ :sub:`1`
- a\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`9`
- b\ :sub:`8`
- b\ :sub:`7`
- b\ :sub:`6`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`9`
- g\ :sub:`8`
- g\ :sub:`7`
- g\ :sub:`6`
- g\ :sub:`5`
- g\ :sub:`4`
- r\ :sub:`9`
- r\ :sub:`8`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
* .. _V4L2-PIX-FMT-ARGB2101010:
- ``V4L2_PIX_FMT_ARGB2101010``
- 'AR30'
- b\ :sub:`7`
- b\ :sub:`6`
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`9`
- b\ :sub:`8`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`9`
- g\ :sub:`8`
- g\ :sub:`7`
- g\ :sub:`6`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`9`
- r\ :sub:`8`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
.. raw:: latex
\endgroup
12 Bits Per Component
==============================
These formats store an RGB triplet in six or eight bytes, with 12 bits per component.
Expand the bits per component to 16 bits, data in the high bits, zeros in the low bits,
arranged in little endian order.
.. raw:: latex
\small
.. flat-table:: RGB Formats With 12 Bits Per Component
:header-rows: 1
* - Identifier
- Code
- Byte 1-0
- Byte 3-2
- Byte 5-4
- Byte 7-6
* .. _V4L2-PIX-FMT-BGR48-12:
- ``V4L2_PIX_FMT_BGR48_12``
- 'B312'
- B\ :sub:`15-4`
- G\ :sub:`15-4`
- R\ :sub:`15-4`
-
* .. _V4L2-PIX-FMT-ABGR64-12:
- ``V4L2_PIX_FMT_ABGR64_12``
- 'B412'
- B\ :sub:`15-4`
- G\ :sub:`15-4`
- R\ :sub:`15-4`
- A\ :sub:`15-4`
.. raw:: latex
\normalsize
16 Bits Per Component
=====================
These formats store an RGB triplet in six bytes, with 16 bits per component
stored in memory in little endian byte order. They are named based on the order
of the RGB components as stored in memory. For instance, RGB48 stores R\
:sub:`7:0` and R\ :sub:`15:8` in bytes 0 and 1 respectively. This differs from
the DRM format nomenclature that instead uses the order of components as seen in
the 48-bits little endian word.
.. raw:: latex
\small
.. flat-table:: RGB Formats With 16 Bits Per Component
:header-rows: 1
* - Identifier
- Code
- Byte 0
- Byte 1
- Byte 2
- Byte 3
- Byte 4
- Byte 5
* .. _V4L2-PIX-FMT-BGR48:
- ``V4L2_PIX_FMT_BGR48``
- 'BGR6'
- B\ :sub:`7-0`
- B\ :sub:`15-8`
- G\ :sub:`7-0`
- G\ :sub:`15-8`
- R\ :sub:`7-0`
- R\ :sub:`15-8`
* .. _V4L2-PIX-FMT-RGB48:
- ``V4L2_PIX_FMT_RGB48``
- 'RGB6'
- R\ :sub:`7-0`
- R\ :sub:`15-8`
- G\ :sub:`7-0`
- G\ :sub:`15-8`
- B\ :sub:`7-0`
- B\ :sub:`15-8`
.. raw:: latex
\normalsize
Deprecated RGB Formats
======================
Formats defined in :ref:`pixfmt-rgb-deprecated` are deprecated and must not be
used by new drivers. They are documented here for reference. The meaning of
their alpha bits ``(a)`` is ill-defined and they are interpreted as in either
the corresponding ARGB or XRGB format, depending on the driver.
.. raw:: latex
\begingroup
\tiny
\setlength{\tabcolsep}{2pt}
.. 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}|
.. _pixfmt-rgb-deprecated:
.. flat-table:: Deprecated Packed RGB Image Formats
:header-rows: 2
:stub-columns: 0
* - Identifier
- Code
- :cspan:`7` Byte 0 in memory
- :cspan:`7` Byte 1
- :cspan:`7` Byte 2
- :cspan:`7` Byte 3
* -
-
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
* .. _V4L2-PIX-FMT-RGB444:
- ``V4L2_PIX_FMT_RGB444``
- 'R444'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
-
* .. _V4L2-PIX-FMT-RGB555:
- ``V4L2_PIX_FMT_RGB555``
- 'RGBO'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-RGB555X:
- ``V4L2_PIX_FMT_RGB555X``
- 'RGBQ'
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-BGR32:
- ``V4L2_PIX_FMT_BGR32``
- 'BGR4'
- b\ :sub:`7`
- b\ :sub:`6`
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`7`
- g\ :sub:`6`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a\ :sub:`7`
- a\ :sub:`6`
- a\ :sub:`5`
- a\ :sub:`4`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
* .. _V4L2-PIX-FMT-RGB32:
- ``V4L2_PIX_FMT_RGB32``
- 'RGB4'
- a\ :sub:`7`
- a\ :sub:`6`
- a\ :sub:`5`
- a\ :sub:`4`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`7`
- g\ :sub:`6`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`7`
- b\ :sub:`6`
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
.. raw:: latex
\endgroup
A test utility to determine which RGB formats a driver actually supports
is available from the LinuxTV v4l-dvb repository. See
`https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access
instructions.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Packed RGB와 alpha·padding 규칙
1-49RGB 형식은 pixel 하나를 R, G, B 값의 triplet으로 encoding합니다. 모두 packed 형식이라 한 pixel의 component가 memory에 연속 저장되고 pixel 하나가 정수 개 byte를 차지합니다. Pixel bit 수가 byte 경계에 맞지 않으면 남는 bit를 padding으로 채웁니다.
형식은 component별 bit 수, memory에서의 component 순서, alpha component 또는 추가 padding bit의 유무로 구분됩니다. Component bit 수는 대체로 같지만 항상 같지는 않습니다.
ARGB 및 그 순열인 alpha 형식에서 alpha의 용도와 값은 device 유형과 hardware operation에 따라 달라집니다. Capture device와 mem-to-mem capture queue는 alpha를 memory에 채웁니다. 실제 alpha channel을 capture하면 값에 의미가 있고, channel은 없지만 고정 alpha를 넣을 수 있으면 `V4L2_CID_ALPHA_COMPONENT`로 모든 pixel의 alpha 값을 정합니다. 어느 쪽도 아니면 alpha 형식 대신 대응 XRGB/XBGR 형식을 사용해야 합니다.
Output device, mem-to-mem output queue와 video output overlay는 alpha를 memory에서 읽습니다. Hardware가 alpha를 처리한다면 application이 의미 있는 값을 채워야 하며, 처리하지 않는다면 역시 대응 XRGB/XBGR 형식을 사용합니다.
이름에 X가 있는 형식의 X bit는 padding입니다. 값은 undefined이므로 capture와 output 모두에서 application, device, driver가 무시해야 합니다. 뒤 표에서 bit 7은 byte의 MSB이고 r/g/b/a/x는 각각 red, green, blue, alpha, padding bit를 뜻합니다.
Device가 alpha를 실제로 다루는지에 따라 형식을 선택합니다.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _pixfmt-rgb:
***********
RGB Formats
***********
These formats encode each pixel as a triplet of RGB values. They are packed
formats, meaning that the RGB values for one pixel are stored consecutively in
memory and each pixel consumes an integer number of bytes. When the number of
bits required to store a pixel is not aligned to a byte boundary, the data is
padded with additional bits to fill the remaining byte.
The formats differ by the number of bits per RGB component (typically but not
always the same for all components), the order of components in memory, and the
presence of an alpha component or additional padding bits.
The usage and value of the alpha bits in formats that support them (named ARGB
or a permutation thereof, collectively referred to as alpha formats) depend on
the device type and hardware operation. :ref:`Capture <capture>` devices
(including capture queues of mem-to-mem devices) fill the alpha component in
memory. When the device captures an alpha channel the alpha component will have
a meaningful value. Otherwise, when the device doesn't capture an alpha channel
but can set the alpha bit to a user-configurable value, the
:ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control is used to
specify that alpha value, and the alpha component of all pixels will be set to
the value specified by that control. Otherwise a corresponding format without
an alpha component (XRGB or XBGR) must be used instead of an alpha format.
:ref:`Output <output>` devices (including output queues of mem-to-mem devices
and :ref:`video output overlay <osd>` devices) read the alpha component from
memory. When the device processes the alpha channel the alpha component must be
filled with meaningful values by applications. Otherwise a corresponding format
without an alpha component (XRGB or XBGR) must be used instead of an alpha
format.
Formats that contain padding bits are named XRGB (or a permutation thereof).
The padding bits contain undefined values and must be ignored by applications,
devices and drivers, for both :ref:`capture` and :ref:`output` devices.
.. note::
- In all the tables that follow, bit 7 is the most significant bit in a byte.
- 'r', 'g' and 'b' denote bits of the red, green and blue components
respectively. 'a' denotes bits of the alpha component (if supported by the
format), and 'x' denotes padding bits.
8 bpc 미만: RGB332와 4:4:4
50-319Component당 8 bit 미만인 형식은 pixel을 1, 2 또는 4 byte에 저장합니다. 이름은 8/16/32-bit word에서 보이는 component 순서와 각 component bit 수를 기준으로 하며, word는 기본적으로 little-endian으로 memory에 저장됩니다. FourCC 값의 bit 31이 설정된 형식은 명시된 반대 byte 순서를 사용합니다.
예를 들어 RGB565의 16-bit word는 `[R4:0 G5:0 B4:0]`이고 little-endian memory에서는 낮은 byte `[G2:0 B4:0]` 다음 높은 byte `[R4:0 G5:3]`가 옵니다.
Byte 0이 낮은 주소입니다. 각 표기는 한 byte 안의 MSB→LSB 순서입니다.
이름은 word의 MSB→LSB component 순서이고 memory는 little-endian임을 구분합니다.
Less Than 8 Bits Per Component
==============================
These formats store an RGB triplet in one, two or four bytes. They are named
based on the order of the RGB components as seen in a 8-, 16- or 32-bit word,
which is then stored in memory in little endian byte order (unless otherwise
noted by the presence of bit 31 in the 4CC value), and on the number of bits
for each component. For instance, the RGB565 format stores a pixel in a 16-bit
word [15:0] laid out at as [R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1`
R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3` G\ :sub:`2` G\ :sub:`1`
G\ :sub:`0` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` B\ :sub:`1` B\ :sub:`0`], and
stored in memory in two bytes, [R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1`
R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3`] followed by [G\ :sub:`2`
G\ :sub:`1` G\ :sub:`0` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` B\ :sub:`1`
B\ :sub:`0`].
.. raw:: latex
\begingroup
\tiny
\setlength{\tabcolsep}{2pt}
.. 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}|
.. flat-table:: RGB Formats With Less Than 8 Bits Per Component
:header-rows: 2
:stub-columns: 0
* - Identifier
- Code
- :cspan:`7` Byte 0 in memory
- :cspan:`7` Byte 1
- :cspan:`7` Byte 2
- :cspan:`7` Byte 3
* -
-
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
* .. _V4L2-PIX-FMT-RGB332:
- ``V4L2_PIX_FMT_RGB332``
- 'RGB1'
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-ARGB444:
- ``V4L2_PIX_FMT_ARGB444``
- 'AR12'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
-
* .. _V4L2-PIX-FMT-XRGB444:
- ``V4L2_PIX_FMT_XRGB444``
- 'XR12'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- x
- x
- x
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
-
* .. _V4L2-PIX-FMT-RGBA444:
- ``V4L2_PIX_FMT_RGBA444``
- 'RA12'
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
-
* .. _V4L2-PIX-FMT-RGBX444:
- ``V4L2_PIX_FMT_RGBX444``
- 'RX12'
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- x
- x
- x
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
-
* .. _V4L2-PIX-FMT-ABGR444:
- ``V4L2_PIX_FMT_ABGR444``
- 'AB12'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-XBGR444:
- ``V4L2_PIX_FMT_XBGR444``
- 'XB12'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- x
- x
- x
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-BGRA444:
- ``V4L2_PIX_FMT_BGRA444``
- 'BA12'
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
-
* .. _V4L2-PIX-FMT-BGRX444:
- ``V4L2_PIX_FMT_BGRX444``
- 'BX12'
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- x
- x
- x
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
-
8 bpc 미만: 5:5:5·5:6:5·6:6:6
320-641A와 X만 다르고 RGB bit 배치는 쌍별로 같습니다.
FourCC bit 31 또는 X suffix가 byte 순서를 명시하는 형식입니다.
`V4L2_PIX_FMT_BGR666` (`BGRH`)은 4 byte를 차지하지만 실제 color는 18 bit입니다. Byte 0=`B[5:0] G[5:4]`, Byte 1=`G[3:0] R[5:2]`, Byte 2=`R[1:0] X[5:0]`, Byte 3은 모두 X padding입니다.
14개 X bit는 정의되지 않으므로 무시합니다.
* .. _V4L2-PIX-FMT-ARGB555:
- ``V4L2_PIX_FMT_ARGB555``
- 'AR15'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-XRGB555:
- ``V4L2_PIX_FMT_XRGB555``
- 'XR15'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-RGBA555:
- ``V4L2_PIX_FMT_RGBA555``
- 'RA15'
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
-
* .. _V4L2-PIX-FMT-RGBX555:
- ``V4L2_PIX_FMT_RGBX555``
- 'RX15'
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
-
* .. _V4L2-PIX-FMT-ABGR555:
- ``V4L2_PIX_FMT_ABGR555``
- 'AB15'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-XBGR555:
- ``V4L2_PIX_FMT_XBGR555``
- 'XB15'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-BGRA555:
- ``V4L2_PIX_FMT_BGRA555``
- 'BA15'
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
-
* .. _V4L2-PIX-FMT-BGRX555:
- ``V4L2_PIX_FMT_BGRX555``
- 'BX15'
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
-
* .. _V4L2-PIX-FMT-RGB565:
- ``V4L2_PIX_FMT_RGB565``
- 'RGBP'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-ARGB555X:
- ``V4L2_PIX_FMT_ARGB555X``
- 'AR15' | (1 << 31)
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-XRGB555X:
- ``V4L2_PIX_FMT_XRGB555X``
- 'XR15' | (1 << 31)
- x
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-RGB565X:
- ``V4L2_PIX_FMT_RGB565X``
- 'RGBR'
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-BGR666:
- ``V4L2_PIX_FMT_BGR666``
- 'BGRH'
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
- x
.. raw:: latex
\endgroup
Component당 8 bit
642-7658-bpc 형식은 RGB triplet을 3 byte 또는 alpha/padding을 포함해 4 byte에 저장합니다. 이름은 실제 memory의 component 순서와 pixel당 총 bit 수를 기준으로 합니다. RGB24는 Byte 0=R, Byte 1=G, Byte 2=B입니다. 이는 24/32-bit little-endian word에서 보이는 component 순서를 이름에 쓰는 DRM naming과 다릅니다.
A는 alpha, X는 undefined padding입니다.
같은 byte sequence를 이름으로 읽을 때 기준이 다릅니다.
8 Bits Per Component
====================
These formats store an RGB triplet in three or four bytes. They are named based
on the order of the RGB components as stored in memory, and on the total number
of bits per pixel. For instance, RGB24 format stores a pixel with [R\ :sub:`7`
R\ :sub:`6` R\ :sub:`5` R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1`
R\ :sub:`0`] in the first byte, [G\ :sub:`7` G\ :sub:`6` G\ :sub:`5` G\ :sub:`4`
G\ :sub:`3` G\ :sub:`2` G\ :sub:`1` G\ :sub:`0`] in the second byte and
[B\ :sub:`7` B\ :sub:`6` B\ :sub:`5` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2`
B\ :sub:`1` B\ :sub:`0`] in the third byte. This differs from the DRM format
nomenclature that instead use the order of components as seen in a 24- or
32-bit little endian word.
.. raw:: latex
\small
.. flat-table:: RGB Formats With 8 Bits Per Component
:header-rows: 1
:stub-columns: 0
* - Identifier
- Code
- Byte 0 in memory
- Byte 1
- Byte 2
- Byte 3
* .. _V4L2-PIX-FMT-BGR24:
- ``V4L2_PIX_FMT_BGR24``
- 'BGR3'
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
-
* .. _V4L2-PIX-FMT-RGB24:
- ``V4L2_PIX_FMT_RGB24``
- 'RGB3'
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
-
* .. _V4L2-PIX-FMT-ABGR32:
- ``V4L2_PIX_FMT_ABGR32``
- 'AR24'
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
- A\ :sub:`7-0`
* .. _V4L2-PIX-FMT-XBGR32:
- ``V4L2_PIX_FMT_XBGR32``
- 'XR24'
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
- X\ :sub:`7-0`
* .. _V4L2-PIX-FMT-BGRA32:
- ``V4L2_PIX_FMT_BGRA32``
- 'RA24'
- A\ :sub:`7-0`
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
* .. _V4L2-PIX-FMT-BGRX32:
- ``V4L2_PIX_FMT_BGRX32``
- 'RX24'
- X\ :sub:`7-0`
- B\ :sub:`7-0`
- G\ :sub:`7-0`
- R\ :sub:`7-0`
* .. _V4L2-PIX-FMT-RGBA32:
- ``V4L2_PIX_FMT_RGBA32``
- 'AB24'
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
- A\ :sub:`7-0`
* .. _V4L2-PIX-FMT-RGBX32:
- ``V4L2_PIX_FMT_RGBX32``
- 'XB24'
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
- X\ :sub:`7-0`
* .. _V4L2-PIX-FMT-ARGB32:
- ``V4L2_PIX_FMT_ARGB32``
- 'BA24'
- A\ :sub:`7-0`
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
* .. _V4L2-PIX-FMT-XRGB32:
- ``V4L2_PIX_FMT_XRGB32``
- 'BX24'
- X\ :sub:`7-0`
- R\ :sub:`7-0`
- G\ :sub:`7-0`
- B\ :sub:`7-0`
.. raw:: latex
\normalsize
Component당 10 bit
766-95510-bpc 형식은 30-bit RGB triplet과 선택적인 2-bit alpha를 4 byte에 저장합니다. 이름은 32-bit word에서 보이는 component 순서와 각 component bit 수를 기준으로 하고, word는 기본적으로 little-endian으로 memory에 저장됩니다. FourCC bit 31 표시는 예외 byte order를 뜻합니다.
Word 표기는 bit 31→0, byte 표기는 낮은 주소부터입니다.
Byte 경계를 가로지르는 component를 32-bit word에서 복원합니다.
10 Bits Per Component
=====================
These formats store a 30-bit RGB triplet with an optional 2 bit alpha in four
bytes. They are named based on the order of the RGB components as seen in a
32-bit word, which is then stored in memory in little endian byte order
(unless otherwise noted by the presence of bit 31 in the 4CC value), and on the
number of bits for each component.
.. raw:: latex
\begingroup
\tiny
\setlength{\tabcolsep}{2pt}
.. tabularcolumns:: |p{3.2cm}|p{0.8cm}|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}|
.. flat-table:: RGB Formats 10 Bits Per Color Component
:header-rows: 2
:stub-columns: 0
* - Identifier
- Code
- :cspan:`7` Byte 0 in memory
- :cspan:`7` Byte 1
- :cspan:`7` Byte 2
- :cspan:`7` Byte 3
* -
-
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
* .. _V4L2-PIX-FMT-RGBX1010102:
- ``V4L2_PIX_FMT_RGBX1010102``
- 'RX30'
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- x
- x
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`9`
- b\ :sub:`8`
- b\ :sub:`7`
- b\ :sub:`6`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`9`
- g\ :sub:`8`
- g\ :sub:`7`
- g\ :sub:`6`
- g\ :sub:`5`
- g\ :sub:`4`
- r\ :sub:`9`
- r\ :sub:`8`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
* .. _V4L2-PIX-FMT-RGBA1010102:
- ``V4L2_PIX_FMT_RGBA1010102``
- 'RA30'
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a\ :sub:`1`
- a\ :sub:`0`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`9`
- b\ :sub:`8`
- b\ :sub:`7`
- b\ :sub:`6`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`9`
- g\ :sub:`8`
- g\ :sub:`7`
- g\ :sub:`6`
- g\ :sub:`5`
- g\ :sub:`4`
- r\ :sub:`9`
- r\ :sub:`8`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
* .. _V4L2-PIX-FMT-ARGB2101010:
- ``V4L2_PIX_FMT_ARGB2101010``
- 'AR30'
- b\ :sub:`7`
- b\ :sub:`6`
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`9`
- b\ :sub:`8`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`9`
- g\ :sub:`8`
- g\ :sub:`7`
- g\ :sub:`6`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`9`
- r\ :sub:`8`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
.. raw:: latex
\endgroup
Component당 12·16 bit
956-105212-bpc 형식은 RGB triplet을 6 byte, alpha 포함 형식은 8 byte에 저장합니다. 각 12-bit component를 16-bit word의 상위 bit 15:4로 확장하고 하위 4 bit는 0으로 채우며 word는 little-endian입니다.
각 항목은 16-bit little-endian word 하나입니다.
16-bpc 형식은 RGB triplet을 6 byte에 저장하고 component마다 완전한 16-bit little-endian word를 사용합니다. 이름은 memory component 순서 기준이며, 48-bit little-endian word에서 보이는 순서를 쓰는 DRM naming과 다릅니다.
각 component는 low byte 뒤 high byte 순서입니다.
12 Bits Per Component
==============================
These formats store an RGB triplet in six or eight bytes, with 12 bits per component.
Expand the bits per component to 16 bits, data in the high bits, zeros in the low bits,
arranged in little endian order.
.. raw:: latex
\small
.. flat-table:: RGB Formats With 12 Bits Per Component
:header-rows: 1
* - Identifier
- Code
- Byte 1-0
- Byte 3-2
- Byte 5-4
- Byte 7-6
* .. _V4L2-PIX-FMT-BGR48-12:
- ``V4L2_PIX_FMT_BGR48_12``
- 'B312'
- B\ :sub:`15-4`
- G\ :sub:`15-4`
- R\ :sub:`15-4`
-
* .. _V4L2-PIX-FMT-ABGR64-12:
- ``V4L2_PIX_FMT_ABGR64_12``
- 'B412'
- B\ :sub:`15-4`
- G\ :sub:`15-4`
- R\ :sub:`15-4`
- A\ :sub:`15-4`
.. raw:: latex
\normalsize
16 Bits Per Component
=====================
These formats store an RGB triplet in six bytes, with 16 bits per component
stored in memory in little endian byte order. They are named based on the order
of the RGB components as stored in memory. For instance, RGB48 stores R\
:sub:`7:0` and R\ :sub:`15:8` in bytes 0 and 1 respectively. This differs from
the DRM format nomenclature that instead uses the order of components as seen in
the 48-bits little endian word.
.. raw:: latex
\small
.. flat-table:: RGB Formats With 16 Bits Per Component
:header-rows: 1
* - Identifier
- Code
- Byte 0
- Byte 1
- Byte 2
- Byte 3
- Byte 4
- Byte 5
* .. _V4L2-PIX-FMT-BGR48:
- ``V4L2_PIX_FMT_BGR48``
- 'BGR6'
- B\ :sub:`7-0`
- B\ :sub:`15-8`
- G\ :sub:`7-0`
- G\ :sub:`15-8`
- R\ :sub:`7-0`
- R\ :sub:`15-8`
* .. _V4L2-PIX-FMT-RGB48:
- ``V4L2_PIX_FMT_RGB48``
- 'RGB6'
- R\ :sub:`7-0`
- R\ :sub:`15-8`
- G\ :sub:`7-0`
- G\ :sub:`15-8`
- B\ :sub:`7-0`
- B\ :sub:`15-8`
.. raw:: latex
\normalsize
Deprecated RGB 형식
1053-1278`pixfmt-rgb-deprecated`에 정의된 형식은 deprecated이므로 새 driver가 사용하면 안 됩니다. 호환성 참고를 위해 남아 있으며 alpha bit `(a)`의 의미가 명확하지 않습니다. Driver에 따라 대응 ARGB의 alpha로 해석하거나 XRGB의 padding으로 해석합니다.
새 구현은 명확한 A/X 형식으로 대체해야 합니다.
Alpha semantic을 FourCC 이름으로 명확히 합니다.
Driver가 실제 지원하는 RGB 형식을 판별하는 test utility는 LinuxTV v4l-dvb repository에서 제공됩니다. 접근 방법은 `https://linuxtv.org/repo/`를 참조합니다.
Deprecated RGB Formats
======================
Formats defined in :ref:`pixfmt-rgb-deprecated` are deprecated and must not be
used by new drivers. They are documented here for reference. The meaning of
their alpha bits ``(a)`` is ill-defined and they are interpreted as in either
the corresponding ARGB or XRGB format, depending on the driver.
.. raw:: latex
\begingroup
\tiny
\setlength{\tabcolsep}{2pt}
.. 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}|
.. _pixfmt-rgb-deprecated:
.. flat-table:: Deprecated Packed RGB Image Formats
:header-rows: 2
:stub-columns: 0
* - Identifier
- Code
- :cspan:`7` Byte 0 in memory
- :cspan:`7` Byte 1
- :cspan:`7` Byte 2
- :cspan:`7` Byte 3
* -
-
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
* .. _V4L2-PIX-FMT-RGB444:
- ``V4L2_PIX_FMT_RGB444``
- 'R444'
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
-
* .. _V4L2-PIX-FMT-RGB555:
- ``V4L2_PIX_FMT_RGB555``
- 'RGBO'
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
-
* .. _V4L2-PIX-FMT-RGB555X:
- ``V4L2_PIX_FMT_RGB555X``
- 'RGBQ'
- a
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
-
* .. _V4L2-PIX-FMT-BGR32:
- ``V4L2_PIX_FMT_BGR32``
- 'BGR4'
- b\ :sub:`7`
- b\ :sub:`6`
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
- g\ :sub:`7`
- g\ :sub:`6`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- a\ :sub:`7`
- a\ :sub:`6`
- a\ :sub:`5`
- a\ :sub:`4`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
* .. _V4L2-PIX-FMT-RGB32:
- ``V4L2_PIX_FMT_RGB32``
- 'RGB4'
- a\ :sub:`7`
- a\ :sub:`6`
- a\ :sub:`5`
- a\ :sub:`4`
- a\ :sub:`3`
- a\ :sub:`2`
- a\ :sub:`1`
- a\ :sub:`0`
- r\ :sub:`7`
- r\ :sub:`6`
- r\ :sub:`5`
- r\ :sub:`4`
- r\ :sub:`3`
- r\ :sub:`2`
- r\ :sub:`1`
- r\ :sub:`0`
- g\ :sub:`7`
- g\ :sub:`6`
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
- b\ :sub:`7`
- b\ :sub:`6`
- b\ :sub:`5`
- b\ :sub:`4`
- b\ :sub:`3`
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
.. raw:: latex
\endgroup
A test utility to determine which RGB formats a driver actually supports
is available from the LinuxTV v4l-dvb repository. See
`https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access
instructions.
요약·해설
pixfmt-rgb.rst:1-1278Packed RGB 형식은 component bit 수, memory 순서와 alpha/padding semantic으로 구분되며 V4L2 naming은 DRM과 다른 기준을 사용합니다.