[1/1] libcamera: libipa: camera_sensor: Add Sony IMX415 sensor properties
diff mbox series

Message ID 20240503124420.2043486-1-alexander.stein@ew.tq-group.com
State Accepted
Commit 7235248d38434f4c3e8a163ab03637ac115bdda8
Headers show
Series
  • [1/1] libcamera: libipa: camera_sensor: Add Sony IMX415 sensor properties
Related show

Commit Message

Alexander Stein May 3, 2024, 12:44 p.m. UTC
Provide the Sony IMX415 camera sensor properties and registration
with libipa for the gain code helpers.

The test patterns exposed by the IMX415 do not map well to the current
set of test pattern controls supplied by libcamera. These are left
intentionally unimplemented.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
I shamelessly used the same commit message and structure from commit
6b1b2bd7 ("libcamera: libipa: camera_sensor: Add Sony IMX335 sensor
properties").

 src/ipa/libipa/camera_sensor_helper.cpp           | 11 +++++++++++
 src/libcamera/sensor/camera_sensor_properties.cpp |  4 ++++
 2 files changed, 15 insertions(+)

Comments

Laurent Pinchart May 3, 2024, 1:50 p.m. UTC | #1
Hi Alexander,

Thank you for the patch.

On Fri, May 03, 2024 at 02:44:20PM +0200, Alexander Stein wrote:
> Provide the Sony IMX415 camera sensor properties and registration
> with libipa for the gain code helpers.
> 
> The test patterns exposed by the IMX415 do not map well to the current
> set of test pattern controls supplied by libcamera. These are left
> intentionally unimplemented.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

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

> ---
> I shamelessly used the same commit message and structure from commit
> 6b1b2bd7 ("libcamera: libipa: camera_sensor: Add Sony IMX335 sensor
> properties").
> 
>  src/ipa/libipa/camera_sensor_helper.cpp           | 11 +++++++++++
>  src/libcamera/sensor/camera_sensor_properties.cpp |  4 ++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
> index 84d52d10..f8a497e1 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -466,6 +466,17 @@ public:
>  };
>  REGISTER_CAMERA_SENSOR_HELPER("imx335", CameraSensorHelperImx335)
>  
> +class CameraSensorHelperImx415 : public CameraSensorHelper
> +{
> +public:
> +	CameraSensorHelperImx415()
> +	{
> +		gainType_ = AnalogueGainExponential;
> +		gainConstants_.exp = { 1.0, expGainDb(0.3) };
> +	}
> +};
> +REGISTER_CAMERA_SENSOR_HELPER("imx415", CameraSensorHelperImx415)
> +
>  class CameraSensorHelperImx477 : public CameraSensorHelper
>  {
>  public:
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
> index 895bf967..5c2c93e1 100644
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -119,6 +119,10 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
>  			.unitCellSize = { 2000, 2000 },
>  			.testPatternModes = {},
>  		} },
> +		{ "imx415", {
> +			.unitCellSize = { 1450, 1450 },
> +			.testPatternModes = {},
> +		} },
>  		{ "imx477", {
>  			.unitCellSize = { 1550, 1550 },
>  			.testPatternModes = {},
> -- 
> 2.34.1
>
Dan Scally May 3, 2024, 2:21 p.m. UTC | #2
Hi Alexander - thanks for the patch

On 03/05/2024 13:44, Alexander Stein wrote:
> Provide the Sony IMX415 camera sensor properties and registration
> with libipa for the gain code helpers.
>
> The test patterns exposed by the IMX415 do not map well to the current
> set of test pattern controls supplied by libcamera. These are left
> intentionally unimplemented.
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>


Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>

> ---
> I shamelessly used the same commit message and structure from commit
> 6b1b2bd7 ("libcamera: libipa: camera_sensor: Add Sony IMX335 sensor
> properties").
>
>   src/ipa/libipa/camera_sensor_helper.cpp           | 11 +++++++++++
>   src/libcamera/sensor/camera_sensor_properties.cpp |  4 ++++
>   2 files changed, 15 insertions(+)
>
> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
> index 84d52d10..f8a497e1 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -466,6 +466,17 @@ public:
>   };
>   REGISTER_CAMERA_SENSOR_HELPER("imx335", CameraSensorHelperImx335)
>   
> +class CameraSensorHelperImx415 : public CameraSensorHelper
> +{
> +public:
> +	CameraSensorHelperImx415()
> +	{
> +		gainType_ = AnalogueGainExponential;
> +		gainConstants_.exp = { 1.0, expGainDb(0.3) };
> +	}
> +};
> +REGISTER_CAMERA_SENSOR_HELPER("imx415", CameraSensorHelperImx415)
> +
>   class CameraSensorHelperImx477 : public CameraSensorHelper
>   {
>   public:
> diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
> index 895bf967..5c2c93e1 100644
> --- a/src/libcamera/sensor/camera_sensor_properties.cpp
> +++ b/src/libcamera/sensor/camera_sensor_properties.cpp
> @@ -119,6 +119,10 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
>   			.unitCellSize = { 2000, 2000 },
>   			.testPatternModes = {},
>   		} },
> +		{ "imx415", {
> +			.unitCellSize = { 1450, 1450 },
> +			.testPatternModes = {},
> +		} },
>   		{ "imx477", {
>   			.unitCellSize = { 1550, 1550 },
>   			.testPatternModes = {},

Patch
diff mbox series

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index 84d52d10..f8a497e1 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -466,6 +466,17 @@  public:
 };
 REGISTER_CAMERA_SENSOR_HELPER("imx335", CameraSensorHelperImx335)
 
+class CameraSensorHelperImx415 : public CameraSensorHelper
+{
+public:
+	CameraSensorHelperImx415()
+	{
+		gainType_ = AnalogueGainExponential;
+		gainConstants_.exp = { 1.0, expGainDb(0.3) };
+	}
+};
+REGISTER_CAMERA_SENSOR_HELPER("imx415", CameraSensorHelperImx415)
+
 class CameraSensorHelperImx477 : public CameraSensorHelper
 {
 public:
diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
index 895bf967..5c2c93e1 100644
--- a/src/libcamera/sensor/camera_sensor_properties.cpp
+++ b/src/libcamera/sensor/camera_sensor_properties.cpp
@@ -119,6 +119,10 @@  const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
 			.unitCellSize = { 2000, 2000 },
 			.testPatternModes = {},
 		} },
+		{ "imx415", {
+			.unitCellSize = { 1450, 1450 },
+			.testPatternModes = {},
+		} },
 		{ "imx477", {
 			.unitCellSize = { 1550, 1550 },
 			.testPatternModes = {},