[libcamera-devel] libipa: camera_sensor_helper: Add Sony IMX477 helper
diff mbox series

Message ID 20220525122735.3771958-1-naush@raspberrypi.com
State Accepted
Commit b7ce7e1d342a5f278e6688e23132526f12b728a2
Headers show
Series
  • [libcamera-devel] libipa: camera_sensor_helper: Add Sony IMX477 helper
Related show

Commit Message

Naushir Patuck May 25, 2022, 12:27 p.m. UTC
Add suport for the Sony IMX477 sensor in the cameara helper database.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Laurent Pinchart May 25, 2022, 12:39 p.m. UTC | #1
Hi Naush,

Thank you for the patch.

On Wed, May 25, 2022 at 01:27:35PM +0100, Naushir Patuck via libcamera-devel wrote:
> Add suport for the Sony IMX477 sensor in the cameara helper database.

s/suport/support/

I'll fix that when applying.

> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

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

It would be nice to use the CameraSensorHelper in the Raspberry Pi IPA
at some point :-) We're missing support for integration time
calculation, delays and embedded data parsing. I'll try to implement at
least the first two at some point, and may then send a patch series to
switch.

> ---
>  src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
> index 0f1561370c9c..2ddbf01cdeac 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -396,6 +396,17 @@ public:
>  };
>  REGISTER_CAMERA_SENSOR_HELPER("imx296", CameraSensorHelperImx296)
>  
> +class CameraSensorHelperImx477 : public CameraSensorHelper
> +{
> +public:
> +	CameraSensorHelperImx477()
> +	{
> +		gainType_ = AnalogueGainLinear;
> +		gainConstants_.linear = { 0, 1024, -1, 1024 };
> +	}
> +};
> +REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477)
> +
>  class CameraSensorHelperOv2740 : public CameraSensorHelper
>  {
>  public:
Nicolas Dufresne via libcamera-devel May 27, 2022, 3:05 a.m. UTC | #2
Hi Naush,

On Wed, May 25, 2022 at 01:27:35PM +0100, Naushir Patuck via libcamera-devel wrote:
> Add suport for the Sony IMX477 sensor in the cameara helper database.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
> index 0f1561370c9c..2ddbf01cdeac 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -396,6 +396,17 @@ public:
>  };
>  REGISTER_CAMERA_SENSOR_HELPER("imx296", CameraSensorHelperImx296)
>  
> +class CameraSensorHelperImx477 : public CameraSensorHelper
> +{
> +public:
> +	CameraSensorHelperImx477()
> +	{
> +		gainType_ = AnalogueGainLinear;
> +		gainConstants_.linear = { 0, 1024, -1, 1024 };
> +	}
> +};
> +REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477)
> +
>  class CameraSensorHelperOv2740 : public CameraSensorHelper
>  {
>  public:
> -- 
> 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 0f1561370c9c..2ddbf01cdeac 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -396,6 +396,17 @@  public:
 };
 REGISTER_CAMERA_SENSOR_HELPER("imx296", CameraSensorHelperImx296)
 
+class CameraSensorHelperImx477 : public CameraSensorHelper
+{
+public:
+	CameraSensorHelperImx477()
+	{
+		gainType_ = AnalogueGainLinear;
+		gainConstants_.linear = { 0, 1024, -1, 1024 };
+	}
+};
+REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477)
+
 class CameraSensorHelperOv2740 : public CameraSensorHelper
 {
 public: