diff mbox

UVC Module - Support Intel RealSense SR300 Depth Camera formats

Message ID AA09C8071EEEFC44A7852ADCECA86673A1E6E7@hasmsx108.ger.corp.intel.com
State New
Headers show

Commit Message

Raikhel, Evgeni Dec. 5, 2016, 10:06 a.m. UTC
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.

Comments

Laurent Pinchart Dec. 5, 2016, 11:01 a.m. UTC | #1
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

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Raikhel, Evgeni Dec. 5, 2016, 1:34 p.m. UTC | #2
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.

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Feb. 8, 2017, 1:39 p.m. UTC | #3
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

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Feb. 8, 2017, 1:41 p.m. UTC | #4
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

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Feb. 19, 2017, 4:45 p.m. UTC | #5
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
Raikhel, Evgeni April 3, 2017, 8:53 a.m. UTC | #6
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.
Hans Verkuil April 3, 2017, 8:58 a.m. UTC | #7
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 */

>
Laurent Pinchart April 4, 2017, 10:35 a.m. UTC | #8
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
diff mbox

Patch

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