libcamera: libipa: camera_sensor: Add IMX283 black level
diff mbox series

Message ID 20240808165701.2442029-1-kieran.bingham@ideasonboard.com
State Accepted
Commit 935f6ff2672a36c1e2b842bdcc23429a39ff535d
Headers show
Series
  • libcamera: libipa: camera_sensor: Add IMX283 black level
Related show

Commit Message

Kieran Bingham Aug. 8, 2024, 4:57 p.m. UTC
Configure the default sensor black level reported by the datasheet.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/ipa/libipa/camera_sensor_helper.cpp | 2 ++
 1 file changed, 2 insertions(+)

Comments

Laurent Pinchart Aug. 10, 2024, 12:25 p.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Thu, Aug 08, 2024 at 05:57:01PM +0100, Kieran Bingham wrote:
> Configure the default sensor black level reported by the datasheet.

s/Configure/Report/ maybe ?

> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.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 c07b1a8dcaec..039109f9540d 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -549,6 +549,8 @@ class CameraSensorHelperImx283 : public CameraSensorHelper
>  public:
>  	CameraSensorHelperImx283()
>  	{
> +		/* From datasheet: 0x32 at 10bits. */
> +		blackLevel_ = 3200;

It's funny that 0x32 << 6 == 3200 :-)

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

>  		gainType_ = AnalogueGainLinear;
>  		gainConstants_.linear = { 0, 2048, -1, 2048 };
>  	}
Stefan Klug Sept. 12, 2024, 8:45 a.m. UTC | #2
Hi Kieran,

Thank you for the patch. 

On Thu, Aug 08, 2024 at 05:57:01PM +0100, Kieran Bingham wrote:
> Configure the default sensor black level reported by the datasheet.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> 

Cheers,
Stefan

> ---
>  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 c07b1a8dcaec..039109f9540d 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -549,6 +549,8 @@ class CameraSensorHelperImx283 : public CameraSensorHelper
>  public:
>  	CameraSensorHelperImx283()
>  	{
> +		/* From datasheet: 0x32 at 10bits. */
> +		blackLevel_ = 3200;
>  		gainType_ = AnalogueGainLinear;
>  		gainConstants_.linear = { 0, 2048, -1, 2048 };
>  	}
> -- 
> 2.34.1
>

Patch
diff mbox series

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index c07b1a8dcaec..039109f9540d 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -549,6 +549,8 @@  class CameraSensorHelperImx283 : public CameraSensorHelper
 public:
 	CameraSensorHelperImx283()
 	{
+		/* From datasheet: 0x32 at 10bits. */
+		blackLevel_ = 3200;
 		gainType_ = AnalogueGainLinear;
 		gainConstants_.linear = { 0, 2048, -1, 2048 };
 	}