Message ID | 20220316222245.132315-3-djrscally@gmail.com |
---|---|
State | Accepted |
Commit | 727428749c0566bc8861175b6b23d944562f1186 |
Headers | show |
Series |
|
Related | show |
Quoting Daniel Scally via libcamera-devel (2022-03-16 22:22:45) > The datasheet for the OV2740 gives 0x80 as 1x gain, so real gain > is GainCode / 128. > > Signed-off-by: Daniel Scally <djrscally@gmail.com> I can't confirm this, but I can't see any reason for it to be wrong currently, and we'll soon know if it's wrong when it's tested. Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > index 5d052612..c953def0 100644 > --- a/src/ipa/libipa/camera_sensor_helper.cpp > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > @@ -305,6 +305,16 @@ public: > }; > REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258) > > +class CameraSensorHelperOv2740 : public CameraSensorHelper > +{ > +public: > + CameraSensorHelperOv2740() > + { > + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 128 }; > + } > +}; > +REGISTER_CAMERA_SENSOR_HELPER("ov2740", CameraSensorHelperOv2740) > + > class CameraSensorHelperOv5670 : public CameraSensorHelper > { > public: > -- > 2.25.1 >
On Wed, Mar 16, 2022 at 10:43:59PM +0000, Kieran Bingham via libcamera-devel wrote: > Quoting Daniel Scally via libcamera-devel (2022-03-16 22:22:45) > > The datasheet for the OV2740 gives 0x80 as 1x gain, so real gain > > is GainCode / 128. > > > > Signed-off-by: Daniel Scally <djrscally@gmail.com> > > I can't confirm this, but I can't see any reason for it to be wrong > currently, and we'll soon know if it's wrong when it's tested. > > Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > > index 5d052612..c953def0 100644 > > --- a/src/ipa/libipa/camera_sensor_helper.cpp > > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > > @@ -305,6 +305,16 @@ public: > > }; > > REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258) > > > > +class CameraSensorHelperOv2740 : public CameraSensorHelper > > +{ > > +public: > > + CameraSensorHelperOv2740() > > + { > > + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 128 }; > > + } > > +}; > > +REGISTER_CAMERA_SENSOR_HELPER("ov2740", CameraSensorHelperOv2740) > > + > > class CameraSensorHelperOv5670 : public CameraSensorHelper > > { > > public:
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 5d052612..c953def0 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -305,6 +305,16 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258) +class CameraSensorHelperOv2740 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv2740() + { + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 128 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov2740", CameraSensorHelperOv2740) + class CameraSensorHelperOv5670 : public CameraSensorHelper { public:
The datasheet for the OV2740 gives 0x80 as 1x gain, so real gain is GainCode / 128. Signed-off-by: Daniel Scally <djrscally@gmail.com> --- src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+)