Y012 is a luma-only formats with 12-bits per pixel, expanded to 16bits. Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian order.
Unified · Split
| @@ -103,6 +103,17 @@ are often referred to as greyscale formats. · 102 unmodified lines | ||
| 103 | 103 | - ... |
| 104 | 104 | - ... |
| 105 | 105 | |
| 106 | + * .. _V4L2-PIX-FMT-Y012: | |
| 107 | + | |
| 108 | + - ``V4L2_PIX_FMT_Y012`` | |
| 109 | + - 'Y012' | |
| 110 | + | |
| 111 | + - Y'\ :sub:`0`\ [3:0] `0000` | |
| 112 | + - Y'\ :sub:`0`\ [11:4] | |
| 113 | + - ... | |
| 114 | + - ... | |
| 115 | + - ... | |
| 116 | + | |
| 106 | 117 | * .. _V4L2-PIX-FMT-Y14: |
| 107 | 118 | |
| 108 | 119 | - ``V4L2_PIX_FMT_Y14`` |
| @@ -146,3 +157,7 @@ are often referred to as greyscale formats. · 37 unmodified lines | ||
| 146 | 157 | than 16 bits. For example, 10 bits per pixel uses values in the range 0 to |
| 147 | 158 | 1023. For the IPU3_Y10 format 25 pixels are packed into 32 bytes, which |
| 148 | 159 | leaves the 6 most significant bits of the last byte padded with 0. |
| 160 | + | |
| 161 | + For Y012 and Y12 formats, Y012 places its data in the 12 high bits, with | |
| 162 | + padding zeros in the 4 low bits, in contrast to the Y12 format, which has | |
| 163 | + its padding located in the most significant bits of the 16 bit word. | |
| @@ -1303,6 +1303,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) · 1302 unmodified lines | ||
| 1303 | 1303 | case V4L2_PIX_FMT_Y6: descr = "6-bit Greyscale"; break; |
| 1304 | 1304 | case V4L2_PIX_FMT_Y10: descr = "10-bit Greyscale"; break; |
| 1305 | 1305 | case V4L2_PIX_FMT_Y12: descr = "12-bit Greyscale"; break; |
| 1306 | + case V4L2_PIX_FMT_Y012: descr = "12-bit Greyscale (bits 15-4)"; break; | |
| 1306 | 1307 | case V4L2_PIX_FMT_Y14: descr = "14-bit Greyscale"; break; |
| 1307 | 1308 | case V4L2_PIX_FMT_Y16: descr = "16-bit Greyscale"; break; |
| 1308 | 1309 | case V4L2_PIX_FMT_Y16_BE: descr = "16-bit Greyscale BE"; break; |
| @@ -586,6 +586,7 @@ struct v4l2_pix_format { · 585 unmodified lines | ||
| 586 | 586 | #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ |
| 587 | 587 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ |
| 588 | 588 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ |
| 589 | +#define V4L2_PIX_FMT_Y012 v4l2_fourcc('Y', '0', '1', '2') /* 12 Greyscale */ | |
| 589 | 590 | #define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */ |
| 590 | 591 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
| 591 | 592 | #define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ |