1<refentry id="packed-rgb"> 2 <refmeta> 3 <refentrytitle>Packed RGB formats</refentrytitle> 4 &manvol; 5 </refmeta> 6 <refnamediv> 7 <refname>Packed RGB formats</refname> 8 <refpurpose>Packed RGB formats</refpurpose> 9 </refnamediv> 10 <refsect1> 11 <title>Description</title> 12 13 <para>These formats are designed to match the pixel formats of 14typical PC graphics frame buffers. They occupy 8, 16, 24 or 32 bits 15per pixel. These are all packed-pixel formats, meaning all the data 16for a pixel lie next to each other in memory.</para> 17 18 <table pgwide="1" frame="none" id="rgb-formats"> 19 <title>Packed RGB Image Formats</title> 20 <tgroup cols="37" align="center"> 21 <colspec colname="id" align="left" /> 22 <colspec colname="fourcc" /> 23 <colspec colname="bit" /> 24 25 <colspec colnum="4" colname="b07" align="center" /> 26 <colspec colnum="5" colname="b06" align="center" /> 27 <colspec colnum="6" colname="b05" align="center" /> 28 <colspec colnum="7" colname="b04" align="center" /> 29 <colspec colnum="8" colname="b03" align="center" /> 30 <colspec colnum="9" colname="b02" align="center" /> 31 <colspec colnum="10" colname="b01" align="center" /> 32 <colspec colnum="11" colname="b00" align="center" /> 33 34 <colspec colnum="13" colname="b17" align="center" /> 35 <colspec colnum="14" colname="b16" align="center" /> 36 <colspec colnum="15" colname="b15" align="center" /> 37 <colspec colnum="16" colname="b14" align="center" /> 38 <colspec colnum="17" colname="b13" align="center" /> 39 <colspec colnum="18" colname="b12" align="center" /> 40 <colspec colnum="19" colname="b11" align="center" /> 41 <colspec colnum="20" colname="b10" align="center" /> 42 43 <colspec colnum="22" colname="b27" align="center" /> 44 <colspec colnum="23" colname="b26" align="center" /> 45 <colspec colnum="24" colname="b25" align="center" /> 46 <colspec colnum="25" colname="b24" align="center" /> 47 <colspec colnum="26" colname="b23" align="center" /> 48 <colspec colnum="27" colname="b22" align="center" /> 49 <colspec colnum="28" colname="b21" align="center" /> 50 <colspec colnum="29" colname="b20" align="center" /> 51 52 <colspec colnum="31" colname="b37" align="center" /> 53 <colspec colnum="32" colname="b36" align="center" /> 54 <colspec colnum="33" colname="b35" align="center" /> 55 <colspec colnum="34" colname="b34" align="center" /> 56 <colspec colnum="35" colname="b33" align="center" /> 57 <colspec colnum="36" colname="b32" align="center" /> 58 <colspec colnum="37" colname="b31" align="center" /> 59 <colspec colnum="38" colname="b30" align="center" /> 60 61 <spanspec namest="b07" nameend="b00" spanname="b0" /> 62 <spanspec namest="b17" nameend="b10" spanname="b1" /> 63 <spanspec namest="b27" nameend="b20" spanname="b2" /> 64 <spanspec namest="b37" nameend="b30" spanname="b3" /> 65 <thead> 66 <row> 67 <entry>Identifier</entry> 68 <entry>Code</entry> 69 <entry> </entry> 70 <entry spanname="b0">Byte 0 in memory</entry> 71 <entry spanname="b1">Byte 1</entry> 72 <entry spanname="b2">Byte 2</entry> 73 <entry spanname="b3">Byte 3</entry> 74 </row> 75 <row> 76 <entry> </entry> 77 <entry> </entry> 78 <entry>Bit</entry> 79 <entry>7</entry> 80 <entry>6</entry> 81 <entry>5</entry> 82 <entry>4</entry> 83 <entry>3</entry> 84 <entry>2</entry> 85 <entry>1</entry> 86 <entry>0</entry> 87 <entry> </entry> 88 <entry>7</entry> 89 <entry>6</entry> 90 <entry>5</entry> 91 <entry>4</entry> 92 <entry>3</entry> 93 <entry>2</entry> 94 <entry>1</entry> 95 <entry>0</entry> 96 <entry> </entry> 97 <entry>7</entry> 98 <entry>6</entry> 99 <entry>5</entry> 100 <entry>4</entry> 101 <entry>3</entry> 102 <entry>2</entry> 103 <entry>1</entry> 104 <entry>0</entry> 105 <entry> </entry> 106 <entry>7</entry> 107 <entry>6</entry> 108 <entry>5</entry> 109 <entry>4</entry> 110 <entry>3</entry> 111 <entry>2</entry> 112 <entry>1</entry> 113 <entry>0</entry> 114 </row> 115 </thead> 116 <tbody valign="top"> 117 <row id="V4L2-PIX-FMT-RGB332"> 118 <entry><constant>V4L2_PIX_FMT_RGB332</constant></entry> 119 <entry>'RGB1'</entry> 120 <entry></entry> 121 <entry>r<subscript>2</subscript></entry> 122 <entry>r<subscript>1</subscript></entry> 123 <entry>r<subscript>0</subscript></entry> 124 <entry>g<subscript>2</subscript></entry> 125 <entry>g<subscript>1</subscript></entry> 126 <entry>g<subscript>0</subscript></entry> 127 <entry>b<subscript>1</subscript></entry> 128 <entry>b<subscript>0</subscript></entry> 129 </row> 130 <row id="V4L2-PIX-FMT-ARGB444"> 131 <entry><constant>V4L2_PIX_FMT_ARGB444</constant></entry> 132 <entry>'AR12'</entry> 133 <entry></entry> 134 <entry>g<subscript>3</subscript></entry> 135 <entry>g<subscript>2</subscript></entry> 136 <entry>g<subscript>1</subscript></entry> 137 <entry>g<subscript>0</subscript></entry> 138 <entry>b<subscript>3</subscript></entry> 139 <entry>b<subscript>2</subscript></entry> 140 <entry>b<subscript>1</subscript></entry> 141 <entry>b<subscript>0</subscript></entry> 142 <entry></entry> 143 <entry>a<subscript>3</subscript></entry> 144 <entry>a<subscript>2</subscript></entry> 145 <entry>a<subscript>1</subscript></entry> 146 <entry>a<subscript>0</subscript></entry> 147 <entry>r<subscript>3</subscript></entry> 148 <entry>r<subscript>2</subscript></entry> 149 <entry>r<subscript>1</subscript></entry> 150 <entry>r<subscript>0</subscript></entry> 151 </row> 152 <row id="V4L2-PIX-FMT-XRGB444"> 153 <entry><constant>V4L2_PIX_FMT_XRGB444</constant></entry> 154 <entry>'XR12'</entry> 155 <entry></entry> 156 <entry>g<subscript>3</subscript></entry> 157 <entry>g<subscript>2</subscript></entry> 158 <entry>g<subscript>1</subscript></entry> 159 <entry>g<subscript>0</subscript></entry> 160 <entry>b<subscript>3</subscript></entry> 161 <entry>b<subscript>2</subscript></entry> 162 <entry>b<subscript>1</subscript></entry> 163 <entry>b<subscript>0</subscript></entry> 164 <entry></entry> 165 <entry>-</entry> 166 <entry>-</entry> 167 <entry>-</entry> 168 <entry>-</entry> 169 <entry>r<subscript>3</subscript></entry> 170 <entry>r<subscript>2</subscript></entry> 171 <entry>r<subscript>1</subscript></entry> 172 <entry>r<subscript>0</subscript></entry> 173 </row> 174 <row id="V4L2-PIX-FMT-ARGB555"> 175 <entry><constant>V4L2_PIX_FMT_ARGB555</constant></entry> 176 <entry>'AR15'</entry> 177 <entry></entry> 178 <entry>g<subscript>2</subscript></entry> 179 <entry>g<subscript>1</subscript></entry> 180 <entry>g<subscript>0</subscript></entry> 181 <entry>b<subscript>4</subscript></entry> 182 <entry>b<subscript>3</subscript></entry> 183 <entry>b<subscript>2</subscript></entry> 184 <entry>b<subscript>1</subscript></entry> 185 <entry>b<subscript>0</subscript></entry> 186 <entry></entry> 187 <entry>a</entry> 188 <entry>r<subscript>4</subscript></entry> 189 <entry>r<subscript>3</subscript></entry> 190 <entry>r<subscript>2</subscript></entry> 191 <entry>r<subscript>1</subscript></entry> 192 <entry>r<subscript>0</subscript></entry> 193 <entry>g<subscript>4</subscript></entry> 194 <entry>g<subscript>3</subscript></entry> 195 </row> 196 <row id="V4L2-PIX-FMT-XRGB555"> 197 <entry><constant>V4L2_PIX_FMT_XRGB555</constant></entry> 198 <entry>'XR15'</entry> 199 <entry></entry> 200 <entry>g<subscript>2</subscript></entry> 201 <entry>g<subscript>1</subscript></entry> 202 <entry>g<subscript>0</subscript></entry> 203 <entry>b<subscript>4</subscript></entry> 204 <entry>b<subscript>3</subscript></entry> 205 <entry>b<subscript>2</subscript></entry> 206 <entry>b<subscript>1</subscript></entry> 207 <entry>b<subscript>0</subscript></entry> 208 <entry></entry> 209 <entry>-</entry> 210 <entry>r<subscript>4</subscript></entry> 211 <entry>r<subscript>3</subscript></entry> 212 <entry>r<subscript>2</subscript></entry> 213 <entry>r<subscript>1</subscript></entry> 214 <entry>r<subscript>0</subscript></entry> 215 <entry>g<subscript>4</subscript></entry> 216 <entry>g<subscript>3</subscript></entry> 217 </row> 218 <row id="V4L2-PIX-FMT-RGB565"> 219 <entry><constant>V4L2_PIX_FMT_RGB565</constant></entry> 220 <entry>'RGBP'</entry> 221 <entry></entry> 222 <entry>g<subscript>2</subscript></entry> 223 <entry>g<subscript>1</subscript></entry> 224 <entry>g<subscript>0</subscript></entry> 225 <entry>b<subscript>4</subscript></entry> 226 <entry>b<subscript>3</subscript></entry> 227 <entry>b<subscript>2</subscript></entry> 228 <entry>b<subscript>1</subscript></entry> 229 <entry>b<subscript>0</subscript></entry> 230 <entry></entry> 231 <entry>r<subscript>4</subscript></entry> 232 <entry>r<subscript>3</subscript></entry> 233 <entry>r<subscript>2</subscript></entry> 234 <entry>r<subscript>1</subscript></entry> 235 <entry>r<subscript>0</subscript></entry> 236 <entry>g<subscript>5</subscript></entry> 237 <entry>g<subscript>4</subscript></entry> 238 <entry>g<subscript>3</subscript></entry> 239 </row> 240 <row id="V4L2-PIX-FMT-ARGB555X"> 241 <entry><constant>V4L2_PIX_FMT_ARGB555X</constant></entry> 242 <entry>'AR15' | (1 << 31)</entry> 243 <entry></entry> 244 <entry>a</entry> 245 <entry>r<subscript>4</subscript></entry> 246 <entry>r<subscript>3</subscript></entry> 247 <entry>r<subscript>2</subscript></entry> 248 <entry>r<subscript>1</subscript></entry> 249 <entry>r<subscript>0</subscript></entry> 250 <entry>g<subscript>4</subscript></entry> 251 <entry>g<subscript>3</subscript></entry> 252 <entry></entry> 253 <entry>g<subscript>2</subscript></entry> 254 <entry>g<subscript>1</subscript></entry> 255 <entry>g<subscript>0</subscript></entry> 256 <entry>b<subscript>4</subscript></entry> 257 <entry>b<subscript>3</subscript></entry> 258 <entry>b<subscript>2</subscript></entry> 259 <entry>b<subscript>1</subscript></entry> 260 <entry>b<subscript>0</subscript></entry> 261 </row> 262 <row id="V4L2-PIX-FMT-XRGB555X"> 263 <entry><constant>V4L2_PIX_FMT_XRGB555X</constant></entry> 264 <entry>'XR15' | (1 << 31)</entry> 265 <entry></entry> 266 <entry>-</entry> 267 <entry>r<subscript>4</subscript></entry> 268 <entry>r<subscript>3</subscript></entry> 269 <entry>r<subscript>2</subscript></entry> 270 <entry>r<subscript>1</subscript></entry> 271 <entry>r<subscript>0</subscript></entry> 272 <entry>g<subscript>4</subscript></entry> 273 <entry>g<subscript>3</subscript></entry> 274 <entry></entry> 275 <entry>g<subscript>2</subscript></entry> 276 <entry>g<subscript>1</subscript></entry> 277 <entry>g<subscript>0</subscript></entry> 278 <entry>b<subscript>4</subscript></entry> 279 <entry>b<subscript>3</subscript></entry> 280 <entry>b<subscript>2</subscript></entry> 281 <entry>b<subscript>1</subscript></entry> 282 <entry>b<subscript>0</subscript></entry> 283 </row> 284 <row id="V4L2-PIX-FMT-RGB565X"> 285 <entry><constant>V4L2_PIX_FMT_RGB565X</constant></entry> 286 <entry>'RGBR'</entry> 287 <entry></entry> 288 <entry>r<subscript>4</subscript></entry> 289 <entry>r<subscript>3</subscript></entry> 290 <entry>r<subscript>2</subscript></entry> 291 <entry>r<subscript>1</subscript></entry> 292 <entry>r<subscript>0</subscript></entry> 293 <entry>g<subscript>5</subscript></entry> 294 <entry>g<subscript>4</subscript></entry> 295 <entry>g<subscript>3</subscript></entry> 296 <entry></entry> 297 <entry>g<subscript>2</subscript></entry> 298 <entry>g<subscript>1</subscript></entry> 299 <entry>g<subscript>0</subscript></entry> 300 <entry>b<subscript>4</subscript></entry> 301 <entry>b<subscript>3</subscript></entry> 302 <entry>b<subscript>2</subscript></entry> 303 <entry>b<subscript>1</subscript></entry> 304 <entry>b<subscript>0</subscript></entry> 305 </row> 306 <row id="V4L2-PIX-FMT-BGR24"> 307 <entry><constant>V4L2_PIX_FMT_BGR24</constant></entry> 308 <entry>'BGR3'</entry> 309 <entry></entry> 310 <entry>b<subscript>7</subscript></entry> 311 <entry>b<subscript>6</subscript></entry> 312 <entry>b<subscript>5</subscript></entry> 313 <entry>b<subscript>4</subscript></entry> 314 <entry>b<subscript>3</subscript></entry> 315 <entry>b<subscript>2</subscript></entry> 316 <entry>b<subscript>1</subscript></entry> 317 <entry>b<subscript>0</subscript></entry> 318 <entry></entry> 319 <entry>g<subscript>7</subscript></entry> 320 <entry>g<subscript>6</subscript></entry> 321 <entry>g<subscript>5</subscript></entry> 322 <entry>g<subscript>4</subscript></entry> 323 <entry>g<subscript>3</subscript></entry> 324 <entry>g<subscript>2</subscript></entry> 325 <entry>g<subscript>1</subscript></entry> 326 <entry>g<subscript>0</subscript></entry> 327 <entry></entry> 328 <entry>r<subscript>7</subscript></entry> 329 <entry>r<subscript>6</subscript></entry> 330 <entry>r<subscript>5</subscript></entry> 331 <entry>r<subscript>4</subscript></entry> 332 <entry>r<subscript>3</subscript></entry> 333 <entry>r<subscript>2</subscript></entry> 334 <entry>r<subscript>1</subscript></entry> 335 <entry>r<subscript>0</subscript></entry> 336 </row> 337 <row id="V4L2-PIX-FMT-RGB24"> 338 <entry><constant>V4L2_PIX_FMT_RGB24</constant></entry> 339 <entry>'RGB3'</entry> 340 <entry></entry> 341 <entry>r<subscript>7</subscript></entry> 342 <entry>r<subscript>6</subscript></entry> 343 <entry>r<subscript>5</subscript></entry> 344 <entry>r<subscript>4</subscript></entry> 345 <entry>r<subscript>3</subscript></entry> 346 <entry>r<subscript>2</subscript></entry> 347 <entry>r<subscript>1</subscript></entry> 348 <entry>r<subscript>0</subscript></entry> 349 <entry></entry> 350 <entry>g<subscript>7</subscript></entry> 351 <entry>g<subscript>6</subscript></entry> 352 <entry>g<subscript>5</subscript></entry> 353 <entry>g<subscript>4</subscript></entry> 354 <entry>g<subscript>3</subscript></entry> 355 <entry>g<subscript>2</subscript></entry> 356 <entry>g<subscript>1</subscript></entry> 357 <entry>g<subscript>0</subscript></entry> 358 <entry></entry> 359 <entry>b<subscript>7</subscript></entry> 360 <entry>b<subscript>6</subscript></entry> 361 <entry>b<subscript>5</subscript></entry> 362 <entry>b<subscript>4</subscript></entry> 363 <entry>b<subscript>3</subscript></entry> 364 <entry>b<subscript>2</subscript></entry> 365 <entry>b<subscript>1</subscript></entry> 366 <entry>b<subscript>0</subscript></entry> 367 </row> 368 <row id="V4L2-PIX-FMT-BGR666"> 369 <entry><constant>V4L2_PIX_FMT_BGR666</constant></entry> 370 <entry>'BGRH'</entry> 371 <entry></entry> 372 <entry>b<subscript>5</subscript></entry> 373 <entry>b<subscript>4</subscript></entry> 374 <entry>b<subscript>3</subscript></entry> 375 <entry>b<subscript>2</subscript></entry> 376 <entry>b<subscript>1</subscript></entry> 377 <entry>b<subscript>0</subscript></entry> 378 <entry>g<subscript>5</subscript></entry> 379 <entry>g<subscript>4</subscript></entry> 380 <entry></entry> 381 <entry>g<subscript>3</subscript></entry> 382 <entry>g<subscript>2</subscript></entry> 383 <entry>g<subscript>1</subscript></entry> 384 <entry>g<subscript>0</subscript></entry> 385 <entry>r<subscript>5</subscript></entry> 386 <entry>r<subscript>4</subscript></entry> 387 <entry>r<subscript>3</subscript></entry> 388 <entry>r<subscript>2</subscript></entry> 389 <entry></entry> 390 <entry>r<subscript>1</subscript></entry> 391 <entry>r<subscript>0</subscript></entry> 392 <entry>-</entry> 393 <entry>-</entry> 394 <entry>-</entry> 395 <entry>-</entry> 396 <entry>-</entry> 397 <entry>-</entry> 398 <entry></entry> 399 <entry>-</entry> 400 <entry>-</entry> 401 <entry>-</entry> 402 <entry>-</entry> 403 <entry>-</entry> 404 <entry>-</entry> 405 <entry>-</entry> 406 <entry>-</entry> 407 </row> 408 <row id="V4L2-PIX-FMT-ABGR32"> 409 <entry><constant>V4L2_PIX_FMT_ABGR32</constant></entry> 410 <entry>'AR24'</entry> 411 <entry></entry> 412 <entry>b<subscript>7</subscript></entry> 413 <entry>b<subscript>6</subscript></entry> 414 <entry>b<subscript>5</subscript></entry> 415 <entry>b<subscript>4</subscript></entry> 416 <entry>b<subscript>3</subscript></entry> 417 <entry>b<subscript>2</subscript></entry> 418 <entry>b<subscript>1</subscript></entry> 419 <entry>b<subscript>0</subscript></entry> 420 <entry></entry> 421 <entry>g<subscript>7</subscript></entry> 422 <entry>g<subscript>6</subscript></entry> 423 <entry>g<subscript>5</subscript></entry> 424 <entry>g<subscript>4</subscript></entry> 425 <entry>g<subscript>3</subscript></entry> 426 <entry>g<subscript>2</subscript></entry> 427 <entry>g<subscript>1</subscript></entry> 428 <entry>g<subscript>0</subscript></entry> 429 <entry></entry> 430 <entry>r<subscript>7</subscript></entry> 431 <entry>r<subscript>6</subscript></entry> 432 <entry>r<subscript>5</subscript></entry> 433 <entry>r<subscript>4</subscript></entry> 434 <entry>r<subscript>3</subscript></entry> 435 <entry>r<subscript>2</subscript></entry> 436 <entry>r<subscript>1</subscript></entry> 437 <entry>r<subscript>0</subscript></entry> 438 <entry></entry> 439 <entry>a<subscript>7</subscript></entry> 440 <entry>a<subscript>6</subscript></entry> 441 <entry>a<subscript>5</subscript></entry> 442 <entry>a<subscript>4</subscript></entry> 443 <entry>a<subscript>3</subscript></entry> 444 <entry>a<subscript>2</subscript></entry> 445 <entry>a<subscript>1</subscript></entry> 446 <entry>a<subscript>0</subscript></entry> 447 </row> 448 <row id="V4L2-PIX-FMT-XBGR32"> 449 <entry><constant>V4L2_PIX_FMT_XBGR32</constant></entry> 450 <entry>'XR24'</entry> 451 <entry></entry> 452 <entry>b<subscript>7</subscript></entry> 453 <entry>b<subscript>6</subscript></entry> 454 <entry>b<subscript>5</subscript></entry> 455 <entry>b<subscript>4</subscript></entry> 456 <entry>b<subscript>3</subscript></entry> 457 <entry>b<subscript>2</subscript></entry> 458 <entry>b<subscript>1</subscript></entry> 459 <entry>b<subscript>0</subscript></entry> 460 <entry></entry> 461 <entry>g<subscript>7</subscript></entry> 462 <entry>g<subscript>6</subscript></entry> 463 <entry>g<subscript>5</subscript></entry> 464 <entry>g<subscript>4</subscript></entry> 465 <entry>g<subscript>3</subscript></entry> 466 <entry>g<subscript>2</subscript></entry> 467 <entry>g<subscript>1</subscript></entry> 468 <entry>g<subscript>0</subscript></entry> 469 <entry></entry> 470 <entry>r<subscript>7</subscript></entry> 471 <entry>r<subscript>6</subscript></entry> 472 <entry>r<subscript>5</subscript></entry> 473 <entry>r<subscript>4</subscript></entry> 474 <entry>r<subscript>3</subscript></entry> 475 <entry>r<subscript>2</subscript></entry> 476 <entry>r<subscript>1</subscript></entry> 477 <entry>r<subscript>0</subscript></entry> 478 <entry></entry> 479 <entry>-</entry> 480 <entry>-</entry> 481 <entry>-</entry> 482 <entry>-</entry> 483 <entry>-</entry> 484 <entry>-</entry> 485 <entry>-</entry> 486 <entry>-</entry> 487 </row> 488 <row id="V4L2-PIX-FMT-ARGB32"> 489 <entry><constant>V4L2_PIX_FMT_ARGB32</constant></entry> 490 <entry>'BA24'</entry> 491 <entry></entry> 492 <entry>a<subscript>7</subscript></entry> 493 <entry>a<subscript>6</subscript></entry> 494 <entry>a<subscript>5</subscript></entry> 495 <entry>a<subscript>4</subscript></entry> 496 <entry>a<subscript>3</subscript></entry> 497 <entry>a<subscript>2</subscript></entry> 498 <entry>a<subscript>1</subscript></entry> 499 <entry>a<subscript>0</subscript></entry> 500 <entry></entry> 501 <entry>r<subscript>7</subscript></entry> 502 <entry>r<subscript>6</subscript></entry> 503 <entry>r<subscript>5</subscript></entry> 504 <entry>r<subscript>4</subscript></entry> 505 <entry>r<subscript>3</subscript></entry> 506 <entry>r<subscript>2</subscript></entry> 507 <entry>r<subscript>1</subscript></entry> 508 <entry>r<subscript>0</subscript></entry> 509 <entry></entry> 510 <entry>g<subscript>7</subscript></entry> 511 <entry>g<subscript>6</subscript></entry> 512 <entry>g<subscript>5</subscript></entry> 513 <entry>g<subscript>4</subscript></entry> 514 <entry>g<subscript>3</subscript></entry> 515 <entry>g<subscript>2</subscript></entry> 516 <entry>g<subscript>1</subscript></entry> 517 <entry>g<subscript>0</subscript></entry> 518 <entry></entry> 519 <entry>b<subscript>7</subscript></entry> 520 <entry>b<subscript>6</subscript></entry> 521 <entry>b<subscript>5</subscript></entry> 522 <entry>b<subscript>4</subscript></entry> 523 <entry>b<subscript>3</subscript></entry> 524 <entry>b<subscript>2</subscript></entry> 525 <entry>b<subscript>1</subscript></entry> 526 <entry>b<subscript>0</subscript></entry> 527 </row> 528 <row id="V4L2-PIX-FMT-XRGB32"> 529 <entry><constant>V4L2_PIX_FMT_XRGB32</constant></entry> 530 <entry>'BX24'</entry> 531 <entry></entry> 532 <entry>-</entry> 533 <entry>-</entry> 534 <entry>-</entry> 535 <entry>-</entry> 536 <entry>-</entry> 537 <entry>-</entry> 538 <entry>-</entry> 539 <entry>-</entry> 540 <entry></entry> 541 <entry>r<subscript>7</subscript></entry> 542 <entry>r<subscript>6</subscript></entry> 543 <entry>r<subscript>5</subscript></entry> 544 <entry>r<subscript>4</subscript></entry> 545 <entry>r<subscript>3</subscript></entry> 546 <entry>r<subscript>2</subscript></entry> 547 <entry>r<subscript>1</subscript></entry> 548 <entry>r<subscript>0</subscript></entry> 549 <entry></entry> 550 <entry>g<subscript>7</subscript></entry> 551 <entry>g<subscript>6</subscript></entry> 552 <entry>g<subscript>5</subscript></entry> 553 <entry>g<subscript>4</subscript></entry> 554 <entry>g<subscript>3</subscript></entry> 555 <entry>g<subscript>2</subscript></entry> 556 <entry>g<subscript>1</subscript></entry> 557 <entry>g<subscript>0</subscript></entry> 558 <entry></entry> 559 <entry>b<subscript>7</subscript></entry> 560 <entry>b<subscript>6</subscript></entry> 561 <entry>b<subscript>5</subscript></entry> 562 <entry>b<subscript>4</subscript></entry> 563 <entry>b<subscript>3</subscript></entry> 564 <entry>b<subscript>2</subscript></entry> 565 <entry>b<subscript>1</subscript></entry> 566 <entry>b<subscript>0</subscript></entry> 567 </row> 568 </tbody> 569 </tgroup> 570 </table> 571 572 <para>Bit 7 is the most significant bit.</para> 573 574 <para>The usage and value of the alpha bits (a) in the ARGB and ABGR formats 575 (collectively referred to as alpha formats) depend on the device type and 576 hardware operation. <link linkend="capture">Capture</link> devices 577 (including capture queues of mem-to-mem devices) fill the alpha component in 578 memory. When the device outputs an alpha channel the alpha component will 579 have a meaningful value. Otherwise, when the device doesn't output an alpha 580 channel but can set the alpha bit to a user-configurable value, the <link 581 linkend="v4l2-alpha-component"><constant>V4L2_CID_ALPHA_COMPONENT</constant> 582 </link> control is used to specify that alpha value, and the alpha component 583 of all pixels will be set to the value specified by that control. Otherwise 584 a corresponding format without an alpha component (XRGB or XBGR) must be 585 used instead of an alpha format.</para> 586 587 <para><link linkend="output">Output</link> devices (including output queues 588 of mem-to-mem devices and <link linkend="osd">video output overlay</link> 589 devices) read the alpha component from memory. When the device processes the 590 alpha channel the alpha component must be filled with meaningful values by 591 applications. Otherwise a corresponding format without an alpha component 592 (XRGB or XBGR) must be used instead of an alpha format.</para> 593 594 <para>The XRGB and XBGR formats contain undefined bits (-). Applications, 595 devices and drivers must ignore those bits, for both <link 596 linkend="capture">capture</link> and <link linkend="output">output</link> 597 devices.</para> 598 599 <example> 600 <title><constant>V4L2_PIX_FMT_BGR24</constant> 4 × 4 pixel 601image</title> 602 603 <formalpara> 604 <title>Byte Order.</title> 605 <para>Each cell is one byte. 606 <informaltable frame="none"> 607 <tgroup cols="13" align="center"> 608 <colspec align="left" colwidth="2*" /> 609 <tbody valign="top"> 610 <row> 611 <entry>start + 0:</entry> 612 <entry>B<subscript>00</subscript></entry> 613 <entry>G<subscript>00</subscript></entry> 614 <entry>R<subscript>00</subscript></entry> 615 <entry>B<subscript>01</subscript></entry> 616 <entry>G<subscript>01</subscript></entry> 617 <entry>R<subscript>01</subscript></entry> 618 <entry>B<subscript>02</subscript></entry> 619 <entry>G<subscript>02</subscript></entry> 620 <entry>R<subscript>02</subscript></entry> 621 <entry>B<subscript>03</subscript></entry> 622 <entry>G<subscript>03</subscript></entry> 623 <entry>R<subscript>03</subscript></entry> 624 </row> 625 <row> 626 <entry>start + 12:</entry> 627 <entry>B<subscript>10</subscript></entry> 628 <entry>G<subscript>10</subscript></entry> 629 <entry>R<subscript>10</subscript></entry> 630 <entry>B<subscript>11</subscript></entry> 631 <entry>G<subscript>11</subscript></entry> 632 <entry>R<subscript>11</subscript></entry> 633 <entry>B<subscript>12</subscript></entry> 634 <entry>G<subscript>12</subscript></entry> 635 <entry>R<subscript>12</subscript></entry> 636 <entry>B<subscript>13</subscript></entry> 637 <entry>G<subscript>13</subscript></entry> 638 <entry>R<subscript>13</subscript></entry> 639 </row> 640 <row> 641 <entry>start + 24:</entry> 642 <entry>B<subscript>20</subscript></entry> 643 <entry>G<subscript>20</subscript></entry> 644 <entry>R<subscript>20</subscript></entry> 645 <entry>B<subscript>21</subscript></entry> 646 <entry>G<subscript>21</subscript></entry> 647 <entry>R<subscript>21</subscript></entry> 648 <entry>B<subscript>22</subscript></entry> 649 <entry>G<subscript>22</subscript></entry> 650 <entry>R<subscript>22</subscript></entry> 651 <entry>B<subscript>23</subscript></entry> 652 <entry>G<subscript>23</subscript></entry> 653 <entry>R<subscript>23</subscript></entry> 654 </row> 655 <row> 656 <entry>start + 36:</entry> 657 <entry>B<subscript>30</subscript></entry> 658 <entry>G<subscript>30</subscript></entry> 659 <entry>R<subscript>30</subscript></entry> 660 <entry>B<subscript>31</subscript></entry> 661 <entry>G<subscript>31</subscript></entry> 662 <entry>R<subscript>31</subscript></entry> 663 <entry>B<subscript>32</subscript></entry> 664 <entry>G<subscript>32</subscript></entry> 665 <entry>R<subscript>32</subscript></entry> 666 <entry>B<subscript>33</subscript></entry> 667 <entry>G<subscript>33</subscript></entry> 668 <entry>R<subscript>33</subscript></entry> 669 </row> 670 </tbody> 671 </tgroup> 672 </informaltable> 673 </para> 674 </formalpara> 675 </example> 676 677 <para>Formats defined in <xref linkend="rgb-formats-deprecated"/> are 678 deprecated and must not be used by new drivers. They are documented here for 679 reference. The meaning of their alpha bits (a) is ill-defined and 680 interpreted as in either the corresponding ARGB or XRGB format, depending on 681 the driver.</para> 682 683 <table pgwide="1" frame="none" id="rgb-formats-deprecated"> 684 <title>Deprecated Packed RGB Image Formats</title> 685 <tgroup cols="37" align="center"> 686 <colspec colname="id" align="left" /> 687 <colspec colname="fourcc" /> 688 <colspec colname="bit" /> 689 690 <colspec colnum="4" colname="b07" align="center" /> 691 <colspec colnum="5" colname="b06" align="center" /> 692 <colspec colnum="6" colname="b05" align="center" /> 693 <colspec colnum="7" colname="b04" align="center" /> 694 <colspec colnum="8" colname="b03" align="center" /> 695 <colspec colnum="9" colname="b02" align="center" /> 696 <colspec colnum="10" colname="b01" align="center" /> 697 <colspec colnum="11" colname="b00" align="center" /> 698 699 <colspec colnum="13" colname="b17" align="center" /> 700 <colspec colnum="14" colname="b16" align="center" /> 701 <colspec colnum="15" colname="b15" align="center" /> 702 <colspec colnum="16" colname="b14" align="center" /> 703 <colspec colnum="17" colname="b13" align="center" /> 704 <colspec colnum="18" colname="b12" align="center" /> 705 <colspec colnum="19" colname="b11" align="center" /> 706 <colspec colnum="20" colname="b10" align="center" /> 707 708 <colspec colnum="22" colname="b27" align="center" /> 709 <colspec colnum="23" colname="b26" align="center" /> 710 <colspec colnum="24" colname="b25" align="center" /> 711 <colspec colnum="25" colname="b24" align="center" /> 712 <colspec colnum="26" colname="b23" align="center" /> 713 <colspec colnum="27" colname="b22" align="center" /> 714 <colspec colnum="28" colname="b21" align="center" /> 715 <colspec colnum="29" colname="b20" align="center" /> 716 717 <colspec colnum="31" colname="b37" align="center" /> 718 <colspec colnum="32" colname="b36" align="center" /> 719 <colspec colnum="33" colname="b35" align="center" /> 720 <colspec colnum="34" colname="b34" align="center" /> 721 <colspec colnum="35" colname="b33" align="center" /> 722 <colspec colnum="36" colname="b32" align="center" /> 723 <colspec colnum="37" colname="b31" align="center" /> 724 <colspec colnum="38" colname="b30" align="center" /> 725 726 <spanspec namest="b07" nameend="b00" spanname="b0" /> 727 <spanspec namest="b17" nameend="b10" spanname="b1" /> 728 <spanspec namest="b27" nameend="b20" spanname="b2" /> 729 <spanspec namest="b37" nameend="b30" spanname="b3" /> 730 <thead> 731 <row> 732 <entry>Identifier</entry> 733 <entry>Code</entry> 734 <entry> </entry> 735 <entry spanname="b0">Byte 0 in memory</entry> 736 <entry spanname="b1">Byte 1</entry> 737 <entry spanname="b2">Byte 2</entry> 738 <entry spanname="b3">Byte 3</entry> 739 </row> 740 <row> 741 <entry> </entry> 742 <entry> </entry> 743 <entry>Bit</entry> 744 <entry>7</entry> 745 <entry>6</entry> 746 <entry>5</entry> 747 <entry>4</entry> 748 <entry>3</entry> 749 <entry>2</entry> 750 <entry>1</entry> 751 <entry>0</entry> 752 <entry> </entry> 753 <entry>7</entry> 754 <entry>6</entry> 755 <entry>5</entry> 756 <entry>4</entry> 757 <entry>3</entry> 758 <entry>2</entry> 759 <entry>1</entry> 760 <entry>0</entry> 761 <entry> </entry> 762 <entry>7</entry> 763 <entry>6</entry> 764 <entry>5</entry> 765 <entry>4</entry> 766 <entry>3</entry> 767 <entry>2</entry> 768 <entry>1</entry> 769 <entry>0</entry> 770 <entry> </entry> 771 <entry>7</entry> 772 <entry>6</entry> 773 <entry>5</entry> 774 <entry>4</entry> 775 <entry>3</entry> 776 <entry>2</entry> 777 <entry>1</entry> 778 <entry>0</entry> 779 </row> 780 </thead> 781 <tbody> 782 <row id="V4L2-PIX-FMT-RGB444"> 783 <entry><constant>V4L2_PIX_FMT_RGB444</constant></entry> 784 <entry>'R444'</entry> 785 <entry></entry> 786 <entry>g<subscript>3</subscript></entry> 787 <entry>g<subscript>2</subscript></entry> 788 <entry>g<subscript>1</subscript></entry> 789 <entry>g<subscript>0</subscript></entry> 790 <entry>b<subscript>3</subscript></entry> 791 <entry>b<subscript>2</subscript></entry> 792 <entry>b<subscript>1</subscript></entry> 793 <entry>b<subscript>0</subscript></entry> 794 <entry></entry> 795 <entry>a<subscript>3</subscript></entry> 796 <entry>a<subscript>2</subscript></entry> 797 <entry>a<subscript>1</subscript></entry> 798 <entry>a<subscript>0</subscript></entry> 799 <entry>r<subscript>3</subscript></entry> 800 <entry>r<subscript>2</subscript></entry> 801 <entry>r<subscript>1</subscript></entry> 802 <entry>r<subscript>0</subscript></entry> 803 </row> 804 <row id="V4L2-PIX-FMT-RGB555"> 805 <entry><constant>V4L2_PIX_FMT_RGB555</constant></entry> 806 <entry>'RGBO'</entry> 807 <entry></entry> 808 <entry>g<subscript>2</subscript></entry> 809 <entry>g<subscript>1</subscript></entry> 810 <entry>g<subscript>0</subscript></entry> 811 <entry>b<subscript>4</subscript></entry> 812 <entry>b<subscript>3</subscript></entry> 813 <entry>b<subscript>2</subscript></entry> 814 <entry>b<subscript>1</subscript></entry> 815 <entry>b<subscript>0</subscript></entry> 816 <entry></entry> 817 <entry>a</entry> 818 <entry>r<subscript>4</subscript></entry> 819 <entry>r<subscript>3</subscript></entry> 820 <entry>r<subscript>2</subscript></entry> 821 <entry>r<subscript>1</subscript></entry> 822 <entry>r<subscript>0</subscript></entry> 823 <entry>g<subscript>4</subscript></entry> 824 <entry>g<subscript>3</subscript></entry> 825 </row> 826 <row id="V4L2-PIX-FMT-RGB555X"> 827 <entry><constant>V4L2_PIX_FMT_RGB555X</constant></entry> 828 <entry>'RGBQ'</entry> 829 <entry></entry> 830 <entry>a</entry> 831 <entry>r<subscript>4</subscript></entry> 832 <entry>r<subscript>3</subscript></entry> 833 <entry>r<subscript>2</subscript></entry> 834 <entry>r<subscript>1</subscript></entry> 835 <entry>r<subscript>0</subscript></entry> 836 <entry>g<subscript>4</subscript></entry> 837 <entry>g<subscript>3</subscript></entry> 838 <entry></entry> 839 <entry>g<subscript>2</subscript></entry> 840 <entry>g<subscript>1</subscript></entry> 841 <entry>g<subscript>0</subscript></entry> 842 <entry>b<subscript>4</subscript></entry> 843 <entry>b<subscript>3</subscript></entry> 844 <entry>b<subscript>2</subscript></entry> 845 <entry>b<subscript>1</subscript></entry> 846 <entry>b<subscript>0</subscript></entry> 847 </row> 848 <row id="V4L2-PIX-FMT-BGR32"> 849 <entry><constant>V4L2_PIX_FMT_BGR32</constant></entry> 850 <entry>'BGR4'</entry> 851 <entry></entry> 852 <entry>b<subscript>7</subscript></entry> 853 <entry>b<subscript>6</subscript></entry> 854 <entry>b<subscript>5</subscript></entry> 855 <entry>b<subscript>4</subscript></entry> 856 <entry>b<subscript>3</subscript></entry> 857 <entry>b<subscript>2</subscript></entry> 858 <entry>b<subscript>1</subscript></entry> 859 <entry>b<subscript>0</subscript></entry> 860 <entry></entry> 861 <entry>g<subscript>7</subscript></entry> 862 <entry>g<subscript>6</subscript></entry> 863 <entry>g<subscript>5</subscript></entry> 864 <entry>g<subscript>4</subscript></entry> 865 <entry>g<subscript>3</subscript></entry> 866 <entry>g<subscript>2</subscript></entry> 867 <entry>g<subscript>1</subscript></entry> 868 <entry>g<subscript>0</subscript></entry> 869 <entry></entry> 870 <entry>r<subscript>7</subscript></entry> 871 <entry>r<subscript>6</subscript></entry> 872 <entry>r<subscript>5</subscript></entry> 873 <entry>r<subscript>4</subscript></entry> 874 <entry>r<subscript>3</subscript></entry> 875 <entry>r<subscript>2</subscript></entry> 876 <entry>r<subscript>1</subscript></entry> 877 <entry>r<subscript>0</subscript></entry> 878 <entry></entry> 879 <entry>a<subscript>7</subscript></entry> 880 <entry>a<subscript>6</subscript></entry> 881 <entry>a<subscript>5</subscript></entry> 882 <entry>a<subscript>4</subscript></entry> 883 <entry>a<subscript>3</subscript></entry> 884 <entry>a<subscript>2</subscript></entry> 885 <entry>a<subscript>1</subscript></entry> 886 <entry>a<subscript>0</subscript></entry> 887 </row> 888 <row id="V4L2-PIX-FMT-RGB32"> 889 <entry><constant>V4L2_PIX_FMT_RGB32</constant></entry> 890 <entry>'RGB4'</entry> 891 <entry></entry> 892 <entry>a<subscript>7</subscript></entry> 893 <entry>a<subscript>6</subscript></entry> 894 <entry>a<subscript>5</subscript></entry> 895 <entry>a<subscript>4</subscript></entry> 896 <entry>a<subscript>3</subscript></entry> 897 <entry>a<subscript>2</subscript></entry> 898 <entry>a<subscript>1</subscript></entry> 899 <entry>a<subscript>0</subscript></entry> 900 <entry></entry> 901 <entry>r<subscript>7</subscript></entry> 902 <entry>r<subscript>6</subscript></entry> 903 <entry>r<subscript>5</subscript></entry> 904 <entry>r<subscript>4</subscript></entry> 905 <entry>r<subscript>3</subscript></entry> 906 <entry>r<subscript>2</subscript></entry> 907 <entry>r<subscript>1</subscript></entry> 908 <entry>r<subscript>0</subscript></entry> 909 <entry></entry> 910 <entry>g<subscript>7</subscript></entry> 911 <entry>g<subscript>6</subscript></entry> 912 <entry>g<subscript>5</subscript></entry> 913 <entry>g<subscript>4</subscript></entry> 914 <entry>g<subscript>3</subscript></entry> 915 <entry>g<subscript>2</subscript></entry> 916 <entry>g<subscript>1</subscript></entry> 917 <entry>g<subscript>0</subscript></entry> 918 <entry></entry> 919 <entry>b<subscript>7</subscript></entry> 920 <entry>b<subscript>6</subscript></entry> 921 <entry>b<subscript>5</subscript></entry> 922 <entry>b<subscript>4</subscript></entry> 923 <entry>b<subscript>3</subscript></entry> 924 <entry>b<subscript>2</subscript></entry> 925 <entry>b<subscript>1</subscript></entry> 926 <entry>b<subscript>0</subscript></entry> 927 </row> 928 </tbody> 929 </tgroup> 930 </table> 931 932 <para>A test utility to determine which RGB formats a driver 933actually supports is available from the LinuxTV v4l-dvb repository. 934See &v4l-dvb; for access instructions.</para> 935 936 </refsect1> 937 </refentry> 938