History

media: v4l: Add packed YUV444 24bpp pixel format

The added format is V4L2_PIX_FMT_YUV24, this is a packed YUV 4:4:4 format, with 8 bits for each component, 24 bits per sample. This format is used by the i.MX 8QuadMax and i.MX 8DualXPlus/8QuadXPlus JPEG encoder/decoder.

Mirela Rabulea committed 5 years ago

Commit 0376a511 parent 74323763 files · +12 −0Browse files

Unified · Split

3 files
  1. Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst +10 −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-packed-yuv.rst+10−0
@@ -220,6 +220,16 @@ the second byte and Y'\ :sub:`7-0` in the third byte. · 219 unmodified lines
220220 - Y'\ :sub:`7-0`
221221 - X\ :sub:`7-0`
222222
223+ * .. _V4L2-PIX-FMT-YUV24:
224+
225+ - ``V4L2_PIX_FMT_YUV24``
226+ - 'YUV3'
227+
228+ - Y'\ :sub:`7-0`
229+ - Cb\ :sub:`7-0`
230+ - Cr\ :sub:`7-0`
231+ - -\
232+
223233 .. note::
224234
225235 - The alpha component is expected to contain a meaningful value that can be
drivers/media/v4l2-core/v4l2-ioctl.c+1−0
@@ -1304,6 +1304,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) · 1303 unmodified lines
13041304 case V4L2_PIX_FMT_YUV444: descr = "16-bit A/XYUV 4-4-4-4"; break;
13051305 case V4L2_PIX_FMT_YUV555: descr = "16-bit A/XYUV 1-5-5-5"; break;
13061306 case V4L2_PIX_FMT_YUV565: descr = "16-bit YUV 5-6-5"; break;
1307+ case V4L2_PIX_FMT_YUV24: descr = "24-bit YUV 4:4:4 8-8-8"; break;
13071308 case V4L2_PIX_FMT_YUV32: descr = "32-bit A/XYUV 8-8-8-8"; break;
13081309 case V4L2_PIX_FMT_AYUV32: descr = "32-bit AYUV 8-8-8-8"; break;
13091310 case V4L2_PIX_FMT_XYUV32: descr = "32-bit XYUV 8-8-8-8"; break;
include/uapi/linux/videodev2.h+1−0
@@ -586,6 +586,7 @@ struct v4l2_pix_format { · 585 unmodified lines
586586 #define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */
587587 #define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */
588588 #define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */
589+#define V4L2_PIX_FMT_YUV24 v4l2_fourcc('Y', 'U', 'V', '3') /* 24 YUV-8-8-8 */
589590 #define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */
590591 #define V4L2_PIX_FMT_AYUV32 v4l2_fourcc('A', 'Y', 'U', 'V') /* 32 AYUV-8-8-8-8 */
591592 #define V4L2_PIX_FMT_XYUV32 v4l2_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */