From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Dmitry Perchanov <dmitry.perchanov@intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Sasha Levin <sashal@kernel.org>,
mchehab@kernel.org, hverkuil@xs4all.nl,
sakari.ailus@linux.intel.com, jacopo.mondi@ideasonboard.com,
naush@raspberrypi.com, jeanmichel.hautbois@ideasonboard.com,
benjamin.gaignard@collabora.com, linux-media@vger.kernel.org
Subject: [PATCH AUTOSEL 6.12 07/23] media: v4l: Add luma 16-bit interlaced pixel format
Date: Sun, 24 Nov 2024 07:48:18 -0500 [thread overview]
Message-ID: <20241124124919.3338752-7-sashal@kernel.org> (raw)
In-Reply-To: <20241124124919.3338752-1-sashal@kernel.org>
From: Dmitry Perchanov <dmitry.perchanov@intel.com>
[ Upstream commit a8f2cdd27d114ed6c3354a0e39502e6d56215804 ]
The formats added by this patch are:
V4L2_PIX_FMT_Y16I
Interlaced lumina format primary use in RealSense Depth cameras with
stereo stream for left and right image sensors.
Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/568efbd75290e286b8ad9e7347b5f43745121020.camel@intel.com
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../userspace-api/media/v4l/pixfmt-y16i.rst | 73 +++++++++++++++++++
.../userspace-api/media/v4l/yuv-formats.rst | 1 +
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
include/uapi/linux/videodev2.h | 1 +
4 files changed, 76 insertions(+)
create mode 100644 Documentation/userspace-api/media/v4l/pixfmt-y16i.rst
diff --git a/Documentation/userspace-api/media/v4l/pixfmt-y16i.rst b/Documentation/userspace-api/media/v4l/pixfmt-y16i.rst
new file mode 100644
index 0000000000000..74ba9e910a38f
--- /dev/null
+++ b/Documentation/userspace-api/media/v4l/pixfmt-y16i.rst
@@ -0,0 +1,73 @@
+.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
+
+.. _V4L2-PIX-FMT-Y16I:
+
+**************************
+V4L2_PIX_FMT_Y16I ('Y16I')
+**************************
+
+Interleaved grey-scale image, e.g. from a stereo-pair
+
+
+Description
+===========
+
+This is a grey-scale image with a depth of 16 bits per pixel, but with pixels
+from 2 sources interleaved and unpacked. Each pixel is stored in a 16-bit word
+in the little-endian order. The first pixel is from the left source.
+
+**Pixel unpacked representation.**
+Left/Right pixels 16-bit unpacked - 16-bit for each interleaved pixel.
+
+.. flat-table::
+ :header-rows: 0
+ :stub-columns: 0
+
+ * - Y'\ :sub:`0L[7:0]`
+ - Y'\ :sub:`0L[15:8]`
+ - Y'\ :sub:`0R[7:0]`
+ - Y'\ :sub:`0R[15:8]`
+
+**Byte Order.**
+Each cell is one byte.
+
+.. flat-table::
+ :header-rows: 0
+ :stub-columns: 0
+
+ * - start + 0:
+ - Y'\ :sub:`00Llow`
+ - Y'\ :sub:`00Lhigh`
+ - Y'\ :sub:`00Rlow`
+ - Y'\ :sub:`00Rhigh`
+ - Y'\ :sub:`01Llow`
+ - Y'\ :sub:`01Lhigh`
+ - Y'\ :sub:`01Rlow`
+ - Y'\ :sub:`01Rhigh`
+ * - start + 8:
+ - Y'\ :sub:`10Llow`
+ - Y'\ :sub:`10Lhigh`
+ - Y'\ :sub:`10Rlow`
+ - Y'\ :sub:`10Rhigh`
+ - Y'\ :sub:`11Llow`
+ - Y'\ :sub:`11Lhigh`
+ - Y'\ :sub:`11Rlow`
+ - Y'\ :sub:`11Rhigh`
+ * - start + 16:
+ - Y'\ :sub:`20Llow`
+ - Y'\ :sub:`20Lhigh`
+ - Y'\ :sub:`20Rlow`
+ - Y'\ :sub:`20Rhigh`
+ - Y'\ :sub:`21Llow`
+ - Y'\ :sub:`21Lhigh`
+ - Y'\ :sub:`21Rlow`
+ - Y'\ :sub:`21Rhigh`
+ * - start + 24:
+ - Y'\ :sub:`30Llow`
+ - Y'\ :sub:`30Lhigh`
+ - Y'\ :sub:`30Rlow`
+ - Y'\ :sub:`30Rhigh`
+ - Y'\ :sub:`31Llow`
+ - Y'\ :sub:`31Lhigh`
+ - Y'\ :sub:`31Rlow`
+ - Y'\ :sub:`31Rhigh`
diff --git a/Documentation/userspace-api/media/v4l/yuv-formats.rst b/Documentation/userspace-api/media/v4l/yuv-formats.rst
index 24b34cdfa6fea..78ee406d76479 100644
--- a/Documentation/userspace-api/media/v4l/yuv-formats.rst
+++ b/Documentation/userspace-api/media/v4l/yuv-formats.rst
@@ -269,5 +269,6 @@ image.
pixfmt-yuv-luma
pixfmt-y8i
pixfmt-y12i
+ pixfmt-y16i
pixfmt-uv8
pixfmt-m420
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index e14db67be97c5..b9a3c6b20282d 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1327,6 +1327,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
case V4L2_PIX_FMT_Y14P: descr = "14-bit Greyscale (MIPI Packed)"; break;
case V4L2_PIX_FMT_Y8I: descr = "Interleaved 8-bit Greyscale"; break;
case V4L2_PIX_FMT_Y12I: descr = "Interleaved 12-bit Greyscale"; break;
+ case V4L2_PIX_FMT_Y16I: descr = "Interleaved 16-bit Greyscale"; break;
case V4L2_PIX_FMT_Z16: descr = "16-bit Depth"; break;
case V4L2_PIX_FMT_INZI: descr = "Planar 10:16 Greyscale Depth"; break;
case V4L2_PIX_FMT_CNF4: descr = "4-bit Depth Confidence (Packed)"; break;
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 27239cb64065d..21a8aa575ea31 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -798,6 +798,7 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */
#define V4L2_PIX_FMT_Y8I v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */
#define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */
+#define V4L2_PIX_FMT_Y16I v4l2_fourcc('Y', '1', '6', 'I') /* Greyscale 16-bit L/R interleaved */
#define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */
#define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */
#define V4L2_PIX_FMT_MM21 v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-contiguous planes */
--
2.43.0
next prev parent reply other threads:[~2024-11-24 12:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-24 12:48 [PATCH AUTOSEL 6.12 01/23] gpio: free irqs that are still requested when the chip is being removed Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 02/23] spi: spi-fsl-lpspi: Adjust type of scldiv Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 03/23] soc: qcom: llcc: Use designated initializers for LLC settings Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 04/23] HID: add per device quirk to force bind to hid-generic Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 05/23] firmware: qcom: scm: Allow QSEECOM on Lenovo Yoga Slim 7x Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 06/23] soc: qcom: pd-mapper: Add QCM6490 PD maps Sasha Levin
2024-11-24 12:48 ` Sasha Levin [this message]
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 08/23] media: uvcvideo: Add luma 16-bit interlaced pixel format Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 09/23] media: uvcvideo: RealSense D421 Depth module metadata Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 10/23] media: uvcvideo: Add a quirk for the Kaiweets KTI-W02 infrared camera Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 11/23] media: uvcvideo: Force UVC version to 1.0a for 0408:4033 Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 12/23] media: vb2: use lock if wait_prepare/finish are NULL Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 13/23] media: cx231xx: Add support for Dexatek USB Video Grabber 1d19:6108 Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 14/23] mmc: core: Add SD card quirk for broken poweroff notification Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 15/23] mmc: sdhci-esdhc-imx: enable quirks SDHCI_QUIRK_NO_LED Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 16/23] firmware: qcom: scm: Allow QSEECOM on Dell XPS 13 9345 Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 17/23] soc: imx8m: Probe the SoC driver as platform driver Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 18/23] HID: bpf: Fix NKRO on Mistel MD770 Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 19/23] regmap: maple: Provide lockdep (sub)class for maple tree's internal lock Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 20/23] selftests/resctrl: Protect against array overflow when reading strings Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 21/23] USB: gadget: pxa27x_udc: Avoid using GPIOF_ACTIVE_LOW Sasha Levin
2024-11-26 12:41 ` Bartosz Golaszewski
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 22/23] sched_ext: add a missing rcu_read_lock/unlock pair at scx_select_cpu_dfl() Sasha Levin
2024-11-24 12:48 ` [PATCH AUTOSEL 6.12 23/23] HID: magicmouse: Apple Magic Trackpad 2 USB-C driver support Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241124124919.3338752-7-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=benjamin.gaignard@collabora.com \
--cc=dmitry.perchanov@intel.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=hverkuil@xs4all.nl \
--cc=jacopo.mondi@ideasonboard.com \
--cc=jeanmichel.hautbois@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=naush@raspberrypi.com \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®