Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1 | .. -*- coding: utf-8; mode: rst -*- |
| 2 | |
| 3 | .. _V4L2-PIX-FMT-YUV422M: |
Mauro Carvalho Chehab | 9aff73d | 2016-07-07 16:16:21 -0300 | [diff] [blame] | 4 | .. _v4l2-pix-fmt-yvu422m: |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 5 | |
| 6 | ************************************************************ |
| 7 | V4L2_PIX_FMT_YUV422M ('YM16'), V4L2_PIX_FMT_YVU422M ('YM61') |
| 8 | ************************************************************ |
| 9 | |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 10 | |
| 11 | V4L2_PIX_FMT_YVU422M |
| 12 | Planar formats with ½ horizontal resolution, also known as YUV and YVU |
| 13 | 4:2:2 |
| 14 | |
| 15 | |
| 16 | Description |
| 17 | =========== |
| 18 | |
| 19 | This is a multi-planar format, as opposed to a packed format. The three |
| 20 | components are separated into three sub-images or planes. |
| 21 | |
| 22 | The Y plane is first. The Y plane has one byte per pixel. For |
| 23 | ``V4L2_PIX_FMT_YUV422M`` the Cb data constitutes the second plane which |
| 24 | is half the width of the Y plane (and of the image). Each Cb belongs to |
| 25 | two pixels. For example, Cb\ :sub:`0` belongs to Y'\ :sub:`00`, |
| 26 | Y'\ :sub:`01`. The Cr data, just like the Cb plane, is in the third |
| 27 | plane. |
| 28 | |
| 29 | ``V4L2_PIX_FMT_YVU422M`` is the same except the Cr data is stored in the |
| 30 | second plane and the Cb data in the third plane. |
| 31 | |
| 32 | If the Y plane has pad bytes after each row, then the Cb and Cr planes |
| 33 | have half as many pad bytes after their rows. In other words, two Cx |
| 34 | rows (including padding) is exactly as long as one Y row (including |
| 35 | padding). |
| 36 | |
| 37 | ``V4L2_PIX_FMT_YUV422M`` and ``V4L2_PIX_FMT_YVU422M`` are intended to be |
| 38 | used only in drivers and applications that support the multi-planar API, |
| 39 | described in :ref:`planar-apis`. |
| 40 | |
Mauro Carvalho Chehab | 056d2ee | 2016-07-04 13:58:01 -0300 | [diff] [blame] | 41 | **Byte Order.** |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 42 | Each cell is one byte. |
| 43 | |
| 44 | |
| 45 | |
Mauro Carvalho Chehab | 5bd4bb7 | 2016-08-17 08:14:19 -0300 | [diff] [blame] | 46 | |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 47 | .. flat-table:: |
| 48 | :header-rows: 0 |
| 49 | :stub-columns: 0 |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 50 | |
Laurent Pinchart | c2b66ca | 2016-09-05 08:44:34 -0300 | [diff] [blame] | 51 | * - start0 + 0: |
| 52 | - Y'\ :sub:`00` |
| 53 | - Y'\ :sub:`01` |
| 54 | - Y'\ :sub:`02` |
| 55 | - Y'\ :sub:`03` |
| 56 | * - start0 + 4: |
| 57 | - Y'\ :sub:`10` |
| 58 | - Y'\ :sub:`11` |
| 59 | - Y'\ :sub:`12` |
| 60 | - Y'\ :sub:`13` |
| 61 | * - start0 + 8: |
| 62 | - Y'\ :sub:`20` |
| 63 | - Y'\ :sub:`21` |
| 64 | - Y'\ :sub:`22` |
| 65 | - Y'\ :sub:`23` |
| 66 | * - start0 + 12: |
| 67 | - Y'\ :sub:`30` |
| 68 | - Y'\ :sub:`31` |
| 69 | - Y'\ :sub:`32` |
| 70 | - Y'\ :sub:`33` |
| 71 | * - |
| 72 | * - start1 + 0: |
| 73 | - Cb\ :sub:`00` |
| 74 | - Cb\ :sub:`01` |
| 75 | * - start1 + 2: |
| 76 | - Cb\ :sub:`10` |
| 77 | - Cb\ :sub:`11` |
| 78 | * - start1 + 4: |
| 79 | - Cb\ :sub:`20` |
| 80 | - Cb\ :sub:`21` |
| 81 | * - start1 + 6: |
| 82 | - Cb\ :sub:`30` |
| 83 | - Cb\ :sub:`31` |
| 84 | * - |
| 85 | * - start2 + 0: |
| 86 | - Cr\ :sub:`00` |
| 87 | - Cr\ :sub:`01` |
| 88 | * - start2 + 2: |
| 89 | - Cr\ :sub:`10` |
| 90 | - Cr\ :sub:`11` |
| 91 | * - start2 + 4: |
| 92 | - Cr\ :sub:`20` |
| 93 | - Cr\ :sub:`21` |
| 94 | * - start2 + 6: |
| 95 | - Cr\ :sub:`30` |
| 96 | - Cr\ :sub:`31` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 97 | |
| 98 | |
| 99 | **Color Sample Location..** |
| 100 | |
| 101 | |
| 102 | |
| 103 | .. flat-table:: |
| 104 | :header-rows: 0 |
| 105 | :stub-columns: 0 |
| 106 | |
Laurent Pinchart | c2b66ca | 2016-09-05 08:44:34 -0300 | [diff] [blame] | 107 | * - |
| 108 | - 0 |
| 109 | - |
| 110 | - 1 |
| 111 | - 2 |
| 112 | - |
| 113 | - 3 |
| 114 | * - 0 |
| 115 | - Y |
| 116 | - C |
| 117 | - Y |
| 118 | - Y |
| 119 | - C |
| 120 | - Y |
| 121 | * - 1 |
| 122 | - Y |
| 123 | - C |
| 124 | - Y |
| 125 | - Y |
| 126 | - C |
| 127 | - Y |
| 128 | * - 2 |
| 129 | - Y |
| 130 | - C |
| 131 | - Y |
| 132 | - Y |
| 133 | - C |
| 134 | - Y |
| 135 | * - 3 |
| 136 | - Y |
| 137 | - C |
| 138 | - Y |
| 139 | - Y |
| 140 | - C |
| 141 | - Y |