[libcamera-devel] [PATCH 2/2] libcamera: Correct typos and omissions for packed 10-bit raw monochrome format

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Aug 4 20:28:58 CEST 2022


Hi David,

Thank you for the patch.

On Thu, Aug 04, 2022 at 11:45:50AM +0100, David Plowman via libcamera-devel wrote:
> One typo is corrected, and this format is added to one further table
> where it was missing entirely.
> 
> Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
> ---
>  src/libcamera/formats.cpp          | 2 +-
>  src/libcamera/v4l2_pixelformat.cpp | 2 ++
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp
> index 7b98fef2..cc8f652a 100644
> --- a/src/libcamera/formats.cpp
> +++ b/src/libcamera/formats.cpp
> @@ -564,7 +564,7 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
>  	} },
>  	{ formats::R10_CSI2P, {
>  		.name = "R10_CSI2P",
> -		.format = formats::R10,
> +		.format = formats::R10_CSI2P,

Oops indeed.

>  		.v4l2Formats = {
>  			.single = V4L2PixelFormat(V4L2_PIX_FMT_Y10P),
>  			.multi = V4L2PixelFormat(),
> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
> index bdcdc3be..8d1fde5d 100644
> --- a/src/libcamera/v4l2_pixelformat.cpp
> +++ b/src/libcamera/v4l2_pixelformat.cpp
> @@ -129,6 +129,8 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{
>  		{ formats::R10, "10-bit Greyscale" } },
>  	{ V4L2PixelFormat(V4L2_PIX_FMT_Y12),
>  		{ formats::R12, "12-bit Greyscale" } },
> +	{ V4L2PixelFormat(V4L2_PIX_FMT_Y10P),
> +		{ formats::R10_CSI2P, "10-bit Greyscale Packed" } },

I'll move this right after R10, to match the sort order of the Bayer
formats.

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

As the patch doesn't depend on the previous one, I'll apply it without
waiting for the outcome of the discussions in 1/2.

>  
>  	/* Bayer formats. */
>  	{ V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8),

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list