[libcamera-devel] [PATCH 1/2] libipa: Add CameraSensorHelper for ov2680

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Nov 30 22:56:53 CET 2021


Hi Daniel,

Thank you for the patch.

On Tue, Nov 30, 2021 at 09:34:10PM +0000, Daniel Scally wrote:
> Add a CameraSensorHelperOv2680 class. The OV2680 is found in concert
> with an IPU3 on the Lenovo Miix 510. The constants set are a bit of a
> guess, as the datasheet doesn't document the gain control field any
> further than giving its width in bits, but the default is 0x10 so we
> assume that to be 1x gain.

Would you be able to test if the gain is linear by capturing images
with, for instance, gains set to 16, 32, 48 and 64 and see if the
average relative luminance increases linearly ?

> Signed-off-by: Daniel Scally <djrscally at gmail.com>
> ---
>  src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
> index 0b0eb503..fd951505 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -305,6 +305,16 @@ public:
>  };
>  REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258)
>  
> +class CameraSensorHelperOv2680 : public CameraSensorHelper
> +{
> +public:
> +	CameraSensorHelperOv2680()
> +	{
> +		analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 16 };
> +	}
> +};
> +REGISTER_CAMERA_SENSOR_HELPER("ov2680", CameraSensorHelperOv2680)
> +
>  class CameraSensorHelperOv5670 : public CameraSensorHelper
>  {
>  public:

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list