All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] UVC Module  - Support Intel RealSense SR300 Depth Camera formats
@ 2016-12-05 10:06 Raikhel, Evgeni
  2016-12-05 11:01 ` Laurent Pinchart
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Raikhel, Evgeni @ 2016-12-05 10:06 UTC (permalink / raw)
  To: linux-media; +Cc: laurent.pinchart

[-- Attachment #1: Type: text/plain, Size: 558 bytes --]

Specify GUID and FourCC codes mapping for Depth-related pixel formats advertised by Intel RealSense(tm) SR300 depth camera.
Provide documentation for the new INZI pixel format introduced.

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-UVC-Add-support-for-Intel-SR300-depth-camera.patch --]
[-- Type: text/x-patch; name="0001-UVC-Add-support-for-Intel-SR300-depth-camera.patch", Size: 3227 bytes --]

From e9693dd008bdaaafa2e2b57762cb75f84649de2e Mon Sep 17 00:00:00 2001
From: Aviv Greenberg <aviv.d.greenberg@intel.com>
Date: Tue, 15 Nov 2016 12:10:09 +0200
Subject: [PATCH 1/2] UVC: Add support for Intel SR300 depth camera

Add support for Intel SR300 depth camera in uvc driver.
This includes adding three uvc GUIDs for the required pixel formats,
adding a new V4L pixel format definition to user api headers,
and updating the uvc driver GUID-to-4cc tables with the new formats.

Signed-off-by: Aviv Greenberg <aviv.d.greenberg@intel.com>
Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
---
 drivers/media/usb/uvc/uvc_driver.c | 15 +++++++++++++++
 drivers/media/usb/uvc/uvcvideo.h   |  9 +++++++++
 include/uapi/linux/videodev2.h     |  1 +
 3 files changed, 25 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 11744f92097b..5b96a89f29ae 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -168,6 +168,21 @@ static struct uvc_format_desc uvc_fmts[] = {
 		.guid		= UVC_GUID_FORMAT_RW10,
 		.fcc		= V4L2_PIX_FMT_SRGGB10P,
 	},
+	{
+		.name		= "Depth data 16-bit (Z16)",
+		.guid		= UVC_GUID_FORMAT_INVZ,
+		.fcc		= V4L2_PIX_FMT_Z16,
+	},
+	{
+		.name		= "IR:Depth 26-bit (INZI)",
+		.guid		= UVC_GUID_FORMAT_INZI,
+		.fcc		= V4L2_PIX_FMT_INZI,
+	},
+	{
+		.name		= "Greyscale 10-bit (Y10 )",
+		.guid		= UVC_GUID_FORMAT_INVI,
+		.fcc		= V4L2_PIX_FMT_Y10,
+	},
 };
 
 /* ------------------------------------------------------------------------
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 7e4d3eea371b..460b99ca99b7 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -131,6 +131,15 @@
 #define UVC_GUID_FORMAT_RW10 \
 	{ 'R',  'W',  '1',  '0', 0x00, 0x00, 0x10, 0x00, \
 	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_INVZ \
+	{ 'I',  'N',  'V',  'Z', 0x90, 0x2d, 0x58, 0x4a, \
+	 0x92, 0x0b, 0x77, 0x3f, 0x1f, 0x2c, 0x55, 0x6b}
+#define UVC_GUID_FORMAT_INZI \
+	{ 'I',  'N',  'Z',  'I', 0x66, 0x1a, 0x42, 0xa2, \
+	 0x90, 0x65, 0xd0, 0x18, 0x14, 0xa8, 0xef, 0x8a}
+#define UVC_GUID_FORMAT_INVI \
+	{ 'I',  'N',  'V',  'I', 0xdb, 0x57, 0x49, 0x5e, \
+	 0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
 
 /* ------------------------------------------------------------------------
  * Driver specific constants.
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index d3f613e2c54a..4ab995bbec5b 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -659,6 +659,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_Y12I     v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-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_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Infrared 10-bit linked with Depth 16-bit */
 
 /* SDR formats - used only for Software Defined Radio devices */
 #define V4L2_SDR_FMT_CU8          v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
-- 
2.7.4


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-Document-Intel-SR300-Depth-camera-INZI-format.patch --]
[-- Type: text/x-patch; name="0002-Document-Intel-SR300-Depth-camera-INZI-format.patch", Size: 3556 bytes --]

From 581f4c3e60d8e7895bc34f9e0e90476eed31fa8d Mon Sep 17 00:00:00 2001
From: Evgeni Raikhel <evgeni.raikhel@intel.com>
Date: Wed, 16 Nov 2016 11:53:49 +0200
Subject: [PATCH 2/2] Document Intel SR300 Depth camera INZI format

Provide the frame structure and data layout of V4L2-PIX-FMT-INZI
format utilized by Intel SR300 Depth camera.

This is a complimentary patch for:
[PATCH] UVC: Add support for Intel SR300 depth camera

Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
---
 Documentation/media/uapi/v4l/pixfmt-inzi.rst | 40 ++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst

diff --git a/Documentation/media/uapi/v4l/pixfmt-inzi.rst b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
new file mode 100644
index 000000000000..cdfdeae4a664
--- /dev/null
+++ b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
@@ -0,0 +1,40 @@
+.. -*- coding: utf-8; mode: rst -*-
+
+.. _V4L2-PIX-FMT-INZI:
+
+**************************
+V4L2_PIX_FMT_INZI ('INZI')
+**************************
+
+Infrared 10-bit linked with Depth 16-bit images
+
+
+Description
+===========
+
+Custom multi-planar format used by Intel SR300 Depth cameras, comprise of Infrared image followed by Depth data.
+The pixel definition is 32-bpp, with the Depth and Infrared Data split into separate continuous planes of identical dimensions.
+
+The first plane - Infrared data - is stored in V4L2_PIX_FMT_Y10 (see :ref:`pixfmt-y10`) greyscale format. Each pixel is 16-bit cell, with actual data present in the 10 LSBs with values in range 0 to 1023. The six remaining MSBs are padded with zeros.
+
+The second plane provides 16-bit per-pixel Depth data in V4L2_PIX_FMT_Z16 (:ref:`pixfmt-z16`) format.
+
+
+**Frame Structure.**
+Each cell is a 16-bit word with the significant data byte is stored at lower memory address (little-endian).
+
++-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+
+| Ir\ :sub:`0`    | Ir\ :sub:`1`    | Ir\ :sub:`2`    |       ...       |        ...      |       ...       |
++-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+
+|      ...       ...       ...                                                                              |
+|                                 Infrared Data                                                             |
+|                                                 ...   ...   ...                                           |
++-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+
+| Ir\ :sub:`n-3`  | Ir\ :sub:`n-2`  | Ir\ :sub:`n-1`  | Depth\ :sub:`0` | Depth\ :sub:`1` | Depth\ :sub:`2` |
++-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+
+|      ...       ...       ...                                                                              |
+|                                 Depth Data                                                                |
+|                                                 ...   ...   ...                                           |
++-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+
+|       ...       |       ...       |       ...       |Depth\ :sub:`n-3`|Depth\ :sub:`n-2`|Depth\ :sub:`n-1`|
++-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH] UVC Module  - Support Intel RealSense SR300 Depth Camera formats
  2016-12-05 10:06 [PATCH] UVC Module - Support Intel RealSense SR300 Depth Camera formats Raikhel, Evgeni
@ 2016-12-05 11:01 ` Laurent Pinchart
  2016-12-05 13:34   ` Raikhel, Evgeni
  2017-02-08  8:34 ` [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Laurent Pinchart @ 2016-12-05 11:01 UTC (permalink / raw)
  To: Raikhel, Evgeni; +Cc: linux-media

Hi Evgeni,

Thank you for the patch.

On Monday 05 Dec 2016 10:06:55 Raikhel, Evgeni wrote:
> Specify GUID and FourCC codes mapping for Depth-related pixel formats
> advertised by Intel RealSense(tm) SR300 depth camera. Provide documentation
> for the new INZI pixel format introduced.

Could you please resend the patches inline instead of as attachments ? See 
Documentation/SubmittingPatches for more information.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH] UVC Module  - Support Intel RealSense SR300 Depth Camera formats
  2016-12-05 11:01 ` Laurent Pinchart
@ 2016-12-05 13:34   ` Raikhel, Evgeni
  0 siblings, 0 replies; 18+ messages in thread
