| 1 |
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later |
| 2 |
.. c:namespace:: V4L |
| 3 |
|
| 4 |
.. _V4L2-PIX-FMT-M420: |
| 5 |
|
| 6 |
************************** |
| 7 |
V4L2_PIX_FMT_M420 ('M420') |
| 8 |
************************** |
| 9 |
|
| 10 |
Format with ½ horizontal and vertical chroma resolution, also known as |
| 11 |
YUV 4:2:0. Hybrid plane line-interleaved layout. |
| 12 |
|
| 13 |
|
| 14 |
Description |
| 15 |
=========== |
| 16 |
|
| 17 |
M420 is a YUV format with ½ horizontal and vertical chroma subsampling |
| 18 |
(YUV 4:2:0). Pixels are organized as interleaved luma and chroma planes. |
| 19 |
Two lines of luma data are followed by one line of chroma data. |
| 20 |
|
| 21 |
The luma plane has one byte per pixel. The chroma plane contains |
| 22 |
interleaved CbCr pixels subsampled by ½ in the horizontal and vertical |
| 23 |
directions. Each CbCr pair belongs to four pixels. For example, |
| 24 |
Cb\ :sub:`0`/Cr\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`, |
| 25 |
Y'\ :sub:`10`, Y'\ :sub:`11`. |
| 26 |
|
| 27 |
All line lengths are identical: if the Y lines include pad bytes so do |
| 28 |
the CbCr lines. |
| 29 |
|
| 30 |
**Byte Order.** |
| 31 |
Each cell is one byte. |
| 32 |
|
| 33 |
|
| 34 |
.. flat-table:: |
| 35 |
:header-rows: 0 |
| 36 |
:stub-columns: 0 |
| 37 |
|
| 38 |
* - start + 0: |
| 39 |
- Y'\ :sub:`00` |
| 40 |
- Y'\ :sub:`01` |
| 41 |
- Y'\ :sub:`02` |
| 42 |
- Y'\ :sub:`03` |
| 43 |
* - start + 4: |
| 44 |
- Y'\ :sub:`10` |
| 45 |
- Y'\ :sub:`11` |
| 46 |
- Y'\ :sub:`12` |
| 47 |
- Y'\ :sub:`13` |
| 48 |
* - start + 8: |
| 49 |
- Cb\ :sub:`00` |
| 50 |
- Cr\ :sub:`00` |
| 51 |
- Cb\ :sub:`01` |
| 52 |
- Cr\ :sub:`01` |
| 53 |
* - start + 16: |
| 54 |
- Y'\ :sub:`20` |
| 55 |
- Y'\ :sub:`21` |
| 56 |
- Y'\ :sub:`22` |
| 57 |
- Y'\ :sub:`23` |
| 58 |
* - start + 20: |
| 59 |
- Y'\ :sub:`30` |
| 60 |
- Y'\ :sub:`31` |
| 61 |
- Y'\ :sub:`32` |
| 62 |
- Y'\ :sub:`33` |
| 63 |
* - start + 24: |
| 64 |
- Cb\ :sub:`10` |
| 65 |
- Cr\ :sub:`10` |
| 66 |
- Cb\ :sub:`11` |
| 67 |
- Cr\ :sub:`11` |
| 68 |
|
| 69 |
|
| 70 |
**Color Sample Location:** |
| 71 |
Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>` |
| 72 |
horizontally and vertically. |