1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
8 .. c:type:: v4l2_mbus_framefmt
10 .. tabularcolumns:: |p{2.0cm}|p{4.0cm}|p{11.3cm}|
12 .. cssclass:: longtable
14 .. flat-table:: struct v4l2_mbus_framefmt
21 - Image width in pixels.
24 - Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``,
25 ``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height
26 refers to the number of lines in the field, otherwise it refers to
27 the number of lines in the frame (which is twice the field height
28 for interlaced formats).
31 - Format code, from enum
32 :ref:`v4l2_mbus_pixelcode <v4l2-mbus-pixelcode>`.
35 - Field order, from enum :c:type:`v4l2_field`. See
36 :ref:`field-order` for details.
39 - Image colorspace, from enum :c:type:`v4l2_colorspace`.
40 Must be set by the driver for subdevices. If the application sets the
41 flag ``V4L2_MBUS_FRAMEFMT_SET_CSC`` then the application can set this
42 field on the source pad to request a specific colorspace for the media
43 bus data. If the driver cannot handle the requested conversion, it will
44 return another supported colorspace. The driver indicates that colorspace
45 conversion is supported by setting the flag
46 V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE in the corresponding struct
47 :c:type:`v4l2_subdev_mbus_code_enum` during enumeration.
48 See :ref:`v4l2-subdev-mbus-code-flags`.
53 - Y'CbCr encoding, from enum :c:type:`v4l2_ycbcr_encoding`.
54 This information supplements the ``colorspace`` and must be set by
55 the driver for subdevices, see :ref:`colorspaces`. If the application
56 sets the flag ``V4L2_MBUS_FRAMEFMT_SET_CSC`` then the application can set
57 this field on a source pad to request a specific Y'CbCr encoding
58 for the media bus data. If the driver cannot handle the requested
59 conversion, it will return another supported encoding.
60 This field is ignored for HSV media bus formats. The driver indicates
61 that ycbcr_enc conversion is supported by setting the flag
62 V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC in the corresponding struct
63 :c:type:`v4l2_subdev_mbus_code_enum` during enumeration.
64 See :ref:`v4l2-subdev-mbus-code-flags`.
67 - HSV encoding, from enum :c:type:`v4l2_hsv_encoding`.
68 This information supplements the ``colorspace`` and must be set by
69 the driver for subdevices, see :ref:`colorspaces`. If the application
70 sets the flag ``V4L2_MBUS_FRAMEFMT_SET_CSC`` then the application can set
71 this field on a source pad to request a specific HSV encoding
72 for the media bus data. If the driver cannot handle the requested
73 conversion, it will return another supported encoding.
74 This field is ignored for Y'CbCr media bus formats. The driver indicates
75 that hsv_enc conversion is supported by setting the flag
76 V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC in the corresponding struct
77 :c:type:`v4l2_subdev_mbus_code_enum` during enumeration.
78 See :ref:`v4l2-subdev-mbus-code-flags`
83 - Quantization range, from enum :c:type:`v4l2_quantization`.
84 This information supplements the ``colorspace`` and must be set by
85 the driver for subdevices, see :ref:`colorspaces`. If the application
86 sets the flag ``V4L2_MBUS_FRAMEFMT_SET_CSC`` then the application can set
87 this field on a source pad to request a specific quantization
88 for the media bus data. If the driver cannot handle the requested
89 conversion, it will return another supported quantization.
90 The driver indicates that quantization conversion is supported by
91 setting the flag V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION in the
92 corresponding struct :c:type:`v4l2_subdev_mbus_code_enum`
93 during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`.
97 - Transfer function, from enum :c:type:`v4l2_xfer_func`.
98 This information supplements the ``colorspace`` and must be set by
99 the driver for subdevices, see :ref:`colorspaces`. If the application
100 sets the flag ``V4L2_MBUS_FRAMEFMT_SET_CSC`` then the application can set
101 this field on a source pad to request a specific transfer
102 function for the media bus data. If the driver cannot handle the requested
103 conversion, it will return another supported transfer function.
104 The driver indicates that the transfer function conversion is supported by
105 setting the flag V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC in the
106 corresponding struct :c:type:`v4l2_subdev_mbus_code_enum`
107 during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`.
110 - flags See: :ref:v4l2-mbus-framefmt-flags
113 - Reserved for future extensions. Applications and drivers must set
116 .. _v4l2-mbus-framefmt-flags:
118 .. tabularcolumns:: |p{6.5cm}|p{1.6cm}|p{9.2cm}|
120 .. flat-table:: v4l2_mbus_framefmt Flags
125 * .. _`mbus-framefmt-set-csc`:
127 - ``V4L2_MBUS_FRAMEFMT_SET_CSC``
129 - Set by the application. It is only used for source pads and is
130 ignored for sink pads. If set, then request the subdevice to do
131 colorspace conversion from the received colorspace to the requested
132 colorspace values. If the colorimetry field (``colorspace``, ``xfer_func``,
133 ``ycbcr_enc``, ``hsv_enc`` or ``quantization``) is set to ``*_DEFAULT``,
134 then that colorimetry setting will remain unchanged from what was received.
135 So in order to change the quantization, only the ``quantization`` field shall
136 be set to non default value (``V4L2_QUANTIZATION_FULL_RANGE`` or
137 ``V4L2_QUANTIZATION_LIM_RANGE``) and all other colorimetry fields shall
138 be set to ``*_DEFAULT``.
140 To check which conversions are supported by the hardware for the current
141 media bus frame format, see :ref:`v4l2-subdev-mbus-code-flags`.
144 .. _v4l2-mbus-pixelcode:
146 Media Bus Pixel Codes
147 ---------------------
149 The media bus pixel codes describe image formats as flowing over
150 physical buses (both between separate physical components and inside
151 SoC devices). This should not be confused with the V4L2 pixel formats
152 that describe, using four character codes, image formats as stored in
155 While there is a relationship between image formats on buses and image
156 formats in memory (a raw Bayer image won't be magically converted to
157 JPEG just by storing it to memory), there is no one-to-one
158 correspondence between them.
160 The media bus pixel codes document parallel formats. Should the pixel data be
161 transported over a serial bus, the media bus pixel code that describes a
162 parallel format that transfers a sample on a single clock cycle is used. For
163 instance, both MEDIA_BUS_FMT_BGR888_1X24 and MEDIA_BUS_FMT_BGR888_3X8 are used
164 on parallel busses for transferring an 8 bits per sample BGR data, whereas on
165 serial busses the data in this format is only referred to using
166 MEDIA_BUS_FMT_BGR888_1X24. This is because there is effectively only a single
167 way to transport that format on the serial busses.
172 Those formats transfer pixel data as red, green and blue components. The
173 format code is made of the following information.
175 - The red, green and blue components order code, as encoded in a pixel
176 sample. Possible values are RGB and BGR.
178 - The number of bits per component, for each component. The values can
179 be different for all components. Common values are 555 and 565.
181 - The number of bus samples per pixel. Pixels that are wider than the
182 bus width must be transferred in multiple samples. Common values are
187 - For formats where the total number of bits per pixel is smaller than
188 the number of bus samples per pixel times the bus width, a padding
189 value stating if the bytes are padded in their most high order bits
190 (PADHI) or low order bits (PADLO). A "C" prefix is used for
191 component-wise padding in the most high order bits (CPADHI) or low
192 order bits (CPADLO) of each separate component.
194 - For formats where the number of bus samples per pixel is larger than
195 1, an endianness value stating if the pixel is transferred MSB first
196 (BE) or LSB first (LE).
198 For instance, a format where pixels are encoded as 5-bits red, 5-bits
199 green and 5-bit blue values padded on the high bit, transferred as 2
200 8-bit samples per pixel with the most significant bits (padding, red and
201 half of the green value) transferred first will be named
202 ``MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE``.
204 The following tables list existing packed RGB formats.
206 .. HACK: ideally, we would be using adjustbox here. However, Sphinx
207 .. is a very bad behaviored guy: if the table has more than 30 cols,
208 .. it switches to long table, and there's no way to override it.
211 .. tabularcolumns:: |p{5.0cm}|p{0.7cm}|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}|p{0.22cm}|
213 .. _v4l2-mbus-pixelcode-rgb:
219 \setlength{\tabcolsep}{2pt}
221 .. flat-table:: RGB formats
224 :widths: 36 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
229 - :cspan:`31` Data organization
265 * .. _MEDIA-BUS-FMT-RGB444-1X12:
267 - MEDIA_BUS_FMT_RGB444_1X12
302 * .. _MEDIA-BUS-FMT-RGB444-2X8-PADHI-BE:
304 - MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE
374 * .. _MEDIA-BUS-FMT-RGB444-2X8-PADHI-LE:
376 - MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE
446 * .. _MEDIA-BUS-FMT-RGB555-2X8-PADHI-BE:
448 - MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE
518 * .. _MEDIA-BUS-FMT-RGB555-2X8-PADHI-LE:
520 - MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE
590 * .. _MEDIA-BUS-FMT-RGB565-1X16:
592 - MEDIA_BUS_FMT_RGB565_1X16
627 * .. _MEDIA-BUS-FMT-BGR565-2X8-BE:
629 - MEDIA_BUS_FMT_BGR565_2X8_BE
699 * .. _MEDIA-BUS-FMT-BGR565-2X8-LE:
701 - MEDIA_BUS_FMT_BGR565_2X8_LE
771 * .. _MEDIA-BUS-FMT-RGB565-2X8-BE:
773 - MEDIA_BUS_FMT_RGB565_2X8_BE
843 * .. _MEDIA-BUS-FMT-RGB565-2X8-LE:
845 - MEDIA_BUS_FMT_RGB565_2X8_LE
915 * .. _MEDIA-BUS-FMT-RGB666-1X18:
917 - MEDIA_BUS_FMT_RGB666_1X18
952 * .. _MEDIA-BUS-FMT-RBG888-1X24:
954 - MEDIA_BUS_FMT_RBG888_1X24
989 * .. _MEDIA-BUS-FMT-RGB666-1X24_CPADHI:
991 - MEDIA_BUS_FMT_RGB666_1X24_CPADHI
1026 * .. _MEDIA-BUS-FMT-BGR888-1X24:
1028 - MEDIA_BUS_FMT_BGR888_1X24
1063 * .. _MEDIA-BUS-FMT-BGR888-3X8:
1065 - MEDIA_BUS_FMT_BGR888_3X8
1170 * .. _MEDIA-BUS-FMT-GBR888-1X24:
1172 - MEDIA_BUS_FMT_GBR888_1X24
1207 * .. _MEDIA-BUS-FMT-RGB888-1X24:
1209 - MEDIA_BUS_FMT_RGB888_1X24
1244 * .. _MEDIA-BUS-FMT-RGB888-2X12-BE:
1246 - MEDIA_BUS_FMT_RGB888_2X12_BE
1316 * .. _MEDIA-BUS-FMT-RGB888-2X12-LE:
1318 - MEDIA_BUS_FMT_RGB888_2X12_LE
1388 * .. _MEDIA-BUS-FMT-RGB888-3X8:
1390 - MEDIA_BUS_FMT_RGB888_3X8
1495 * .. _MEDIA-BUS-FMT-ARGB888-1X32:
1497 - MEDIA_BUS_FMT_ARGB888_1X32
1532 * .. _MEDIA-BUS-FMT-RGB888-1X32-PADHI:
1534 - MEDIA_BUS_FMT_RGB888_1X32_PADHI
1569 * .. _MEDIA-BUS-FMT-RGB101010-1X30:
1571 - MEDIA_BUS_FMT_RGB101010_1X30
1612 The following table list existing packed 36bit wide RGB formats.
1614 .. tabularcolumns:: |p{4.0cm}|p{0.7cm}|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}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|
1616 .. _v4l2-mbus-pixelcode-rgb-36:
1622 \setlength{\tabcolsep}{2pt}
1624 .. flat-table:: 36bit RGB formats
1627 :widths: 36 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1632 - :cspan:`35` Data organization
1672 * .. _MEDIA-BUS-FMT-RGB121212-1X36:
1674 - MEDIA_BUS_FMT_RGB121212_1X36
1719 The following table list existing packed 48bit wide RGB formats.
1721 .. tabularcolumns:: |p{4.0cm}|p{0.7cm}|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}|p{0.22cm}|
1723 .. _v4l2-mbus-pixelcode-rgb-48:
1729 \setlength{\tabcolsep}{2pt}
1731 .. flat-table:: 48bit RGB formats
1734 :widths: 36 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1739 - :cspan:`31` Data organization
1810 * .. _MEDIA-BUS-FMT-RGB161616-1X48:
1812 - MEDIA_BUS_FMT_RGB161616_1X48
1887 On LVDS buses, usually each sample is transferred serialized in seven
1888 time slots per pixel clock, on three (18-bit) or four (24-bit)
1889 differential data pairs at the same time. The remaining bits are used
1890 for control signals as defined by SPWG/PSWG/VESA or JEIDA standards. The
1891 24-bit RGB format serialized in seven time slots on four lanes using
1892 JEIDA defined bit mapping will be named
1893 ``MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA``, for example.
1899 .. _v4l2-mbus-pixelcode-rgb-lvds:
1901 .. flat-table:: LVDS RGB formats
1909 - :cspan:`3` Data organization
1918 * .. _MEDIA-BUS-FMT-RGB666-1X7X3-SPWG:
1920 - MEDIA_BUS_FMT_RGB666_1X7X3_SPWG
1976 * .. _MEDIA-BUS-FMT-RGB888-1X7X4-SPWG:
1978 - MEDIA_BUS_FMT_RGB888_1X7X4_SPWG
2034 * .. _MEDIA-BUS-FMT-RGB888-1X7X4-JEIDA:
2036 - MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA
2101 Those formats transfer pixel data as red, green and blue components. The
2102 format code is made of the following information.
2104 - The red, green and blue components order code, as encoded in a pixel
2105 sample. The possible values are shown in :ref:`bayer-patterns`.
2107 - The number of bits per pixel component. All components are
2108 transferred on the same number of bits. Common values are 8, 10 and
2111 - The compression (optional). If the pixel components are ALAW- or
2112 DPCM-compressed, a mention of the compression scheme and the number
2113 of bits per compressed pixel component.
2115 - The number of bus samples per pixel. Pixels that are wider than the
2116 bus width must be transferred in multiple samples. Common values are
2121 - For formats where the total number of bits per pixel is smaller than
2122 the number of bus samples per pixel times the bus width, a padding
2123 value stating if the bytes are padded in their most high order bits
2124 (PADHI) or low order bits (PADLO).
2126 - For formats where the number of bus samples per pixel is larger than
2127 1, an endianness value stating if the pixel is transferred MSB first
2128 (BE) or LSB first (LE).
2130 For instance, a format with uncompressed 10-bit Bayer components
2131 arranged in a red, green, green, blue pattern transferred as 2 8-bit
2132 samples per pixel with the least significant bits transferred first will
2133 be named ``MEDIA_BUS_FMT_SRGGB10_2X8_PADHI_LE``.
2138 .. kernel-figure:: bayer.svg
2142 **Figure 4.8 Bayer Patterns**
2144 The following table lists existing packed Bayer formats. The data
2145 organization is given as an example for the first pixel only.
2148 .. HACK: ideally, we would be using adjustbox here. However, Sphinx
2149 .. is a very bad behaviored guy: if the table has more than 30 cols,
2150 .. it switches to long table, and there's no way to override it.
2157 \setlength{\tabcolsep}{2pt}
2159 .. tabularcolumns:: |p{6.0cm}|p{0.7cm}|p{0.3cm}|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}|
2161 .. _v4l2-mbus-pixelcode-bayer:
2163 .. cssclass: longtable
2165 .. flat-table:: Bayer Formats
2172 - :cspan:`15` Data organization
2192 * .. _MEDIA-BUS-FMT-SBGGR8-1X8:
2194 - MEDIA_BUS_FMT_SBGGR8_1X8
2213 * .. _MEDIA-BUS-FMT-SGBRG8-1X8:
2215 - MEDIA_BUS_FMT_SGBRG8_1X8
2234 * .. _MEDIA-BUS-FMT-SGRBG8-1X8:
2236 - MEDIA_BUS_FMT_SGRBG8_1X8
2255 * .. _MEDIA-BUS-FMT-SRGGB8-1X8:
2257 - MEDIA_BUS_FMT_SRGGB8_1X8
2276 * .. _MEDIA-BUS-FMT-SBGGR10-ALAW8-1X8:
2278 - MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8
2297 * .. _MEDIA-BUS-FMT-SGBRG10-ALAW8-1X8:
2299 - MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8
2318 * .. _MEDIA-BUS-FMT-SGRBG10-ALAW8-1X8:
2320 - MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8
2339 * .. _MEDIA-BUS-FMT-SRGGB10-ALAW8-1X8:
2341 - MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8
2360 * .. _MEDIA-BUS-FMT-SBGGR10-DPCM8-1X8:
2362 - MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8
2381 * .. _MEDIA-BUS-FMT-SGBRG10-DPCM8-1X8:
2383 - MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8
2402 * .. _MEDIA-BUS-FMT-SGRBG10-DPCM8-1X8:
2404 - MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8
2423 * .. _MEDIA-BUS-FMT-SRGGB10-DPCM8-1X8:
2425 - MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8
2444 * .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-BE:
2446 - MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE
2484 * .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-LE:
2486 - MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE
2524 * .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-BE:
2526 - MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE
2564 * .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-LE:
2566 - MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE
2604 * .. _MEDIA-BUS-FMT-SBGGR10-1X10:
2606 - MEDIA_BUS_FMT_SBGGR10_1X10
2625 * .. _MEDIA-BUS-FMT-SGBRG10-1X10:
2627 - MEDIA_BUS_FMT_SGBRG10_1X10
2646 * .. _MEDIA-BUS-FMT-SGRBG10-1X10:
2648 - MEDIA_BUS_FMT_SGRBG10_1X10
2667 * .. _MEDIA-BUS-FMT-SRGGB10-1X10:
2669 - MEDIA_BUS_FMT_SRGGB10_1X10
2688 * .. _MEDIA-BUS-FMT-SBGGR12-1X12:
2690 - MEDIA_BUS_FMT_SBGGR12_1X12
2709 * .. _MEDIA-BUS-FMT-SGBRG12-1X12:
2711 - MEDIA_BUS_FMT_SGBRG12_1X12
2730 * .. _MEDIA-BUS-FMT-SGRBG12-1X12:
2732 - MEDIA_BUS_FMT_SGRBG12_1X12
2751 * .. _MEDIA-BUS-FMT-SRGGB12-1X12:
2753 - MEDIA_BUS_FMT_SRGGB12_1X12
2772 * .. _MEDIA-BUS-FMT-SBGGR14-1X14:
2774 - MEDIA_BUS_FMT_SBGGR14_1X14
2793 * .. _MEDIA-BUS-FMT-SGBRG14-1X14:
2795 - MEDIA_BUS_FMT_SGBRG14_1X14
2814 * .. _MEDIA-BUS-FMT-SGRBG14-1X14:
2816 - MEDIA_BUS_FMT_SGRBG14_1X14
2835 * .. _MEDIA-BUS-FMT-SRGGB14-1X14:
2837 - MEDIA_BUS_FMT_SRGGB14_1X14
2856 * .. _MEDIA-BUS-FMT-SBGGR16-1X16:
2858 - MEDIA_BUS_FMT_SBGGR16_1X16
2877 * .. _MEDIA-BUS-FMT-SGBRG16-1X16:
2879 - MEDIA_BUS_FMT_SGBRG16_1X16
2898 * .. _MEDIA-BUS-FMT-SGRBG16-1X16:
2900 - MEDIA_BUS_FMT_SGRBG16_1X16
2919 * .. _MEDIA-BUS-FMT-SRGGB16-1X16:
2921 - MEDIA_BUS_FMT_SRGGB16_1X16
2949 Those data formats transfer pixel data as (possibly downsampled) Y, U
2950 and V components. Some formats include dummy bits in some of their
2951 samples and are collectively referred to as "YDYC" (Y-Dummy-Y-Chroma)
2952 formats. One cannot rely on the values of these dummy bits as those are
2955 The format code is made of the following information.
2957 - The Y, U and V components order code, as transferred on the bus.
2958 Possible values are YUYV, UYVY, YVYU and VYUY for formats with no
2959 dummy bit, and YDYUYDYV, YDYVYDYU, YUYDYVYD and YVYDYUYD for YDYC
2962 - The number of bits per pixel component. All components are
2963 transferred on the same number of bits. Common values are 8, 10 and
2966 - The number of bus samples per pixel. Pixels that are wider than the
2967 bus width must be transferred in multiple samples. Common values are
2968 0.5 (encoded as 0_5; in this case two pixels are transferred per bus
2969 sample), 1, 1.5 (encoded as 1_5) and 2.
2971 - The bus width. When the bus width is larger than the number of bits
2972 per pixel component, several components are packed in a single bus
2973 sample. The components are ordered as specified by the order code,
2974 with components on the left of the code transferred in the high order
2975 bits. Common values are 8 and 16.
2977 For instance, a format where pixels are encoded as 8-bit YUV values
2978 downsampled to 4:2:2 and transferred as 2 8-bit bus samples per pixel in
2979 the U, Y, V, Y order will be named ``MEDIA_BUS_FMT_UYVY8_2X8``.
2981 :ref:`v4l2-mbus-pixelcode-yuv8` lists existing packed YUV formats and
2982 describes the organization of each pixel data in each sample. When a
2983 format pattern is split across multiple samples each of the samples in
2984 the pattern is described.
2986 The role of each bit transferred over the bus is identified by one of
2987 the following codes.
2989 - y\ :sub:`x` for luma component bit number x
2991 - u\ :sub:`x` for blue chroma component bit number x
2993 - v\ :sub:`x` for red chroma component bit number x
2995 - a\ :sub:`x` for alpha component bit number x
2997 - for non-available bits (for positions higher than the bus width)
3001 .. HACK: ideally, we would be using adjustbox here. However, this
3002 .. will never work for this table, as, even with tiny font, it is
3003 .. to big for a single page. So, we need to manually adjust the
3010 \setlength{\tabcolsep}{2pt}
3012 .. tabularcolumns:: |p{5.0cm}|p{0.7cm}|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}|p{0.22cm}|
3014 .. _v4l2-mbus-pixelcode-yuv8:
3016 .. flat-table:: YUV Formats
3019 :widths: 36 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
3024 - :cspan:`31` Data organization
3060 * .. _MEDIA-BUS-FMT-Y8-1X8:
3062 - MEDIA_BUS_FMT_Y8_1X8
3097 * .. _MEDIA-BUS-FMT-UV8-1X8:
3099 - MEDIA_BUS_FMT_UV8_1X8
3169 * .. _MEDIA-BUS-FMT-UYVY8-1_5X8:
3171 - MEDIA_BUS_FMT_UYVY8_1_5X8
3381 * .. _MEDIA-BUS-FMT-VYUY8-1_5X8:
3383 - MEDIA_BUS_FMT_VYUY8_1_5X8
3593 * .. _MEDIA-BUS-FMT-YUYV8-1_5X8:
3595 - MEDIA_BUS_FMT_YUYV8_1_5X8
3805 * .. _MEDIA-BUS-FMT-YVYU8-1_5X8:
3807 - MEDIA_BUS_FMT_YVYU8_1_5X8
4017 * .. _MEDIA-BUS-FMT-UYVY8-2X8:
4019 - MEDIA_BUS_FMT_UYVY8_2X8
4159 * .. _MEDIA-BUS-FMT-VYUY8-2X8:
4161 - MEDIA_BUS_FMT_VYUY8_2X8
4301 * .. _MEDIA-BUS-FMT-YUYV8-2X8:
4303 - MEDIA_BUS_FMT_YUYV8_2X8
4443 * .. _MEDIA-BUS-FMT-YVYU8-2X8:
4445 - MEDIA_BUS_FMT_YVYU8_2X8
4585 * .. _MEDIA-BUS-FMT-Y10-1X10:
4587 - MEDIA_BUS_FMT_Y10_1X10
4622 * .. _MEDIA-BUS-FMT-Y10-2X8-PADHI_LE:
4624 - MEDIA_BUS_FMT_Y10_2X8_PADHI_LE
4694 * .. _MEDIA-BUS-FMT-UYVY10-2X10:
4696 - MEDIA_BUS_FMT_UYVY10_2X10
4836 * .. _MEDIA-BUS-FMT-VYUY10-2X10:
4838 - MEDIA_BUS_FMT_VYUY10_2X10
4978 * .. _MEDIA-BUS-FMT-YUYV10-2X10:
4980 - MEDIA_BUS_FMT_YUYV10_2X10
5120 * .. _MEDIA-BUS-FMT-YVYU10-2X10:
5122 - MEDIA_BUS_FMT_YVYU10_2X10
5262 * .. _MEDIA-BUS-FMT-Y12-1X12:
5264 - MEDIA_BUS_FMT_Y12_1X12
5299 * .. _MEDIA-BUS-FMT-UYVY12-2X12:
5301 - MEDIA_BUS_FMT_UYVY12_2X12
5441 * .. _MEDIA-BUS-FMT-VYUY12-2X12:
5443 - MEDIA_BUS_FMT_VYUY12_2X12
5583 * .. _MEDIA-BUS-FMT-YUYV12-2X12:
5585 - MEDIA_BUS_FMT_YUYV12_2X12
5725 * .. _MEDIA-BUS-FMT-YVYU12-2X12:
5727 - MEDIA_BUS_FMT_YVYU12_2X12
5867 * .. _MEDIA-BUS-FMT-Y14-1X14:
5869 - MEDIA_BUS_FMT_Y14_1X14
5904 * .. _MEDIA-BUS-FMT-UYVY8-1X16:
5906 - MEDIA_BUS_FMT_UYVY8_1X16
5976 * .. _MEDIA-BUS-FMT-VYUY8-1X16:
5978 - MEDIA_BUS_FMT_VYUY8_1X16
6048 * .. _MEDIA-BUS-FMT-YUYV8-1X16:
6050 - MEDIA_BUS_FMT_YUYV8_1X16
6120 * .. _MEDIA-BUS-FMT-YVYU8-1X16:
6122 - MEDIA_BUS_FMT_YVYU8_1X16
6192 * .. _MEDIA-BUS-FMT-YDYUYDYV8-1X16:
6194 - MEDIA_BUS_FMT_YDYUYDYV8_1X16
6334 * .. _MEDIA-BUS-FMT-UYVY10-1X20:
6336 - MEDIA_BUS_FMT_UYVY10_1X20
6406 * .. _MEDIA-BUS-FMT-VYUY10-1X20:
6408 - MEDIA_BUS_FMT_VYUY10_1X20
6478 * .. _MEDIA-BUS-FMT-YUYV10-1X20:
6480 - MEDIA_BUS_FMT_YUYV10_1X20
6550 * .. _MEDIA-BUS-FMT-YVYU10-1X20:
6552 - MEDIA_BUS_FMT_YVYU10_1X20
6622 * .. _MEDIA-BUS-FMT-VUY8-1X24:
6624 - MEDIA_BUS_FMT_VUY8_1X24
6659 * .. _MEDIA-BUS-FMT-YUV8-1X24:
6661 - MEDIA_BUS_FMT_YUV8_1X24
6696 * .. _MEDIA-BUS-FMT-UYYVYY8-0-5X24:
6698 - MEDIA_BUS_FMT_UYYVYY8_0_5X24
6768 * .. _MEDIA-BUS-FMT-UYVY12-1X24:
6770 - MEDIA_BUS_FMT_UYVY12_1X24
6840 * .. _MEDIA-BUS-FMT-VYUY12-1X24:
6842 - MEDIA_BUS_FMT_VYUY12_1X24
6912 * .. _MEDIA-BUS-FMT-YUYV12-1X24:
6914 - MEDIA_BUS_FMT_YUYV12_1X24
6984 * .. _MEDIA-BUS-FMT-YVYU12-1X24:
6986 - MEDIA_BUS_FMT_YVYU12_1X24
7056 * .. _MEDIA-BUS-FMT-YUV10-1X30:
7058 - MEDIA_BUS_FMT_YUV10_1X30
7093 * .. _MEDIA-BUS-FMT-UYYVYY10-0-5X30:
7095 - MEDIA_BUS_FMT_UYYVYY10_0_5X30
7165 * .. _MEDIA-BUS-FMT-AYUV8-1X32:
7167 - MEDIA_BUS_FMT_AYUV8_1X32
7209 The following table list existing packed 36bit wide YUV formats.
7215 \setlength{\tabcolsep}{2pt}
7217 .. tabularcolumns:: |p{4.1cm}|p{0.7cm}|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}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|
7219 .. _v4l2-mbus-pixelcode-yuv8-36bit:
7221 .. flat-table:: 36bit YUV Formats
7224 :widths: 36 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
7229 - :cspan:`35` Data organization
7269 * .. _MEDIA-BUS-FMT-UYYVYY12-0-5X36:
7271 - MEDIA_BUS_FMT_UYYVYY12_0_5X36
7349 * .. _MEDIA-BUS-FMT-YUV12-1X36:
7351 - MEDIA_BUS_FMT_YUV12_1X36
7397 The following table list existing packed 48bit wide YUV formats.
7403 \setlength{\tabcolsep}{2pt}
7405 .. tabularcolumns:: |p{5.6cm}|p{0.7cm}|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}|p{0.22cm}|
7407 .. _v4l2-mbus-pixelcode-yuv8-48bit:
7409 .. flat-table:: 48bit YUV Formats
7412 :widths: 36 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
7417 - :cspan:`31` Data organization
7488 * .. _MEDIA-BUS-FMT-YUV16-1X48:
7490 - MEDIA_BUS_FMT_YUV16_1X48
7560 * .. _MEDIA-BUS-FMT-UYYVYY16-0-5X48:
7562 - MEDIA_BUS_FMT_UYYVYY16_0_5X48
7711 Those formats transfer pixel data as RGB values in a
7712 cylindrical-coordinate system using Hue-Saturation-Value or
7713 Hue-Saturation-Lightness components. The format code is made of the
7714 following information.
7716 - The hue, saturation, value or lightness and optional alpha components
7717 order code, as encoded in a pixel sample. The only currently
7718 supported value is AHSV.
7720 - The number of bits per component, for each component. The values can
7721 be different for all components. The only currently supported value
7724 - The number of bus samples per pixel. Pixels that are wider than the
7725 bus width must be transferred in multiple samples. The only currently
7726 supported value is 1.
7730 - For formats where the total number of bits per pixel is smaller than
7731 the number of bus samples per pixel times the bus width, a padding
7732 value stating if the bytes are padded in their most high order bits
7733 (PADHI) or low order bits (PADLO).
7735 - For formats where the number of bus samples per pixel is larger than
7736 1, an endianness value stating if the pixel is transferred MSB first
7737 (BE) or LSB first (LE).
7739 The following table lists existing HSV/HSL formats.
7746 \setlength{\tabcolsep}{2pt}
7748 .. tabularcolumns:: |p{3.9cm}|p{0.73cm}|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}|p{0.22cm}|
7750 .. _v4l2-mbus-pixelcode-hsv:
7752 .. flat-table:: HSV/HSL formats
7755 :widths: 28 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
7760 - :cspan:`31` Data organization
7796 * .. _MEDIA-BUS-FMT-AHSV8888-1X32:
7798 - MEDIA_BUS_FMT_AHSV8888_1X32
7839 JPEG Compressed Formats
7840 ^^^^^^^^^^^^^^^^^^^^^^^
7842 Those data formats consist of an ordered sequence of 8-bit bytes
7843 obtained from JPEG compression process. Additionally to the ``_JPEG``
7844 postfix the format code is made of the following information.
7846 - The number of bus samples per entropy encoded byte.
7850 For instance, for a JPEG baseline process and an 8-bit bus width the
7851 format will be named ``MEDIA_BUS_FMT_JPEG_1X8``.
7853 The following table lists existing JPEG compressed formats.
7856 .. _v4l2-mbus-pixelcode-jpeg:
7858 .. tabularcolumns:: |p{6.0cm}|p{1.4cm}|p{9.9cm}|
7860 .. flat-table:: JPEG Formats
7867 * .. _MEDIA-BUS-FMT-JPEG-1X8:
7869 - MEDIA_BUS_FMT_JPEG_1X8
7871 - Besides of its usage for the parallel bus this format is
7872 recommended for transmission of JPEG data over MIPI CSI bus using
7873 the User Defined 8-bit Data types.
7877 .. _v4l2-mbus-vendor-spec-fmts:
7879 Vendor and Device Specific Formats
7880 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7882 This section lists complex data formats that are either vendor or device
7885 The following table lists the existing vendor and device specific
7889 .. _v4l2-mbus-pixelcode-vendor-specific:
7891 .. tabularcolumns:: |p{8.0cm}|p{1.4cm}|p{7.9cm}|
7893 .. flat-table:: Vendor and device specific formats
7900 * .. _MEDIA-BUS-FMT-S5C-UYVY-JPEG-1X8:
7902 - MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8
7904 - Interleaved raw UYVY and JPEG image format with embedded meta-data
7905 used by Samsung S3C73MX camera sensors.
7907 .. _v4l2-mbus-metadata-fmts:
7912 This section lists all metadata formats.
7914 The following table lists the existing metadata formats.
7916 .. tabularcolumns:: |p{8.0cm}|p{1.4cm}|p{7.9cm}|
7918 .. flat-table:: Metadata formats
7925 * .. _MEDIA-BUS-FMT-METADATA-FIXED:
7927 - MEDIA_BUS_FMT_METADATA_FIXED
7929 - This format should be used when the same driver handles
7930 both sides of the link and the bus format is a fixed
7931 metadata format that is not configurable from userspace.
7932 Width and height will be set to 0 for this format.
7935 .. _v4l2-mbus-sensor-data:
7937 Sensor Ancillary Metadata Formats
7938 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7940 This section lists ancillary data generated by a camera sensor and
7941 transmitted over a stream on the camera bus.
7943 The following table lists the existing sensor ancillary metadata formats:
7946 .. _v4l2-mbus-pixelcode-sensor-metadata:
7948 .. tabularcolumns:: |p{8.0cm}|p{1.4cm}|p{7.7cm}|
7950 .. flat-table:: Sensor ancillary metadata formats
7957 * .. _MEDIA_BUS_FMT_SENSOR_DATA:
7959 - MEDIA_BUS_FMT_SENSOR_DATA
7961 - Sensor vendor specific ancillary metadata. Some vendors follow a generic
7962 CSI-2/SMIA embedded data format as described in the `CSI-2 specification.
7963 <https://mipi.org/specifications/csi-2>`_