From: Raikhel, Evgeni @ 2016-12-05 13:34 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

Hi Laurent,

Thanks for the feedback - I resubmitted the patches inline, as requested.

Regards,
Evgeni Raikhel

-----Original Message-----
From: Laurent Pinchart [mailto:laurent.pinchart@ideasonboard.com] 
Sent: Monday, December 05, 2016 13:02
To: Raikhel, Evgeni <evgeni.raikhel@intel.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] UVC Module - Support Intel RealSense SR300 Depth Camera formats

Hi Evgeni,

Thank you for the patch.

On Monday 05 Dec 2016 10:06:55 Raikhel, Evgeni wrote:
> Specify GUID and FourCC codes mapping for Depth-related pixel formats 
> advertised by Intel RealSense(tm) SR300 depth camera. Provide 
> documentation for the new INZI pixel format introduced.

Could you please resend the patches inline instead of as attachments ? See Documentation/SubmittingPatches for more information.

--
Regards,

Laurent Pinchart

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format
  2016-12-05 10:06 [PATCH] UVC Module - Support Intel RealSense SR300 Depth Camera formats Raikhel, Evgeni
  2016-12-05 11:01 ` Laurent Pinchart
@ 2017-02-08  8:34 ` evgeni.raikhel
  2017-02-08  8:34   ` [PATCH v2 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
  2017-02-08 13:39   ` [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format Laurent Pinchart
  2017-02-19 16:05 ` [PATCH v3 0/2] Intel SR300 Depth Formats evgeni.raikhel
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 18+ messages in thread
From: evgeni.raikhel @ 2017-02-08  8:34 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir,
	sergey.dorodnicov, eraikhel

From: eraikhel <evgeni.raikhel@intel.com>

Provide the frame structure and data layout of V4L2-PIX-FMT-INZI
format utilized by Intel SR300 Depth camera.

Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
---
 Documentation/media/uapi/v4l/depth-formats.rst |  1 +
 Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++++++
 include/uapi/linux/videodev2.h                 |  1 +
 3 files changed, 83 insertions(+)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst

diff --git a/Documentation/media/uapi/v4l/depth-formats.rst b/Documentation/media/uapi/v4l/depth-formats.rst
index 82f183870aae..c755be0e4d2a 100644
--- a/Documentation/media/uapi/v4l/depth-formats.rst
+++ b/Documentation/media/uapi/v4l/depth-formats.rst
@@ -13,3 +13,4 @@ Depth data provides distance to points, mapped onto the image plane
     :maxdepth: 1
 
     pixfmt-z16
+    pixfmt-inzi
diff --git a/Documentation/media/uapi/v4l/pixfmt-inzi.rst b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
new file mode 100644
index 000000000000..9849e799f205
--- /dev/null
+++ b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
@@ -0,0 +1,81 @@
+.. -*- coding: utf-8; mode: rst -*-
+
+.. _V4L2-PIX-FMT-INZI:
+
+**************************
+V4L2_PIX_FMT_INZI ('INZI')
+**************************
+
+Infrared 10-bit linked with Depth 16-bit images
+
+
+Description
+===========
+
+Proprietary multi-planar format used by Intel SR300 Depth cameras, comprise of
+Infrared image followed by Depth data. The pixel definition is 32-bpp,
+with the Depth and Infrared Data split into separate continuous planes of
+identical dimensions.
+
+
+
+The first plane - Infrared data - is stored according to
+:ref:`V4L2_PIX_FMT_Y10 <V4L2-PIX-FMT-Y10>` greyscale format.
+Each pixel is 16-bit cell, with actual data stored in the 10 LSBs
+with values in range 0 to 1023.
+The six remaining MSBs are padded with zeros.
+
+
+The second plane provides 16-bit per-pixel Depth data arranged in
+:ref:`V4L2-PIX-FMT-Z16 <V4L2-PIX-FMT-Z16>` format.
+
+
+**Frame Structure.**
+Each cell is a 16-bit word with more significant data stored at higher
+memory address (byte order is little-endian).
+
+.. raw:: latex
+
+    \newline\newline\begin{adjustbox}{width=\columnwidth}
+
+.. tabularcolumns:: |p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
+
+.. flat-table::
+    :header-rows:  0
+    :stub-columns: 1
+    :widths:    1 1 1 1 1 1
+
+    * - Ir\ :sub:`0,0`
+      - Ir\ :sub:`0,1`
+      - Ir\ :sub:`0,2`
+      - ...
+      - ...
+      - ...
+    * - :cspan:`5` ...
+    * - :cspan:`5` Infrared Data
+    * - :cspan:`5` ...
+    * - ...
+      - ...
+      - ...
+      - Ir\ :sub:`n-1,n-3`
+      - Ir\ :sub:`n-1,n-2`
+      - Ir\ :sub:`n-1,n-1`
+    * - Depth\ :sub:`0,0`
+      - Depth\ :sub:`0,1`
+      - Depth\ :sub:`0,2`
+      - ...
+      - ...
+      - ...
+    * - :cspan:`5` ...
+    * - :cspan:`5` Depth Data
+    * - :cspan:`5` ...
+    * - ...
+      - ...
+      - ...
+      - Depth\ :sub:`n-1,n-3`
+      - Depth\ :sub:`n-1,n-2`
+      - Depth\ :sub:`n-1,n-1`
+
+.. raw:: latex
+
+    \end{adjustbox}\newline\newline
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 46e8a2e369f9..04263c59b93f 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -662,6 +662,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_Y12I     v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-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_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Infrared 10-bit linked with Depth 16-bit */
 
 /* SDR formats - used only for Software Defined Radio devices */
 #define V4L2_SDR_FMT_CU8          v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v2 2/2] uvcvideo: Add support for Intel SR300 depth camera
  2017-02-08  8:34 ` [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
@ 2017-02-08  8:34   ` evgeni.raikhel
  2017-02-08 13:41     ` Laurent Pinchart
  2017-02-08 13:39   ` [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format Laurent Pinchart
  1 sibling, 1 reply; 18+ messages in thread
From: evgeni.raikhel @ 2017-02-08  8:34 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir,
	sergey.dorodnicov, Daniel Patrick Johnson, Aviv Greenberg,
	Evgeni Raikhel

From: Daniel Patrick Johnson <teknotus@teknot.us>

Add support for Intel SR300 depth camera in uvc driver.
This includes adding three uvc GUIDs for the required pixel formats,
adding a new V4L pixel format definition to user api headers,
and updating the uvc driver GUID-to-4cc tables with the new formats.

Signed-off-by: Daniel Patrick Johnson <teknotus@teknot.us>
Signed-off-by: Aviv Greenberg <avivgr@gmail.com>
Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
---
 drivers/media/usb/uvc/uvc_driver.c | 15 +++++++++++++++
 drivers/media/usb/uvc/uvcvideo.h   |  9 +++++++++
 2 files changed, 24 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 04bf35063c4c..46d6be0bb316 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -188,6 +188,21 @@ static struct uvc_format_desc uvc_fmts[] = {
 		.guid		= UVC_GUID_FORMAT_GR16,
 		.fcc		= V4L2_PIX_FMT_SGRBG16,
 	},
+	{
+		.name		= "Depth data 16-bit (Z16)",
+		.guid		= UVC_GUID_FORMAT_INVZ,
+		.fcc		= V4L2_PIX_FMT_Z16,
+	},
+	{
+		.name		= "Greyscale 10-bit (Y10 )",
+		.guid		= UVC_GUID_FORMAT_INVI,
+		.fcc		= V4L2_PIX_FMT_Y10,
+	},
+	{
+		.name		= "IR:Depth 26-bit (INZI)",
+		.guid		= UVC_GUID_FORMAT_INZI,
+		.fcc		= V4L2_PIX_FMT_INZI,
+	},
 };
 
 /* ------------------------------------------------------------------------
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 4205e7a423f0..15e415e32c7f 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -143,6 +143,15 @@
 #define UVC_GUID_FORMAT_RW10 \
 	{ 'R',  'W',  '1',  '0', 0x00, 0x00, 0x10, 0x00, \
 	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_INVZ \
+	{ 'I',  'N',  'V',  'Z', 0x90, 0x2d, 0x58, 0x4a, \
+	 0x92, 0x0b, 0x77, 0x3f, 0x1f, 0x2c, 0x55, 0x6b}
+#define UVC_GUID_FORMAT_INZI \
+	{ 'I',  'N',  'Z',  'I', 0x66, 0x1a, 0x42, 0xa2, \
+	 0x90, 0x65, 0xd0, 0x18, 0x14, 0xa8, 0xef, 0x8a}
+#define UVC_GUID_FORMAT_INVI \
+	{ 'I',  'N',  'V',  'I', 0xdb, 0x57, 0x49, 0x5e, \
+	 0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
 
 /* ------------------------------------------------------------------------
  * Driver specific constants.
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format
  2017-02-08  8:34 ` [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
  2017-02-08  8:34   ` [PATCH v2 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
@ 2017-02-08 13:39   ` Laurent Pinchart
  1 sibling, 0 replies; 18+ messages in thread
From: Laurent Pinchart @ 2017-02-08 13:39 UTC (permalink / raw)
  To: evgeni.raikhel
  Cc: linux-media, guennadi.liakhovetski, eliezer.tamir,
	sergey.dorodnicov, eraikhel

Hi Evgeni,

Thank you for the patch.

On Wednesday 08 Feb 2017 10:34:23 evgeni.raikhel@gmail.com wrote:
> From: eraikhel <evgeni.raikhel@intel.com>
> 
> Provide the frame structure and data layout of V4L2-PIX-FMT-INZI
> format utilized by Intel SR300 Depth camera.
> 
> Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
> ---
>  Documentation/media/uapi/v4l/depth-formats.rst |  1 +
>  Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 +++++++++++++++++++++++
>  include/uapi/linux/videodev2.h                 |  1 +

You should also add the format description string to v4l_fill_fmtdesc() in 
drivers/media/v4l2-core/v4l2-ioctl.c. Maybe something like "Planar 10-bit IR 
and 16-bit Depth" ?

>  3 files changed, 83 insertions(+)
>  create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst
> 
> diff --git a/Documentation/media/uapi/v4l/depth-formats.rst
> b/Documentation/media/uapi/v4l/depth-formats.rst index
> 82f183870aae..c755be0e4d2a 100644
> --- a/Documentation/media/uapi/v4l/depth-formats.rst
> +++ b/Documentation/media/uapi/v4l/depth-formats.rst
> @@ -13,3 +13,4 @@ Depth data provides distance to points, mapped onto the
> image plane
>      :maxdepth: 1
> 
>      pixfmt-z16
> +    pixfmt-inzi

I'd keep the formats alphabetically sorted.

The rest looks good to me. With these two small issues fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> diff --git a/Documentation/media/uapi/v4l/pixfmt-inzi.rst
> b/Documentation/media/uapi/v4l/pixfmt-inzi.rst new file mode 100644
> index 000000000000..9849e799f205
> --- /dev/null
> +++ b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
> @@ -0,0 +1,81 @@
> +.. -*- coding: utf-8; mode: rst -*-
> +
> +.. _V4L2-PIX-FMT-INZI:
> +
> +**************************
> +V4L2_PIX_FMT_INZI ('INZI')
> +**************************
> +
> +Infrared 10-bit linked with Depth 16-bit images
> +
> +
> +Description
> +===========
> +
> +Proprietary multi-planar format used by Intel SR300 Depth cameras, comprise
> of
> +Infrared image followed by Depth data. The pixel definition is 32-bpp,
> +with the Depth and Infrared Data split into separate continuous planes of
> +identical dimensions.
> +
> +
> +
> +The first plane - Infrared data - is stored according to
> +:ref:`V4L2_PIX_FMT_Y10 <V4L2-PIX-FMT-Y10>` greyscale format.
> +Each pixel is 16-bit cell, with actual data stored in the 10 LSBs
> +with values in range 0 to 1023.
> +The six remaining MSBs are padded with zeros.
> +
> +
> +The second plane provides 16-bit per-pixel Depth data arranged in
> +:ref:`V4L2-PIX-FMT-Z16 <V4L2-PIX-FMT-Z16>` format.
> +
> +
> +**Frame Structure.**
> +Each cell is a 16-bit word with more significant data stored at higher
> +memory address (byte order is little-endian).
> +
> +.. raw:: latex
> +
> +    \newline\newline\begin{adjustbox}{width=\columnwidth}
> +
> +.. tabularcolumns:: |p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
> +
> +.. flat-table::
> +    :header-rows:  0
> +    :stub-columns: 1
> +    :widths:    1 1 1 1 1 1
> +
> +    * - Ir\ :sub:`0,0`
> +      - Ir\ :sub:`0,1`
> +      - Ir\ :sub:`0,2`
> +      - ...
> +      - ...
> +      - ...
> +    * - :cspan:`5` ...
> +    * - :cspan:`5` Infrared Data
> +    * - :cspan:`5` ...
> +    * - ...
> +      - ...
> +      - ...
> +      - Ir\ :sub:`n-1,n-3`
> +      - Ir\ :sub:`n-1,n-2`
> +      - Ir\ :sub:`n-1,n-1`
> +    * - Depth\ :sub:`0,0`
> +      - Depth\ :sub:`0,1`
> +      - Depth\ :sub:`0,2`
> +      - ...
> +      - ...
> +      - ...
> +    * - :cspan:`5` ...
> +    * - :cspan:`5` Depth Data
> +    * - :cspan:`5` ...
> +    * - ...
> +      - ...
> +      - ...
> +      - Depth\ :sub:`n-1,n-3`
> +      - Depth\ :sub:`n-1,n-2`
> +      - Depth\ :sub:`n-1,n-1`
> +
> +.. raw:: latex
> +
> +    \end{adjustbox}\newline\newline
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 46e8a2e369f9..04263c59b93f 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -662,6 +662,7 @@ struct v4l2_pix_format {
>  #define V4L2_PIX_FMT_Y12I     v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale
> 12-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_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel
> Infrared 10-bit linked with Depth 16-bit */
> 
>  /* SDR formats - used only for Software Defined Radio devices */
>  #define V4L2_SDR_FMT_CU8          v4l2_fourcc('C', 'U', '0', '8') /* IQ u8
> */

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v2 2/2] uvcvideo: Add support for Intel SR300 depth camera
  2017-02-08  8:34   ` [PATCH v2 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
@ 2017-02-08 13:41     ` Laurent Pinchart
  0 siblings, 0 replies; 18+ messages in thread
From: Laurent Pinchart @ 2017-02-08 13:41 UTC (permalink / raw)
  To: evgeni.raikhel
  Cc: linux-media, guennadi.liakhovetski, eliezer.tamir,
	sergey.dorodnicov, Daniel Patrick Johnson, Aviv Greenberg,
	Evgeni Raikhel

Hi Evgeni,

Thank you for the patch.

On Wednesday 08 Feb 2017 10:34:24 evgeni.raikhel@gmail.com wrote:
> From: Daniel Patrick Johnson <teknotus@teknot.us>
> 
> Add support for Intel SR300 depth camera in uvc driver.
> This includes adding three uvc GUIDs for the required pixel formats,
> adding a new V4L pixel format definition to user api headers,

The header change has been split to patch 1/2, you can remove this sentence.

Apart from that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> and updating the uvc driver GUID-to-4cc tables with the new formats.
> 
> Signed-off-by: Daniel Patrick Johnson <teknotus@teknot.us>
> Signed-off-by: Aviv Greenberg <avivgr@gmail.com>
> Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
> ---
>  drivers/media/usb/uvc/uvc_driver.c | 15 +++++++++++++++
>  drivers/media/usb/uvc/uvcvideo.h   |  9 +++++++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/drivers/media/usb/uvc/uvc_driver.c
> b/drivers/media/usb/uvc/uvc_driver.c index 04bf35063c4c..46d6be0bb316
> 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -188,6 +188,21 @@ static struct uvc_format_desc uvc_fmts[] = {
>  		.guid		= UVC_GUID_FORMAT_GR16,
>  		.fcc		= V4L2_PIX_FMT_SGRBG16,
>  	},
> +	{
> +		.name		= "Depth data 16-bit (Z16)",
> +		.guid		= UVC_GUID_FORMAT_INVZ,
> +		.fcc		= V4L2_PIX_FMT_Z16,
> +	},
> +	{
> +		.name		= "Greyscale 10-bit (Y10 )",
> +		.guid		= UVC_GUID_FORMAT_INVI,
> +		.fcc		= V4L2_PIX_FMT_Y10,
> +	},
> +	{
> +		.name		= "IR:Depth 26-bit (INZI)",
> +		.guid		= UVC_GUID_FORMAT_INZI,
> +		.fcc		= V4L2_PIX_FMT_INZI,
> +	},
>  };
> 
>  /* ------------------------------------------------------------------------
> diff --git a/drivers/media/usb/uvc/uvcvideo.h
> b/drivers/media/usb/uvc/uvcvideo.h index 4205e7a423f0..15e415e32c7f 100644
> --- a/drivers/media/usb/uvc/uvcvideo.h
> +++ b/drivers/media/usb/uvc/uvcvideo.hdrivers/media/usb/uvc/uvcvideo.h
> @@ -143,6 +143,15 @@
>  #define UVC_GUID_FORMAT_RW10 \
>  	{ 'R',  'W',  '1',  '0', 0x00, 0x00, 0x10, 0x00, \
>  	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> +#define UVC_GUID_FORMAT_INVZ \
> +	{ 'I',  'N',  'V',  'Z', 0x90, 0x2d, 0x58, 0x4a, \
> +	 0x92, 0x0b, 0x77, 0x3f, 0x1f, 0x2c, 0x55, 0x6b}
> +#define UVC_GUID_FORMAT_INZI \
> +	{ 'I',  'N',  'Z',  'I', 0x66, 0x1a, 0x42, 0xa2, \
> +	 0x90, 0x65, 0xd0, 0x18, 0x14, 0xa8, 0xef, 0x8a}
> +#define UVC_GUID_FORMAT_INVI \
> +	{ 'I',  'N',  'V',  'I', 0xdb, 0x57, 0x49, 0x5e, \
> +	 0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
> 
>  /* ------------------------------------------------------------------------
> * Driver specific constants.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 0/2] Intel SR300 Depth Formats
  2016-12-05 10:06 [PATCH] UVC Module - Support Intel RealSense SR300 Depth Camera formats Raikhel, Evgeni
  2016-12-05 11:01 ` Laurent Pinchart
  2017-02-08  8:34 ` [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
@ 2017-02-19 16:05 ` evgeni.raikhel
  2017-02-19 16:14 ` [PATCH v3 0/2] Intel Depth Formats for SR300 camera evgeni.raikhel
  2017-03-02 23:43 ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera evgeni.raikhel
  4 siblings, 0 replies; 18+ messages in thread
From: evgeni.raikhel @ 2017-02-19 16:05 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir, Evgeni Raikhel

From: Evgeni Raikhel <evgeni.raikhel@intel.com>

This is the third iteration of the formats patch.
Change log:
- Changing INZI entry order in documentation to keep it sorted alphabetically
- Adding format description string to v4l_fill_fmtdesc() function
- Comments update


Daniel Patrick Johnson (1):
  uvcvideo: Add support for Intel SR300 depth camera

eraikhel (1):
  Documentation: Intel SR300 Depth camera INZI format

 Documentation/media/uapi/v4l/depth-formats.rst |  1 +
 Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++++++
 drivers/media/usb/uvc/uvc_driver.c             | 15 +++++
 drivers/media/usb/uvc/uvcvideo.h               |  9 +++
 drivers/media/v4l2-core/v4l2-ioctl.c           |  1 +
 include/uapi/linux/videodev2.h                 |  1 +
 6 files changed, 108 insertions(+)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst

-- 
2.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 0/2] Intel  Depth Formats for SR300 camera
  2016-12-05 10:06 [PATCH] UVC Module - Support Intel RealSense SR300 Depth Camera formats Raikhel, Evgeni
                   ` (2 preceding siblings ...)
  2017-02-19 16:05 ` [PATCH v3 0/2] Intel SR300 Depth Formats evgeni.raikhel
@ 2017-02-19 16:14 ` evgeni.raikhel
  2017-02-19 16:14   ` [PATCH v3 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
  2017-02-19 16:14   ` [PATCH v3 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
  2017-03-02 23:43 ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera evgeni.raikhel
  4 siblings, 2 replies; 18+ messages in thread
From: evgeni.raikhel @ 2017-02-19 16:14 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir, Evgeni Raikhel

From: Evgeni Raikhel <evgeni.raikhel@intel.com>

This is the third iteration of the patch that addresses reported issues.
Change Log:
- Adding V4L2_PIX_FMT_INZI format description to v4l_fill_fmtdesc(..)
- Reorder INZI entry in ../depth-formats.rst to keep the list strictly alphabetic
- Patch comments minor amendments


Daniel Patrick Johnson (1):
  uvcvideo: Add support for Intel SR300 depth camera

eraikhel (1):
  Documentation: Intel SR300 Depth camera INZI format

 Documentation/media/uapi/v4l/depth-formats.rst |  1 +
 Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++++++
 drivers/media/usb/uvc/uvc_driver.c             | 15 +++++
 drivers/media/usb/uvc/uvcvideo.h               |  9 +++
 drivers/media/v4l2-core/v4l2-ioctl.c           |  1 +
 include/uapi/linux/videodev2.h                 |  1 +
 6 files changed, 108 insertions(+)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst

-- 
2.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 1/2] Documentation: Intel SR300 Depth camera INZI format
  2017-02-19 16:14 ` [PATCH v3 0/2] Intel Depth Formats for SR300 camera evgeni.raikhel
@ 2017-02-19 16:14   ` evgeni.raikhel
  2017-02-19 16:45     ` Laurent Pinchart
  2017-02-19 16:14   ` [PATCH v3 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
  1 sibling, 1 reply; 18+ messages in thread
From: evgeni.raikhel @ 2017-02-19 16:14 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir, eraikhel

From: eraikhel <evgeni.raikhel@intel.com>

Provide the frame structure and data layout of V4L2-PIX-FMT-INZI
format utilized by Intel SR300 Depth camera.

Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 Documentation/media/uapi/v4l/depth-formats.rst |  1 +
 Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++++++
 drivers/media/v4l2-core/v4l2-ioctl.c           |  1 +
 include/uapi/linux/videodev2.h                 |  1 +
 4 files changed, 84 insertions(+)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst

diff --git a/Documentation/media/uapi/v4l/depth-formats.rst b/Documentation/media/uapi/v4l/depth-formats.rst
index 82f183870aae..c755be0e4d2a 100644
--- a/Documentation/media/uapi/v4l/depth-formats.rst
+++ b/Documentation/media/uapi/v4l/depth-formats.rst
@@ -13,3 +13,4 @@ Depth data provides distance to points, mapped onto the image plane
     :maxdepth: 1
 
     pixfmt-z16
+    pixfmt-inzi
diff --git a/Documentation/media/uapi/v4l/pixfmt-inzi.rst b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
new file mode 100644
index 000000000000..9849e799f205
--- /dev/null
+++ b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
@@ -0,0 +1,81 @@
+.. -*- coding: utf-8; mode: rst -*-
+
+.. _V4L2-PIX-FMT-INZI:
+
+**************************
+V4L2_PIX_FMT_INZI ('INZI')
+**************************
+
+Infrared 10-bit linked with Depth 16-bit images
+
+
+Description
+===========
+
+Proprietary multi-planar format used by Intel SR300 Depth cameras, comprise of
+Infrared image followed by Depth data. The pixel definition is 32-bpp,
+with the Depth and Infrared Data split into separate continuous planes of
+identical dimensions.
+
+
+
+The first plane - Infrared data - is stored according to
+:ref:`V4L2_PIX_FMT_Y10 <V4L2-PIX-FMT-Y10>` greyscale format.
+Each pixel is 16-bit cell, with actual data stored in the 10 LSBs
+with values in range 0 to 1023.
+The six remaining MSBs are padded with zeros.
+
+
+The second plane provides 16-bit per-pixel Depth data arranged in
+:ref:`V4L2-PIX-FMT-Z16 <V4L2-PIX-FMT-Z16>` format.
+
+
+**Frame Structure.**
+Each cell is a 16-bit word with more significant data stored at higher
+memory address (byte order is little-endian).
+
+.. raw:: latex
+
+    \newline\newline\begin{adjustbox}{width=\columnwidth}
+
+.. tabularcolumns:: |p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
+
+.. flat-table::
+    :header-rows:  0
+    :stub-columns: 1
+    :widths:    1 1 1 1 1 1
+
+    * - Ir\ :sub:`0,0`
+      - Ir\ :sub:`0,1`
+      - Ir\ :sub:`0,2`
+      - ...
+      - ...
+      - ...
+    * - :cspan:`5` ...
+    * - :cspan:`5` Infrared Data
+    * - :cspan:`5` ...
+    * - ...
+      - ...
+      - ...
+      - Ir\ :sub:`n-1,n-3`
+      - Ir\ :sub:`n-1,n-2`
+      - Ir\ :sub:`n-1,n-1`
+    * - Depth\ :sub:`0,0`
+      - Depth\ :sub:`0,1`
+      - Depth\ :sub:`0,2`
+      - ...
+      - ...
+      - ...
+    * - :cspan:`5` ...
+    * - :cspan:`5` Depth Data
+    * - :cspan:`5` ...
+    * - ...
+      - ...
+      - ...
+      - Depth\ :sub:`n-1,n-3`
+      - Depth\ :sub:`n-1,n-2`
+      - Depth\ :sub:`n-1,n-1`
+
+.. raw:: latex
+
+    \end{adjustbox}\newline\newline
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 0c3f238a2e76..3023e2351861 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1131,6 +1131,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 	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_Z16:		descr = "16-bit Depth"; break;
+	case V4L2_PIX_FMT_INZI:		descr = "Planar 10-bit Greyscale and 16-bit Depth"; break;
 	case V4L2_PIX_FMT_PAL8:		descr = "8-bit Palette"; break;
 	case V4L2_PIX_FMT_UV8:		descr = "8-bit Chrominance UV 4-4"; break;
 	case V4L2_PIX_FMT_YVU410:	descr = "Planar YVU 4:1:0"; break;
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 46e8a2e369f9..8543741a9910 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -662,6 +662,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_Y12I     v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-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_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
 
 /* SDR formats - used only for Software Defined Radio devices */
 #define V4L2_SDR_FMT_CU8          v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
-- 
2.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 2/2] uvcvideo: Add support for Intel SR300 depth camera
  2017-02-19 16:14 ` [PATCH v3 0/2] Intel Depth Formats for SR300 camera evgeni.raikhel
  2017-02-19 16:14   ` [PATCH v3 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
@ 2017-02-19 16:14   ` evgeni.raikhel
  1 sibling, 0 replies; 18+ messages in thread
From: evgeni.raikhel @ 2017-02-19 16:14 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir,
	Daniel Patrick Johnson, Aviv Greenberg, Evgeni Raikhel

From: Daniel Patrick Johnson <teknotus@teknot.us>

Add support for Intel SR300 depth camera in uvc driver.
This includes adding three uvc GUIDs for the required pixel formats
and updating the uvc driver GUID-to-4cc tables with the new formats.

Signed-off-by: Daniel Patrick Johnson <teknotus@teknot.us>
Signed-off-by: Aviv Greenberg <avivgr@gmail.com>
Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/usb/uvc/uvc_driver.c | 15 +++++++++++++++
 drivers/media/usb/uvc/uvcvideo.h   |  9 +++++++++
 2 files changed, 24 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 04bf35063c4c..46d6be0bb316 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -188,6 +188,21 @@ static struct uvc_format_desc uvc_fmts[] = {
 		.guid		= UVC_GUID_FORMAT_GR16,
 		.fcc		= V4L2_PIX_FMT_SGRBG16,
 	},
+	{
+		.name		= "Depth data 16-bit (Z16)",
+		.guid		= UVC_GUID_FORMAT_INVZ,
+		.fcc		= V4L2_PIX_FMT_Z16,
+	},
+	{
+		.name		= "Greyscale 10-bit (Y10 )",
+		.guid		= UVC_GUID_FORMAT_INVI,
+		.fcc		= V4L2_PIX_FMT_Y10,
+	},
+	{
+		.name		= "IR:Depth 26-bit (INZI)",
+		.guid		= UVC_GUID_FORMAT_INZI,
+		.fcc		= V4L2_PIX_FMT_INZI,
+	},
 };
 
 /* ------------------------------------------------------------------------
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 4205e7a423f0..15e415e32c7f 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -143,6 +143,15 @@
 #define UVC_GUID_FORMAT_RW10 \
 	{ 'R',  'W',  '1',  '0', 0x00, 0x00, 0x10, 0x00, \
 	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_INVZ \
+	{ 'I',  'N',  'V',  'Z', 0x90, 0x2d, 0x58, 0x4a, \
+	 0x92, 0x0b, 0x77, 0x3f, 0x1f, 0x2c, 0x55, 0x6b}
+#define UVC_GUID_FORMAT_INZI \
+	{ 'I',  'N',  'Z',  'I', 0x66, 0x1a, 0x42, 0xa2, \
+	 0x90, 0x65, 0xd0, 0x18, 0x14, 0xa8, 0xef, 0x8a}
+#define UVC_GUID_FORMAT_INVI \
+	{ 'I',  'N',  'V',  'I', 0xdb, 0x57, 0x49, 0x5e, \
+	 0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
 
 /* ------------------------------------------------------------------------
  * Driver specific constants.
-- 
2.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 1/2] Documentation: Intel SR300 Depth camera INZI format
  2017-02-19 16:14   ` [PATCH v3 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
@ 2017-02-19 16:45     ` Laurent Pinchart
  0 siblings, 0 replies; 18+ messages in thread
From: Laurent Pinchart @ 2017-02-19 16:45 UTC (permalink / raw)
  To: evgeni.raikhel; +Cc: linux-media, guennadi.liakhovetski, eliezer.tamir

Hi Evgeni,

Thank you for the patch.

On Sunday 19 Feb 2017 18:14:36 evgeni.raikhel@intel.com wrote:
> From: eraikhel <evgeni.raikhel@intel.com>
> 
> Provide the frame structure and data layout of V4L2-PIX-FMT-INZI
> format utilized by Intel SR300 Depth camera.
> 
> Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  Documentation/media/uapi/v4l/depth-formats.rst |  1 +
>  Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++
>  drivers/media/v4l2-core/v4l2-ioctl.c           |  1 +
>  include/uapi/linux/videodev2.h                 |  1 +
>  4 files changed, 84 insertions(+)
>  create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst
> 
> diff --git a/Documentation/media/uapi/v4l/depth-formats.rst
> b/Documentation/media/uapi/v4l/depth-formats.rst index
> 82f183870aae..c755be0e4d2a 100644
> --- a/Documentation/media/uapi/v4l/depth-formats.rst
> +++ b/Documentation/media/uapi/v4l/depth-formats.rst
> @@ -13,3 +13,4 @@ Depth data provides distance to points, mapped onto the
> image plane
>      :maxdepth: 1
> 
>      pixfmt-z16
> +    pixfmt-inzi

According the the cover letter, this version reordered "INZI entry in 
../depth-formats.rst to keep the list strictly alphabetic. Do we have a 
different definition of the alphabetic order ? :-)

[snip]

> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c
> b/drivers/media/v4l2-core/v4l2-ioctl.c index 0c3f238a2e76..3023e2351861
> 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1131,6 +1131,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
> 	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_Z16:		descr = "16-bit Depth"; break;
> +	case V4L2_PIX_FMT_INZI:		descr = "Planar 10-bit Greyscale and
> 16-bit Depth"; break;

I'm afraid that the format description is limited to 32 characters (including 
the terminating 0), while this is 41 characters long.

> 	case V4L2_PIX_FMT_PAL8:		descr = "8-bit Palette"; break;
>  	case V4L2_PIX_FMT_UV8:		descr = "8-bit Chrominance UV 4-4";
> break;
>  	case V4L2_PIX_FMT_YVU410:	descr = "Planar YVU 4:1:0"; break;

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v4 0/2]  Intel Depth Formats for SR300 Camera
  2016-12-05 10:06 [PATCH] UVC Module - Support Intel RealSense SR300 Depth Camera formats Raikhel, Evgeni
                   ` (3 preceding siblings ...)
  2017-02-19 16:14 ` [PATCH v3 0/2] Intel Depth Formats for SR300 camera evgeni.raikhel
@ 2017-03-02 23:43 ` evgeni.raikhel
  2017-03-02 23:43   ` [PATCH v4 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
                     ` (2 more replies)
  4 siblings, 3 replies; 18+ messages in thread
From: evgeni.raikhel @ 2017-03-02 23:43 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir, Evgeni Raikhel

From: Evgeni Raikhel <evgeni.raikhel@intel.com>

Change Log:
 - Fixing FourCC description in v4l2_ioctl.c to be less than 32 bytes
 - Reorder INZI format entry in Documentation chapter

Daniel Patrick Johnson (1):
  uvcvideo: Add support for Intel SR300 depth camera

eraikhel (1):
  Documentation: Intel SR300 Depth camera INZI format

 Documentation/media/uapi/v4l/depth-formats.rst |  1 +
 Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++++++
 drivers/media/usb/uvc/uvc_driver.c             | 15 +++++
 drivers/media/usb/uvc/uvcvideo.h               |  9 +++
 drivers/media/v4l2-core/v4l2-ioctl.c           |  1 +
 include/uapi/linux/videodev2.h                 |  1 +
 6 files changed, 108 insertions(+)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst

-- 
2.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v4 1/2] Documentation: Intel SR300 Depth camera INZI format
  2017-03-02 23:43 ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera evgeni.raikhel
@ 2017-03-02 23:43   ` evgeni.raikhel
  2017-04-03  8:58     ` Hans Verkuil
  2017-03-02 23:43   ` [PATCH v4 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
  2017-04-03  8:53   ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera Raikhel, Evgeni
  2 siblings, 1 reply; 18+ messages in thread
From: evgeni.raikhel @ 2017-03-02 23:43 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir, eraikhel

From: eraikhel <evgeni.raikhel@intel.com>

Provide the frame structure and data layout of V4L2-PIX-FMT-INZI
format utilized by Intel SR300 Depth camera.

Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 Documentation/media/uapi/v4l/depth-formats.rst |  1 +
 Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++++++
 drivers/media/v4l2-core/v4l2-ioctl.c           |  1 +
 include/uapi/linux/videodev2.h                 |  1 +
 4 files changed, 84 insertions(+)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst

diff --git a/Documentation/media/uapi/v4l/depth-formats.rst b/Documentation/media/uapi/v4l/depth-formats.rst
index 82f183870aae..d1641e9687a6 100644
--- a/Documentation/media/uapi/v4l/depth-formats.rst
+++ b/Documentation/media/uapi/v4l/depth-formats.rst
@@ -12,4 +12,5 @@ Depth data provides distance to points, mapped onto the image plane
 .. toctree::
     :maxdepth: 1
 
+    pixfmt-inzi
     pixfmt-z16
diff --git a/Documentation/media/uapi/v4l/pixfmt-inzi.rst b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
new file mode 100644
index 000000000000..9849e799f205
--- /dev/null
+++ b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
@@ -0,0 +1,81 @@
+.. -*- coding: utf-8; mode: rst -*-
+
+.. _V4L2-PIX-FMT-INZI:
+
+**************************
+V4L2_PIX_FMT_INZI ('INZI')
+**************************
+
+Infrared 10-bit linked with Depth 16-bit images
+
+
+Description
+===========
+
+Proprietary multi-planar format used by Intel SR300 Depth cameras, comprise of
+Infrared image followed by Depth data. The pixel definition is 32-bpp,
+with the Depth and Infrared Data split into separate continuous planes of
+identical dimensions.
+
+
+
+The first plane - Infrared data - is stored according to
+:ref:`V4L2_PIX_FMT_Y10 <V4L2-PIX-FMT-Y10>` greyscale format.
+Each pixel is 16-bit cell, with actual data stored in the 10 LSBs
+with values in range 0 to 1023.
+The six remaining MSBs are padded with zeros.
+
+
+The second plane provides 16-bit per-pixel Depth data arranged in
+:ref:`V4L2-PIX-FMT-Z16 <V4L2-PIX-FMT-Z16>` format.
+
+
+**Frame Structure.**
+Each cell is a 16-bit word with more significant data stored at higher
+memory address (byte order is little-endian).
+
+.. raw:: latex
+
+    \newline\newline\begin{adjustbox}{width=\columnwidth}
+
+.. tabularcolumns:: |p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
+
+.. flat-table::
+    :header-rows:  0
+    :stub-columns: 1
+    :widths:    1 1 1 1 1 1
+
+    * - Ir\ :sub:`0,0`
+      - Ir\ :sub:`0,1`
+      - Ir\ :sub:`0,2`
+      - ...
+      - ...
+      - ...
+    * - :cspan:`5` ...
+    * - :cspan:`5` Infrared Data
+    * - :cspan:`5` ...
+    * - ...
+      - ...
+      - ...
+      - Ir\ :sub:`n-1,n-3`
+      - Ir\ :sub:`n-1,n-2`
+      - Ir\ :sub:`n-1,n-1`
+    * - Depth\ :sub:`0,0`
+      - Depth\ :sub:`0,1`
+      - Depth\ :sub:`0,2`
+      - ...
+      - ...
+      - ...
+    * - :cspan:`5` ...
+    * - :cspan:`5` Depth Data
+    * - :cspan:`5` ...
+    * - ...
+      - ...
+      - ...
+      - Depth\ :sub:`n-1,n-3`
+      - Depth\ :sub:`n-1,n-2`
+      - Depth\ :sub:`n-1,n-1`
+
+.. raw:: latex
+
+    \end{adjustbox}\newline\newline
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 0c3f238a2e76..93e8f42b0d63 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1131,6 +1131,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 	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_Z16:		descr = "16-bit Depth"; break;
+	case V4L2_PIX_FMT_INZI:		descr = "Planar 10:16 Greyscale Depth"; break;
 	case V4L2_PIX_FMT_PAL8:		descr = "8-bit Palette"; break;
 	case V4L2_PIX_FMT_UV8:		descr = "8-bit Chrominance UV 4-4"; break;
 	case V4L2_PIX_FMT_YVU410:	descr = "Planar YVU 4:1:0"; break;
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 45184a2ef66c..fbf59637d577 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -661,6 +661,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_Y12I     v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-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_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
 
 /* SDR formats - used only for Software Defined Radio devices */
 #define V4L2_SDR_FMT_CU8          v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
-- 
2.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v4 2/2] uvcvideo: Add support for Intel SR300 depth camera
  2017-03-02 23:43 ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera evgeni.raikhel
  2017-03-02 23:43   ` [PATCH v4 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
@ 2017-03-02 23:43   ` evgeni.raikhel
  2017-04-03  8:53   ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera Raikhel, Evgeni
  2 siblings, 0 replies; 18+ messages in thread
From: evgeni.raikhel @ 2017-03-02 23:43 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir,
	Daniel Patrick Johnson, Aviv Greenberg, Evgeni Raikhel

From: Daniel Patrick Johnson <teknotus@teknot.us>

Add support for Intel SR300 depth camera in uvc driver.
This includes adding three uvc GUIDs for the required pixel formats
and updating the uvc driver GUID-to-4cc tables with the new formats.

Signed-off-by: Daniel Patrick Johnson <teknotus@teknot.us>
Signed-off-by: Aviv Greenberg <avivgr@gmail.com>
Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/usb/uvc/uvc_driver.c | 15 +++++++++++++++
 drivers/media/usb/uvc/uvcvideo.h   |  9 +++++++++
 2 files changed, 24 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 04bf35063c4c..46d6be0bb316 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -188,6 +188,21 @@ static struct uvc_format_desc uvc_fmts[] = {
 		.guid		= UVC_GUID_FORMAT_GR16,
 		.fcc		= V4L2_PIX_FMT_SGRBG16,
 	},
+	{
+		.name		= "Depth data 16-bit (Z16)",
+		.guid		= UVC_GUID_FORMAT_INVZ,
+		.fcc		= V4L2_PIX_FMT_Z16,
+	},
+	{
+		.name		= "Greyscale 10-bit (Y10 )",
+		.guid		= UVC_GUID_FORMAT_INVI,
+		.fcc		= V4L2_PIX_FMT_Y10,
+	},
+	{
+		.name		= "IR:Depth 26-bit (INZI)",
+		.guid		= UVC_GUID_FORMAT_INZI,
+		.fcc		= V4L2_PIX_FMT_INZI,
+	},
 };
 
 /* ------------------------------------------------------------------------
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 4205e7a423f0..15e415e32c7f 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -143,6 +143,15 @@
 #define UVC_GUID_FORMAT_RW10 \
 	{ 'R',  'W',  '1',  '0', 0x00, 0x00, 0x10, 0x00, \
 	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_INVZ \
+	{ 'I',  'N',  'V',  'Z', 0x90, 0x2d, 0x58, 0x4a, \
+	 0x92, 0x0b, 0x77, 0x3f, 0x1f, 0x2c, 0x55, 0x6b}
+#define UVC_GUID_FORMAT_INZI \
+	{ 'I',  'N',  'Z',  'I', 0x66, 0x1a, 0x42, 0xa2, \
+	 0x90, 0x65, 0xd0, 0x18, 0x14, 0xa8, 0xef, 0x8a}
+#define UVC_GUID_FORMAT_INVI \
+	{ 'I',  'N',  'V',  'I', 0xdb, 0x57, 0x49, 0x5e, \
+	 0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
 
 /* ------------------------------------------------------------------------
  * Driver specific constants.
-- 
2.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* RE: [PATCH v4 0/2]  Intel Depth Formats for SR300 Camera
  2017-03-02 23:43 ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera evgeni.raikhel
  2017-03-02 23:43   ` [PATCH v4 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
  2017-03-02 23:43   ` [PATCH v4 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
@ 2017-04-03  8:53   ` Raikhel, Evgeni
  2017-04-04 10:35     ` Laurent Pinchart
  2 siblings, 1 reply; 18+ messages in thread
From: Raikhel, Evgeni @ 2017-04-03  8:53 UTC (permalink / raw)
  To: laurent.pinchart; +Cc: Liakhovetski, Guennadi, Tamir, Eliezer, linux-media

Hi Laurent,
Can you please update on the status of the submission?
The last version has been reviewed a month ago.
Is there any estimate on when it is going to be staged/triaged/merged into media tree?

Please advise,
Evgeni


-----Original Message-----
From: Raikhel, Evgeni 
Sent: Friday, March 03, 2017 01:43
To: linux-media@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com; Liakhovetski, Guennadi <guennadi.liakhovetski@intel.com>; Tamir, Eliezer <eliezer.tamir@intel.com>; Raikhel, Evgeni <evgeni.raikhel@intel.com>
Subject: [PATCH v4 0/2] Intel Depth Formats for SR300 Camera

From: Evgeni Raikhel <evgeni.raikhel@intel.com>

Change Log:
 - Fixing FourCC description in v4l2_ioctl.c to be less than 32 bytes
 - Reorder INZI format entry in Documentation chapter

Daniel Patrick Johnson (1):
  uvcvideo: Add support for Intel SR300 depth camera

eraikhel (1):
  Documentation: Intel SR300 Depth camera INZI format

 Documentation/media/uapi/v4l/depth-formats.rst |  1 +
 Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++++++
 drivers/media/usb/uvc/uvc_driver.c             | 15 +++++
 drivers/media/usb/uvc/uvcvideo.h               |  9 +++
 drivers/media/v4l2-core/v4l2-ioctl.c           |  1 +
 include/uapi/linux/videodev2.h                 |  1 +
 6 files changed, 108 insertions(+)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst

-- 
2.7.4

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v4 1/2] Documentation: Intel SR300 Depth camera INZI format
  2017-03-02 23:43   ` [PATCH v4 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
@ 2017-04-03  8:58     ` Hans Verkuil
  0 siblings, 0 replies; 18+ messages in thread
From: Hans Verkuil @ 2017-04-03  8:58 UTC (permalink / raw)
  To: evgeni.raikhel, linux-media
  Cc: laurent.pinchart, guennadi.liakhovetski, eliezer.tamir

On 03/03/2017 12:43 AM, evgeni.raikhel@intel.com wrote:
> From: eraikhel <evgeni.raikhel@intel.com>
> 
> Provide the frame structure and data layout of V4L2-PIX-FMT-INZI
> format utilized by Intel SR300 Depth camera.
> 
> Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

	Hans

> ---
>  Documentation/media/uapi/v4l/depth-formats.rst |  1 +
>  Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++++++
>  drivers/media/v4l2-core/v4l2-ioctl.c           |  1 +
>  include/uapi/linux/videodev2.h                 |  1 +
>  4 files changed, 84 insertions(+)
>  create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst
> 
> diff --git a/Documentation/media/uapi/v4l/depth-formats.rst b/Documentation/media/uapi/v4l/depth-formats.rst
> index 82f183870aae..d1641e9687a6 100644
> --- a/Documentation/media/uapi/v4l/depth-formats.rst
> +++ b/Documentation/media/uapi/v4l/depth-formats.rst
> @@ -12,4 +12,5 @@ Depth data provides distance to points, mapped onto the image plane
>  .. toctree::
>      :maxdepth: 1
>  
> +    pixfmt-inzi
>      pixfmt-z16
> diff --git a/Documentation/media/uapi/v4l/pixfmt-inzi.rst b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
> new file mode 100644
> index 000000000000..9849e799f205
> --- /dev/null
> +++ b/Documentation/media/uapi/v4l/pixfmt-inzi.rst
> @@ -0,0 +1,81 @@
> +.. -*- coding: utf-8; mode: rst -*-
> +
> +.. _V4L2-PIX-FMT-INZI:
> +
> +**************************
> +V4L2_PIX_FMT_INZI ('INZI')
> +**************************
> +
> +Infrared 10-bit linked with Depth 16-bit images
> +
> +
> +Description
> +===========
> +
> +Proprietary multi-planar format used by Intel SR300 Depth cameras, comprise of
> +Infrared image followed by Depth data. The pixel definition is 32-bpp,
> +with the Depth and Infrared Data split into separate continuous planes of
> +identical dimensions.
> +
> +
> +
> +The first plane - Infrared data - is stored according to
> +:ref:`V4L2_PIX_FMT_Y10 <V4L2-PIX-FMT-Y10>` greyscale format.
> +Each pixel is 16-bit cell, with actual data stored in the 10 LSBs
> +with values in range 0 to 1023.
> +The six remaining MSBs are padded with zeros.
> +
> +
> +The second plane provides 16-bit per-pixel Depth data arranged in
> +:ref:`V4L2-PIX-FMT-Z16 <V4L2-PIX-FMT-Z16>` format.
> +
> +
> +**Frame Structure.**
> +Each cell is a 16-bit word with more significant data stored at higher
> +memory address (byte order is little-endian).
> +
> +.. raw:: latex
> +
> +    \newline\newline\begin{adjustbox}{width=\columnwidth}
> +
> +.. tabularcolumns:: |p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}|
> +
> +.. flat-table::
> +    :header-rows:  0
> +    :stub-columns: 1
> +    :widths:    1 1 1 1 1 1
> +
> +    * - Ir\ :sub:`0,0`
> +      - Ir\ :sub:`0,1`
> +      - Ir\ :sub:`0,2`
> +      - ...
> +      - ...
> +      - ...
> +    * - :cspan:`5` ...
> +    * - :cspan:`5` Infrared Data
> +    * - :cspan:`5` ...
> +    * - ...
> +      - ...
> +      - ...
> +      - Ir\ :sub:`n-1,n-3`
> +      - Ir\ :sub:`n-1,n-2`
> +      - Ir\ :sub:`n-1,n-1`
> +    * - Depth\ :sub:`0,0`
> +      - Depth\ :sub:`0,1`
> +      - Depth\ :sub:`0,2`
> +      - ...
> +      - ...
> +      - ...
> +    * - :cspan:`5` ...
> +    * - :cspan:`5` Depth Data
> +    * - :cspan:`5` ...
> +    * - ...
> +      - ...
> +      - ...
> +      - Depth\ :sub:`n-1,n-3`
> +      - Depth\ :sub:`n-1,n-2`
> +      - Depth\ :sub:`n-1,n-1`
> +
> +.. raw:: latex
> +
> +    \end{adjustbox}\newline\newline
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> index 0c3f238a2e76..93e8f42b0d63 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1131,6 +1131,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>  	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_Z16:		descr = "16-bit Depth"; break;
> +	case V4L2_PIX_FMT_INZI:		descr = "Planar 10:16 Greyscale Depth"; break;
>  	case V4L2_PIX_FMT_PAL8:		descr = "8-bit Palette"; break;
>  	case V4L2_PIX_FMT_UV8:		descr = "8-bit Chrominance UV 4-4"; break;
>  	case V4L2_PIX_FMT_YVU410:	descr = "Planar YVU 4:1:0"; break;
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 45184a2ef66c..fbf59637d577 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -661,6 +661,7 @@ struct v4l2_pix_format {
>  #define V4L2_PIX_FMT_Y12I     v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-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_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
>  
>  /* SDR formats - used only for Software Defined Radio devices */
>  #define V4L2_SDR_FMT_CU8          v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v4 0/2]  Intel Depth Formats for SR300 Camera
  2017-04-03  8:53   ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera Raikhel, Evgeni
@ 2017-04-04 10:35     ` Laurent Pinchart
  0 siblings, 0 replies; 18+ messages in thread
From: Laurent Pinchart @ 2017-04-04 10:35 UTC (permalink / raw)
  To: Raikhel, Evgeni; +Cc: Liakhovetski, Guennadi, Tamir, Eliezer, linux-media

Hi Evgeni,

On Monday 03 Apr 2017 08:53:44 Raikhel, Evgeni wrote:
> Hi Laurent,
> Can you please update on the status of the submission?
> The last version has been reviewed a month ago.
> Is there any estimate on when it is going to be staged/triaged/merged into
> media tree?

I've just sent a pull request to Mauro (and CC'ed you). The patches should get 
merged in v4.12.

> -----Original Message-----
> From: Raikhel, Evgeni
> Sent: Friday, March 03, 2017 01:43
> To: linux-media@vger.kernel.org
> Cc: laurent.pinchart@ideasonboard.com; Liakhovetski, Guennadi
> <guennadi.liakhovetski@intel.com>; Tamir, Eliezer
> <eliezer.tamir@intel.com>; Raikhel, Evgeni <evgeni.raikhel@intel.com>
> Subject: [PATCH v4 0/2] Intel Depth Formats for SR300 Camera
> 
> From: Evgeni Raikhel <evgeni.raikhel@intel.com>
> 
> Change Log:
>  - Fixing FourCC description in v4l2_ioctl.c to be less than 32 bytes
>  - Reorder INZI format entry in Documentation chapter
> 
> Daniel Patrick Johnson (1):
>   uvcvideo: Add support for Intel SR300 depth camera
> 
> eraikhel (1):
>   Documentation: Intel SR300 Depth camera INZI format
> 
>  Documentation/media/uapi/v4l/depth-formats.rst |  1 +
>  Documentation/media/uapi/v4l/pixfmt-inzi.rst   | 81 ++++++++++++++++++++++
>  drivers/media/usb/uvc/uvc_driver.c             | 15 +++++
>  drivers/media/usb/uvc/uvcvideo.h               |  9 +++
>  drivers/media/v4l2-core/v4l2-ioctl.c           |  1 +
>  include/uapi/linux/videodev2.h                 |  1 +
>  6 files changed, 108 insertions(+)
>  create mode 100644 Documentation/media/uapi/v4l/pixfmt-inzi.rst

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-04-04 10:35 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-05 10:06 [PATCH] UVC Module - Support Intel RealSense SR300 Depth Camera formats Raikhel, Evgeni
2016-12-05 11:01 ` Laurent Pinchart
2016-12-05 13:34   ` Raikhel, Evgeni
2017-02-08  8:34 ` [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
2017-02-08  8:34   ` [PATCH v2 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
2017-02-08 13:41     ` Laurent Pinchart
2017-02-08 13:39   ` [PATCH v2 1/2] Documentation: Intel SR300 Depth camera INZI format Laurent Pinchart
2017-02-19 16:05 ` [PATCH v3 0/2] Intel SR300 Depth Formats evgeni.raikhel
2017-02-19 16:14 ` [PATCH v3 0/2] Intel Depth Formats for SR300 camera evgeni.raikhel
2017-02-19 16:14   ` [PATCH v3 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
2017-02-19 16:45     ` Laurent Pinchart
2017-02-19 16:14   ` [PATCH v3 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
2017-03-02 23:43 ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera evgeni.raikhel
2017-03-02 23:43   ` [PATCH v4 1/2] Documentation: Intel SR300 Depth camera INZI format evgeni.raikhel
2017-04-03  8:58     ` Hans Verkuil
2017-03-02 23:43   ` [PATCH v4 2/2] uvcvideo: Add support for Intel SR300 depth camera evgeni.raikhel
2017-04-03  8:53   ` [PATCH v4 0/2] Intel Depth Formats for SR300 Camera Raikhel, Evgeni
2017-04-04 10:35     ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.