Add three new formats storing packed YUV 4:4:4 in 10-, 12- and 16-bpc variants, with component order VUY. They are used by the Xilinx Video Frame Buffer Read/Write IP cores. Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> --- Changes since v1: - Interleave component names and number of bits --- .../media/v4l/pixfmt-packed-yuv.rst | 56 +++++++++++++++++++ include/uapi/linux/videodev2.h | 3 + 2 files changed, 59 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst b/Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst index 6824898122aa..7f66d5ba8cfa 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst @@ -257,6 +257,62 @@ the second byte and Y'\ :sub:`7-0` in the third byte. applications and drivers. +The next table lists the packed YUV 4:4:4 formats with more than 8 bits per +component. They are named similarly to the formats with less than 8 bits per +components, based on the order of the Y, Cb and Cr components as seen in a +word, which is then stored in memory in little endian byte order, and on the +number of bits for each component. The component names and the corresponding +number of bits are interleaved for clarity. + +.. flat-table:: Packed YUV Image Formats (more than 8bpc) + :header-rows: 1 + :stub-columns: 0 + + * - Identifier + - Code + - Byte 0 + - Byte 1 + - Byte 2 + - Byte 3 + - Byte 4 + - Byte 5 + + * .. _V4L2-PIX-FMT-X2V10U10Y10: + + - ``V4L2_PIX_FMT_X2V10U10Y10`` + - 'VY30' + + - Y'\ :sub:`7-0` + - Cb\ :sub:`5-0` Y'\ :sub:`9-8` + - Cr\ :sub:`3-0` Cb\ :sub:`9-6` + - `-`\ :sub:`1-0` Cr\ :sub:`9-4` + - + + * .. _V4L2-PIX-FMT-X4V12U12Y12: + + - ``V4L2_PIX_FMT_X4V12U12Y12`` + - 'VY36' + + - Y'\ :sub:`7-0` + - Cb\ :sub:`3-0` Y'\ :sub:`11-8` + - Cb\ :sub:`11-4` + - Cr\ :sub:`7-0` + - `-`\ :sub:`3-0` Cr\ :sub:`11-8` + - + + * .. _V4L2-PIX-FMT-V16U16Y16: + + - ``V4L2_PIX_FMT_V16U16Y16`` + - 'VY40' + + - Y'\ :sub:`7-0` + - Y'\ :sub:`15-8` + - Cb\ :sub:`7-0` + - Cb\ :sub:`15-8` + - Cr\ :sub:`7-0` + - Cr\ :sub:`15-8` + + 4:2:2 Subsampling ================= diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index afe3619bc77c..5cdbd1a2fddb 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -602,6 +602,9 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_YUVA32 v4l2_fourcc('Y', 'U', 'V', 'A') /* 32 YUVA-8-8-8-8 */ #define V4L2_PIX_FMT_YUVX32 v4l2_fourcc('Y', 'U', 'V', 'X') /* 32 YUVX-8-8-8-8 */ #define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv interleaved */ +#define V4L2_PIX_FMT_X2V10U10Y10 v4l2_fourcc('V', 'Y', '3', '0') /* 32 XVUY-2-10-10-10 */ +#define V4L2_PIX_FMT_X4V12U12Y12 v4l2_fourcc('V', 'Y', '3', '6') /* 40 XVUY-4-12-12-12 */ +#define V4L2_PIX_FMT_V16U16Y16 v4l2_fourcc('V', 'Y', '4', '8') /* 48 VUY-16-16-16 */ /* two planes -- one Y, one Cr + Cb interleaved */ #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ -- Regards, Laurent Pinchart