1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 3.. _packed-yuv: 4 5****************** 6Packed YUV formats 7****************** 8 9Description 10=========== 11 12Similar to the packed RGB formats these formats store the Y, Cb and Cr 13component of each pixel in one 16 or 32 bit word. 14 15 16.. raw:: latex 17 18 \begingroup 19 \tiny 20 \setlength{\tabcolsep}{2pt} 21 22.. _packed-yuv-formats: 23 24.. tabularcolumns:: |p{2.5cm}|p{0.69cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}| 25 26.. flat-table:: Packed YUV Image Formats 27 :header-rows: 2 28 :stub-columns: 0 29 30 * - Identifier 31 - Code 32 33 - :cspan:`7` Byte 0 in memory 34 35 - :cspan:`7` Byte 1 36 37 - :cspan:`7` Byte 2 38 39 - :cspan:`7` Byte 3 40 41 * - 42 - 43 - 7 44 - 6 45 - 5 46 - 4 47 - 3 48 - 2 49 - 1 50 - 0 51 52 - 7 53 - 6 54 - 5 55 - 4 56 - 3 57 - 2 58 - 1 59 - 0 60 61 - 7 62 - 6 63 - 5 64 - 4 65 - 3 66 - 2 67 - 1 68 - 0 69 70 - 7 71 - 6 72 - 5 73 - 4 74 - 3 75 - 2 76 - 1 77 - 0 78 79 * .. _V4L2-PIX-FMT-YUV444: 80 81 - ``V4L2_PIX_FMT_YUV444`` 82 - 'Y444' 83 84 - Cb\ :sub:`3` 85 - Cb\ :sub:`2` 86 - Cb\ :sub:`1` 87 - Cb\ :sub:`0` 88 - Cr\ :sub:`3` 89 - Cr\ :sub:`2` 90 - Cr\ :sub:`1` 91 - Cr\ :sub:`0` 92 93 - a\ :sub:`3` 94 - a\ :sub:`2` 95 - a\ :sub:`1` 96 - a\ :sub:`0` 97 - Y'\ :sub:`3` 98 - Y'\ :sub:`2` 99 - Y'\ :sub:`1` 100 - Y'\ :sub:`0` 101 102 - :cspan:`15` 103 104 * .. _V4L2-PIX-FMT-YUV555: 105 106 - ``V4L2_PIX_FMT_YUV555`` 107 - 'YUVO' 108 109 - Cb\ :sub:`2` 110 - Cb\ :sub:`1` 111 - Cb\ :sub:`0` 112 - Cr\ :sub:`4` 113 - Cr\ :sub:`3` 114 - Cr\ :sub:`2` 115 - Cr\ :sub:`1` 116 - Cr\ :sub:`0` 117 118 - a 119 - Y'\ :sub:`4` 120 - Y'\ :sub:`3` 121 - Y'\ :sub:`2` 122 - Y'\ :sub:`1` 123 - Y'\ :sub:`0` 124 - Cb\ :sub:`4` 125 - Cb\ :sub:`3` 126 127 - :cspan:`15` 128 * .. _V4L2-PIX-FMT-YUV565: 129 130 - ``V4L2_PIX_FMT_YUV565`` 131 - 'YUVP' 132 133 - Cb\ :sub:`2` 134 - Cb\ :sub:`1` 135 - Cb\ :sub:`0` 136 - Cr\ :sub:`4` 137 - Cr\ :sub:`3` 138 - Cr\ :sub:`2` 139 - Cr\ :sub:`1` 140 - Cr\ :sub:`0` 141 142 - Y'\ :sub:`4` 143 - Y'\ :sub:`3` 144 - Y'\ :sub:`2` 145 - Y'\ :sub:`1` 146 - Y'\ :sub:`0` 147 - Cb\ :sub:`5` 148 - Cb\ :sub:`4` 149 - Cb\ :sub:`3` 150 151 - :cspan:`15` 152 153 * .. _V4L2-PIX-FMT-YUV32: 154 155 - ``V4L2_PIX_FMT_YUV32`` 156 - 'YUV4' 157 158 - a\ :sub:`7` 159 - a\ :sub:`6` 160 - a\ :sub:`5` 161 - a\ :sub:`4` 162 - a\ :sub:`3` 163 - a\ :sub:`2` 164 - a\ :sub:`1` 165 - a\ :sub:`0` 166 167 - Y'\ :sub:`7` 168 - Y'\ :sub:`6` 169 - Y'\ :sub:`5` 170 - Y'\ :sub:`4` 171 - Y'\ :sub:`3` 172 - Y'\ :sub:`2` 173 - Y'\ :sub:`1` 174 - Y'\ :sub:`0` 175 176 - Cb\ :sub:`7` 177 - Cb\ :sub:`6` 178 - Cb\ :sub:`5` 179 - Cb\ :sub:`4` 180 - Cb\ :sub:`3` 181 - Cb\ :sub:`2` 182 - Cb\ :sub:`1` 183 - Cb\ :sub:`0` 184 185 - Cr\ :sub:`7` 186 - Cr\ :sub:`6` 187 - Cr\ :sub:`5` 188 - Cr\ :sub:`4` 189 - Cr\ :sub:`3` 190 - Cr\ :sub:`2` 191 - Cr\ :sub:`1` 192 - Cr\ :sub:`0` 193 194 * .. _V4L2-PIX-FMT-AYUV32: 195 196 - ``V4L2_PIX_FMT_AYUV32`` 197 - 'AYUV' 198 199 - a\ :sub:`7` 200 - a\ :sub:`6` 201 - a\ :sub:`5` 202 - a\ :sub:`4` 203 - a\ :sub:`3` 204 - a\ :sub:`2` 205 - a\ :sub:`1` 206 - a\ :sub:`0` 207 208 - Y'\ :sub:`7` 209 - Y'\ :sub:`6` 210 - Y'\ :sub:`5` 211 - Y'\ :sub:`4` 212 - Y'\ :sub:`3` 213 - Y'\ :sub:`2` 214 - Y'\ :sub:`1` 215 - Y'\ :sub:`0` 216 217 - Cb\ :sub:`7` 218 - Cb\ :sub:`6` 219 - Cb\ :sub:`5` 220 - Cb\ :sub:`4` 221 - Cb\ :sub:`3` 222 - Cb\ :sub:`2` 223 - Cb\ :sub:`1` 224 - Cb\ :sub:`0` 225 226 - Cr\ :sub:`7` 227 - Cr\ :sub:`6` 228 - Cr\ :sub:`5` 229 - Cr\ :sub:`4` 230 - Cr\ :sub:`3` 231 - Cr\ :sub:`2` 232 - Cr\ :sub:`1` 233 - Cr\ :sub:`0` 234 235 * .. _V4L2-PIX-FMT-XYUV32: 236 237 - ``V4L2_PIX_FMT_XYUV32`` 238 - 'XYUV' 239 240 - 241 - 242 - 243 - 244 - 245 - 246 - 247 - 248 249 - Y'\ :sub:`7` 250 - Y'\ :sub:`6` 251 - Y'\ :sub:`5` 252 - Y'\ :sub:`4` 253 - Y'\ :sub:`3` 254 - Y'\ :sub:`2` 255 - Y'\ :sub:`1` 256 - Y'\ :sub:`0` 257 258 - Cb\ :sub:`7` 259 - Cb\ :sub:`6` 260 - Cb\ :sub:`5` 261 - Cb\ :sub:`4` 262 - Cb\ :sub:`3` 263 - Cb\ :sub:`2` 264 - Cb\ :sub:`1` 265 - Cb\ :sub:`0` 266 267 - Cr\ :sub:`7` 268 - Cr\ :sub:`6` 269 - Cr\ :sub:`5` 270 - Cr\ :sub:`4` 271 - Cr\ :sub:`3` 272 - Cr\ :sub:`2` 273 - Cr\ :sub:`1` 274 - Cr\ :sub:`0` 275 276 * .. _V4L2-PIX-FMT-VUYA32: 277 278 - ``V4L2_PIX_FMT_VUYA32`` 279 - 'VUYA' 280 281 - Cr\ :sub:`7` 282 - Cr\ :sub:`6` 283 - Cr\ :sub:`5` 284 - Cr\ :sub:`4` 285 - Cr\ :sub:`3` 286 - Cr\ :sub:`2` 287 - Cr\ :sub:`1` 288 - Cr\ :sub:`0` 289 290 - Cb\ :sub:`7` 291 - Cb\ :sub:`6` 292 - Cb\ :sub:`5` 293 - Cb\ :sub:`4` 294 - Cb\ :sub:`3` 295 - Cb\ :sub:`2` 296 - Cb\ :sub:`1` 297 - Cb\ :sub:`0` 298 299 - Y'\ :sub:`7` 300 - Y'\ :sub:`6` 301 - Y'\ :sub:`5` 302 - Y'\ :sub:`4` 303 - Y'\ :sub:`3` 304 - Y'\ :sub:`2` 305 - Y'\ :sub:`1` 306 - Y'\ :sub:`0` 307 308 - a\ :sub:`7` 309 - a\ :sub:`6` 310 - a\ :sub:`5` 311 - a\ :sub:`4` 312 - a\ :sub:`3` 313 - a\ :sub:`2` 314 - a\ :sub:`1` 315 - a\ :sub:`0` 316 317 * .. _V4L2-PIX-FMT-VUYX32: 318 319 - ``V4L2_PIX_FMT_VUYX32`` 320 - 'VUYX' 321 322 - Cr\ :sub:`7` 323 - Cr\ :sub:`6` 324 - Cr\ :sub:`5` 325 - Cr\ :sub:`4` 326 - Cr\ :sub:`3` 327 - Cr\ :sub:`2` 328 - Cr\ :sub:`1` 329 - Cr\ :sub:`0` 330 331 - Cb\ :sub:`7` 332 - Cb\ :sub:`6` 333 - Cb\ :sub:`5` 334 - Cb\ :sub:`4` 335 - Cb\ :sub:`3` 336 - Cb\ :sub:`2` 337 - Cb\ :sub:`1` 338 - Cb\ :sub:`0` 339 340 - Y'\ :sub:`7` 341 - Y'\ :sub:`6` 342 - Y'\ :sub:`5` 343 - Y'\ :sub:`4` 344 - Y'\ :sub:`3` 345 - Y'\ :sub:`2` 346 - Y'\ :sub:`1` 347 - Y'\ :sub:`0` 348 349 - 350 - 351 - 352 - 353 - 354 - 355 - 356 - 357 358.. raw:: latex 359 360 \endgroup 361 362.. note:: 363 364 #) Bit 7 is the most significant bit; 365 366 #) The value of a = alpha bits is undefined when reading from the driver, 367 ignored when writing to the driver, except when alpha blending has 368 been negotiated for a :ref:`Video Overlay <overlay>` or 369 :ref:`Video Output Overlay <osd>` for the formats Y444, YUV555 and 370 YUV4. However, for formats AYUV32 and VUYA32, the alpha component is 371 expected to contain a meaningful value that can be used by drivers 372 and applications. And, the formats XYUV32 and VUYX32 contain undefined 373 alpha values that must be ignored by all applications and drivers. 374