1 .. SPDX-License-Identifier: GFDL-1.1-no-invari 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 2 3 .. planar-yuv: 3 .. planar-yuv: 4 4 5 ****************** 5 ****************** 6 Planar YUV formats 6 Planar YUV formats 7 ****************** 7 ****************** 8 8 9 Planar formats split luma and chroma data in s 9 Planar formats split luma and chroma data in separate memory regions. They 10 exist in two variants: 10 exist in two variants: 11 11 12 - Semi-planar formats use two planes. The firs 12 - Semi-planar formats use two planes. The first plane is the luma plane and 13 stores the Y components. The second plane is 13 stores the Y components. The second plane is the chroma plane and stores the 14 Cb and Cr components interleaved. 14 Cb and Cr components interleaved. 15 15 16 - Fully planar formats use three planes to sto 16 - Fully planar formats use three planes to store the Y, Cb and Cr components 17 separately. 17 separately. 18 18 19 Within a plane, components are stored in pixel 19 Within a plane, components are stored in pixel order, which may be linear or 20 tiled. Padding may be supported at the end of 20 tiled. Padding may be supported at the end of the lines, and the line stride of 21 the chroma planes may be constrained by the li 21 the chroma planes may be constrained by the line stride of the luma plane. 22 22 23 Some planar formats allow planes to be placed 23 Some planar formats allow planes to be placed in independent memory locations. 24 They are identified by an 'M' suffix in their 24 They are identified by an 'M' suffix in their name (such as in 25 ``V4L2_PIX_FMT_NV12M``). Those formats are int 25 ``V4L2_PIX_FMT_NV12M``). Those formats are intended to be used only in drivers 26 and applications that support the multi-planar 26 and applications that support the multi-planar API, described in 27 :ref:`planar-apis`. Unless explicitly document 27 :ref:`planar-apis`. Unless explicitly documented as supporting non-contiguous 28 planes, formats require the planes to follow e 28 planes, formats require the planes to follow each other immediately in memory. 29 29 30 30 31 Semi-Planar YUV Formats 31 Semi-Planar YUV Formats 32 ======================= 32 ======================= 33 33 34 These formats are commonly referred to as NV f 34 These formats are commonly referred to as NV formats (NV12, NV16, ...). They 35 use two planes, and store the luma components 35 use two planes, and store the luma components in the first plane and the chroma 36 components in the second plane. The Cb and Cr 36 components in the second plane. The Cb and Cr components are interleaved in the 37 chroma plane, with Cb and Cr always stored in 37 chroma plane, with Cb and Cr always stored in pairs. The chroma order is 38 exposed as different formats. 38 exposed as different formats. 39 39 40 For memory contiguous formats, the number of p 40 For memory contiguous formats, the number of padding pixels at the end of the 41 chroma lines is identical to the padding of th 41 chroma lines is identical to the padding of the luma lines. Without horizontal 42 subsampling, the chroma line stride (in bytes) 42 subsampling, the chroma line stride (in bytes) is thus equal to twice the luma 43 line stride. With horizontal subsampling by 2, 43 line stride. With horizontal subsampling by 2, the chroma line stride is equal 44 to the luma line stride. Vertical subsampling 44 to the luma line stride. Vertical subsampling doesn't affect the line stride. 45 45 46 For non-contiguous formats, no constraints are 46 For non-contiguous formats, no constraints are enforced by the format on the 47 relationship between the luma and chroma line 47 relationship between the luma and chroma line padding and stride. 48 48 49 All components are stored with the same number 49 All components are stored with the same number of bits per component. 50 50 51 .. raw:: latex 51 .. raw:: latex 52 52 53 \footnotesize 53 \footnotesize 54 54 55 .. tabularcolumns:: |p{5.2cm}|p{1.0cm}|p{1.5cm 55 .. tabularcolumns:: |p{5.2cm}|p{1.0cm}|p{1.5cm}|p{1.9cm}|p{1.2cm}|p{1.8cm}|p{2.7cm}| 56 56 57 .. flat-table:: Overview of Semi-Planar YUV Fo 57 .. flat-table:: Overview of Semi-Planar YUV Formats 58 :header-rows: 1 58 :header-rows: 1 59 :stub-columns: 0 59 :stub-columns: 0 60 60 61 * - Identifier 61 * - Identifier 62 - Code 62 - Code 63 - Bits per component 63 - Bits per component 64 - Subsampling 64 - Subsampling 65 - Chroma order [1]_ 65 - Chroma order [1]_ 66 - Contiguous [2]_ 66 - Contiguous [2]_ 67 - Tiling [3]_ 67 - Tiling [3]_ 68 * - V4L2_PIX_FMT_NV12 68 * - V4L2_PIX_FMT_NV12 69 - 'NV12' 69 - 'NV12' 70 - 8 70 - 8 71 - 4:2:0 71 - 4:2:0 72 - Cb, Cr 72 - Cb, Cr 73 - Yes 73 - Yes 74 - Linear 74 - Linear 75 * - V4L2_PIX_FMT_NV21 75 * - V4L2_PIX_FMT_NV21 76 - 'NV21' 76 - 'NV21' 77 - 8 77 - 8 78 - 4:2:0 78 - 4:2:0 79 - Cr, Cb 79 - Cr, Cb 80 - Yes 80 - Yes 81 - Linear 81 - Linear 82 * - V4L2_PIX_FMT_NV12M 82 * - V4L2_PIX_FMT_NV12M 83 - 'NM12' 83 - 'NM12' 84 - 8 84 - 8 85 - 4:2:0 85 - 4:2:0 86 - Cb, Cr 86 - Cb, Cr 87 - No 87 - No 88 - Linear 88 - Linear 89 * - V4L2_PIX_FMT_NV21M 89 * - V4L2_PIX_FMT_NV21M 90 - 'NM21' 90 - 'NM21' 91 - 8 91 - 8 92 - 4:2:0 92 - 4:2:0 93 - Cr, Cb 93 - Cr, Cb 94 - No 94 - No 95 - Linear 95 - Linear 96 * - V4L2_PIX_FMT_NV12MT 96 * - V4L2_PIX_FMT_NV12MT 97 - 'TM12' 97 - 'TM12' 98 - 8 98 - 8 99 - 4:2:0 99 - 4:2:0 100 - Cb, Cr 100 - Cb, Cr 101 - No 101 - No 102 - 64x32 tiles 102 - 64x32 tiles 103 103 104 Horizontal Z order 104 Horizontal Z order 105 * - V4L2_PIX_FMT_NV12MT_16X16 105 * - V4L2_PIX_FMT_NV12MT_16X16 106 - 'VM12' 106 - 'VM12' 107 - 8 107 - 8 108 - 4:2:2 108 - 4:2:2 109 - Cb, Cr 109 - Cb, Cr 110 - No 110 - No 111 - 16x16 tiles 111 - 16x16 tiles 112 * - V4L2_PIX_FMT_P010 112 * - V4L2_PIX_FMT_P010 113 - 'P010' 113 - 'P010' 114 - 10 114 - 10 115 - 4:2:0 115 - 4:2:0 116 - Cb, Cr 116 - Cb, Cr 117 - Yes 117 - Yes 118 - Linear 118 - Linear 119 * - V4L2_PIX_FMT_P010_4L4 119 * - V4L2_PIX_FMT_P010_4L4 120 - 'T010' 120 - 'T010' 121 - 10 121 - 10 122 - 4:2:0 122 - 4:2:0 123 - Cb, Cr 123 - Cb, Cr 124 - Yes 124 - Yes 125 - 4x4 tiles 125 - 4x4 tiles 126 * - V4L2_PIX_FMT_P012 126 * - V4L2_PIX_FMT_P012 127 - 'P012' 127 - 'P012' 128 - 12 128 - 12 129 - 4:2:0 129 - 4:2:0 130 - Cb, Cr 130 - Cb, Cr 131 - Yes 131 - Yes 132 - Linear 132 - Linear 133 * - V4L2_PIX_FMT_P012M 133 * - V4L2_PIX_FMT_P012M 134 - 'PM12' 134 - 'PM12' 135 - 12 135 - 12 136 - 4:2:0 136 - 4:2:0 137 - Cb, Cr 137 - Cb, Cr 138 - No 138 - No 139 - Linear 139 - Linear 140 * - V4L2_PIX_FMT_NV15_4L4 << 141 - 'VT15' << 142 - 15 << 143 - 4:2:0 << 144 - Cb, Cr << 145 - Yes << 146 - 4x4 tiles << 147 * - V4L2_PIX_FMT_MT2110T << 148 - 'MT2T' << 149 - 15 << 150 - 4:2:0 << 151 - Cb, Cr << 152 - No << 153 - 16x32 / 16x16 tiles tiled low bits << 154 * - V4L2_PIX_FMT_MT2110R << 155 - 'MT2R' << 156 - 15 << 157 - 4:2:0 << 158 - Cb, Cr << 159 - No << 160 - 16x32 / 16x16 tiles raster low bits << 161 * - V4L2_PIX_FMT_NV16 140 * - V4L2_PIX_FMT_NV16 162 - 'NV16' 141 - 'NV16' 163 - 8 142 - 8 164 - 4:2:2 143 - 4:2:2 165 - Cb, Cr 144 - Cb, Cr 166 - Yes 145 - Yes 167 - Linear 146 - Linear 168 * - V4L2_PIX_FMT_NV61 147 * - V4L2_PIX_FMT_NV61 169 - 'NV61' 148 - 'NV61' 170 - 8 149 - 8 171 - 4:2:2 150 - 4:2:2 172 - Cr, Cb 151 - Cr, Cb 173 - Yes 152 - Yes 174 - Linear 153 - Linear 175 * - V4L2_PIX_FMT_NV16M 154 * - V4L2_PIX_FMT_NV16M 176 - 'NM16' 155 - 'NM16' 177 - 8 156 - 8 178 - 4:2:2 157 - 4:2:2 179 - Cb, Cr 158 - Cb, Cr 180 - No 159 - No 181 - Linear 160 - Linear 182 * - V4L2_PIX_FMT_NV61M 161 * - V4L2_PIX_FMT_NV61M 183 - 'NM61' 162 - 'NM61' 184 - 8 163 - 8 185 - 4:2:2 164 - 4:2:2 186 - Cr, Cb 165 - Cr, Cb 187 - No 166 - No 188 - Linear 167 - Linear 189 * - V4L2_PIX_FMT_NV24 168 * - V4L2_PIX_FMT_NV24 190 - 'NV24' 169 - 'NV24' 191 - 8 170 - 8 192 - 4:4:4 171 - 4:4:4 193 - Cb, Cr 172 - Cb, Cr 194 - Yes 173 - Yes 195 - Linear 174 - Linear 196 * - V4L2_PIX_FMT_NV42 175 * - V4L2_PIX_FMT_NV42 197 - 'NV42' 176 - 'NV42' 198 - 8 177 - 8 199 - 4:4:4 178 - 4:4:4 200 - Cr, Cb 179 - Cr, Cb 201 - Yes 180 - Yes 202 - Linear 181 - Linear 203 182 204 .. raw:: latex 183 .. raw:: latex 205 184 206 \normalsize 185 \normalsize 207 186 208 .. [1] Order of chroma samples in the second p 187 .. [1] Order of chroma samples in the second plane 209 .. [2] Indicates if planes have to be contiguo 188 .. [2] Indicates if planes have to be contiguous in memory or can be 210 disjoint 189 disjoint 211 .. [3] Macroblock size in pixels 190 .. [3] Macroblock size in pixels 212 191 213 192 214 **Color Sample Location:** 193 **Color Sample Location:** 215 Chroma samples are :ref:`interstitially sited< 194 Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>` 216 horizontally. 195 horizontally. 217 196 218 197 219 .. _V4L2-PIX-FMT-NV12: 198 .. _V4L2-PIX-FMT-NV12: 220 .. _V4L2-PIX-FMT-NV21: 199 .. _V4L2-PIX-FMT-NV21: 221 .. _V4L2-PIX-FMT-NV12M: 200 .. _V4L2-PIX-FMT-NV12M: 222 .. _V4L2-PIX-FMT-NV21M: 201 .. _V4L2-PIX-FMT-NV21M: 223 .. _V4L2-PIX-FMT-P010: 202 .. _V4L2-PIX-FMT-P010: 224 203 225 NV12, NV21, NV12M and NV21M 204 NV12, NV21, NV12M and NV21M 226 --------------------------- 205 --------------------------- 227 206 228 Semi-planar YUV 4:2:0 formats. The chroma plan 207 Semi-planar YUV 4:2:0 formats. The chroma plane is subsampled by 2 in each 229 direction. Chroma lines contain half the numbe 208 direction. Chroma lines contain half the number of pixels and the same number 230 of bytes as luma lines, and the chroma plane c 209 of bytes as luma lines, and the chroma plane contains half the number of lines 231 of the luma plane. 210 of the luma plane. 232 211 233 .. flat-table:: Sample 4x4 NV12 Image 212 .. flat-table:: Sample 4x4 NV12 Image 234 :header-rows: 0 213 :header-rows: 0 235 :stub-columns: 0 214 :stub-columns: 0 236 215 237 * - start + 0: 216 * - start + 0: 238 - Y'\ :sub:`00` 217 - Y'\ :sub:`00` 239 - Y'\ :sub:`01` 218 - Y'\ :sub:`01` 240 - Y'\ :sub:`02` 219 - Y'\ :sub:`02` 241 - Y'\ :sub:`03` 220 - Y'\ :sub:`03` 242 * - start + 4: 221 * - start + 4: 243 - Y'\ :sub:`10` 222 - Y'\ :sub:`10` 244 - Y'\ :sub:`11` 223 - Y'\ :sub:`11` 245 - Y'\ :sub:`12` 224 - Y'\ :sub:`12` 246 - Y'\ :sub:`13` 225 - Y'\ :sub:`13` 247 * - start + 8: 226 * - start + 8: 248 - Y'\ :sub:`20` 227 - Y'\ :sub:`20` 249 - Y'\ :sub:`21` 228 - Y'\ :sub:`21` 250 - Y'\ :sub:`22` 229 - Y'\ :sub:`22` 251 - Y'\ :sub:`23` 230 - Y'\ :sub:`23` 252 * - start + 12: 231 * - start + 12: 253 - Y'\ :sub:`30` 232 - Y'\ :sub:`30` 254 - Y'\ :sub:`31` 233 - Y'\ :sub:`31` 255 - Y'\ :sub:`32` 234 - Y'\ :sub:`32` 256 - Y'\ :sub:`33` 235 - Y'\ :sub:`33` 257 * - start + 16: 236 * - start + 16: 258 - Cb\ :sub:`00` 237 - Cb\ :sub:`00` 259 - Cr\ :sub:`00` 238 - Cr\ :sub:`00` 260 - Cb\ :sub:`01` 239 - Cb\ :sub:`01` 261 - Cr\ :sub:`01` 240 - Cr\ :sub:`01` 262 * - start + 20: 241 * - start + 20: 263 - Cb\ :sub:`10` 242 - Cb\ :sub:`10` 264 - Cr\ :sub:`10` 243 - Cr\ :sub:`10` 265 - Cb\ :sub:`11` 244 - Cb\ :sub:`11` 266 - Cr\ :sub:`11` 245 - Cr\ :sub:`11` 267 246 268 .. flat-table:: Sample 4x4 NV12M Image 247 .. flat-table:: Sample 4x4 NV12M Image 269 :header-rows: 0 248 :header-rows: 0 270 :stub-columns: 0 249 :stub-columns: 0 271 250 272 * - start0 + 0: 251 * - start0 + 0: 273 - Y'\ :sub:`00` 252 - Y'\ :sub:`00` 274 - Y'\ :sub:`01` 253 - Y'\ :sub:`01` 275 - Y'\ :sub:`02` 254 - Y'\ :sub:`02` 276 - Y'\ :sub:`03` 255 - Y'\ :sub:`03` 277 * - start0 + 4: 256 * - start0 + 4: 278 - Y'\ :sub:`10` 257 - Y'\ :sub:`10` 279 - Y'\ :sub:`11` 258 - Y'\ :sub:`11` 280 - Y'\ :sub:`12` 259 - Y'\ :sub:`12` 281 - Y'\ :sub:`13` 260 - Y'\ :sub:`13` 282 * - start0 + 8: 261 * - start0 + 8: 283 - Y'\ :sub:`20` 262 - Y'\ :sub:`20` 284 - Y'\ :sub:`21` 263 - Y'\ :sub:`21` 285 - Y'\ :sub:`22` 264 - Y'\ :sub:`22` 286 - Y'\ :sub:`23` 265 - Y'\ :sub:`23` 287 * - start0 + 12: 266 * - start0 + 12: 288 - Y'\ :sub:`30` 267 - Y'\ :sub:`30` 289 - Y'\ :sub:`31` 268 - Y'\ :sub:`31` 290 - Y'\ :sub:`32` 269 - Y'\ :sub:`32` 291 - Y'\ :sub:`33` 270 - Y'\ :sub:`33` 292 * - 271 * - 293 * - start1 + 0: 272 * - start1 + 0: 294 - Cb\ :sub:`00` 273 - Cb\ :sub:`00` 295 - Cr\ :sub:`00` 274 - Cr\ :sub:`00` 296 - Cb\ :sub:`01` 275 - Cb\ :sub:`01` 297 - Cr\ :sub:`01` 276 - Cr\ :sub:`01` 298 * - start1 + 4: 277 * - start1 + 4: 299 - Cb\ :sub:`10` 278 - Cb\ :sub:`10` 300 - Cr\ :sub:`10` 279 - Cr\ :sub:`10` 301 - Cb\ :sub:`11` 280 - Cb\ :sub:`11` 302 - Cr\ :sub:`11` 281 - Cr\ :sub:`11` 303 282 304 283 305 .. _V4L2-PIX-FMT-NV12MT: 284 .. _V4L2-PIX-FMT-NV12MT: 306 .. _V4L2-PIX-FMT-NV12MT-16X16: 285 .. _V4L2-PIX-FMT-NV12MT-16X16: 307 .. _V4L2-PIX-FMT-NV12-4L4: 286 .. _V4L2-PIX-FMT-NV12-4L4: 308 .. _V4L2-PIX-FMT-NV12-16L16: 287 .. _V4L2-PIX-FMT-NV12-16L16: 309 .. _V4L2-PIX-FMT-NV12-32L32: 288 .. _V4L2-PIX-FMT-NV12-32L32: 310 .. _V4L2-PIX-FMT-NV12M-8L128: 289 .. _V4L2-PIX-FMT-NV12M-8L128: 311 .. _V4L2-PIX-FMT-NV12-8L128: 290 .. _V4L2-PIX-FMT-NV12-8L128: >> 291 .. _V4L2-PIX-FMT-NV12M-10BE-8L128: >> 292 .. _V4L2-PIX-FMT-NV12-10BE-8L128: 312 .. _V4L2-PIX-FMT-MM21: 293 .. _V4L2-PIX-FMT-MM21: 313 294 314 Tiled NV12 295 Tiled NV12 315 ---------- 296 ---------- 316 297 317 Semi-planar YUV 4:2:0 formats, using macrobloc 298 Semi-planar YUV 4:2:0 formats, using macroblock tiling. The chroma plane is 318 subsampled by 2 in each direction. Chroma line 299 subsampled by 2 in each direction. Chroma lines contain half the number of 319 pixels and the same number of bytes as luma li 300 pixels and the same number of bytes as luma lines, and the chroma plane 320 contains half the number of lines of the luma 301 contains half the number of lines of the luma plane. Each tile follows the 321 previous one linearly in memory (from left to 302 previous one linearly in memory (from left to right, top to bottom). 322 303 323 ``V4L2_PIX_FMT_NV12MT_16X16`` is similar to `` 304 ``V4L2_PIX_FMT_NV12MT_16X16`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 324 pixels in 2D 16x16 tiles, and stores tiles lin 305 pixels in 2D 16x16 tiles, and stores tiles linearly in memory. 325 The line stride and image height must be align 306 The line stride and image height must be aligned to a multiple of 16. 326 The layouts of the luma and chroma planes are 307 The layouts of the luma and chroma planes are identical. 327 308 328 ``V4L2_PIX_FMT_NV12MT`` is similar to ``V4L2_P 309 ``V4L2_PIX_FMT_NV12MT`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 329 pixels in 2D 64x32 tiles, and stores 2x2 group 310 pixels in 2D 64x32 tiles, and stores 2x2 groups of tiles in 330 Z-order in memory, alternating Z and mirrored 311 Z-order in memory, alternating Z and mirrored Z shapes horizontally. 331 The line stride must be a multiple of 128 pixe 312 The line stride must be a multiple of 128 pixels to ensure an 332 integer number of Z shapes. The image height m 313 integer number of Z shapes. The image height must be a multiple of 32 pixels. 333 If the vertical resolution is an odd number of 314 If the vertical resolution is an odd number of tiles, the last row of 334 tiles is stored in linear order. The layouts o 315 tiles is stored in linear order. The layouts of the luma and chroma 335 planes are identical. 316 planes are identical. 336 317 337 .. _nv12mt: << 338 << 339 .. kernel-figure:: nv12mt.svg << 340 :alt: nv12mt.svg << 341 :align: center << 342 << 343 V4L2_PIX_FMT_NV12MT macroblock Z shape mem << 344 << 345 .. _nv12mt_ex: << 346 << 347 .. kernel-figure:: nv12mt_example.svg << 348 :alt: nv12mt_example.svg << 349 :align: center << 350 << 351 Example V4L2_PIX_FMT_NV12MT memory layout << 352 << 353 ``V4L2_PIX_FMT_NV12_4L4`` stores pixels in 4x4 318 ``V4L2_PIX_FMT_NV12_4L4`` stores pixels in 4x4 tiles, and stores 354 tiles linearly in memory. The line stride and 319 tiles linearly in memory. The line stride and image height must be 355 aligned to a multiple of 4. The layouts of the 320 aligned to a multiple of 4. The layouts of the luma and chroma planes are 356 identical. 321 identical. 357 322 358 ``V4L2_PIX_FMT_NV12_16L16`` stores pixels in 1 323 ``V4L2_PIX_FMT_NV12_16L16`` stores pixels in 16x16 tiles, and stores 359 tiles linearly in memory. The line stride and 324 tiles linearly in memory. The line stride and image height must be 360 aligned to a multiple of 16. The layouts of th 325 aligned to a multiple of 16. The layouts of the luma and chroma planes are 361 identical. 326 identical. 362 327 363 ``V4L2_PIX_FMT_NV12_32L32`` stores pixels in 3 328 ``V4L2_PIX_FMT_NV12_32L32`` stores pixels in 32x32 tiles, and stores 364 tiles linearly in memory. The line stride and 329 tiles linearly in memory. The line stride and image height must be 365 aligned to a multiple of 32. The layouts of th 330 aligned to a multiple of 32. The layouts of the luma and chroma planes are 366 identical. 331 identical. 367 332 368 ``V4L2_PIX_FMT_NV12M_8L128`` is similar to ``V 333 ``V4L2_PIX_FMT_NV12M_8L128`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 369 pixels in 2D 8x128 tiles, and stores tiles lin 334 pixels in 2D 8x128 tiles, and stores tiles linearly in memory. 370 The image height must be aligned to a multiple 335 The image height must be aligned to a multiple of 128. 371 The layouts of the luma and chroma planes are 336 The layouts of the luma and chroma planes are identical. 372 337 373 ``V4L2_PIX_FMT_NV12_8L128`` is similar to ``V4 338 ``V4L2_PIX_FMT_NV12_8L128`` is similar to ``V4L2_PIX_FMT_NV12M_8L128`` but stores 374 two planes in one memory. 339 two planes in one memory. 375 340 376 ``V4L2_PIX_FMT_MM21`` store luma pixel in 16x3 << 377 in 16x16 tiles. The line stride must be aligne << 378 image height must be aligned to a multiple of << 379 tiles are identical, even though the tile size << 380 two non-contiguous planes. << 381 << 382 << 383 .. _V4L2-PIX-FMT-NV15-4L4: << 384 .. _V4L2-PIX-FMT-NV12M-10BE-8L128: << 385 .. _V4L2-PIX-FMT-NV12-10BE-8L128: << 386 .. _V4L2-PIX-FMT-MT2110T: << 387 .. _V4L2-PIX-FMT-MT2110R: << 388 << 389 Tiled NV15 << 390 ---------- << 391 << 392 ``V4L2_PIX_FMT_NV15_4L4`` Semi-planar 10-bit Y << 393 All components are packed without any padding << 394 As a side-effect, each group of 4 components a << 395 (YYYY or UVUV = 4 * 10 bits = 40 bits = 5 byte << 396 << 397 ``V4L2_PIX_FMT_NV12M_10BE_8L128`` is similar t 341 ``V4L2_PIX_FMT_NV12M_10BE_8L128`` is similar to ``V4L2_PIX_FMT_NV12M`` but stores 398 10 bits pixels in 2D 8x128 tiles, and stores t 342 10 bits pixels in 2D 8x128 tiles, and stores tiles linearly in memory. 399 the data is arranged in big endian order. 343 the data is arranged in big endian order. 400 The image height must be aligned to a multiple 344 The image height must be aligned to a multiple of 128. 401 The layouts of the luma and chroma planes are 345 The layouts of the luma and chroma planes are identical. 402 Note the tile size is 8bytes multiplied by 128 346 Note the tile size is 8bytes multiplied by 128 bytes, 403 it means that the low bits and high bits of on 347 it means that the low bits and high bits of one pixel may be in different tiles. 404 The 10 bit pixels are packed, so 5 bytes conta 348 The 10 bit pixels are packed, so 5 bytes contain 4 10-bit pixels layout like 405 this (for luma): 349 this (for luma): 406 byte 0: Y0(bits 9-2) 350 byte 0: Y0(bits 9-2) 407 byte 1: Y0(bits 1-0) Y1(bits 9-4) 351 byte 1: Y0(bits 1-0) Y1(bits 9-4) 408 byte 2: Y1(bits 3-0) Y2(bits 9-6) 352 byte 2: Y1(bits 3-0) Y2(bits 9-6) 409 byte 3: Y2(bits 5-0) Y3(bits 9-8) 353 byte 3: Y2(bits 5-0) Y3(bits 9-8) 410 byte 4: Y3(bits 7-0) 354 byte 4: Y3(bits 7-0) 411 355 412 ``V4L2_PIX_FMT_NV12_10BE_8L128`` is similar to 356 ``V4L2_PIX_FMT_NV12_10BE_8L128`` is similar to ``V4L2_PIX_FMT_NV12M_10BE_8L128`` but stores 413 two planes in one memory. 357 two planes in one memory. 414 358 415 ``V4L2_PIX_FMT_MT2110T`` is one of Mediatek pa !! 359 ``V4L2_PIX_FMT_MM21`` store luma pixel in 16x32 tiles, and chroma pixels 416 It is fully packed 10bit 4:2:0 format like NV1 !! 360 in 16x16 tiles. The line stride must be aligned to a multiple of 16 and the 417 that the lower two bits data is stored in sepa !! 361 image height must be aligned to a multiple of 32. The number of luma and chroma 418 composed of 16x32 luma tiles, and 16x16 chroma !! 362 tiles are identical, even though the tile size differ. The image is formed of 419 long, divided into 8 partitions of 80 bytes. !! 363 two non-contiguous planes. 420 partition represent the 2 least significant bi !! 364 421 64 bytes represent the 8 most significant bits !! 365 .. _nv12mt: 422 366 423 .. kernel-figure:: mt2110t.svg !! 367 .. kernel-figure:: nv12mt.svg 424 :alt: mt2110t.svg !! 368 :alt: nv12mt.svg 425 :align: center 369 :align: center 426 370 427 Layout of MT2110T Chroma Tile !! 371 V4L2_PIX_FMT_NV12MT macroblock Z shape memory layout 428 372 429 Filtering out the upper part of each partition !! 373 .. _nv12mt_ex: 430 ``V4L2_PIX_FMT_MM21`` frame. A partition is a << 431 lower two bits is said to be tiled since each << 432 bits of the column of for pixel matching the s << 433 only have 4 partitions. << 434 << 435 .. flat-table:: MT2110T LSB bits layout << 436 :header-rows: 1 << 437 :stub-columns: 1 << 438 374 439 * - !! 375 .. kernel-figure:: nv12mt_example.svg 440 - start + 0: !! 376 :alt: nv12mt_example.svg 441 - start + 1: !! 377 :align: center 442 - . . . << 443 - start\ +\ 15: << 444 * - Bits 1:0 << 445 - Y'\ :sub:`0:0` << 446 - Y'\ :sub:`0:1` << 447 - . . . << 448 - Y'\ :sub:`0:15` << 449 * - Bit 3:2 << 450 - Y'\ :sub:`1:0` << 451 - Y'\ :sub:`1:1` << 452 - . . . << 453 - Y'\ :sub:`1:15` << 454 * - Bits 5:4 << 455 - Y'\ :sub:`2:0` << 456 - Y'\ :sub:`2:1` << 457 - . . . << 458 - Y'\ :sub:`2:15` << 459 * - Bits 7:6 << 460 - Y'\ :sub:`3:0` << 461 - Y'\ :sub:`3:1` << 462 - . . . << 463 - Y'\ :sub:`3:15` << 464 << 465 ``V4L2_PIX_FMT_MT2110R`` is identical to ``V4L << 466 the least significant two bits layout is in ra << 467 contains 4 pixels of the first row, with 4 byt << 468 << 469 .. flat-table:: MT2110R LSB bits layout << 470 :header-rows: 2 << 471 :stub-columns: 1 << 472 378 473 * - !! 379 Example V4L2_PIX_FMT_NV12MT memory layout of tiles 474 - :cspan:`3` Byte 0 << 475 - ... << 476 - :cspan:`3` Byte 3 << 477 * - << 478 - 7:6 << 479 - 5:4 << 480 - 3:2 << 481 - 1:0 << 482 - ... << 483 - 7:6 << 484 - 5:4 << 485 - 3:2 << 486 - 1:0 << 487 * - start + 0: << 488 - Y'\ :sub:`0:3` << 489 - Y'\ :sub:`0:2` << 490 - Y'\ :sub:`0:1` << 491 - Y'\ :sub:`0:0` << 492 - ... << 493 - Y'\ :sub:`0:15` << 494 - Y'\ :sub:`0:14` << 495 - Y'\ :sub:`0:13` << 496 - Y'\ :sub:`0:12` << 497 * - start + 4: << 498 - Y'\ :sub:`1:3` << 499 - Y'\ :sub:`1:2` << 500 - Y'\ :sub:`1:1` << 501 - Y'\ :sub:`1:0` << 502 - ... << 503 - Y'\ :sub:`1:15` << 504 - Y'\ :sub:`1:14` << 505 - Y'\ :sub:`1:13` << 506 - Y'\ :sub:`1:12` << 507 * - start + 8: << 508 - Y'\ :sub:`2:3` << 509 - Y'\ :sub:`2:2` << 510 - Y'\ :sub:`2:1` << 511 - Y'\ :sub:`2:0` << 512 - ... << 513 - Y'\ :sub:`2:15` << 514 - Y'\ :sub:`2:14` << 515 - Y'\ :sub:`2:13` << 516 - Y'\ :sub:`2:12` << 517 * - start\ +\ 12: << 518 - Y'\ :sub:`3:3` << 519 - Y'\ :sub:`3:2` << 520 - Y'\ :sub:`3:1` << 521 - Y'\ :sub:`3:0` << 522 - ... << 523 - Y'\ :sub:`3:15` << 524 - Y'\ :sub:`3:14` << 525 - Y'\ :sub:`3:13` << 526 - Y'\ :sub:`3:12` << 527 380 528 381 529 .. _V4L2-PIX-FMT-NV16: 382 .. _V4L2-PIX-FMT-NV16: 530 .. _V4L2-PIX-FMT-NV61: 383 .. _V4L2-PIX-FMT-NV61: 531 .. _V4L2-PIX-FMT-NV16M: 384 .. _V4L2-PIX-FMT-NV16M: 532 .. _V4L2-PIX-FMT-NV61M: 385 .. _V4L2-PIX-FMT-NV61M: 533 386 534 NV16, NV61, NV16M and NV61M 387 NV16, NV61, NV16M and NV61M 535 --------------------------- 388 --------------------------- 536 389 537 Semi-planar YUV 4:2:2 formats. The chroma plan 390 Semi-planar YUV 4:2:2 formats. The chroma plane is subsampled by 2 in the 538 horizontal direction. Chroma lines contain hal 391 horizontal direction. Chroma lines contain half the number of pixels and the 539 same number of bytes as luma lines, and the ch 392 same number of bytes as luma lines, and the chroma plane contains the same 540 number of lines as the luma plane. 393 number of lines as the luma plane. 541 394 542 .. flat-table:: Sample 4x4 NV16 Image 395 .. flat-table:: Sample 4x4 NV16 Image 543 :header-rows: 0 396 :header-rows: 0 544 :stub-columns: 0 397 :stub-columns: 0 545 398 546 * - start + 0: 399 * - start + 0: 547 - Y'\ :sub:`00` 400 - Y'\ :sub:`00` 548 - Y'\ :sub:`01` 401 - Y'\ :sub:`01` 549 - Y'\ :sub:`02` 402 - Y'\ :sub:`02` 550 - Y'\ :sub:`03` 403 - Y'\ :sub:`03` 551 * - start + 4: 404 * - start + 4: 552 - Y'\ :sub:`10` 405 - Y'\ :sub:`10` 553 - Y'\ :sub:`11` 406 - Y'\ :sub:`11` 554 - Y'\ :sub:`12` 407 - Y'\ :sub:`12` 555 - Y'\ :sub:`13` 408 - Y'\ :sub:`13` 556 * - start + 8: 409 * - start + 8: 557 - Y'\ :sub:`20` 410 - Y'\ :sub:`20` 558 - Y'\ :sub:`21` 411 - Y'\ :sub:`21` 559 - Y'\ :sub:`22` 412 - Y'\ :sub:`22` 560 - Y'\ :sub:`23` 413 - Y'\ :sub:`23` 561 * - start + 12: 414 * - start + 12: 562 - Y'\ :sub:`30` 415 - Y'\ :sub:`30` 563 - Y'\ :sub:`31` 416 - Y'\ :sub:`31` 564 - Y'\ :sub:`32` 417 - Y'\ :sub:`32` 565 - Y'\ :sub:`33` 418 - Y'\ :sub:`33` 566 * - start + 16: 419 * - start + 16: 567 - Cb\ :sub:`00` 420 - Cb\ :sub:`00` 568 - Cr\ :sub:`00` 421 - Cr\ :sub:`00` 569 - Cb\ :sub:`01` 422 - Cb\ :sub:`01` 570 - Cr\ :sub:`01` 423 - Cr\ :sub:`01` 571 * - start + 20: 424 * - start + 20: 572 - Cb\ :sub:`10` 425 - Cb\ :sub:`10` 573 - Cr\ :sub:`10` 426 - Cr\ :sub:`10` 574 - Cb\ :sub:`11` 427 - Cb\ :sub:`11` 575 - Cr\ :sub:`11` 428 - Cr\ :sub:`11` 576 * - start + 24: 429 * - start + 24: 577 - Cb\ :sub:`20` 430 - Cb\ :sub:`20` 578 - Cr\ :sub:`20` 431 - Cr\ :sub:`20` 579 - Cb\ :sub:`21` 432 - Cb\ :sub:`21` 580 - Cr\ :sub:`21` 433 - Cr\ :sub:`21` 581 * - start + 28: 434 * - start + 28: 582 - Cb\ :sub:`30` 435 - Cb\ :sub:`30` 583 - Cr\ :sub:`30` 436 - Cr\ :sub:`30` 584 - Cb\ :sub:`31` 437 - Cb\ :sub:`31` 585 - Cr\ :sub:`31` 438 - Cr\ :sub:`31` 586 439 587 .. flat-table:: Sample 4x4 NV16M Image 440 .. flat-table:: Sample 4x4 NV16M Image 588 :header-rows: 0 441 :header-rows: 0 589 :stub-columns: 0 442 :stub-columns: 0 590 443 591 * - start0 + 0: 444 * - start0 + 0: 592 - Y'\ :sub:`00` 445 - Y'\ :sub:`00` 593 - Y'\ :sub:`01` 446 - Y'\ :sub:`01` 594 - Y'\ :sub:`02` 447 - Y'\ :sub:`02` 595 - Y'\ :sub:`03` 448 - Y'\ :sub:`03` 596 * - start0 + 4: 449 * - start0 + 4: 597 - Y'\ :sub:`10` 450 - Y'\ :sub:`10` 598 - Y'\ :sub:`11` 451 - Y'\ :sub:`11` 599 - Y'\ :sub:`12` 452 - Y'\ :sub:`12` 600 - Y'\ :sub:`13` 453 - Y'\ :sub:`13` 601 * - start0 + 8: 454 * - start0 + 8: 602 - Y'\ :sub:`20` 455 - Y'\ :sub:`20` 603 - Y'\ :sub:`21` 456 - Y'\ :sub:`21` 604 - Y'\ :sub:`22` 457 - Y'\ :sub:`22` 605 - Y'\ :sub:`23` 458 - Y'\ :sub:`23` 606 * - start0 + 12: 459 * - start0 + 12: 607 - Y'\ :sub:`30` 460 - Y'\ :sub:`30` 608 - Y'\ :sub:`31` 461 - Y'\ :sub:`31` 609 - Y'\ :sub:`32` 462 - Y'\ :sub:`32` 610 - Y'\ :sub:`33` 463 - Y'\ :sub:`33` 611 * - 464 * - 612 * - start1 + 0: 465 * - start1 + 0: 613 - Cb\ :sub:`00` 466 - Cb\ :sub:`00` 614 - Cr\ :sub:`00` 467 - Cr\ :sub:`00` 615 - Cb\ :sub:`02` 468 - Cb\ :sub:`02` 616 - Cr\ :sub:`02` 469 - Cr\ :sub:`02` 617 * - start1 + 4: 470 * - start1 + 4: 618 - Cb\ :sub:`10` 471 - Cb\ :sub:`10` 619 - Cr\ :sub:`10` 472 - Cr\ :sub:`10` 620 - Cb\ :sub:`12` 473 - Cb\ :sub:`12` 621 - Cr\ :sub:`12` 474 - Cr\ :sub:`12` 622 * - start1 + 8: 475 * - start1 + 8: 623 - Cb\ :sub:`20` 476 - Cb\ :sub:`20` 624 - Cr\ :sub:`20` 477 - Cr\ :sub:`20` 625 - Cb\ :sub:`22` 478 - Cb\ :sub:`22` 626 - Cr\ :sub:`22` 479 - Cr\ :sub:`22` 627 * - start1 + 12: 480 * - start1 + 12: 628 - Cb\ :sub:`30` 481 - Cb\ :sub:`30` 629 - Cr\ :sub:`30` 482 - Cr\ :sub:`30` 630 - Cb\ :sub:`32` 483 - Cb\ :sub:`32` 631 - Cr\ :sub:`32` 484 - Cr\ :sub:`32` 632 485 633 486 634 .. _V4L2-PIX-FMT-NV24: 487 .. _V4L2-PIX-FMT-NV24: 635 .. _V4L2-PIX-FMT-NV42: 488 .. _V4L2-PIX-FMT-NV42: 636 489 637 NV24 and NV42 490 NV24 and NV42 638 ------------- 491 ------------- 639 492 640 Semi-planar YUV 4:4:4 formats. The chroma plan 493 Semi-planar YUV 4:4:4 formats. The chroma plane is not subsampled. 641 Chroma lines contain the same number of pixels 494 Chroma lines contain the same number of pixels and twice the 642 number of bytes as luma lines, and the chroma 495 number of bytes as luma lines, and the chroma plane contains the same 643 number of lines as the luma plane. 496 number of lines as the luma plane. 644 497 645 .. flat-table:: Sample 4x4 NV24 Image 498 .. flat-table:: Sample 4x4 NV24 Image 646 :header-rows: 0 499 :header-rows: 0 647 :stub-columns: 0 500 :stub-columns: 0 648 501 649 * - start + 0: 502 * - start + 0: 650 - Y'\ :sub:`00` 503 - Y'\ :sub:`00` 651 - Y'\ :sub:`01` 504 - Y'\ :sub:`01` 652 - Y'\ :sub:`02` 505 - Y'\ :sub:`02` 653 - Y'\ :sub:`03` 506 - Y'\ :sub:`03` 654 * - start + 4: 507 * - start + 4: 655 - Y'\ :sub:`10` 508 - Y'\ :sub:`10` 656 - Y'\ :sub:`11` 509 - Y'\ :sub:`11` 657 - Y'\ :sub:`12` 510 - Y'\ :sub:`12` 658 - Y'\ :sub:`13` 511 - Y'\ :sub:`13` 659 * - start + 8: 512 * - start + 8: 660 - Y'\ :sub:`20` 513 - Y'\ :sub:`20` 661 - Y'\ :sub:`21` 514 - Y'\ :sub:`21` 662 - Y'\ :sub:`22` 515 - Y'\ :sub:`22` 663 - Y'\ :sub:`23` 516 - Y'\ :sub:`23` 664 * - start + 12: 517 * - start + 12: 665 - Y'\ :sub:`30` 518 - Y'\ :sub:`30` 666 - Y'\ :sub:`31` 519 - Y'\ :sub:`31` 667 - Y'\ :sub:`32` 520 - Y'\ :sub:`32` 668 - Y'\ :sub:`33` 521 - Y'\ :sub:`33` 669 * - start + 16: 522 * - start + 16: 670 - Cb\ :sub:`00` 523 - Cb\ :sub:`00` 671 - Cr\ :sub:`00` 524 - Cr\ :sub:`00` 672 - Cb\ :sub:`01` 525 - Cb\ :sub:`01` 673 - Cr\ :sub:`01` 526 - Cr\ :sub:`01` 674 - Cb\ :sub:`02` 527 - Cb\ :sub:`02` 675 - Cr\ :sub:`02` 528 - Cr\ :sub:`02` 676 - Cb\ :sub:`03` 529 - Cb\ :sub:`03` 677 - Cr\ :sub:`03` 530 - Cr\ :sub:`03` 678 * - start + 24: 531 * - start + 24: 679 - Cb\ :sub:`10` 532 - Cb\ :sub:`10` 680 - Cr\ :sub:`10` 533 - Cr\ :sub:`10` 681 - Cb\ :sub:`11` 534 - Cb\ :sub:`11` 682 - Cr\ :sub:`11` 535 - Cr\ :sub:`11` 683 - Cb\ :sub:`12` 536 - Cb\ :sub:`12` 684 - Cr\ :sub:`12` 537 - Cr\ :sub:`12` 685 - Cb\ :sub:`13` 538 - Cb\ :sub:`13` 686 - Cr\ :sub:`13` 539 - Cr\ :sub:`13` 687 * - start + 32: 540 * - start + 32: 688 - Cb\ :sub:`20` 541 - Cb\ :sub:`20` 689 - Cr\ :sub:`20` 542 - Cr\ :sub:`20` 690 - Cb\ :sub:`21` 543 - Cb\ :sub:`21` 691 - Cr\ :sub:`21` 544 - Cr\ :sub:`21` 692 - Cb\ :sub:`22` 545 - Cb\ :sub:`22` 693 - Cr\ :sub:`22` 546 - Cr\ :sub:`22` 694 - Cb\ :sub:`23` 547 - Cb\ :sub:`23` 695 - Cr\ :sub:`23` 548 - Cr\ :sub:`23` 696 * - start + 40: 549 * - start + 40: 697 - Cb\ :sub:`30` 550 - Cb\ :sub:`30` 698 - Cr\ :sub:`30` 551 - Cr\ :sub:`30` 699 - Cb\ :sub:`31` 552 - Cb\ :sub:`31` 700 - Cr\ :sub:`31` 553 - Cr\ :sub:`31` 701 - Cb\ :sub:`32` 554 - Cb\ :sub:`32` 702 - Cr\ :sub:`32` 555 - Cr\ :sub:`32` 703 - Cb\ :sub:`33` 556 - Cb\ :sub:`33` 704 - Cr\ :sub:`33` 557 - Cr\ :sub:`33` 705 558 706 .. _V4L2_PIX_FMT_P010: 559 .. _V4L2_PIX_FMT_P010: 707 .. _V4L2-PIX-FMT-P010-4L4: 560 .. _V4L2-PIX-FMT-P010-4L4: 708 561 709 P010 and tiled P010 562 P010 and tiled P010 710 ------------------- 563 ------------------- 711 564 712 P010 is like NV12 with 10 bits per component, 565 P010 is like NV12 with 10 bits per component, expanded to 16 bits. 713 Data in the 10 high bits, zeros in the 6 low b 566 Data in the 10 high bits, zeros in the 6 low bits, arranged in little endian order. 714 567 715 .. flat-table:: Sample 4x4 P010 Image 568 .. flat-table:: Sample 4x4 P010 Image 716 :header-rows: 0 569 :header-rows: 0 717 :stub-columns: 0 570 :stub-columns: 0 718 571 719 * - start + 0: 572 * - start + 0: 720 - Y'\ :sub:`00` 573 - Y'\ :sub:`00` 721 - Y'\ :sub:`01` 574 - Y'\ :sub:`01` 722 - Y'\ :sub:`02` 575 - Y'\ :sub:`02` 723 - Y'\ :sub:`03` 576 - Y'\ :sub:`03` 724 * - start + 8: 577 * - start + 8: 725 - Y'\ :sub:`10` 578 - Y'\ :sub:`10` 726 - Y'\ :sub:`11` 579 - Y'\ :sub:`11` 727 - Y'\ :sub:`12` 580 - Y'\ :sub:`12` 728 - Y'\ :sub:`13` 581 - Y'\ :sub:`13` 729 * - start + 16: 582 * - start + 16: 730 - Y'\ :sub:`20` 583 - Y'\ :sub:`20` 731 - Y'\ :sub:`21` 584 - Y'\ :sub:`21` 732 - Y'\ :sub:`22` 585 - Y'\ :sub:`22` 733 - Y'\ :sub:`23` 586 - Y'\ :sub:`23` 734 * - start + 24: 587 * - start + 24: 735 - Y'\ :sub:`30` 588 - Y'\ :sub:`30` 736 - Y'\ :sub:`31` 589 - Y'\ :sub:`31` 737 - Y'\ :sub:`32` 590 - Y'\ :sub:`32` 738 - Y'\ :sub:`33` 591 - Y'\ :sub:`33` 739 * - start + 32: 592 * - start + 32: 740 - Cb\ :sub:`00` 593 - Cb\ :sub:`00` 741 - Cr\ :sub:`00` 594 - Cr\ :sub:`00` 742 - Cb\ :sub:`01` 595 - Cb\ :sub:`01` 743 - Cr\ :sub:`01` 596 - Cr\ :sub:`01` 744 * - start + 40: 597 * - start + 40: 745 - Cb\ :sub:`10` 598 - Cb\ :sub:`10` 746 - Cr\ :sub:`10` 599 - Cr\ :sub:`10` 747 - Cb\ :sub:`11` 600 - Cb\ :sub:`11` 748 - Cr\ :sub:`11` 601 - Cr\ :sub:`11` 749 602 750 .. _V4L2-PIX-FMT-P012: 603 .. _V4L2-PIX-FMT-P012: 751 .. _V4L2-PIX-FMT-P012M: 604 .. _V4L2-PIX-FMT-P012M: 752 605 753 P012 and P012M 606 P012 and P012M 754 -------------- 607 -------------- 755 608 756 P012 is like NV12 with 12 bits per component, 609 P012 is like NV12 with 12 bits per component, expanded to 16 bits. 757 Data in the 12 high bits, zeros in the 4 low b 610 Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order. 758 611 759 .. flat-table:: Sample 4x4 P012 Image 612 .. flat-table:: Sample 4x4 P012 Image 760 :header-rows: 0 613 :header-rows: 0 761 :stub-columns: 0 614 :stub-columns: 0 762 615 763 * - start + 0: 616 * - start + 0: 764 - Y'\ :sub:`00` 617 - Y'\ :sub:`00` 765 - Y'\ :sub:`01` 618 - Y'\ :sub:`01` 766 - Y'\ :sub:`02` 619 - Y'\ :sub:`02` 767 - Y'\ :sub:`03` 620 - Y'\ :sub:`03` 768 * - start + 8: 621 * - start + 8: 769 - Y'\ :sub:`10` 622 - Y'\ :sub:`10` 770 - Y'\ :sub:`11` 623 - Y'\ :sub:`11` 771 - Y'\ :sub:`12` 624 - Y'\ :sub:`12` 772 - Y'\ :sub:`13` 625 - Y'\ :sub:`13` 773 * - start + 16: 626 * - start + 16: 774 - Y'\ :sub:`20` 627 - Y'\ :sub:`20` 775 - Y'\ :sub:`21` 628 - Y'\ :sub:`21` 776 - Y'\ :sub:`22` 629 - Y'\ :sub:`22` 777 - Y'\ :sub:`23` 630 - Y'\ :sub:`23` 778 * - start + 24: 631 * - start + 24: 779 - Y'\ :sub:`30` 632 - Y'\ :sub:`30` 780 - Y'\ :sub:`31` 633 - Y'\ :sub:`31` 781 - Y'\ :sub:`32` 634 - Y'\ :sub:`32` 782 - Y'\ :sub:`33` 635 - Y'\ :sub:`33` 783 * - start + 32: 636 * - start + 32: 784 - Cb\ :sub:`00` 637 - Cb\ :sub:`00` 785 - Cr\ :sub:`00` 638 - Cr\ :sub:`00` 786 - Cb\ :sub:`01` 639 - Cb\ :sub:`01` 787 - Cr\ :sub:`01` 640 - Cr\ :sub:`01` 788 * - start + 40: 641 * - start + 40: 789 - Cb\ :sub:`10` 642 - Cb\ :sub:`10` 790 - Cr\ :sub:`10` 643 - Cr\ :sub:`10` 791 - Cb\ :sub:`11` 644 - Cb\ :sub:`11` 792 - Cr\ :sub:`11` 645 - Cr\ :sub:`11` 793 646 794 .. flat-table:: Sample 4x4 P012M Image 647 .. flat-table:: Sample 4x4 P012M Image 795 :header-rows: 0 648 :header-rows: 0 796 :stub-columns: 0 649 :stub-columns: 0 797 650 798 * - start0 + 0: 651 * - start0 + 0: 799 - Y'\ :sub:`00` 652 - Y'\ :sub:`00` 800 - Y'\ :sub:`01` 653 - Y'\ :sub:`01` 801 - Y'\ :sub:`02` 654 - Y'\ :sub:`02` 802 - Y'\ :sub:`03` 655 - Y'\ :sub:`03` 803 * - start0 + 8: 656 * - start0 + 8: 804 - Y'\ :sub:`10` 657 - Y'\ :sub:`10` 805 - Y'\ :sub:`11` 658 - Y'\ :sub:`11` 806 - Y'\ :sub:`12` 659 - Y'\ :sub:`12` 807 - Y'\ :sub:`13` 660 - Y'\ :sub:`13` 808 * - start0 + 16: 661 * - start0 + 16: 809 - Y'\ :sub:`20` 662 - Y'\ :sub:`20` 810 - Y'\ :sub:`21` 663 - Y'\ :sub:`21` 811 - Y'\ :sub:`22` 664 - Y'\ :sub:`22` 812 - Y'\ :sub:`23` 665 - Y'\ :sub:`23` 813 * - start0 + 24: 666 * - start0 + 24: 814 - Y'\ :sub:`30` 667 - Y'\ :sub:`30` 815 - Y'\ :sub:`31` 668 - Y'\ :sub:`31` 816 - Y'\ :sub:`32` 669 - Y'\ :sub:`32` 817 - Y'\ :sub:`33` 670 - Y'\ :sub:`33` 818 * - 671 * - 819 * - start1 + 0: 672 * - start1 + 0: 820 - Cb\ :sub:`00` 673 - Cb\ :sub:`00` 821 - Cr\ :sub:`00` 674 - Cr\ :sub:`00` 822 - Cb\ :sub:`01` 675 - Cb\ :sub:`01` 823 - Cr\ :sub:`01` 676 - Cr\ :sub:`01` 824 * - start1 + 8: 677 * - start1 + 8: 825 - Cb\ :sub:`10` 678 - Cb\ :sub:`10` 826 - Cr\ :sub:`10` 679 - Cr\ :sub:`10` 827 - Cb\ :sub:`11` 680 - Cb\ :sub:`11` 828 - Cr\ :sub:`11` 681 - Cr\ :sub:`11` 829 682 830 683 831 Fully Planar YUV Formats 684 Fully Planar YUV Formats 832 ======================== 685 ======================== 833 686 834 These formats store the Y, Cb and Cr component 687 These formats store the Y, Cb and Cr components in three separate planes. The 835 luma plane comes first, and the order of the t 688 luma plane comes first, and the order of the two chroma planes varies between 836 formats. The two chroma planes always use the 689 formats. The two chroma planes always use the same subsampling. 837 690 838 For memory contiguous formats, the number of p 691 For memory contiguous formats, the number of padding pixels at the end of the 839 chroma lines is identical to the padding of th 692 chroma lines is identical to the padding of the luma lines. The chroma line 840 stride (in bytes) is thus equal to the luma li 693 stride (in bytes) is thus equal to the luma line stride divided by the 841 horizontal subsampling factor. Vertical subsam 694 horizontal subsampling factor. Vertical subsampling doesn't affect the line 842 stride. 695 stride. 843 696 844 For non-contiguous formats, no constraints are 697 For non-contiguous formats, no constraints are enforced by the format on the 845 relationship between the luma and chroma line 698 relationship between the luma and chroma line padding and stride. 846 699 847 All components are stored with the same number 700 All components are stored with the same number of bits per component. 848 701 849 ``V4L2_PIX_FMT_P010_4L4`` stores pixels in 4x4 702 ``V4L2_PIX_FMT_P010_4L4`` stores pixels in 4x4 tiles, and stores tiles linearly 850 in memory. The line stride must be aligned to 703 in memory. The line stride must be aligned to multiple of 8 and image height to 851 a multiple of 4. The layouts of the luma and c 704 a multiple of 4. The layouts of the luma and chroma planes are identical. 852 705 853 .. raw:: latex 706 .. raw:: latex 854 707 855 \small 708 \small 856 709 857 .. tabularcolumns:: |p{5.0cm}|p{1.1cm}|p{1.5cm 710 .. tabularcolumns:: |p{5.0cm}|p{1.1cm}|p{1.5cm}|p{2.2cm}|p{1.2cm}|p{3.7cm}| 858 711 859 .. flat-table:: Overview of Fully Planar YUV F 712 .. flat-table:: Overview of Fully Planar YUV Formats 860 :header-rows: 1 713 :header-rows: 1 861 :stub-columns: 0 714 :stub-columns: 0 862 715 863 * - Identifier 716 * - Identifier 864 - Code 717 - Code 865 - Bits per component 718 - Bits per component 866 - Subsampling 719 - Subsampling 867 - Planes order [4]_ 720 - Planes order [4]_ 868 - Contiguous [5]_ 721 - Contiguous [5]_ 869 722 870 * - V4L2_PIX_FMT_YUV410 723 * - V4L2_PIX_FMT_YUV410 871 - 'YUV9' 724 - 'YUV9' 872 - 8 725 - 8 873 - 4:1:0 726 - 4:1:0 874 - Y, Cb, Cr 727 - Y, Cb, Cr 875 - Yes 728 - Yes 876 * - V4L2_PIX_FMT_YVU410 729 * - V4L2_PIX_FMT_YVU410 877 - 'YVU9' 730 - 'YVU9' 878 - 8 731 - 8 879 - 4:1:0 732 - 4:1:0 880 - Y, Cr, Cb 733 - Y, Cr, Cb 881 - Yes 734 - Yes 882 * - V4L2_PIX_FMT_YUV411P 735 * - V4L2_PIX_FMT_YUV411P 883 - '411P' 736 - '411P' 884 - 8 737 - 8 885 - 4:1:1 738 - 4:1:1 886 - Y, Cb, Cr 739 - Y, Cb, Cr 887 - Yes 740 - Yes 888 * - V4L2_PIX_FMT_YUV420M 741 * - V4L2_PIX_FMT_YUV420M 889 - 'YM12' 742 - 'YM12' 890 - 8 743 - 8 891 - 4:2:0 744 - 4:2:0 892 - Y, Cb, Cr 745 - Y, Cb, Cr 893 - No 746 - No 894 * - V4L2_PIX_FMT_YVU420M 747 * - V4L2_PIX_FMT_YVU420M 895 - 'YM21' 748 - 'YM21' 896 - 8 749 - 8 897 - 4:2:0 750 - 4:2:0 898 - Y, Cr, Cb 751 - Y, Cr, Cb 899 - No 752 - No 900 * - V4L2_PIX_FMT_YUV420 753 * - V4L2_PIX_FMT_YUV420 901 - 'YU12' 754 - 'YU12' 902 - 8 755 - 8 903 - 4:2:0 756 - 4:2:0 904 - Y, Cb, Cr 757 - Y, Cb, Cr 905 - Yes 758 - Yes 906 * - V4L2_PIX_FMT_YVU420 759 * - V4L2_PIX_FMT_YVU420 907 - 'YV12' 760 - 'YV12' 908 - 8 761 - 8 909 - 4:2:0 762 - 4:2:0 910 - Y, Cr, Cb 763 - Y, Cr, Cb 911 - Yes 764 - Yes 912 * - V4L2_PIX_FMT_YUV422P 765 * - V4L2_PIX_FMT_YUV422P 913 - '422P' 766 - '422P' 914 - 8 767 - 8 915 - 4:2:2 768 - 4:2:2 916 - Y, Cb, Cr 769 - Y, Cb, Cr 917 - Yes 770 - Yes 918 * - V4L2_PIX_FMT_YUV422M 771 * - V4L2_PIX_FMT_YUV422M 919 - 'YM16' 772 - 'YM16' 920 - 8 773 - 8 921 - 4:2:2 774 - 4:2:2 922 - Y, Cb, Cr 775 - Y, Cb, Cr 923 - No 776 - No 924 * - V4L2_PIX_FMT_YVU422M 777 * - V4L2_PIX_FMT_YVU422M 925 - 'YM61' 778 - 'YM61' 926 - 8 779 - 8 927 - 4:2:2 780 - 4:2:2 928 - Y, Cr, Cb 781 - Y, Cr, Cb 929 - No 782 - No 930 * - V4L2_PIX_FMT_YUV444M 783 * - V4L2_PIX_FMT_YUV444M 931 - 'YM24' 784 - 'YM24' 932 - 8 785 - 8 933 - 4:4:4 786 - 4:4:4 934 - Y, Cb, Cr 787 - Y, Cb, Cr 935 - No 788 - No 936 * - V4L2_PIX_FMT_YVU444M 789 * - V4L2_PIX_FMT_YVU444M 937 - 'YM42' 790 - 'YM42' 938 - 8 791 - 8 939 - 4:4:4 792 - 4:4:4 940 - Y, Cr, Cb 793 - Y, Cr, Cb 941 - No 794 - No 942 795 943 .. raw:: latex 796 .. raw:: latex 944 797 945 \normalsize 798 \normalsize 946 799 947 .. [4] Order of luma and chroma planes 800 .. [4] Order of luma and chroma planes 948 .. [5] Indicates if planes have to be contiguo 801 .. [5] Indicates if planes have to be contiguous in memory or can be 949 disjoint 802 disjoint 950 803 951 804 952 **Color Sample Location:** 805 **Color Sample Location:** 953 Chroma samples are :ref:`interstitially sited< 806 Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>` 954 horizontally. 807 horizontally. 955 808 956 .. _V4L2-PIX-FMT-YUV410: 809 .. _V4L2-PIX-FMT-YUV410: 957 .. _V4L2-PIX-FMT-YVU410: 810 .. _V4L2-PIX-FMT-YVU410: 958 811 959 YUV410 and YVU410 812 YUV410 and YVU410 960 ----------------- 813 ----------------- 961 814 962 Planar YUV 4:1:0 formats. The chroma planes ar 815 Planar YUV 4:1:0 formats. The chroma planes are subsampled by 4 in each 963 direction. Chroma lines contain a quarter of t 816 direction. Chroma lines contain a quarter of the number of pixels and bytes of 964 the luma lines, and the chroma planes contain 817 the luma lines, and the chroma planes contain a quarter of the number of lines 965 of the luma plane. 818 of the luma plane. 966 819 967 .. flat-table:: Sample 4x4 YUV410 Image 820 .. flat-table:: Sample 4x4 YUV410 Image 968 :header-rows: 0 821 :header-rows: 0 969 :stub-columns: 0 822 :stub-columns: 0 970 823 971 * - start + 0: 824 * - start + 0: 972 - Y'\ :sub:`00` 825 - Y'\ :sub:`00` 973 - Y'\ :sub:`01` 826 - Y'\ :sub:`01` 974 - Y'\ :sub:`02` 827 - Y'\ :sub:`02` 975 - Y'\ :sub:`03` 828 - Y'\ :sub:`03` 976 * - start + 4: 829 * - start + 4: 977 - Y'\ :sub:`10` 830 - Y'\ :sub:`10` 978 - Y'\ :sub:`11` 831 - Y'\ :sub:`11` 979 - Y'\ :sub:`12` 832 - Y'\ :sub:`12` 980 - Y'\ :sub:`13` 833 - Y'\ :sub:`13` 981 * - start + 8: 834 * - start + 8: 982 - Y'\ :sub:`20` 835 - Y'\ :sub:`20` 983 - Y'\ :sub:`21` 836 - Y'\ :sub:`21` 984 - Y'\ :sub:`22` 837 - Y'\ :sub:`22` 985 - Y'\ :sub:`23` 838 - Y'\ :sub:`23` 986 * - start + 12: 839 * - start + 12: 987 - Y'\ :sub:`30` 840 - Y'\ :sub:`30` 988 - Y'\ :sub:`31` 841 - Y'\ :sub:`31` 989 - Y'\ :sub:`32` 842 - Y'\ :sub:`32` 990 - Y'\ :sub:`33` 843 - Y'\ :sub:`33` 991 * - start + 16: 844 * - start + 16: 992 - Cr\ :sub:`00` 845 - Cr\ :sub:`00` 993 * - start + 17: 846 * - start + 17: 994 - Cb\ :sub:`00` 847 - Cb\ :sub:`00` 995 848 996 849 997 .. _V4L2-PIX-FMT-YUV411P: 850 .. _V4L2-PIX-FMT-YUV411P: 998 851 999 YUV411P 852 YUV411P 1000 ------- 853 ------- 1001 854 1002 Planar YUV 4:1:1 formats. The chroma planes a 855 Planar YUV 4:1:1 formats. The chroma planes are subsampled by 4 in the 1003 horizontal direction. Chroma lines contain a 856 horizontal direction. Chroma lines contain a quarter of the number of pixels 1004 and bytes of the luma lines, and the chroma p 857 and bytes of the luma lines, and the chroma planes contain the same number of 1005 lines as the luma plane. 858 lines as the luma plane. 1006 859 1007 .. flat-table:: Sample 4x4 YUV411P Image 860 .. flat-table:: Sample 4x4 YUV411P Image 1008 :header-rows: 0 861 :header-rows: 0 1009 :stub-columns: 0 862 :stub-columns: 0 1010 863 1011 * - start + 0: 864 * - start + 0: 1012 - Y'\ :sub:`00` 865 - Y'\ :sub:`00` 1013 - Y'\ :sub:`01` 866 - Y'\ :sub:`01` 1014 - Y'\ :sub:`02` 867 - Y'\ :sub:`02` 1015 - Y'\ :sub:`03` 868 - Y'\ :sub:`03` 1016 * - start + 4: 869 * - start + 4: 1017 - Y'\ :sub:`10` 870 - Y'\ :sub:`10` 1018 - Y'\ :sub:`11` 871 - Y'\ :sub:`11` 1019 - Y'\ :sub:`12` 872 - Y'\ :sub:`12` 1020 - Y'\ :sub:`13` 873 - Y'\ :sub:`13` 1021 * - start + 8: 874 * - start + 8: 1022 - Y'\ :sub:`20` 875 - Y'\ :sub:`20` 1023 - Y'\ :sub:`21` 876 - Y'\ :sub:`21` 1024 - Y'\ :sub:`22` 877 - Y'\ :sub:`22` 1025 - Y'\ :sub:`23` 878 - Y'\ :sub:`23` 1026 * - start + 12: 879 * - start + 12: 1027 - Y'\ :sub:`30` 880 - Y'\ :sub:`30` 1028 - Y'\ :sub:`31` 881 - Y'\ :sub:`31` 1029 - Y'\ :sub:`32` 882 - Y'\ :sub:`32` 1030 - Y'\ :sub:`33` 883 - Y'\ :sub:`33` 1031 * - start + 16: 884 * - start + 16: 1032 - Cb\ :sub:`00` 885 - Cb\ :sub:`00` 1033 * - start + 17: 886 * - start + 17: 1034 - Cb\ :sub:`10` 887 - Cb\ :sub:`10` 1035 * - start + 18: 888 * - start + 18: 1036 - Cb\ :sub:`20` 889 - Cb\ :sub:`20` 1037 * - start + 19: 890 * - start + 19: 1038 - Cb\ :sub:`30` 891 - Cb\ :sub:`30` 1039 * - start + 20: 892 * - start + 20: 1040 - Cr\ :sub:`00` 893 - Cr\ :sub:`00` 1041 * - start + 21: 894 * - start + 21: 1042 - Cr\ :sub:`10` 895 - Cr\ :sub:`10` 1043 * - start + 22: 896 * - start + 22: 1044 - Cr\ :sub:`20` 897 - Cr\ :sub:`20` 1045 * - start + 23: 898 * - start + 23: 1046 - Cr\ :sub:`30` 899 - Cr\ :sub:`30` 1047 900 1048 901 1049 .. _V4L2-PIX-FMT-YUV420: 902 .. _V4L2-PIX-FMT-YUV420: 1050 .. _V4L2-PIX-FMT-YVU420: 903 .. _V4L2-PIX-FMT-YVU420: 1051 .. _V4L2-PIX-FMT-YUV420M: 904 .. _V4L2-PIX-FMT-YUV420M: 1052 .. _V4L2-PIX-FMT-YVU420M: 905 .. _V4L2-PIX-FMT-YVU420M: 1053 906 1054 YUV420, YVU420, YUV420M and YVU420M 907 YUV420, YVU420, YUV420M and YVU420M 1055 ----------------------------------- 908 ----------------------------------- 1056 909 1057 Planar YUV 4:2:0 formats. The chroma planes a 910 Planar YUV 4:2:0 formats. The chroma planes are subsampled by 2 in each 1058 direction. Chroma lines contain half of the n 911 direction. Chroma lines contain half of the number of pixels and bytes of the 1059 luma lines, and the chroma planes contain hal 912 luma lines, and the chroma planes contain half of the number of lines of the 1060 luma plane. 913 luma plane. 1061 914 1062 .. flat-table:: Sample 4x4 YUV420 Image 915 .. flat-table:: Sample 4x4 YUV420 Image 1063 :header-rows: 0 916 :header-rows: 0 1064 :stub-columns: 0 917 :stub-columns: 0 1065 918 1066 * - start + 0: 919 * - start + 0: 1067 - Y'\ :sub:`00` 920 - Y'\ :sub:`00` 1068 - Y'\ :sub:`01` 921 - Y'\ :sub:`01` 1069 - Y'\ :sub:`02` 922 - Y'\ :sub:`02` 1070 - Y'\ :sub:`03` 923 - Y'\ :sub:`03` 1071 * - start + 4: 924 * - start + 4: 1072 - Y'\ :sub:`10` 925 - Y'\ :sub:`10` 1073 - Y'\ :sub:`11` 926 - Y'\ :sub:`11` 1074 - Y'\ :sub:`12` 927 - Y'\ :sub:`12` 1075 - Y'\ :sub:`13` 928 - Y'\ :sub:`13` 1076 * - start + 8: 929 * - start + 8: 1077 - Y'\ :sub:`20` 930 - Y'\ :sub:`20` 1078 - Y'\ :sub:`21` 931 - Y'\ :sub:`21` 1079 - Y'\ :sub:`22` 932 - Y'\ :sub:`22` 1080 - Y'\ :sub:`23` 933 - Y'\ :sub:`23` 1081 * - start + 12: 934 * - start + 12: 1082 - Y'\ :sub:`30` 935 - Y'\ :sub:`30` 1083 - Y'\ :sub:`31` 936 - Y'\ :sub:`31` 1084 - Y'\ :sub:`32` 937 - Y'\ :sub:`32` 1085 - Y'\ :sub:`33` 938 - Y'\ :sub:`33` 1086 * - start + 16: 939 * - start + 16: 1087 - Cr\ :sub:`00` 940 - Cr\ :sub:`00` 1088 - Cr\ :sub:`01` 941 - Cr\ :sub:`01` 1089 * - start + 18: 942 * - start + 18: 1090 - Cr\ :sub:`10` 943 - Cr\ :sub:`10` 1091 - Cr\ :sub:`11` 944 - Cr\ :sub:`11` 1092 * - start + 20: 945 * - start + 20: 1093 - Cb\ :sub:`00` 946 - Cb\ :sub:`00` 1094 - Cb\ :sub:`01` 947 - Cb\ :sub:`01` 1095 * - start + 22: 948 * - start + 22: 1096 - Cb\ :sub:`10` 949 - Cb\ :sub:`10` 1097 - Cb\ :sub:`11` 950 - Cb\ :sub:`11` 1098 951 1099 .. flat-table:: Sample 4x4 YUV420M Image 952 .. flat-table:: Sample 4x4 YUV420M Image 1100 :header-rows: 0 953 :header-rows: 0 1101 :stub-columns: 0 954 :stub-columns: 0 1102 955 1103 * - start0 + 0: 956 * - start0 + 0: 1104 - Y'\ :sub:`00` 957 - Y'\ :sub:`00` 1105 - Y'\ :sub:`01` 958 - Y'\ :sub:`01` 1106 - Y'\ :sub:`02` 959 - Y'\ :sub:`02` 1107 - Y'\ :sub:`03` 960 - Y'\ :sub:`03` 1108 * - start0 + 4: 961 * - start0 + 4: 1109 - Y'\ :sub:`10` 962 - Y'\ :sub:`10` 1110 - Y'\ :sub:`11` 963 - Y'\ :sub:`11` 1111 - Y'\ :sub:`12` 964 - Y'\ :sub:`12` 1112 - Y'\ :sub:`13` 965 - Y'\ :sub:`13` 1113 * - start0 + 8: 966 * - start0 + 8: 1114 - Y'\ :sub:`20` 967 - Y'\ :sub:`20` 1115 - Y'\ :sub:`21` 968 - Y'\ :sub:`21` 1116 - Y'\ :sub:`22` 969 - Y'\ :sub:`22` 1117 - Y'\ :sub:`23` 970 - Y'\ :sub:`23` 1118 * - start0 + 12: 971 * - start0 + 12: 1119 - Y'\ :sub:`30` 972 - Y'\ :sub:`30` 1120 - Y'\ :sub:`31` 973 - Y'\ :sub:`31` 1121 - Y'\ :sub:`32` 974 - Y'\ :sub:`32` 1122 - Y'\ :sub:`33` 975 - Y'\ :sub:`33` 1123 * - 976 * - 1124 * - start1 + 0: 977 * - start1 + 0: 1125 - Cb\ :sub:`00` 978 - Cb\ :sub:`00` 1126 - Cb\ :sub:`01` 979 - Cb\ :sub:`01` 1127 * - start1 + 2: 980 * - start1 + 2: 1128 - Cb\ :sub:`10` 981 - Cb\ :sub:`10` 1129 - Cb\ :sub:`11` 982 - Cb\ :sub:`11` 1130 * - 983 * - 1131 * - start2 + 0: 984 * - start2 + 0: 1132 - Cr\ :sub:`00` 985 - Cr\ :sub:`00` 1133 - Cr\ :sub:`01` 986 - Cr\ :sub:`01` 1134 * - start2 + 2: 987 * - start2 + 2: 1135 - Cr\ :sub:`10` 988 - Cr\ :sub:`10` 1136 - Cr\ :sub:`11` 989 - Cr\ :sub:`11` 1137 990 1138 991 1139 .. _V4L2-PIX-FMT-YUV422P: 992 .. _V4L2-PIX-FMT-YUV422P: 1140 .. _V4L2-PIX-FMT-YUV422M: 993 .. _V4L2-PIX-FMT-YUV422M: 1141 .. _V4L2-PIX-FMT-YVU422M: 994 .. _V4L2-PIX-FMT-YVU422M: 1142 995 1143 YUV422P, YUV422M and YVU422M 996 YUV422P, YUV422M and YVU422M 1144 ---------------------------- 997 ---------------------------- 1145 998 1146 Planar YUV 4:2:2 formats. The chroma planes a 999 Planar YUV 4:2:2 formats. The chroma planes are subsampled by 2 in the 1147 horizontal direction. Chroma lines contain ha 1000 horizontal direction. Chroma lines contain half of the number of pixels and 1148 bytes of the luma lines, and the chroma plane 1001 bytes of the luma lines, and the chroma planes contain the same number of lines 1149 as the luma plane. 1002 as the luma plane. 1150 1003 1151 .. flat-table:: Sample 4x4 YUV422P Image 1004 .. flat-table:: Sample 4x4 YUV422P Image 1152 :header-rows: 0 1005 :header-rows: 0 1153 :stub-columns: 0 1006 :stub-columns: 0 1154 1007 1155 * - start + 0: 1008 * - start + 0: 1156 - Y'\ :sub:`00` 1009 - Y'\ :sub:`00` 1157 - Y'\ :sub:`01` 1010 - Y'\ :sub:`01` 1158 - Y'\ :sub:`02` 1011 - Y'\ :sub:`02` 1159 - Y'\ :sub:`03` 1012 - Y'\ :sub:`03` 1160 * - start + 4: 1013 * - start + 4: 1161 - Y'\ :sub:`10` 1014 - Y'\ :sub:`10` 1162 - Y'\ :sub:`11` 1015 - Y'\ :sub:`11` 1163 - Y'\ :sub:`12` 1016 - Y'\ :sub:`12` 1164 - Y'\ :sub:`13` 1017 - Y'\ :sub:`13` 1165 * - start + 8: 1018 * - start + 8: 1166 - Y'\ :sub:`20` 1019 - Y'\ :sub:`20` 1167 - Y'\ :sub:`21` 1020 - Y'\ :sub:`21` 1168 - Y'\ :sub:`22` 1021 - Y'\ :sub:`22` 1169 - Y'\ :sub:`23` 1022 - Y'\ :sub:`23` 1170 * - start + 12: 1023 * - start + 12: 1171 - Y'\ :sub:`30` 1024 - Y'\ :sub:`30` 1172 - Y'\ :sub:`31` 1025 - Y'\ :sub:`31` 1173 - Y'\ :sub:`32` 1026 - Y'\ :sub:`32` 1174 - Y'\ :sub:`33` 1027 - Y'\ :sub:`33` 1175 * - start + 16: 1028 * - start + 16: 1176 - Cb\ :sub:`00` 1029 - Cb\ :sub:`00` 1177 - Cb\ :sub:`01` 1030 - Cb\ :sub:`01` 1178 * - start + 18: 1031 * - start + 18: 1179 - Cb\ :sub:`10` 1032 - Cb\ :sub:`10` 1180 - Cb\ :sub:`11` 1033 - Cb\ :sub:`11` 1181 * - start + 20: 1034 * - start + 20: 1182 - Cb\ :sub:`20` 1035 - Cb\ :sub:`20` 1183 - Cb\ :sub:`21` 1036 - Cb\ :sub:`21` 1184 * - start + 22: 1037 * - start + 22: 1185 - Cb\ :sub:`30` 1038 - Cb\ :sub:`30` 1186 - Cb\ :sub:`31` 1039 - Cb\ :sub:`31` 1187 * - start + 24: 1040 * - start + 24: 1188 - Cr\ :sub:`00` 1041 - Cr\ :sub:`00` 1189 - Cr\ :sub:`01` 1042 - Cr\ :sub:`01` 1190 * - start + 26: 1043 * - start + 26: 1191 - Cr\ :sub:`10` 1044 - Cr\ :sub:`10` 1192 - Cr\ :sub:`11` 1045 - Cr\ :sub:`11` 1193 * - start + 28: 1046 * - start + 28: 1194 - Cr\ :sub:`20` 1047 - Cr\ :sub:`20` 1195 - Cr\ :sub:`21` 1048 - Cr\ :sub:`21` 1196 * - start + 30: 1049 * - start + 30: 1197 - Cr\ :sub:`30` 1050 - Cr\ :sub:`30` 1198 - Cr\ :sub:`31` 1051 - Cr\ :sub:`31` 1199 1052 1200 .. flat-table:: Sample 4x4 YUV422M Image 1053 .. flat-table:: Sample 4x4 YUV422M Image 1201 :header-rows: 0 1054 :header-rows: 0 1202 :stub-columns: 0 1055 :stub-columns: 0 1203 1056 1204 * - start0 + 0: 1057 * - start0 + 0: 1205 - Y'\ :sub:`00` 1058 - Y'\ :sub:`00` 1206 - Y'\ :sub:`01` 1059 - Y'\ :sub:`01` 1207 - Y'\ :sub:`02` 1060 - Y'\ :sub:`02` 1208 - Y'\ :sub:`03` 1061 - Y'\ :sub:`03` 1209 * - start0 + 4: 1062 * - start0 + 4: 1210 - Y'\ :sub:`10` 1063 - Y'\ :sub:`10` 1211 - Y'\ :sub:`11` 1064 - Y'\ :sub:`11` 1212 - Y'\ :sub:`12` 1065 - Y'\ :sub:`12` 1213 - Y'\ :sub:`13` 1066 - Y'\ :sub:`13` 1214 * - start0 + 8: 1067 * - start0 + 8: 1215 - Y'\ :sub:`20` 1068 - Y'\ :sub:`20` 1216 - Y'\ :sub:`21` 1069 - Y'\ :sub:`21` 1217 - Y'\ :sub:`22` 1070 - Y'\ :sub:`22` 1218 - Y'\ :sub:`23` 1071 - Y'\ :sub:`23` 1219 * - start0 + 12: 1072 * - start0 + 12: 1220 - Y'\ :sub:`30` 1073 - Y'\ :sub:`30` 1221 - Y'\ :sub:`31` 1074 - Y'\ :sub:`31` 1222 - Y'\ :sub:`32` 1075 - Y'\ :sub:`32` 1223 - Y'\ :sub:`33` 1076 - Y'\ :sub:`33` 1224 * - 1077 * - 1225 * - start1 + 0: 1078 * - start1 + 0: 1226 - Cb\ :sub:`00` 1079 - Cb\ :sub:`00` 1227 - Cb\ :sub:`01` 1080 - Cb\ :sub:`01` 1228 * - start1 + 2: 1081 * - start1 + 2: 1229 - Cb\ :sub:`10` 1082 - Cb\ :sub:`10` 1230 - Cb\ :sub:`11` 1083 - Cb\ :sub:`11` 1231 * - start1 + 4: 1084 * - start1 + 4: 1232 - Cb\ :sub:`20` 1085 - Cb\ :sub:`20` 1233 - Cb\ :sub:`21` 1086 - Cb\ :sub:`21` 1234 * - start1 + 6: 1087 * - start1 + 6: 1235 - Cb\ :sub:`30` 1088 - Cb\ :sub:`30` 1236 - Cb\ :sub:`31` 1089 - Cb\ :sub:`31` 1237 * - 1090 * - 1238 * - start2 + 0: 1091 * - start2 + 0: 1239 - Cr\ :sub:`00` 1092 - Cr\ :sub:`00` 1240 - Cr\ :sub:`01` 1093 - Cr\ :sub:`01` 1241 * - start2 + 2: 1094 * - start2 + 2: 1242 - Cr\ :sub:`10` 1095 - Cr\ :sub:`10` 1243 - Cr\ :sub:`11` 1096 - Cr\ :sub:`11` 1244 * - start2 + 4: 1097 * - start2 + 4: 1245 - Cr\ :sub:`20` 1098 - Cr\ :sub:`20` 1246 - Cr\ :sub:`21` 1099 - Cr\ :sub:`21` 1247 * - start2 + 6: 1100 * - start2 + 6: 1248 - Cr\ :sub:`30` 1101 - Cr\ :sub:`30` 1249 - Cr\ :sub:`31` 1102 - Cr\ :sub:`31` 1250 1103 1251 1104 1252 .. _V4L2-PIX-FMT-YUV444M: 1105 .. _V4L2-PIX-FMT-YUV444M: 1253 .. _V4L2-PIX-FMT-YVU444M: 1106 .. _V4L2-PIX-FMT-YVU444M: 1254 1107 1255 YUV444M and YVU444M 1108 YUV444M and YVU444M 1256 ------------------- 1109 ------------------- 1257 1110 1258 Planar YUV 4:4:4 formats. The chroma planes a 1111 Planar YUV 4:4:4 formats. The chroma planes are no subsampled. Chroma lines 1259 contain the same number of pixels and bytes o 1112 contain the same number of pixels and bytes of the luma lines, and the chroma 1260 planes contain the same number of lines as th 1113 planes contain the same number of lines as the luma plane. 1261 1114 1262 .. flat-table:: Sample 4x4 YUV444M Image 1115 .. flat-table:: Sample 4x4 YUV444M Image 1263 :header-rows: 0 1116 :header-rows: 0 1264 :stub-columns: 0 1117 :stub-columns: 0 1265 1118 1266 * - start0 + 0: 1119 * - start0 + 0: 1267 - Y'\ :sub:`00` 1120 - Y'\ :sub:`00` 1268 - Y'\ :sub:`01` 1121 - Y'\ :sub:`01` 1269 - Y'\ :sub:`02` 1122 - Y'\ :sub:`02` 1270 - Y'\ :sub:`03` 1123 - Y'\ :sub:`03` 1271 * - start0 + 4: 1124 * - start0 + 4: 1272 - Y'\ :sub:`10` 1125 - Y'\ :sub:`10` 1273 - Y'\ :sub:`11` 1126 - Y'\ :sub:`11` 1274 - Y'\ :sub:`12` 1127 - Y'\ :sub:`12` 1275 - Y'\ :sub:`13` 1128 - Y'\ :sub:`13` 1276 * - start0 + 8: 1129 * - start0 + 8: 1277 - Y'\ :sub:`20` 1130 - Y'\ :sub:`20` 1278 - Y'\ :sub:`21` 1131 - Y'\ :sub:`21` 1279 - Y'\ :sub:`22` 1132 - Y'\ :sub:`22` 1280 - Y'\ :sub:`23` 1133 - Y'\ :sub:`23` 1281 * - start0 + 12: 1134 * - start0 + 12: 1282 - Y'\ :sub:`30` 1135 - Y'\ :sub:`30` 1283 - Y'\ :sub:`31` 1136 - Y'\ :sub:`31` 1284 - Y'\ :sub:`32` 1137 - Y'\ :sub:`32` 1285 - Y'\ :sub:`33` 1138 - Y'\ :sub:`33` 1286 * - 1139 * - 1287 * - start1 + 0: 1140 * - start1 + 0: 1288 - Cb\ :sub:`00` 1141 - Cb\ :sub:`00` 1289 - Cb\ :sub:`01` 1142 - Cb\ :sub:`01` 1290 - Cb\ :sub:`02` 1143 - Cb\ :sub:`02` 1291 - Cb\ :sub:`03` 1144 - Cb\ :sub:`03` 1292 * - start1 + 4: 1145 * - start1 + 4: 1293 - Cb\ :sub:`10` 1146 - Cb\ :sub:`10` 1294 - Cb\ :sub:`11` 1147 - Cb\ :sub:`11` 1295 - Cb\ :sub:`12` 1148 - Cb\ :sub:`12` 1296 - Cb\ :sub:`13` 1149 - Cb\ :sub:`13` 1297 * - start1 + 8: 1150 * - start1 + 8: 1298 - Cb\ :sub:`20` 1151 - Cb\ :sub:`20` 1299 - Cb\ :sub:`21` 1152 - Cb\ :sub:`21` 1300 - Cb\ :sub:`22` 1153 - Cb\ :sub:`22` 1301 - Cb\ :sub:`23` 1154 - Cb\ :sub:`23` 1302 * - start1 + 12: 1155 * - start1 + 12: 1303 - Cb\ :sub:`20` 1156 - Cb\ :sub:`20` 1304 - Cb\ :sub:`21` 1157 - Cb\ :sub:`21` 1305 - Cb\ :sub:`32` 1158 - Cb\ :sub:`32` 1306 - Cb\ :sub:`33` 1159 - Cb\ :sub:`33` 1307 * - 1160 * - 1308 * - start2 + 0: 1161 * - start2 + 0: 1309 - Cr\ :sub:`00` 1162 - Cr\ :sub:`00` 1310 - Cr\ :sub:`01` 1163 - Cr\ :sub:`01` 1311 - Cr\ :sub:`02` 1164 - Cr\ :sub:`02` 1312 - Cr\ :sub:`03` 1165 - Cr\ :sub:`03` 1313 * - start2 + 4: 1166 * - start2 + 4: 1314 - Cr\ :sub:`10` 1167 - Cr\ :sub:`10` 1315 - Cr\ :sub:`11` 1168 - Cr\ :sub:`11` 1316 - Cr\ :sub:`12` 1169 - Cr\ :sub:`12` 1317 - Cr\ :sub:`13` 1170 - Cr\ :sub:`13` 1318 * - start2 + 8: 1171 * - start2 + 8: 1319 - Cr\ :sub:`20` 1172 - Cr\ :sub:`20` 1320 - Cr\ :sub:`21` 1173 - Cr\ :sub:`21` 1321 - Cr\ :sub:`22` 1174 - Cr\ :sub:`22` 1322 - Cr\ :sub:`23` 1175 - Cr\ :sub:`23` 1323 * - start2 + 12: 1176 * - start2 + 12: 1324 - Cr\ :sub:`30` 1177 - Cr\ :sub:`30` 1325 - Cr\ :sub:`31` 1178 - Cr\ :sub:`31` 1326 - Cr\ :sub:`32` 1179 - Cr\ :sub:`32` 1327 - Cr\ :sub:`33` 1180 - Cr\ :sub:`33`
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.