Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp715135ybx; Wed, 6 Nov 2019 07:22:07 -0800 (PST) X-Google-Smtp-Source: APXvYqykVcfOwePqBTOVOfs/5Sk3fZlzF+6hlmQrm6vNtVs+3A5ETJ2HujnKgWIarsBn+DMFHcSZ X-Received: by 2002:a17:906:c9d9:: with SMTP id hk25mr35627468ejb.74.1573053727579; Wed, 06 Nov 2019 07:22:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573053727; cv=none; d=google.com; s=arc-20160816; b=nZ5xrR/yfouzpXZhYUdg2tdenosFUlwi7cgxcqieNkE7kTiNayGymPIoAR1gdkSW0J C+aXruePv9/oFZx3Wn35/coZf9136S1AsrPRTUT3TdZ1mdsk0Sa0t4wiZpPI7TPA9mdY 7Kr4tKBUzSX2ud4RBsxhO3/znhwuKjV+a/8BKDYZNa4bvBx1gk7rJwdLkZr1T4NfeLhy quCgnMov7fCX8dwR6gMb4Au6TI4D/fpLtU53BAmUr8hXf3tV0V7RwPrx82u40nblBs5m g7jTzDemp0I6e5N+j8SPhpTxsyZU5dKe4Sxpy2nDgqPouJDYIjwqL/T0KQT0gZ0WJ4ai 2xIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=iTezUJlCBZwL+U2jKz0PJ48jCQgNVNZrLImVIuBWPNA=; b=qD/9wcGLuWNlnJXPykPzBhvMyeyXlL6M8cTTXkZXoHXVerU7u+TmN4ePl+2dgrtZYu Aa4rnJXbOZ6CEO/Rk77rf60pA1w+g/qrr65iJcxYhe8+JuniCePIoWM0WVNQWOxdNHy2 Y0xHnCTaAsV9RsA1IJFeGv3EvHskM13SZnsT9J4wtO7v/Og9LBfJrjQIbtMW4gvBFA5G ffxmD8IKFAGD7H6pADLFxcgCsRoDWcHsEAYedhVHXJjYAWMpAbNfO1ZF+D18/g3CR/CV 73eQ9uc4UCK3dKVWaKn3xL1ELf2xzb+0SnYttyURRzqCT46bgSrN21l76ubAxbA2JDKR FgGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v35si14060709edm.213.2019.11.06.07.21.43; Wed, 06 Nov 2019 07:22:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732024AbfKFPVF (ORCPT + 99 others); Wed, 6 Nov 2019 10:21:05 -0500 Received: from inva021.nxp.com ([92.121.34.21]:51140 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727231AbfKFPVE (ORCPT ); Wed, 6 Nov 2019 10:21:04 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B64B5200A3E; Wed, 6 Nov 2019 16:21:01 +0100 (CET) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9DF8020096F; Wed, 6 Nov 2019 16:21:01 +0100 (CET) Received: from fsr-ub1664-134.ea.freescale.net (fsr-ub1664-134.ea.freescale.net [10.171.74.111]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id D2F8E205EB; Wed, 6 Nov 2019 16:21:00 +0100 (CET) From: Mirela Rabulea To: mchehab@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org Cc: hverkuil-cisco@xs4all.nl, paul.kocialkowski@bootlin.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, s.hauer@pengutronix.de, aisheng.dong@nxp.com, daniel.baluta@nxp.com, leonard.crestez@nxp.com, robert.chiras@nxp.com, laurentiu.palcu@nxp.com, mark.rutland@arm.com, devicetree@vger.kernel.org, p.zabel@pengutronix.de, laurent.pinchart+renesas@ideasonboard.com, niklas.soderlund+renesas@ragnatech.se, dafna.hirschfeld@collabora.com, Mirela Rabulea Subject: [PATCH 1/5] media: v4l: Add packed YUV444 24bpp pixel format Date: Wed, 6 Nov 2019 17:20:29 +0200 Message-Id: <1573053633-21437-2-git-send-email-mirela.rabulea@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573053633-21437-1-git-send-email-mirela.rabulea@nxp.com> References: <1573053633-21437-1-git-send-email-mirela.rabulea@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Mirela Rabulea --- Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst | 37 +++++++++++++++++++++- drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst b/Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst index 41b60fa..5750ff6 100644 --- a/Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst +++ b/Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst @@ -17,7 +17,8 @@ Description =========== Similar to the packed RGB formats these formats store the Y, Cb and Cr -component of each pixel in one 16 or 32 bit word. +component of each pixel next to each other in memory. They occupy 16, 24 or 32 +bits per pixel. .. raw:: latex @@ -157,6 +158,40 @@ component of each pixel in one 16 or 32 bit word. - :cspan:`15` + * .. _V4L2-PIX-FMT-YUV24: + + - ``V4L2_PIX_FMT_YUV24`` + - 'YUV3' + + - Y'\ :sub:`7` + - Y'\ :sub:`6` + - Y'\ :sub:`5` + - Y'\ :sub:`4` + - Y'\ :sub:`3` + - Y'\ :sub:`2` + - Y'\ :sub:`1` + - Y'\ :sub:`0` + + - Cb\ :sub:`7` + - Cb\ :sub:`6` + - Cb\ :sub:`5` + - Cb\ :sub:`4` + - Cb\ :sub:`3` + - Cb\ :sub:`2` + - Cb\ :sub:`1` + - Cb\ :sub:`0` + + - Cr\ :sub:`7` + - Cr\ :sub:`6` + - Cr\ :sub:`5` + - Cr\ :sub:`4` + - Cr\ :sub:`3` + - Cr\ :sub:`2` + - Cr\ :sub:`1` + - Cr\ :sub:`0` + + - :cspan:`7` + * .. _V4L2-PIX-FMT-YUV32: - ``V4L2_PIX_FMT_YUV32`` diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 315ac12..9973fdf 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1246,6 +1246,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_YUV444: descr = "16-bit A/XYUV 4-4-4-4"; break; case V4L2_PIX_FMT_YUV555: descr = "16-bit A/XYUV 1-5-5-5"; break; case V4L2_PIX_FMT_YUV565: descr = "16-bit YUV 5-6-5"; break; + case V4L2_PIX_FMT_YUV24: descr = "24-bit YUV 4:4:4 8-8-8"; break; case V4L2_PIX_FMT_YUV32: descr = "32-bit A/XYUV 8-8-8-8"; break; case V4L2_PIX_FMT_AYUV32: descr = "32-bit AYUV 8-8-8-8"; break; case V4L2_PIX_FMT_XYUV32: descr = "32-bit XYUV 8-8-8-8"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index f98bbcc..8a1d9b4 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -588,6 +588,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */ #define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */ #define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */ +#define V4L2_PIX_FMT_YUV24 v4l2_fourcc('Y', 'U', 'V', '3') /* 24 YUV-8-8-8 */ #define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */ #define V4L2_PIX_FMT_AYUV32 v4l2_fourcc('A', 'Y', 'U', 'V') /* 32 AYUV-8-8-8-8 */ #define V4L2_PIX_FMT_XYUV32 v4l2_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */ -- 2.7.4