[libcamera-devel] [PATCH] libcamera: formats: Add formats for IPU3

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Jun 24 18:09:28 CEST 2020


Hi Niklas,

Thank you for the patch.

On Tue, Jun 23, 2020 at 04:11:30AM +0200, Niklas Söderlund wrote:
> When replacing DRM FourCCs with libcamera formats IPU3 format
> descriptors where missing resulting in RAW capture not being possible.
> Fix this by adding the missing descriptors.
> 
> Fixes: 56c99424edd64c5a ("libcamera: pipeline: Replace explicit DRM FourCCs with libcamera formats")
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

Sorry for breaking it in the first place.

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

> ---
>  src/libcamera/formats.cpp | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
> index 97e986786cc810b8..1272de29c802c539 100644
> --- a/src/libcamera/formats.cpp
> +++ b/src/libcamera/formats.cpp
> @@ -421,6 +421,34 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
>  		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
>  		.packed = true,
>  	} },
> +	{ formats::SBGGR10_IPU3, {
> +		.format = formats::SBGGR10_IPU3,
> +		.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SBGGR10),
> +		.bitsPerPixel = 10,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
> +		.packed = true,
> +	} },
> +	{ formats::SGBRG10_IPU3, {
> +		.format = formats::SGBRG10_IPU3,
> +		.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGBRG10),
> +		.bitsPerPixel = 10,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
> +		.packed = true,
> +	} },
> +	{ formats::SGRBG10_IPU3, {
> +		.format = formats::SGRBG10_IPU3,
> +		.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SGRBG10),
> +		.bitsPerPixel = 10,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
> +		.packed = true,
> +	} },
> +	{ formats::SRGGB10_IPU3, {
> +		.format = formats::SRGGB10_IPU3,
> +		.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_IPU3_SRGGB10),
> +		.bitsPerPixel = 10,
> +		.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
> +		.packed = true,
> +	} },
>  
>  	/* Compressed formats. */
>  	{ formats::MJPEG, {

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list