[libcamera-devel] [PATCH] libcamera: CameraSensorProperties: Add test pattern mode of imx258

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Jun 15 00:28:47 CEST 2021


Hi Hiro,

Thank you for the patch.

On Mon, Jun 14, 2021 at 09:22:15PM +0900, Hirokazu Honda wrote:
> Add supported test pattern modes of imx258 in CameraSensorProperties.

Based on the V4L2 driver, this looks correct. I don't have access to the
datasheet, so I can't perform further checks.

> Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
> ---
>  src/libcamera/camera_sensor_properties.cpp | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
> index f660743a..afa59b82 100644
> --- a/src/libcamera/camera_sensor_properties.cpp
> +++ b/src/libcamera/camera_sensor_properties.cpp
> @@ -65,7 +65,13 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
>  		{ "imx258", {
>  			.unitCellSize = { 1120, 1120 },
>  			/* \todo fill test pattern modes for imx258. */

This should be dropped.

> -			.testPatternModes = {},
> +			.testPatternModes = {
> +				{0, controls::draft::TestPatternModeOff },
> +				{1, controls::draft::TestPatternModeSolidColor},
> +				{2, controls::draft::TestPatternModeColorBars},
> +				{3, controls::draft::TestPatternModeColorBarsFadeToGray},
> +				{4, controls::draft::TestPatternModePn9},

Missing spaces after { and before }.

I'll fix this when applying.

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

> +			},
>  		} },
>  		{ "ov5670", {
>  			.unitCellSize = { 1120, 1120 },

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list