History

media: Add Y012 video format

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.

Ming Qian committed 3 years ago

Commit a490ea61 parent aa108043 files · +17 −0Browse files

Unified · Split

3 files
  1. Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst +15 −0
  2. drivers/media/v4l2-core/v4l2-ioctl.c +1 −0
  3. include/uapi/linux/videodev2.h +1 −0
Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst+15−0
@@ -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 * .. _V4L2-PIX-FMT-Y14:117 * .. _V4L2-PIX-FMT-Y14:
107 118
108 - ``V4L2_PIX_FMT_Y14``119 - ``V4L2_PIX_FMT_Y14``
@@ -146,3 +157,7 @@ are often referred to as greyscale formats. · 37 unmodified lines
146 than 16 bits. For example, 10 bits per pixel uses values in the range 0 to157 than 16 bits. For example, 10 bits per pixel uses values in the range 0 to
147 1023. For the IPU3_Y10 format 25 pixels are packed into 32 bytes, which158 1023. For the IPU3_Y10 format 25 pixels are packed into 32 bytes, which
148 leaves the 6 most significant bits of the last byte padded with 0.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.
drivers/media/v4l2-core/v4l2-ioctl.c+1−0
@@ -1303,6 +1303,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) · 1302 unmodified lines
1303 case V4L2_PIX_FMT_Y6: descr = "6-bit Greyscale"; break;1303 case V4L2_PIX_FMT_Y6: descr = "6-bit Greyscale"; break;
1304 case V4L2_PIX_FMT_Y10: descr = "10-bit Greyscale"; break;1304 case V4L2_PIX_FMT_Y10: descr = "10-bit Greyscale"; break;
1305 case V4L2_PIX_FMT_Y12: descr = "12-bit Greyscale"; break;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 case V4L2_PIX_FMT_Y14: descr = "14-bit Greyscale"; break;1307 case V4L2_PIX_FMT_Y14: descr = "14-bit Greyscale"; break;
1307 case V4L2_PIX_FMT_Y16: descr = "16-bit Greyscale"; break;1308 case V4L2_PIX_FMT_Y16: descr = "16-bit Greyscale"; break;
1308 case V4L2_PIX_FMT_Y16_BE: descr = "16-bit Greyscale BE"; break;1309 case V4L2_PIX_FMT_Y16_BE: descr = "16-bit Greyscale BE"; break;
include/uapi/linux/videodev2.h+1−0
@@ -586,6 +586,7 @@ struct v4l2_pix_format { · 585 unmodified lines
586#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */586#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */
587#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */587#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */
588#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */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#define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */590#define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */
590#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */591#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
591#define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */592#define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t