[libcamera-devel] ipa: libipa: Add OV5647 Camera Sensor Helper
diff mbox series

Message ID 20230308155329.3083814-1-kieran.bingham@ideasonboard.com
State Accepted
Commit 8c0ae95865126a519dc476a4ca00ea4d62210a89
Headers show
Series
  • [libcamera-devel] ipa: libipa: Add OV5647 Camera Sensor Helper
Related show

Commit Message

Kieran Bingham March 8, 2023, 3:53 p.m. UTC
Provide a CameraSensorHelper for the OV5647 as used in the Raspberry Pi
Camera Module v1.

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

Comments

Laurent Pinchart March 8, 2023, 10:02 p.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Wed, Mar 08, 2023 at 03:53:29PM +0000, Kieran Bingham via libcamera-devel wrote:
> Provide a CameraSensorHelper for the OV5647 as used in the Raspberry Pi
> Camera Module v1.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@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 15d92395a7ae..693b628a438a 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -498,6 +498,17 @@ public:
>  };
>  REGISTER_CAMERA_SENSOR_HELPER("ov5640", CameraSensorHelperOv5640)
>  
> +class CameraSensorHelperOv5647 : public CameraSensorHelper
> +{
> +public:
> +	CameraSensorHelperOv5647()
> +	{
> +		gainType_ = AnalogueGainLinear;
> +		gainConstants_.linear = { 1, 0, 0, 16 };
> +	}
> +};
> +REGISTER_CAMERA_SENSOR_HELPER("ov5647", CameraSensorHelperOv5647)
> +
>  class CameraSensorHelperOv5670 : public CameraSensorHelper
>  {
>  public:
Christopher Obbard March 8, 2023, 10:44 p.m. UTC | #2
Hi Kieran,

OV5647 was completely broken on RK3399 before this patch, thank you for fixing it!

On Wed, 2023-03-08 at 15:53 -0000, Kieran Bingham wrote:
> Provide a CameraSensorHelper for the OV5647 as used in the Raspberry Pi
> Camera Module v1.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Tested-by: Christopher Obbard <chris.obbard@collabora.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 15d92395a7ae..693b628a438a 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -498,6 +498,17 @@ public:
>  };
>  REGISTER_CAMERA_SENSOR_HELPER("ov5640", CameraSensorHelperOv5640)
>  
> +class CameraSensorHelperOv5647 : public CameraSensorHelper
> +{
> +public:
> +	CameraSensorHelperOv5647()
> +	{
> +		gainType_ = AnalogueGainLinear;
> +		gainConstants_.linear = { 1, 0, 0, 16 };
> +	}
> +};
> +REGISTER_CAMERA_SENSOR_HELPER("ov5647", CameraSensorHelperOv5647)
> +
>  class CameraSensorHelperOv5670 : public CameraSensorHelper
>  {
>  public:
Umang Jain March 9, 2023, 9:54 a.m. UTC | #3
Hi Kieran,

On 3/8/23 9:23 PM, Kieran Bingham via libcamera-devel wrote:
> Provide a CameraSensorHelper for the OV5647 as used in the Raspberry Pi
> Camera Module v1.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Umang Jain <umang.jain@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 15d92395a7ae..693b628a438a 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -498,6 +498,17 @@ public:
>   };
>   REGISTER_CAMERA_SENSOR_HELPER("ov5640", CameraSensorHelperOv5640)
>   
> +class CameraSensorHelperOv5647 : public CameraSensorHelper
> +{
> +public:
> +	CameraSensorHelperOv5647()
> +	{
> +		gainType_ = AnalogueGainLinear;
> +		gainConstants_.linear = { 1, 0, 0, 16 };
> +	}
> +};
> +REGISTER_CAMERA_SENSOR_HELPER("ov5647", CameraSensorHelperOv5647)
> +
>   class CameraSensorHelperOv5670 : public CameraSensorHelper
>   {
>   public:

Patch
diff mbox series

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index 15d92395a7ae..693b628a438a 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -498,6 +498,17 @@  public:
 };
 REGISTER_CAMERA_SENSOR_HELPER("ov5640", CameraSensorHelperOv5640)
 
+class CameraSensorHelperOv5647 : public CameraSensorHelper
+{
+public:
+	CameraSensorHelperOv5647()
+	{
+		gainType_ = AnalogueGainLinear;
+		gainConstants_.linear = { 1, 0, 0, 16 };
+	}
+};
+REGISTER_CAMERA_SENSOR_HELPER("ov5647", CameraSensorHelperOv5647)
+
 class CameraSensorHelperOv5670 : public CameraSensorHelper
 {
 public: