1 .. SPDX-License-Identifier: GFDL-1.1-no-invari 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 2 3 .. _pixfmt-rgb: 3 .. _pixfmt-rgb: 4 4 5 *********** 5 *********** 6 RGB Formats 6 RGB Formats 7 *********** 7 *********** 8 8 9 These formats encode each pixel as a triplet o 9 These formats encode each pixel as a triplet of RGB values. They are packed 10 formats, meaning that the RGB values for one p 10 formats, meaning that the RGB values for one pixel are stored consecutively in 11 memory and each pixel consumes an integer numb 11 memory and each pixel consumes an integer number of bytes. When the number of 12 bits required to store a pixel is not aligned 12 bits required to store a pixel is not aligned to a byte boundary, the data is 13 padded with additional bits to fill the remain 13 padded with additional bits to fill the remaining byte. 14 14 15 The formats differ by the number of bits per R 15 The formats differ by the number of bits per RGB component (typically but not 16 always the same for all components), the order 16 always the same for all components), the order of components in memory, and the 17 presence of an alpha component or additional p 17 presence of an alpha component or additional padding bits. 18 18 19 The usage and value of the alpha bits in forma 19 The usage and value of the alpha bits in formats that support them (named ARGB 20 or a permutation thereof, collectively referre 20 or a permutation thereof, collectively referred to as alpha formats) depend on 21 the device type and hardware operation. :ref:` 21 the device type and hardware operation. :ref:`Capture <capture>` devices 22 (including capture queues of mem-to-mem device 22 (including capture queues of mem-to-mem devices) fill the alpha component in 23 memory. When the device captures an alpha chan 23 memory. When the device captures an alpha channel the alpha component will have 24 a meaningful value. Otherwise, when the device 24 a meaningful value. Otherwise, when the device doesn't capture an alpha channel 25 but can set the alpha bit to a user-configurab 25 but can set the alpha bit to a user-configurable value, the 26 :ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-com 26 :ref:`V4L2_CID_ALPHA_COMPONENT <v4l2-alpha-component>` control is used to 27 specify that alpha value, and the alpha compon 27 specify that alpha value, and the alpha component of all pixels will be set to 28 the value specified by that control. Otherwise 28 the value specified by that control. Otherwise a corresponding format without 29 an alpha component (XRGB or XBGR) must be used 29 an alpha component (XRGB or XBGR) must be used instead of an alpha format. 30 30 31 :ref:`Output <output>` devices (including outp 31 :ref:`Output <output>` devices (including output queues of mem-to-mem devices 32 and :ref:`video output overlay <osd>` devices) 32 and :ref:`video output overlay <osd>` devices) read the alpha component from 33 memory. When the device processes the alpha ch 33 memory. When the device processes the alpha channel the alpha component must be 34 filled with meaningful values by applications. 34 filled with meaningful values by applications. Otherwise a corresponding format 35 without an alpha component (XRGB or XBGR) must 35 without an alpha component (XRGB or XBGR) must be used instead of an alpha 36 format. 36 format. 37 37 38 Formats that contain padding bits are named XR 38 Formats that contain padding bits are named XRGB (or a permutation thereof). 39 The padding bits contain undefined values and 39 The padding bits contain undefined values and must be ignored by applications, 40 devices and drivers, for both :ref:`capture` a 40 devices and drivers, for both :ref:`capture` and :ref:`output` devices. 41 41 42 .. note:: 42 .. note:: 43 43 44 - In all the tables that follow, bit 7 is t 44 - In all the tables that follow, bit 7 is the most significant bit in a byte. 45 - 'r', 'g' and 'b' denote bits of the red, 45 - 'r', 'g' and 'b' denote bits of the red, green and blue components 46 respectively. 'a' denotes bits of the alp 46 respectively. 'a' denotes bits of the alpha component (if supported by the 47 format), and 'x' denotes padding bits. 47 format), and 'x' denotes padding bits. 48 48 49 49 50 Less Than 8 Bits Per Component 50 Less Than 8 Bits Per Component 51 ============================== 51 ============================== 52 52 53 These formats store an RGB triplet in one, two 53 These formats store an RGB triplet in one, two or four bytes. They are named 54 based on the order of the RGB components as se 54 based on the order of the RGB components as seen in a 8-, 16- or 32-bit word, 55 which is then stored in memory in little endia 55 which is then stored in memory in little endian byte order (unless otherwise 56 noted by the presence of bit 31 in the 4CC val 56 noted by the presence of bit 31 in the 4CC value), and on the number of bits 57 for each component. For instance, the RGB565 f 57 for each component. For instance, the RGB565 format stores a pixel in a 16-bit 58 word [15:0] laid out at as [R\ :sub:`4` R\ :su 58 word [15:0] laid out at as [R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1` 59 R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3 59 R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3` G\ :sub:`2` G\ :sub:`1` 60 G\ :sub:`0` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2 60 G\ :sub:`0` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` B\ :sub:`1` B\ :sub:`0`], and 61 stored in memory in two bytes, [R\ :sub:`4` R\ 61 stored in memory in two bytes, [R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1` 62 R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3 62 R\ :sub:`0` G\ :sub:`5` G\ :sub:`4` G\ :sub:`3`] followed by [G\ :sub:`2` 63 G\ :sub:`1` G\ :sub:`0` B\ :sub:`4` B\ :sub:`3 63 G\ :sub:`1` G\ :sub:`0` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` B\ :sub:`1` 64 B\ :sub:`0`]. 64 B\ :sub:`0`]. 65 65 66 .. raw:: latex 66 .. raw:: latex 67 67 68 \begingroup 68 \begingroup 69 \tiny 69 \tiny 70 \setlength{\tabcolsep}{2pt} 70 \setlength{\tabcolsep}{2pt} 71 71 72 .. tabularcolumns:: |p{2.8cm}|p{2.0cm}|p{0.22c 72 .. 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}| 73 73 74 74 75 .. flat-table:: RGB Formats With Less Than 8 B 75 .. flat-table:: RGB Formats With Less Than 8 Bits Per Component 76 :header-rows: 2 76 :header-rows: 2 77 :stub-columns: 0 77 :stub-columns: 0 78 78 79 * - Identifier 79 * - Identifier 80 - Code 80 - Code 81 - :cspan:`7` Byte 0 in memory 81 - :cspan:`7` Byte 0 in memory 82 - :cspan:`7` Byte 1 82 - :cspan:`7` Byte 1 83 - :cspan:`7` Byte 2 83 - :cspan:`7` Byte 2 84 - :cspan:`7` Byte 3 84 - :cspan:`7` Byte 3 85 * - 85 * - 86 - 86 - 87 - 7 87 - 7 88 - 6 88 - 6 89 - 5 89 - 5 90 - 4 90 - 4 91 - 3 91 - 3 92 - 2 92 - 2 93 - 1 93 - 1 94 - 0 94 - 0 95 95 96 - 7 96 - 7 97 - 6 97 - 6 98 - 5 98 - 5 99 - 4 99 - 4 100 - 3 100 - 3 101 - 2 101 - 2 102 - 1 102 - 1 103 - 0 103 - 0 104 104 105 - 7 105 - 7 106 - 6 106 - 6 107 - 5 107 - 5 108 - 4 108 - 4 109 - 3 109 - 3 110 - 2 110 - 2 111 - 1 111 - 1 112 - 0 112 - 0 113 113 114 - 7 114 - 7 115 - 6 115 - 6 116 - 5 116 - 5 117 - 4 117 - 4 118 - 3 118 - 3 119 - 2 119 - 2 120 - 1 120 - 1 121 - 0 121 - 0 122 * .. _V4L2-PIX-FMT-RGB332: 122 * .. _V4L2-PIX-FMT-RGB332: 123 123 124 - ``V4L2_PIX_FMT_RGB332`` 124 - ``V4L2_PIX_FMT_RGB332`` 125 - 'RGB1' 125 - 'RGB1' 126 126 127 - r\ :sub:`2` 127 - r\ :sub:`2` 128 - r\ :sub:`1` 128 - r\ :sub:`1` 129 - r\ :sub:`0` 129 - r\ :sub:`0` 130 - g\ :sub:`2` 130 - g\ :sub:`2` 131 - g\ :sub:`1` 131 - g\ :sub:`1` 132 - g\ :sub:`0` 132 - g\ :sub:`0` 133 - b\ :sub:`1` 133 - b\ :sub:`1` 134 - b\ :sub:`0` 134 - b\ :sub:`0` 135 - 135 - 136 * .. _V4L2-PIX-FMT-ARGB444: 136 * .. _V4L2-PIX-FMT-ARGB444: 137 137 138 - ``V4L2_PIX_FMT_ARGB444`` 138 - ``V4L2_PIX_FMT_ARGB444`` 139 - 'AR12' 139 - 'AR12' 140 140 141 - g\ :sub:`3` 141 - g\ :sub:`3` 142 - g\ :sub:`2` 142 - g\ :sub:`2` 143 - g\ :sub:`1` 143 - g\ :sub:`1` 144 - g\ :sub:`0` 144 - g\ :sub:`0` 145 - b\ :sub:`3` 145 - b\ :sub:`3` 146 - b\ :sub:`2` 146 - b\ :sub:`2` 147 - b\ :sub:`1` 147 - b\ :sub:`1` 148 - b\ :sub:`0` 148 - b\ :sub:`0` 149 149 150 - a\ :sub:`3` 150 - a\ :sub:`3` 151 - a\ :sub:`2` 151 - a\ :sub:`2` 152 - a\ :sub:`1` 152 - a\ :sub:`1` 153 - a\ :sub:`0` 153 - a\ :sub:`0` 154 - r\ :sub:`3` 154 - r\ :sub:`3` 155 - r\ :sub:`2` 155 - r\ :sub:`2` 156 - r\ :sub:`1` 156 - r\ :sub:`1` 157 - r\ :sub:`0` 157 - r\ :sub:`0` 158 - 158 - 159 * .. _V4L2-PIX-FMT-XRGB444: 159 * .. _V4L2-PIX-FMT-XRGB444: 160 160 161 - ``V4L2_PIX_FMT_XRGB444`` 161 - ``V4L2_PIX_FMT_XRGB444`` 162 - 'XR12' 162 - 'XR12' 163 163 164 - g\ :sub:`3` 164 - g\ :sub:`3` 165 - g\ :sub:`2` 165 - g\ :sub:`2` 166 - g\ :sub:`1` 166 - g\ :sub:`1` 167 - g\ :sub:`0` 167 - g\ :sub:`0` 168 - b\ :sub:`3` 168 - b\ :sub:`3` 169 - b\ :sub:`2` 169 - b\ :sub:`2` 170 - b\ :sub:`1` 170 - b\ :sub:`1` 171 - b\ :sub:`0` 171 - b\ :sub:`0` 172 172 173 - x 173 - x 174 - x 174 - x 175 - x 175 - x 176 - x 176 - x 177 - r\ :sub:`3` 177 - r\ :sub:`3` 178 - r\ :sub:`2` 178 - r\ :sub:`2` 179 - r\ :sub:`1` 179 - r\ :sub:`1` 180 - r\ :sub:`0` 180 - r\ :sub:`0` 181 - 181 - 182 * .. _V4L2-PIX-FMT-RGBA444: 182 * .. _V4L2-PIX-FMT-RGBA444: 183 183 184 - ``V4L2_PIX_FMT_RGBA444`` 184 - ``V4L2_PIX_FMT_RGBA444`` 185 - 'RA12' 185 - 'RA12' 186 186 187 - b\ :sub:`3` 187 - b\ :sub:`3` 188 - b\ :sub:`2` 188 - b\ :sub:`2` 189 - b\ :sub:`1` 189 - b\ :sub:`1` 190 - b\ :sub:`0` 190 - b\ :sub:`0` 191 - a\ :sub:`3` 191 - a\ :sub:`3` 192 - a\ :sub:`2` 192 - a\ :sub:`2` 193 - a\ :sub:`1` 193 - a\ :sub:`1` 194 - a\ :sub:`0` 194 - a\ :sub:`0` 195 195 196 - r\ :sub:`3` 196 - r\ :sub:`3` 197 - r\ :sub:`2` 197 - r\ :sub:`2` 198 - r\ :sub:`1` 198 - r\ :sub:`1` 199 - r\ :sub:`0` 199 - r\ :sub:`0` 200 - g\ :sub:`3` 200 - g\ :sub:`3` 201 - g\ :sub:`2` 201 - g\ :sub:`2` 202 - g\ :sub:`1` 202 - g\ :sub:`1` 203 - g\ :sub:`0` 203 - g\ :sub:`0` 204 - 204 - 205 * .. _V4L2-PIX-FMT-RGBX444: 205 * .. _V4L2-PIX-FMT-RGBX444: 206 206 207 - ``V4L2_PIX_FMT_RGBX444`` 207 - ``V4L2_PIX_FMT_RGBX444`` 208 - 'RX12' 208 - 'RX12' 209 209 210 - b\ :sub:`3` 210 - b\ :sub:`3` 211 - b\ :sub:`2` 211 - b\ :sub:`2` 212 - b\ :sub:`1` 212 - b\ :sub:`1` 213 - b\ :sub:`0` 213 - b\ :sub:`0` 214 - x 214 - x 215 - x 215 - x 216 - x 216 - x 217 - x 217 - x 218 218 219 - r\ :sub:`3` 219 - r\ :sub:`3` 220 - r\ :sub:`2` 220 - r\ :sub:`2` 221 - r\ :sub:`1` 221 - r\ :sub:`1` 222 - r\ :sub:`0` 222 - r\ :sub:`0` 223 - g\ :sub:`3` 223 - g\ :sub:`3` 224 - g\ :sub:`2` 224 - g\ :sub:`2` 225 - g\ :sub:`1` 225 - g\ :sub:`1` 226 - g\ :sub:`0` 226 - g\ :sub:`0` 227 - 227 - 228 * .. _V4L2-PIX-FMT-ABGR444: 228 * .. _V4L2-PIX-FMT-ABGR444: 229 229 230 - ``V4L2_PIX_FMT_ABGR444`` 230 - ``V4L2_PIX_FMT_ABGR444`` 231 - 'AB12' 231 - 'AB12' 232 232 233 - g\ :sub:`3` 233 - g\ :sub:`3` 234 - g\ :sub:`2` 234 - g\ :sub:`2` 235 - g\ :sub:`1` 235 - g\ :sub:`1` 236 - g\ :sub:`0` 236 - g\ :sub:`0` 237 - r\ :sub:`3` 237 - r\ :sub:`3` 238 - r\ :sub:`2` 238 - r\ :sub:`2` 239 - r\ :sub:`1` 239 - r\ :sub:`1` 240 - r\ :sub:`0` 240 - r\ :sub:`0` 241 241 242 - a\ :sub:`3` 242 - a\ :sub:`3` 243 - a\ :sub:`2` 243 - a\ :sub:`2` 244 - a\ :sub:`1` 244 - a\ :sub:`1` 245 - a\ :sub:`0` 245 - a\ :sub:`0` 246 - b\ :sub:`3` 246 - b\ :sub:`3` 247 - b\ :sub:`2` 247 - b\ :sub:`2` 248 - b\ :sub:`1` 248 - b\ :sub:`1` 249 - b\ :sub:`0` 249 - b\ :sub:`0` 250 - 250 - 251 * .. _V4L2-PIX-FMT-XBGR444: 251 * .. _V4L2-PIX-FMT-XBGR444: 252 252 253 - ``V4L2_PIX_FMT_XBGR444`` 253 - ``V4L2_PIX_FMT_XBGR444`` 254 - 'XB12' 254 - 'XB12' 255 255 256 - g\ :sub:`3` 256 - g\ :sub:`3` 257 - g\ :sub:`2` 257 - g\ :sub:`2` 258 - g\ :sub:`1` 258 - g\ :sub:`1` 259 - g\ :sub:`0` 259 - g\ :sub:`0` 260 - r\ :sub:`3` 260 - r\ :sub:`3` 261 - r\ :sub:`2` 261 - r\ :sub:`2` 262 - r\ :sub:`1` 262 - r\ :sub:`1` 263 - r\ :sub:`0` 263 - r\ :sub:`0` 264 264 265 - x 265 - x 266 - x 266 - x 267 - x 267 - x 268 - x 268 - x 269 - b\ :sub:`3` 269 - b\ :sub:`3` 270 - b\ :sub:`2` 270 - b\ :sub:`2` 271 - b\ :sub:`1` 271 - b\ :sub:`1` 272 - b\ :sub:`0` 272 - b\ :sub:`0` 273 - 273 - 274 * .. _V4L2-PIX-FMT-BGRA444: 274 * .. _V4L2-PIX-FMT-BGRA444: 275 275 276 - ``V4L2_PIX_FMT_BGRA444`` 276 - ``V4L2_PIX_FMT_BGRA444`` 277 - 'BA12' 277 - 'BA12' 278 278 279 - r\ :sub:`3` 279 - r\ :sub:`3` 280 - r\ :sub:`2` 280 - r\ :sub:`2` 281 - r\ :sub:`1` 281 - r\ :sub:`1` 282 - r\ :sub:`0` 282 - r\ :sub:`0` 283 - a\ :sub:`3` 283 - a\ :sub:`3` 284 - a\ :sub:`2` 284 - a\ :sub:`2` 285 - a\ :sub:`1` 285 - a\ :sub:`1` 286 - a\ :sub:`0` 286 - a\ :sub:`0` 287 287 288 - b\ :sub:`3` 288 - b\ :sub:`3` 289 - b\ :sub:`2` 289 - b\ :sub:`2` 290 - b\ :sub:`1` 290 - b\ :sub:`1` 291 - b\ :sub:`0` 291 - b\ :sub:`0` 292 - g\ :sub:`3` 292 - g\ :sub:`3` 293 - g\ :sub:`2` 293 - g\ :sub:`2` 294 - g\ :sub:`1` 294 - g\ :sub:`1` 295 - g\ :sub:`0` 295 - g\ :sub:`0` 296 - 296 - 297 * .. _V4L2-PIX-FMT-BGRX444: 297 * .. _V4L2-PIX-FMT-BGRX444: 298 298 299 - ``V4L2_PIX_FMT_BGRX444`` 299 - ``V4L2_PIX_FMT_BGRX444`` 300 - 'BX12' 300 - 'BX12' 301 301 302 - r\ :sub:`3` 302 - r\ :sub:`3` 303 - r\ :sub:`2` 303 - r\ :sub:`2` 304 - r\ :sub:`1` 304 - r\ :sub:`1` 305 - r\ :sub:`0` 305 - r\ :sub:`0` 306 - x 306 - x 307 - x 307 - x 308 - x 308 - x 309 - x 309 - x 310 310 311 - b\ :sub:`3` 311 - b\ :sub:`3` 312 - b\ :sub:`2` 312 - b\ :sub:`2` 313 - b\ :sub:`1` 313 - b\ :sub:`1` 314 - b\ :sub:`0` 314 - b\ :sub:`0` 315 - g\ :sub:`3` 315 - g\ :sub:`3` 316 - g\ :sub:`2` 316 - g\ :sub:`2` 317 - g\ :sub:`1` 317 - g\ :sub:`1` 318 - g\ :sub:`0` 318 - g\ :sub:`0` 319 - 319 - 320 * .. _V4L2-PIX-FMT-ARGB555: 320 * .. _V4L2-PIX-FMT-ARGB555: 321 321 322 - ``V4L2_PIX_FMT_ARGB555`` 322 - ``V4L2_PIX_FMT_ARGB555`` 323 - 'AR15' 323 - 'AR15' 324 324 325 - g\ :sub:`2` 325 - g\ :sub:`2` 326 - g\ :sub:`1` 326 - g\ :sub:`1` 327 - g\ :sub:`0` 327 - g\ :sub:`0` 328 - b\ :sub:`4` 328 - b\ :sub:`4` 329 - b\ :sub:`3` 329 - b\ :sub:`3` 330 - b\ :sub:`2` 330 - b\ :sub:`2` 331 - b\ :sub:`1` 331 - b\ :sub:`1` 332 - b\ :sub:`0` 332 - b\ :sub:`0` 333 333 334 - a 334 - a 335 - r\ :sub:`4` 335 - r\ :sub:`4` 336 - r\ :sub:`3` 336 - r\ :sub:`3` 337 - r\ :sub:`2` 337 - r\ :sub:`2` 338 - r\ :sub:`1` 338 - r\ :sub:`1` 339 - r\ :sub:`0` 339 - r\ :sub:`0` 340 - g\ :sub:`4` 340 - g\ :sub:`4` 341 - g\ :sub:`3` 341 - g\ :sub:`3` 342 - 342 - 343 * .. _V4L2-PIX-FMT-XRGB555: 343 * .. _V4L2-PIX-FMT-XRGB555: 344 344 345 - ``V4L2_PIX_FMT_XRGB555`` 345 - ``V4L2_PIX_FMT_XRGB555`` 346 - 'XR15' 346 - 'XR15' 347 347 348 - g\ :sub:`2` 348 - g\ :sub:`2` 349 - g\ :sub:`1` 349 - g\ :sub:`1` 350 - g\ :sub:`0` 350 - g\ :sub:`0` 351 - b\ :sub:`4` 351 - b\ :sub:`4` 352 - b\ :sub:`3` 352 - b\ :sub:`3` 353 - b\ :sub:`2` 353 - b\ :sub:`2` 354 - b\ :sub:`1` 354 - b\ :sub:`1` 355 - b\ :sub:`0` 355 - b\ :sub:`0` 356 356 357 - x 357 - x 358 - r\ :sub:`4` 358 - r\ :sub:`4` 359 - r\ :sub:`3` 359 - r\ :sub:`3` 360 - r\ :sub:`2` 360 - r\ :sub:`2` 361 - r\ :sub:`1` 361 - r\ :sub:`1` 362 - r\ :sub:`0` 362 - r\ :sub:`0` 363 - g\ :sub:`4` 363 - g\ :sub:`4` 364 - g\ :sub:`3` 364 - g\ :sub:`3` 365 - 365 - 366 * .. _V4L2-PIX-FMT-RGBA555: 366 * .. _V4L2-PIX-FMT-RGBA555: 367 367 368 - ``V4L2_PIX_FMT_RGBA555`` 368 - ``V4L2_PIX_FMT_RGBA555`` 369 - 'RA15' 369 - 'RA15' 370 370 371 - g\ :sub:`1` 371 - g\ :sub:`1` 372 - g\ :sub:`0` 372 - g\ :sub:`0` 373 - b\ :sub:`4` 373 - b\ :sub:`4` 374 - b\ :sub:`3` 374 - b\ :sub:`3` 375 - b\ :sub:`2` 375 - b\ :sub:`2` 376 - b\ :sub:`1` 376 - b\ :sub:`1` 377 - b\ :sub:`0` 377 - b\ :sub:`0` 378 - a 378 - a 379 379 380 - r\ :sub:`4` 380 - r\ :sub:`4` 381 - r\ :sub:`3` 381 - r\ :sub:`3` 382 - r\ :sub:`2` 382 - r\ :sub:`2` 383 - r\ :sub:`1` 383 - r\ :sub:`1` 384 - r\ :sub:`0` 384 - r\ :sub:`0` 385 - g\ :sub:`4` 385 - g\ :sub:`4` 386 - g\ :sub:`3` 386 - g\ :sub:`3` 387 - g\ :sub:`2` 387 - g\ :sub:`2` 388 - 388 - 389 * .. _V4L2-PIX-FMT-RGBX555: 389 * .. _V4L2-PIX-FMT-RGBX555: 390 390 391 - ``V4L2_PIX_FMT_RGBX555`` 391 - ``V4L2_PIX_FMT_RGBX555`` 392 - 'RX15' 392 - 'RX15' 393 393 394 - g\ :sub:`1` 394 - g\ :sub:`1` 395 - g\ :sub:`0` 395 - g\ :sub:`0` 396 - b\ :sub:`4` 396 - b\ :sub:`4` 397 - b\ :sub:`3` 397 - b\ :sub:`3` 398 - b\ :sub:`2` 398 - b\ :sub:`2` 399 - b\ :sub:`1` 399 - b\ :sub:`1` 400 - b\ :sub:`0` 400 - b\ :sub:`0` 401 - x 401 - x 402 402 403 - r\ :sub:`4` 403 - r\ :sub:`4` 404 - r\ :sub:`3` 404 - r\ :sub:`3` 405 - r\ :sub:`2` 405 - r\ :sub:`2` 406 - r\ :sub:`1` 406 - r\ :sub:`1` 407 - r\ :sub:`0` 407 - r\ :sub:`0` 408 - g\ :sub:`4` 408 - g\ :sub:`4` 409 - g\ :sub:`3` 409 - g\ :sub:`3` 410 - g\ :sub:`2` 410 - g\ :sub:`2` 411 - 411 - 412 * .. _V4L2-PIX-FMT-ABGR555: 412 * .. _V4L2-PIX-FMT-ABGR555: 413 413 414 - ``V4L2_PIX_FMT_ABGR555`` 414 - ``V4L2_PIX_FMT_ABGR555`` 415 - 'AB15' 415 - 'AB15' 416 416 417 - g\ :sub:`2` 417 - g\ :sub:`2` 418 - g\ :sub:`1` 418 - g\ :sub:`1` 419 - g\ :sub:`0` 419 - g\ :sub:`0` 420 - r\ :sub:`4` 420 - r\ :sub:`4` 421 - r\ :sub:`3` 421 - r\ :sub:`3` 422 - r\ :sub:`2` 422 - r\ :sub:`2` 423 - r\ :sub:`1` 423 - r\ :sub:`1` 424 - r\ :sub:`0` 424 - r\ :sub:`0` 425 425 426 - a 426 - a 427 - b\ :sub:`4` 427 - b\ :sub:`4` 428 - b\ :sub:`3` 428 - b\ :sub:`3` 429 - b\ :sub:`2` 429 - b\ :sub:`2` 430 - b\ :sub:`1` 430 - b\ :sub:`1` 431 - b\ :sub:`0` 431 - b\ :sub:`0` 432 - g\ :sub:`4` 432 - g\ :sub:`4` 433 - g\ :sub:`3` 433 - g\ :sub:`3` 434 - 434 - 435 * .. _V4L2-PIX-FMT-XBGR555: 435 * .. _V4L2-PIX-FMT-XBGR555: 436 436 437 - ``V4L2_PIX_FMT_XBGR555`` 437 - ``V4L2_PIX_FMT_XBGR555`` 438 - 'XB15' 438 - 'XB15' 439 439 440 - g\ :sub:`2` 440 - g\ :sub:`2` 441 - g\ :sub:`1` 441 - g\ :sub:`1` 442 - g\ :sub:`0` 442 - g\ :sub:`0` 443 - r\ :sub:`4` 443 - r\ :sub:`4` 444 - r\ :sub:`3` 444 - r\ :sub:`3` 445 - r\ :sub:`2` 445 - r\ :sub:`2` 446 - r\ :sub:`1` 446 - r\ :sub:`1` 447 - r\ :sub:`0` 447 - r\ :sub:`0` 448 448 449 - x 449 - x 450 - b\ :sub:`4` 450 - b\ :sub:`4` 451 - b\ :sub:`3` 451 - b\ :sub:`3` 452 - b\ :sub:`2` 452 - b\ :sub:`2` 453 - b\ :sub:`1` 453 - b\ :sub:`1` 454 - b\ :sub:`0` 454 - b\ :sub:`0` 455 - g\ :sub:`4` 455 - g\ :sub:`4` 456 - g\ :sub:`3` 456 - g\ :sub:`3` 457 - 457 - 458 * .. _V4L2-PIX-FMT-BGRA555: 458 * .. _V4L2-PIX-FMT-BGRA555: 459 459 460 - ``V4L2_PIX_FMT_BGRA555`` 460 - ``V4L2_PIX_FMT_BGRA555`` 461 - 'BA15' 461 - 'BA15' 462 462 463 - g\ :sub:`1` 463 - g\ :sub:`1` 464 - g\ :sub:`0` 464 - g\ :sub:`0` 465 - r\ :sub:`4` 465 - r\ :sub:`4` 466 - r\ :sub:`3` 466 - r\ :sub:`3` 467 - r\ :sub:`2` 467 - r\ :sub:`2` 468 - r\ :sub:`1` 468 - r\ :sub:`1` 469 - r\ :sub:`0` 469 - r\ :sub:`0` 470 - a 470 - a 471 471 472 - b\ :sub:`4` 472 - b\ :sub:`4` 473 - b\ :sub:`3` 473 - b\ :sub:`3` 474 - b\ :sub:`2` 474 - b\ :sub:`2` 475 - b\ :sub:`1` 475 - b\ :sub:`1` 476 - b\ :sub:`0` 476 - b\ :sub:`0` 477 - g\ :sub:`4` 477 - g\ :sub:`4` 478 - g\ :sub:`3` 478 - g\ :sub:`3` 479 - g\ :sub:`2` 479 - g\ :sub:`2` 480 - 480 - 481 * .. _V4L2-PIX-FMT-BGRX555: 481 * .. _V4L2-PIX-FMT-BGRX555: 482 482 483 - ``V4L2_PIX_FMT_BGRX555`` 483 - ``V4L2_PIX_FMT_BGRX555`` 484 - 'BX15' 484 - 'BX15' 485 485 486 - g\ :sub:`1` 486 - g\ :sub:`1` 487 - g\ :sub:`0` 487 - g\ :sub:`0` 488 - r\ :sub:`4` 488 - r\ :sub:`4` 489 - r\ :sub:`3` 489 - r\ :sub:`3` 490 - r\ :sub:`2` 490 - r\ :sub:`2` 491 - r\ :sub:`1` 491 - r\ :sub:`1` 492 - r\ :sub:`0` 492 - r\ :sub:`0` 493 - x 493 - x 494 494 495 - b\ :sub:`4` 495 - b\ :sub:`4` 496 - b\ :sub:`3` 496 - b\ :sub:`3` 497 - b\ :sub:`2` 497 - b\ :sub:`2` 498 - b\ :sub:`1` 498 - b\ :sub:`1` 499 - b\ :sub:`0` 499 - b\ :sub:`0` 500 - g\ :sub:`4` 500 - g\ :sub:`4` 501 - g\ :sub:`3` 501 - g\ :sub:`3` 502 - g\ :sub:`2` 502 - g\ :sub:`2` 503 - 503 - 504 * .. _V4L2-PIX-FMT-RGB565: 504 * .. _V4L2-PIX-FMT-RGB565: 505 505 506 - ``V4L2_PIX_FMT_RGB565`` 506 - ``V4L2_PIX_FMT_RGB565`` 507 - 'RGBP' 507 - 'RGBP' 508 508 509 - g\ :sub:`2` 509 - g\ :sub:`2` 510 - g\ :sub:`1` 510 - g\ :sub:`1` 511 - g\ :sub:`0` 511 - g\ :sub:`0` 512 - b\ :sub:`4` 512 - b\ :sub:`4` 513 - b\ :sub:`3` 513 - b\ :sub:`3` 514 - b\ :sub:`2` 514 - b\ :sub:`2` 515 - b\ :sub:`1` 515 - b\ :sub:`1` 516 - b\ :sub:`0` 516 - b\ :sub:`0` 517 517 518 - r\ :sub:`4` 518 - r\ :sub:`4` 519 - r\ :sub:`3` 519 - r\ :sub:`3` 520 - r\ :sub:`2` 520 - r\ :sub:`2` 521 - r\ :sub:`1` 521 - r\ :sub:`1` 522 - r\ :sub:`0` 522 - r\ :sub:`0` 523 - g\ :sub:`5` 523 - g\ :sub:`5` 524 - g\ :sub:`4` 524 - g\ :sub:`4` 525 - g\ :sub:`3` 525 - g\ :sub:`3` 526 - 526 - 527 * .. _V4L2-PIX-FMT-ARGB555X: 527 * .. _V4L2-PIX-FMT-ARGB555X: 528 528 529 - ``V4L2_PIX_FMT_ARGB555X`` 529 - ``V4L2_PIX_FMT_ARGB555X`` 530 - 'AR15' | (1 << 31) 530 - 'AR15' | (1 << 31) 531 531 532 - a 532 - a 533 - r\ :sub:`4` 533 - r\ :sub:`4` 534 - r\ :sub:`3` 534 - r\ :sub:`3` 535 - r\ :sub:`2` 535 - r\ :sub:`2` 536 - r\ :sub:`1` 536 - r\ :sub:`1` 537 - r\ :sub:`0` 537 - r\ :sub:`0` 538 - g\ :sub:`4` 538 - g\ :sub:`4` 539 - g\ :sub:`3` 539 - g\ :sub:`3` 540 540 541 - g\ :sub:`2` 541 - g\ :sub:`2` 542 - g\ :sub:`1` 542 - g\ :sub:`1` 543 - g\ :sub:`0` 543 - g\ :sub:`0` 544 - b\ :sub:`4` 544 - b\ :sub:`4` 545 - b\ :sub:`3` 545 - b\ :sub:`3` 546 - b\ :sub:`2` 546 - b\ :sub:`2` 547 - b\ :sub:`1` 547 - b\ :sub:`1` 548 - b\ :sub:`0` 548 - b\ :sub:`0` 549 - 549 - 550 * .. _V4L2-PIX-FMT-XRGB555X: 550 * .. _V4L2-PIX-FMT-XRGB555X: 551 551 552 - ``V4L2_PIX_FMT_XRGB555X`` 552 - ``V4L2_PIX_FMT_XRGB555X`` 553 - 'XR15' | (1 << 31) 553 - 'XR15' | (1 << 31) 554 554 555 - x 555 - x 556 - r\ :sub:`4` 556 - r\ :sub:`4` 557 - r\ :sub:`3` 557 - r\ :sub:`3` 558 - r\ :sub:`2` 558 - r\ :sub:`2` 559 - r\ :sub:`1` 559 - r\ :sub:`1` 560 - r\ :sub:`0` 560 - r\ :sub:`0` 561 - g\ :sub:`4` 561 - g\ :sub:`4` 562 - g\ :sub:`3` 562 - g\ :sub:`3` 563 563 564 - g\ :sub:`2` 564 - g\ :sub:`2` 565 - g\ :sub:`1` 565 - g\ :sub:`1` 566 - g\ :sub:`0` 566 - g\ :sub:`0` 567 - b\ :sub:`4` 567 - b\ :sub:`4` 568 - b\ :sub:`3` 568 - b\ :sub:`3` 569 - b\ :sub:`2` 569 - b\ :sub:`2` 570 - b\ :sub:`1` 570 - b\ :sub:`1` 571 - b\ :sub:`0` 571 - b\ :sub:`0` 572 - 572 - 573 * .. _V4L2-PIX-FMT-RGB565X: 573 * .. _V4L2-PIX-FMT-RGB565X: 574 574 575 - ``V4L2_PIX_FMT_RGB565X`` 575 - ``V4L2_PIX_FMT_RGB565X`` 576 - 'RGBR' 576 - 'RGBR' 577 577 578 - r\ :sub:`4` 578 - r\ :sub:`4` 579 - r\ :sub:`3` 579 - r\ :sub:`3` 580 - r\ :sub:`2` 580 - r\ :sub:`2` 581 - r\ :sub:`1` 581 - r\ :sub:`1` 582 - r\ :sub:`0` 582 - r\ :sub:`0` 583 - g\ :sub:`5` 583 - g\ :sub:`5` 584 - g\ :sub:`4` 584 - g\ :sub:`4` 585 - g\ :sub:`3` 585 - g\ :sub:`3` 586 586 587 - g\ :sub:`2` 587 - g\ :sub:`2` 588 - g\ :sub:`1` 588 - g\ :sub:`1` 589 - g\ :sub:`0` 589 - g\ :sub:`0` 590 - b\ :sub:`4` 590 - b\ :sub:`4` 591 - b\ :sub:`3` 591 - b\ :sub:`3` 592 - b\ :sub:`2` 592 - b\ :sub:`2` 593 - b\ :sub:`1` 593 - b\ :sub:`1` 594 - b\ :sub:`0` 594 - b\ :sub:`0` 595 - 595 - 596 * .. _V4L2-PIX-FMT-BGR666: 596 * .. _V4L2-PIX-FMT-BGR666: 597 597 598 - ``V4L2_PIX_FMT_BGR666`` 598 - ``V4L2_PIX_FMT_BGR666`` 599 - 'BGRH' 599 - 'BGRH' 600 600 601 - b\ :sub:`5` 601 - b\ :sub:`5` 602 - b\ :sub:`4` 602 - b\ :sub:`4` 603 - b\ :sub:`3` 603 - b\ :sub:`3` 604 - b\ :sub:`2` 604 - b\ :sub:`2` 605 - b\ :sub:`1` 605 - b\ :sub:`1` 606 - b\ :sub:`0` 606 - b\ :sub:`0` 607 - g\ :sub:`5` 607 - g\ :sub:`5` 608 - g\ :sub:`4` 608 - g\ :sub:`4` 609 609 610 - g\ :sub:`3` 610 - g\ :sub:`3` 611 - g\ :sub:`2` 611 - g\ :sub:`2` 612 - g\ :sub:`1` 612 - g\ :sub:`1` 613 - g\ :sub:`0` 613 - g\ :sub:`0` 614 - r\ :sub:`5` 614 - r\ :sub:`5` 615 - r\ :sub:`4` 615 - r\ :sub:`4` 616 - r\ :sub:`3` 616 - r\ :sub:`3` 617 - r\ :sub:`2` 617 - r\ :sub:`2` 618 618 619 - r\ :sub:`1` 619 - r\ :sub:`1` 620 - r\ :sub:`0` 620 - r\ :sub:`0` 621 - x 621 - x 622 - x 622 - x 623 - x 623 - x 624 - x 624 - x 625 - x 625 - x 626 - x 626 - x 627 627 628 - x 628 - x 629 - x 629 - x 630 - x 630 - x 631 - x 631 - x 632 - x 632 - x 633 - x 633 - x 634 - x 634 - x 635 - x 635 - x 636 636 637 .. raw:: latex 637 .. raw:: latex 638 638 639 \endgroup 639 \endgroup 640 640 641 641 642 8 Bits Per Component 642 8 Bits Per Component 643 ==================== 643 ==================== 644 644 645 These formats store an RGB triplet in three or 645 These formats store an RGB triplet in three or four bytes. They are named based 646 on the order of the RGB components as stored i 646 on the order of the RGB components as stored in memory, and on the total number 647 of bits per pixel. For instance, RGB24 format 647 of bits per pixel. For instance, RGB24 format stores a pixel with [R\ :sub:`7` 648 R\ :sub:`6` R\ :sub:`5` R\ :sub:`4` R\ :sub:`3 648 R\ :sub:`6` R\ :sub:`5` R\ :sub:`4` R\ :sub:`3` R\ :sub:`2` R\ :sub:`1` 649 R\ :sub:`0`] in the first byte, [G\ :sub:`7` G 649 R\ :sub:`0`] in the first byte, [G\ :sub:`7` G\ :sub:`6` G\ :sub:`5` G\ :sub:`4` 650 G\ :sub:`3` G\ :sub:`2` G\ :sub:`1` G\ :sub:`0 650 G\ :sub:`3` G\ :sub:`2` G\ :sub:`1` G\ :sub:`0`] in the second byte and 651 [B\ :sub:`7` B\ :sub:`6` B\ :sub:`5` B\ :sub:` 651 [B\ :sub:`7` B\ :sub:`6` B\ :sub:`5` B\ :sub:`4` B\ :sub:`3` B\ :sub:`2` 652 B\ :sub:`1` B\ :sub:`0`] in the third byte. Th 652 B\ :sub:`1` B\ :sub:`0`] in the third byte. This differs from the DRM format 653 nomenclature that instead use the order of com 653 nomenclature that instead use the order of components as seen in a 24- or 654 32-bit little endian word. 654 32-bit little endian word. 655 655 656 .. raw:: latex 656 .. raw:: latex 657 657 658 \small !! 658 \begingroup >> 659 \tiny >> 660 \setlength{\tabcolsep}{2pt} >> 661 >> 662 .. tabularcolumns:: |p{2.8cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}| >> 663 659 664 660 .. flat-table:: RGB Formats With 8 Bits Per Co 665 .. flat-table:: RGB Formats With 8 Bits Per Component 661 :header-rows: 1 666 :header-rows: 1 662 :stub-columns: 0 667 :stub-columns: 0 663 668 664 * - Identifier 669 * - Identifier 665 - Code 670 - Code 666 - Byte 0 in memory 671 - Byte 0 in memory 667 - Byte 1 672 - Byte 1 668 - Byte 2 673 - Byte 2 669 - Byte 3 674 - Byte 3 670 * .. _V4L2-PIX-FMT-BGR24: 675 * .. _V4L2-PIX-FMT-BGR24: 671 676 672 - ``V4L2_PIX_FMT_BGR24`` 677 - ``V4L2_PIX_FMT_BGR24`` 673 - 'BGR3' 678 - 'BGR3' 674 679 675 - B\ :sub:`7-0` << 676 - G\ :sub:`7-0` 680 - G\ :sub:`7-0` >> 681 - B\ :sub:`7-0` 677 - R\ :sub:`7-0` 682 - R\ :sub:`7-0` 678 - 683 - 679 * .. _V4L2-PIX-FMT-RGB24: 684 * .. _V4L2-PIX-FMT-RGB24: 680 685 681 - ``V4L2_PIX_FMT_RGB24`` 686 - ``V4L2_PIX_FMT_RGB24`` 682 - 'RGB3' 687 - 'RGB3' 683 688 684 - R\ :sub:`7-0` 689 - R\ :sub:`7-0` 685 - G\ :sub:`7-0` 690 - G\ :sub:`7-0` 686 - B\ :sub:`7-0` 691 - B\ :sub:`7-0` 687 - 692 - 688 * .. _V4L2-PIX-FMT-ABGR32: 693 * .. _V4L2-PIX-FMT-ABGR32: 689 694 690 - ``V4L2_PIX_FMT_ABGR32`` 695 - ``V4L2_PIX_FMT_ABGR32`` 691 - 'AR24' 696 - 'AR24' 692 697 693 - B\ :sub:`7-0` 698 - B\ :sub:`7-0` 694 - G\ :sub:`7-0` 699 - G\ :sub:`7-0` 695 - R\ :sub:`7-0` 700 - R\ :sub:`7-0` 696 - A\ :sub:`7-0` 701 - A\ :sub:`7-0` 697 * .. _V4L2-PIX-FMT-XBGR32: 702 * .. _V4L2-PIX-FMT-XBGR32: 698 703 699 - ``V4L2_PIX_FMT_XBGR32`` 704 - ``V4L2_PIX_FMT_XBGR32`` 700 - 'XR24' 705 - 'XR24' 701 706 702 - B\ :sub:`7-0` 707 - B\ :sub:`7-0` 703 - G\ :sub:`7-0` 708 - G\ :sub:`7-0` 704 - R\ :sub:`7-0` 709 - R\ :sub:`7-0` 705 - X\ :sub:`7-0` 710 - X\ :sub:`7-0` 706 * .. _V4L2-PIX-FMT-BGRA32: 711 * .. _V4L2-PIX-FMT-BGRA32: 707 712 708 - ``V4L2_PIX_FMT_BGRA32`` 713 - ``V4L2_PIX_FMT_BGRA32`` 709 - 'RA24' 714 - 'RA24' 710 715 711 - A\ :sub:`7-0` 716 - A\ :sub:`7-0` 712 - B\ :sub:`7-0` 717 - B\ :sub:`7-0` 713 - G\ :sub:`7-0` 718 - G\ :sub:`7-0` 714 - R\ :sub:`7-0` 719 - R\ :sub:`7-0` 715 * .. _V4L2-PIX-FMT-BGRX32: 720 * .. _V4L2-PIX-FMT-BGRX32: 716 721 717 - ``V4L2_PIX_FMT_BGRX32`` 722 - ``V4L2_PIX_FMT_BGRX32`` 718 - 'RX24' 723 - 'RX24' 719 724 720 - X\ :sub:`7-0` 725 - X\ :sub:`7-0` 721 - B\ :sub:`7-0` 726 - B\ :sub:`7-0` 722 - G\ :sub:`7-0` 727 - G\ :sub:`7-0` 723 - R\ :sub:`7-0` 728 - R\ :sub:`7-0` 724 * .. _V4L2-PIX-FMT-RGBA32: 729 * .. _V4L2-PIX-FMT-RGBA32: 725 730 726 - ``V4L2_PIX_FMT_RGBA32`` 731 - ``V4L2_PIX_FMT_RGBA32`` 727 - 'AB24' 732 - 'AB24' 728 733 729 - R\ :sub:`7-0` 734 - R\ :sub:`7-0` 730 - G\ :sub:`7-0` 735 - G\ :sub:`7-0` 731 - B\ :sub:`7-0` 736 - B\ :sub:`7-0` 732 - A\ :sub:`7-0` 737 - A\ :sub:`7-0` 733 * .. _V4L2-PIX-FMT-RGBX32: 738 * .. _V4L2-PIX-FMT-RGBX32: 734 739 735 - ``V4L2_PIX_FMT_RGBX32`` 740 - ``V4L2_PIX_FMT_RGBX32`` 736 - 'XB24' 741 - 'XB24' 737 742 738 - R\ :sub:`7-0` 743 - R\ :sub:`7-0` 739 - G\ :sub:`7-0` 744 - G\ :sub:`7-0` 740 - B\ :sub:`7-0` 745 - B\ :sub:`7-0` 741 - X\ :sub:`7-0` 746 - X\ :sub:`7-0` 742 * .. _V4L2-PIX-FMT-ARGB32: 747 * .. _V4L2-PIX-FMT-ARGB32: 743 748 744 - ``V4L2_PIX_FMT_ARGB32`` 749 - ``V4L2_PIX_FMT_ARGB32`` 745 - 'BA24' 750 - 'BA24' 746 751 747 - A\ :sub:`7-0` 752 - A\ :sub:`7-0` 748 - R\ :sub:`7-0` 753 - R\ :sub:`7-0` 749 - G\ :sub:`7-0` 754 - G\ :sub:`7-0` 750 - B\ :sub:`7-0` 755 - B\ :sub:`7-0` 751 * .. _V4L2-PIX-FMT-XRGB32: 756 * .. _V4L2-PIX-FMT-XRGB32: 752 757 753 - ``V4L2_PIX_FMT_XRGB32`` 758 - ``V4L2_PIX_FMT_XRGB32`` 754 - 'BX24' 759 - 'BX24' 755 760 756 - X\ :sub:`7-0` 761 - X\ :sub:`7-0` 757 - R\ :sub:`7-0` 762 - R\ :sub:`7-0` 758 - G\ :sub:`7-0` 763 - G\ :sub:`7-0` 759 - B\ :sub:`7-0` 764 - B\ :sub:`7-0` 760 765 761 .. raw:: latex 766 .. raw:: latex 762 767 763 \normalsize << 764 << 765 << 766 10 Bits Per Component << 767 ===================== << 768 << 769 These formats store a 30-bit RGB triplet with << 770 bytes. They are named based on the order of th << 771 32-bit word, which is then stored in memory in << 772 (unless otherwise noted by the presence of bit << 773 number of bits for each component. << 774 << 775 .. raw:: latex << 776 << 777 \begingroup << 778 \tiny << 779 \setlength{\tabcolsep}{2pt} << 780 << 781 .. tabularcolumns:: |p{3.2cm}|p{0.8cm}|p{0.22c << 782 << 783 << 784 .. flat-table:: RGB Formats 10 Bits Per Color << 785 :header-rows: 2 << 786 :stub-columns: 0 << 787 << 788 * - Identifier << 789 - Code << 790 - :cspan:`7` Byte 0 in memory << 791 - :cspan:`7` Byte 1 << 792 - :cspan:`7` Byte 2 << 793 - :cspan:`7` Byte 3 << 794 * - << 795 - << 796 - 7 << 797 - 6 << 798 - 5 << 799 - 4 << 800 - 3 << 801 - 2 << 802 - 1 << 803 - 0 << 804 << 805 - 7 << 806 - 6 << 807 - 5 << 808 - 4 << 809 - 3 << 810 - 2 << 811 - 1 << 812 - 0 << 813 << 814 - 7 << 815 - 6 << 816 - 5 << 817 - 4 << 818 - 3 << 819 - 2 << 820 - 1 << 821 - 0 << 822 << 823 - 7 << 824 - 6 << 825 - 5 << 826 - 4 << 827 - 3 << 828 - 2 << 829 - 1 << 830 - 0 << 831 * .. _V4L2-PIX-FMT-RGBX1010102: << 832 << 833 - ``V4L2_PIX_FMT_RGBX1010102`` << 834 - 'RX30' << 835 << 836 - b\ :sub:`5` << 837 - b\ :sub:`4` << 838 - b\ :sub:`3` << 839 - b\ :sub:`2` << 840 - b\ :sub:`1` << 841 - b\ :sub:`0` << 842 - x << 843 - x << 844 << 845 - g\ :sub:`3` << 846 - g\ :sub:`2` << 847 - g\ :sub:`1` << 848 - g\ :sub:`0` << 849 - b\ :sub:`9` << 850 - b\ :sub:`8` << 851 - b\ :sub:`7` << 852 - b\ :sub:`6` << 853 << 854 - r\ :sub:`1` << 855 - r\ :sub:`0` << 856 - g\ :sub:`9` << 857 - g\ :sub:`8` << 858 - g\ :sub:`7` << 859 - g\ :sub:`6` << 860 - g\ :sub:`5` << 861 - g\ :sub:`4` << 862 << 863 - r\ :sub:`9` << 864 - r\ :sub:`8` << 865 - r\ :sub:`7` << 866 - r\ :sub:`6` << 867 - r\ :sub:`5` << 868 - r\ :sub:`4` << 869 - r\ :sub:`3` << 870 - r\ :sub:`2` << 871 * .. _V4L2-PIX-FMT-RGBA1010102: << 872 << 873 - ``V4L2_PIX_FMT_RGBA1010102`` << 874 - 'RA30' << 875 << 876 - b\ :sub:`5` << 877 - b\ :sub:`4` << 878 - b\ :sub:`3` << 879 - b\ :sub:`2` << 880 - b\ :sub:`1` << 881 - b\ :sub:`0` << 882 - a\ :sub:`1` << 883 - a\ :sub:`0` << 884 << 885 - g\ :sub:`3` << 886 - g\ :sub:`2` << 887 - g\ :sub:`1` << 888 - g\ :sub:`0` << 889 - b\ :sub:`9` << 890 - b\ :sub:`8` << 891 - b\ :sub:`7` << 892 - b\ :sub:`6` << 893 << 894 - r\ :sub:`1` << 895 - r\ :sub:`0` << 896 - g\ :sub:`9` << 897 - g\ :sub:`8` << 898 - g\ :sub:`7` << 899 - g\ :sub:`6` << 900 - g\ :sub:`5` << 901 - g\ :sub:`4` << 902 << 903 - r\ :sub:`9` << 904 - r\ :sub:`8` << 905 - r\ :sub:`7` << 906 - r\ :sub:`6` << 907 - r\ :sub:`5` << 908 - r\ :sub:`4` << 909 - r\ :sub:`3` << 910 - r\ :sub:`2` << 911 * .. _V4L2-PIX-FMT-ARGB2101010: << 912 << 913 - ``V4L2_PIX_FMT_ARGB2101010`` << 914 - 'AR30' << 915 << 916 - b\ :sub:`7` << 917 - b\ :sub:`6` << 918 - b\ :sub:`5` << 919 - b\ :sub:`4` << 920 - b\ :sub:`3` << 921 - b\ :sub:`2` << 922 - b\ :sub:`1` << 923 - b\ :sub:`0` << 924 << 925 - g\ :sub:`5` << 926 - g\ :sub:`4` << 927 - g\ :sub:`3` << 928 - g\ :sub:`2` << 929 - g\ :sub:`1` << 930 - g\ :sub:`0` << 931 - b\ :sub:`9` << 932 - b\ :sub:`8` << 933 << 934 - r\ :sub:`3` << 935 - r\ :sub:`2` << 936 - r\ :sub:`1` << 937 - r\ :sub:`0` << 938 - g\ :sub:`9` << 939 - g\ :sub:`8` << 940 - g\ :sub:`7` << 941 - g\ :sub:`6` << 942 << 943 - a\ :sub:`1` << 944 - a\ :sub:`0` << 945 - r\ :sub:`9` << 946 - r\ :sub:`8` << 947 - r\ :sub:`7` << 948 - r\ :sub:`6` << 949 - r\ :sub:`5` << 950 - r\ :sub:`4` << 951 << 952 .. raw:: latex << 953 << 954 \endgroup 768 \endgroup 955 769 956 12 Bits Per Component << 957 ============================== << 958 << 959 These formats store an RGB triplet in six or e << 960 Expand the bits per component to 16 bits, data << 961 arranged in little endian order. << 962 << 963 .. raw:: latex << 964 << 965 \small << 966 << 967 .. flat-table:: RGB Formats With 12 Bits Per C << 968 :header-rows: 1 << 969 << 970 * - Identifier << 971 - Code << 972 - Byte 1-0 << 973 - Byte 3-2 << 974 - Byte 5-4 << 975 - Byte 7-6 << 976 * .. _V4L2-PIX-FMT-BGR48-12: << 977 << 978 - ``V4L2_PIX_FMT_BGR48_12`` << 979 - 'B312' << 980 << 981 - B\ :sub:`15-4` << 982 - G\ :sub:`15-4` << 983 - R\ :sub:`15-4` << 984 - << 985 * .. _V4L2-PIX-FMT-ABGR64-12: << 986 << 987 - ``V4L2_PIX_FMT_ABGR64_12`` << 988 - 'B412' << 989 << 990 - B\ :sub:`15-4` << 991 - G\ :sub:`15-4` << 992 - R\ :sub:`15-4` << 993 - A\ :sub:`15-4` << 994 << 995 .. raw:: latex << 996 << 997 \normalsize << 998 << 999 16 Bits Per Component << 1000 ===================== << 1001 << 1002 These formats store an RGB triplet in six byt << 1003 stored in memory in little endian byte order. << 1004 of the RGB components as stored in memory. Fo << 1005 :sub:`7:0` and R\ :sub:`15:8` in bytes 0 and << 1006 the DRM format nomenclature that instead uses << 1007 the 48-bits little endian word. << 1008 << 1009 .. raw:: latex << 1010 << 1011 \small << 1012 << 1013 .. flat-table:: RGB Formats With 16 Bits Per << 1014 :header-rows: 1 << 1015 << 1016 * - Identifier << 1017 - Code << 1018 - Byte 0 << 1019 - Byte 1 << 1020 - Byte 2 << 1021 - Byte 3 << 1022 - Byte 4 << 1023 - Byte 5 << 1024 << 1025 * .. _V4L2-PIX-FMT-BGR48: << 1026 << 1027 - ``V4L2_PIX_FMT_BGR48`` << 1028 - 'BGR6' << 1029 << 1030 - B\ :sub:`7-0` << 1031 - B\ :sub:`15-8` << 1032 - G\ :sub:`7-0` << 1033 - G\ :sub:`15-8` << 1034 - R\ :sub:`7-0` << 1035 - R\ :sub:`15-8` << 1036 << 1037 * .. _V4L2-PIX-FMT-RGB48: << 1038 << 1039 - ``V4L2_PIX_FMT_RGB48`` << 1040 - 'RGB6' << 1041 << 1042 - R\ :sub:`7-0` << 1043 - R\ :sub:`15-8` << 1044 - G\ :sub:`7-0` << 1045 - G\ :sub:`15-8` << 1046 - B\ :sub:`7-0` << 1047 - B\ :sub:`15-8` << 1048 << 1049 .. raw:: latex << 1050 << 1051 \normalsize << 1052 770 1053 Deprecated RGB Formats 771 Deprecated RGB Formats 1054 ====================== 772 ====================== 1055 773 1056 Formats defined in :ref:`pixfmt-rgb-deprecate 774 Formats defined in :ref:`pixfmt-rgb-deprecated` are deprecated and must not be 1057 used by new drivers. They are documented here 775 used by new drivers. They are documented here for reference. The meaning of 1058 their alpha bits ``(a)`` is ill-defined and t 776 their alpha bits ``(a)`` is ill-defined and they are interpreted as in either 1059 the corresponding ARGB or XRGB format, depend 777 the corresponding ARGB or XRGB format, depending on the driver. 1060 778 1061 .. raw:: latex 779 .. raw:: latex 1062 780 1063 \begingroup 781 \begingroup 1064 \tiny 782 \tiny 1065 \setlength{\tabcolsep}{2pt} 783 \setlength{\tabcolsep}{2pt} 1066 784 1067 .. tabularcolumns:: |p{2.6cm}|p{0.70cm}|p{0.2 785 .. 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}| 1068 786 1069 .. _pixfmt-rgb-deprecated: 787 .. _pixfmt-rgb-deprecated: 1070 788 1071 .. flat-table:: Deprecated Packed RGB Image F 789 .. flat-table:: Deprecated Packed RGB Image Formats 1072 :header-rows: 2 790 :header-rows: 2 1073 :stub-columns: 0 791 :stub-columns: 0 1074 792 1075 * - Identifier 793 * - Identifier 1076 - Code 794 - Code 1077 - :cspan:`7` Byte 0 in memory 795 - :cspan:`7` Byte 0 in memory 1078 796 1079 - :cspan:`7` Byte 1 797 - :cspan:`7` Byte 1 1080 798 1081 - :cspan:`7` Byte 2 799 - :cspan:`7` Byte 2 1082 800 1083 - :cspan:`7` Byte 3 801 - :cspan:`7` Byte 3 1084 * - 802 * - 1085 - 803 - 1086 - 7 804 - 7 1087 - 6 805 - 6 1088 - 5 806 - 5 1089 - 4 807 - 4 1090 - 3 808 - 3 1091 - 2 809 - 2 1092 - 1 810 - 1 1093 - 0 811 - 0 1094 812 1095 - 7 813 - 7 1096 - 6 814 - 6 1097 - 5 815 - 5 1098 - 4 816 - 4 1099 - 3 817 - 3 1100 - 2 818 - 2 1101 - 1 819 - 1 1102 - 0 820 - 0 1103 821 1104 - 7 822 - 7 1105 - 6 823 - 6 1106 - 5 824 - 5 1107 - 4 825 - 4 1108 - 3 826 - 3 1109 - 2 827 - 2 1110 - 1 828 - 1 1111 - 0 829 - 0 1112 830 1113 - 7 831 - 7 1114 - 6 832 - 6 1115 - 5 833 - 5 1116 - 4 834 - 4 1117 - 3 835 - 3 1118 - 2 836 - 2 1119 - 1 837 - 1 1120 - 0 838 - 0 1121 * .. _V4L2-PIX-FMT-RGB444: 839 * .. _V4L2-PIX-FMT-RGB444: 1122 840 1123 - ``V4L2_PIX_FMT_RGB444`` 841 - ``V4L2_PIX_FMT_RGB444`` 1124 - 'R444' 842 - 'R444' 1125 843 1126 - g\ :sub:`3` 844 - g\ :sub:`3` 1127 - g\ :sub:`2` 845 - g\ :sub:`2` 1128 - g\ :sub:`1` 846 - g\ :sub:`1` 1129 - g\ :sub:`0` 847 - g\ :sub:`0` 1130 - b\ :sub:`3` 848 - b\ :sub:`3` 1131 - b\ :sub:`2` 849 - b\ :sub:`2` 1132 - b\ :sub:`1` 850 - b\ :sub:`1` 1133 - b\ :sub:`0` 851 - b\ :sub:`0` 1134 852 1135 - a\ :sub:`3` 853 - a\ :sub:`3` 1136 - a\ :sub:`2` 854 - a\ :sub:`2` 1137 - a\ :sub:`1` 855 - a\ :sub:`1` 1138 - a\ :sub:`0` 856 - a\ :sub:`0` 1139 - r\ :sub:`3` 857 - r\ :sub:`3` 1140 - r\ :sub:`2` 858 - r\ :sub:`2` 1141 - r\ :sub:`1` 859 - r\ :sub:`1` 1142 - r\ :sub:`0` 860 - r\ :sub:`0` 1143 - 861 - 1144 * .. _V4L2-PIX-FMT-RGB555: 862 * .. _V4L2-PIX-FMT-RGB555: 1145 863 1146 - ``V4L2_PIX_FMT_RGB555`` 864 - ``V4L2_PIX_FMT_RGB555`` 1147 - 'RGBO' 865 - 'RGBO' 1148 866 1149 - g\ :sub:`2` 867 - g\ :sub:`2` 1150 - g\ :sub:`1` 868 - g\ :sub:`1` 1151 - g\ :sub:`0` 869 - g\ :sub:`0` 1152 - b\ :sub:`4` 870 - b\ :sub:`4` 1153 - b\ :sub:`3` 871 - b\ :sub:`3` 1154 - b\ :sub:`2` 872 - b\ :sub:`2` 1155 - b\ :sub:`1` 873 - b\ :sub:`1` 1156 - b\ :sub:`0` 874 - b\ :sub:`0` 1157 875 1158 - a 876 - a 1159 - r\ :sub:`4` 877 - r\ :sub:`4` 1160 - r\ :sub:`3` 878 - r\ :sub:`3` 1161 - r\ :sub:`2` 879 - r\ :sub:`2` 1162 - r\ :sub:`1` 880 - r\ :sub:`1` 1163 - r\ :sub:`0` 881 - r\ :sub:`0` 1164 - g\ :sub:`4` 882 - g\ :sub:`4` 1165 - g\ :sub:`3` 883 - g\ :sub:`3` 1166 - 884 - 1167 * .. _V4L2-PIX-FMT-RGB555X: 885 * .. _V4L2-PIX-FMT-RGB555X: 1168 886 1169 - ``V4L2_PIX_FMT_RGB555X`` 887 - ``V4L2_PIX_FMT_RGB555X`` 1170 - 'RGBQ' 888 - 'RGBQ' 1171 889 1172 - a 890 - a 1173 - r\ :sub:`4` 891 - r\ :sub:`4` 1174 - r\ :sub:`3` 892 - r\ :sub:`3` 1175 - r\ :sub:`2` 893 - r\ :sub:`2` 1176 - r\ :sub:`1` 894 - r\ :sub:`1` 1177 - r\ :sub:`0` 895 - r\ :sub:`0` 1178 - g\ :sub:`4` 896 - g\ :sub:`4` 1179 - g\ :sub:`3` 897 - g\ :sub:`3` 1180 898 1181 - g\ :sub:`2` 899 - g\ :sub:`2` 1182 - g\ :sub:`1` 900 - g\ :sub:`1` 1183 - g\ :sub:`0` 901 - g\ :sub:`0` 1184 - b\ :sub:`4` 902 - b\ :sub:`4` 1185 - b\ :sub:`3` 903 - b\ :sub:`3` 1186 - b\ :sub:`2` 904 - b\ :sub:`2` 1187 - b\ :sub:`1` 905 - b\ :sub:`1` 1188 - b\ :sub:`0` 906 - b\ :sub:`0` 1189 - 907 - 1190 * .. _V4L2-PIX-FMT-BGR32: 908 * .. _V4L2-PIX-FMT-BGR32: 1191 909 1192 - ``V4L2_PIX_FMT_BGR32`` 910 - ``V4L2_PIX_FMT_BGR32`` 1193 - 'BGR4' 911 - 'BGR4' 1194 912 1195 - b\ :sub:`7` 913 - b\ :sub:`7` 1196 - b\ :sub:`6` 914 - b\ :sub:`6` 1197 - b\ :sub:`5` 915 - b\ :sub:`5` 1198 - b\ :sub:`4` 916 - b\ :sub:`4` 1199 - b\ :sub:`3` 917 - b\ :sub:`3` 1200 - b\ :sub:`2` 918 - b\ :sub:`2` 1201 - b\ :sub:`1` 919 - b\ :sub:`1` 1202 - b\ :sub:`0` 920 - b\ :sub:`0` 1203 921 1204 - g\ :sub:`7` 922 - g\ :sub:`7` 1205 - g\ :sub:`6` 923 - g\ :sub:`6` 1206 - g\ :sub:`5` 924 - g\ :sub:`5` 1207 - g\ :sub:`4` 925 - g\ :sub:`4` 1208 - g\ :sub:`3` 926 - g\ :sub:`3` 1209 - g\ :sub:`2` 927 - g\ :sub:`2` 1210 - g\ :sub:`1` 928 - g\ :sub:`1` 1211 - g\ :sub:`0` 929 - g\ :sub:`0` 1212 930 1213 - r\ :sub:`7` 931 - r\ :sub:`7` 1214 - r\ :sub:`6` 932 - r\ :sub:`6` 1215 - r\ :sub:`5` 933 - r\ :sub:`5` 1216 - r\ :sub:`4` 934 - r\ :sub:`4` 1217 - r\ :sub:`3` 935 - r\ :sub:`3` 1218 - r\ :sub:`2` 936 - r\ :sub:`2` 1219 - r\ :sub:`1` 937 - r\ :sub:`1` 1220 - r\ :sub:`0` 938 - r\ :sub:`0` 1221 939 1222 - a\ :sub:`7` 940 - a\ :sub:`7` 1223 - a\ :sub:`6` 941 - a\ :sub:`6` 1224 - a\ :sub:`5` 942 - a\ :sub:`5` 1225 - a\ :sub:`4` 943 - a\ :sub:`4` 1226 - a\ :sub:`3` 944 - a\ :sub:`3` 1227 - a\ :sub:`2` 945 - a\ :sub:`2` 1228 - a\ :sub:`1` 946 - a\ :sub:`1` 1229 - a\ :sub:`0` 947 - a\ :sub:`0` 1230 * .. _V4L2-PIX-FMT-RGB32: 948 * .. _V4L2-PIX-FMT-RGB32: 1231 949 1232 - ``V4L2_PIX_FMT_RGB32`` 950 - ``V4L2_PIX_FMT_RGB32`` 1233 - 'RGB4' 951 - 'RGB4' 1234 952 1235 - a\ :sub:`7` 953 - a\ :sub:`7` 1236 - a\ :sub:`6` 954 - a\ :sub:`6` 1237 - a\ :sub:`5` 955 - a\ :sub:`5` 1238 - a\ :sub:`4` 956 - a\ :sub:`4` 1239 - a\ :sub:`3` 957 - a\ :sub:`3` 1240 - a\ :sub:`2` 958 - a\ :sub:`2` 1241 - a\ :sub:`1` 959 - a\ :sub:`1` 1242 - a\ :sub:`0` 960 - a\ :sub:`0` 1243 961 1244 - r\ :sub:`7` 962 - r\ :sub:`7` 1245 - r\ :sub:`6` 963 - r\ :sub:`6` 1246 - r\ :sub:`5` 964 - r\ :sub:`5` 1247 - r\ :sub:`4` 965 - r\ :sub:`4` 1248 - r\ :sub:`3` 966 - r\ :sub:`3` 1249 - r\ :sub:`2` 967 - r\ :sub:`2` 1250 - r\ :sub:`1` 968 - r\ :sub:`1` 1251 - r\ :sub:`0` 969 - r\ :sub:`0` 1252 970 1253 - g\ :sub:`7` 971 - g\ :sub:`7` 1254 - g\ :sub:`6` 972 - g\ :sub:`6` 1255 - g\ :sub:`5` 973 - g\ :sub:`5` 1256 - g\ :sub:`4` 974 - g\ :sub:`4` 1257 - g\ :sub:`3` 975 - g\ :sub:`3` 1258 - g\ :sub:`2` 976 - g\ :sub:`2` 1259 - g\ :sub:`1` 977 - g\ :sub:`1` 1260 - g\ :sub:`0` 978 - g\ :sub:`0` 1261 979 1262 - b\ :sub:`7` 980 - b\ :sub:`7` 1263 - b\ :sub:`6` 981 - b\ :sub:`6` 1264 - b\ :sub:`5` 982 - b\ :sub:`5` 1265 - b\ :sub:`4` 983 - b\ :sub:`4` 1266 - b\ :sub:`3` 984 - b\ :sub:`3` 1267 - b\ :sub:`2` 985 - b\ :sub:`2` 1268 - b\ :sub:`1` 986 - b\ :sub:`1` 1269 - b\ :sub:`0` 987 - b\ :sub:`0` 1270 988 1271 .. raw:: latex 989 .. raw:: latex 1272 990 1273 \endgroup 991 \endgroup 1274 992 1275 A test utility to determine which RGB formats 993 A test utility to determine which RGB formats a driver actually supports 1276 is available from the LinuxTV v4l-dvb reposit 994 is available from the LinuxTV v4l-dvb repository. See 1277 `https://linuxtv.org/repo/ <https://linuxtv.o 995 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access 1278 instructions. 996 instructions.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.