[v3,5/5] libcamera: libipa: camera_sensor_helper: add IMX290 black level
diff mbox series

Message ID 20241124192950.542686-6-geoffrey.vl@gmail.com
State Accepted
Headers show
Series
  • Add support for Sony IMX327 and IMX462 sensors
Related show

Commit Message

Geoffrey Van Landeghem Nov. 24, 2024, 7:29 p.m. UTC
Report the default sensor black level reported by the datasheet.
Note that IMX327 and IMX462 depend on the IMX290 CameraSensorHelper.
That's fine since those sensors report the same defaults for the
black level as the Sony IMX290.

Signed-off-by: Geoffrey Van Landeghem <geoffrey.vl@gmail.com>
---
 src/ipa/libipa/camera_sensor_helper.cpp | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jacopo Mondi Nov. 25, 2024, 10:06 a.m. UTC | #1
Hi Geoffrey

On Sun, Nov 24, 2024 at 08:29:50PM +0100, Geoffrey Van Landeghem wrote:
> Report the default sensor black level reported by the datasheet.
> Note that IMX327 and IMX462 depend on the IMX290 CameraSensorHelper.
> That's fine since those sensors report the same defaults for the
> black level as the Sony IMX290.
>
> Signed-off-by: Geoffrey Van Landeghem <geoffrey.vl@gmail.com>
> ---
>  src/ipa/libipa/camera_sensor_helper.cpp | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
> index f870dc28..07657700 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -576,6 +576,8 @@ class CameraSensorHelperImx290 : public CameraSensorHelper
>  public:
>  	CameraSensorHelperImx290()
>  	{
> +		/* From datasheet: 0xF0 at 12bits. */

nit: we usually use lowecase for hex

> +		blackLevel_ = 3840;

Looks correct at 16 bpp.

I can change the comment when applying, no worries

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

>  		gainType_ = AnalogueGainExponential;
>  		gainConstants_.exp = { 1.0, expGainDb(0.3) };
>  	}
> --
> 2.43.0
>

Patch
diff mbox series

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index f870dc28..07657700 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -576,6 +576,8 @@  class CameraSensorHelperImx290 : public CameraSensorHelper
 public:
 	CameraSensorHelperImx290()
 	{
+		/* From datasheet: 0xF0 at 12bits. */
+		blackLevel_ = 3840;
 		gainType_ = AnalogueGainExponential;
 		gainConstants_.exp = { 1.0, expGainDb(0.3) };
 	}