[libcamera-devel] [PATCH 03/11] libcamera/formats: Add IPU3_Y10 format

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Mar 19 15:01:02 CET 2023


Hi Dan,

Thank you for the patch.

On Sat, Mar 18, 2023 at 11:40:06PM +0000, Daniel Scally via libcamera-devel wrote:
> Add entries to libcamera's pixelFormatInfo map describing the IPU3_Y10
> format which is exposed by the CIO2 device when connected to certain
> camera sensors, such as the OmniVision 7251 IR Camera.
> 
> Signed-off-by: Daniel Scally <dan.scally at ideasonboard.com>
> ---
>  src/libcamera/formats.cpp  | 10 ++++++++++
>  src/libcamera/formats.yaml |  3 +++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
> index f5769c48..eda657c5 100644
> --- a/src/libcamera/formats.cpp
> +++ b/src/libcamera/formats.cpp
> @@ -517,6 +517,16 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
>  		.pixelsPerGroup = 4,
>  		.planes = {{ { 5, 1 }, { 0, 0 }, { 0, 0 } }},
>  	} },
> +	{ formats::Y10_IPU3, {
> +		.name = "Y10_IPU3",
> +		.format = formats::Y10_IPU3,
> +		.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_IPU3_Y10), },
> +		.bitsPerPixel = 10,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
> +		.packed = true,
> +		.pixelsPerGroup = 25,
> +		.planes = {{ { 32, 1 }, { 0, 0 }, { 0, 0 } }},
> +	} },
>  
>  	/* Bayer formats. */
>  	{ formats::SBGGR8, {
> diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml
> index e586cde1..36d3016d 100644
> --- a/src/libcamera/formats.yaml
> +++ b/src/libcamera/formats.yaml
> @@ -161,4 +161,7 @@ formats:
>    - SBGGR10_IPU3:
>        fourcc: DRM_FORMAT_SBGGR10
>        mod: IPU3_FORMAT_MOD_PACKED
> +  - Y10_IPU3:

This should be named R10_IPU3. See the existing R10_CSI2P format.

> +      fourcc: DRM_FORMAT_Y10

And you should use DRM_FORMAT_R10.

> +      mod: IPU3_FORMAT_MOD_PACKED
>  ...

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list