| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | .. Permission is granted to copy, distribute and/or modify this |
| 2 | .. document under the terms of the GNU Free Documentation License, |
| 3 | .. Version 1.1 or any later version published by the Free Software |
| 4 | .. Foundation, with no Invariant Sections, no Front-Cover Texts |
| 5 | .. and no Back-Cover Texts. A copy of the license is included at |
| 6 | .. Documentation/media/uapi/fdl-appendix.rst. |
| 7 | .. |
| 8 | .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections |
| 9 | |
| 10 | .. _V4L2-PIX-FMT-YUV422P: |
| 11 | |
| 12 | ***************************** |
| 13 | V4L2_PIX_FMT_YUV422P ('422P') |
| 14 | ***************************** |
| 15 | |
| 16 | |
| 17 | Format with ½ horizontal chroma resolution, also known as YUV 4:2:2. |
| 18 | Planar layout as opposed to ``V4L2_PIX_FMT_YUYV`` |
| 19 | |
| 20 | |
| 21 | Description |
| 22 | =========== |
| 23 | |
| 24 | This format is not commonly used. This is a planar version of the YUYV |
| 25 | format. The three components are separated into three sub-images or |
| 26 | planes. The Y plane is first. The Y plane has one byte per pixel. The Cb |
| 27 | plane immediately follows the Y plane in memory. The Cb plane is half |
| 28 | the width of the Y plane (and of the image). Each Cb belongs to two |
| 29 | pixels. For example, Cb\ :sub:`0` belongs to Y'\ :sub:`00`, |
| 30 | Y'\ :sub:`01`. Following the Cb plane is the Cr plane, just like the Cb |
| 31 | plane. |
| 32 | |
| 33 | If the Y plane has pad bytes after each row, then the Cr and Cb planes |
| 34 | have half as many pad bytes after their rows. In other words, two Cx |
| 35 | rows (including padding) is exactly as long as one Y row (including |
| 36 | padding). |
| 37 | |
| 38 | **Byte Order.** |
| 39 | Each cell is one byte. |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | .. flat-table:: |
| 45 | :header-rows: 0 |
| 46 | :stub-columns: 0 |
| 47 | |
| 48 | * - start + 0: |
| 49 | - Y'\ :sub:`00` |
| 50 | - Y'\ :sub:`01` |
| 51 | - Y'\ :sub:`02` |
| 52 | - Y'\ :sub:`03` |
| 53 | * - start + 4: |
| 54 | - Y'\ :sub:`10` |
| 55 | - Y'\ :sub:`11` |
| 56 | - Y'\ :sub:`12` |
| 57 | - Y'\ :sub:`13` |
| 58 | * - start + 8: |
| 59 | - Y'\ :sub:`20` |
| 60 | - Y'\ :sub:`21` |
| 61 | - Y'\ :sub:`22` |
| 62 | - Y'\ :sub:`23` |
| 63 | * - start + 12: |
| 64 | - Y'\ :sub:`30` |
| 65 | - Y'\ :sub:`31` |
| 66 | - Y'\ :sub:`32` |
| 67 | - Y'\ :sub:`33` |
| 68 | * - start + 16: |
| 69 | - Cb\ :sub:`00` |
| 70 | - Cb\ :sub:`01` |
| 71 | * - start + 18: |
| 72 | - Cb\ :sub:`10` |
| 73 | - Cb\ :sub:`11` |
| 74 | * - start + 20: |
| 75 | - Cb\ :sub:`20` |
| 76 | - Cb\ :sub:`21` |
| 77 | * - start + 22: |
| 78 | - Cb\ :sub:`30` |
| 79 | - Cb\ :sub:`31` |
| 80 | * - start + 24: |
| 81 | - Cr\ :sub:`00` |
| 82 | - Cr\ :sub:`01` |
| 83 | * - start + 26: |
| 84 | - Cr\ :sub:`10` |
| 85 | - Cr\ :sub:`11` |
| 86 | * - start + 28: |
| 87 | - Cr\ :sub:`20` |
| 88 | - Cr\ :sub:`21` |
| 89 | * - start + 30: |
| 90 | - Cr\ :sub:`30` |
| 91 | - Cr\ :sub:`31` |
| 92 | |
| 93 | |
| 94 | **Color Sample Location:** |
| 95 | |
| 96 | |
| 97 | |
| 98 | .. flat-table:: |
| 99 | :header-rows: 0 |
| 100 | :stub-columns: 0 |
| 101 | |
| 102 | * - |
| 103 | - 0 |
| 104 | - |
| 105 | - 1 |
| 106 | - 2 |
| 107 | - |
| 108 | - 3 |
| 109 | * - 0 |
| 110 | - Y |
| 111 | - C |
| 112 | - Y |
| 113 | - Y |
| 114 | - C |
| 115 | - Y |
| 116 | * - 1 |
| 117 | - Y |
| 118 | - C |
| 119 | - Y |
| 120 | - Y |
| 121 | - C |
| 122 | - Y |
| 123 | * - 2 |
| 124 | - Y |
| 125 | - C |
| 126 | - Y |
| 127 | - Y |
| 128 | - C |
| 129 | - Y |
| 130 | * - 3 |
| 131 | - Y |
| 132 | - C |
| 133 | - Y |
| 134 | - Y |
| 135 | - C |
| 136 | - Y |