Message ID | 20211130213411.20149-2-djrscally@gmail.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Hi Daniel, Thank you for the patch. On Tue, Nov 30, 2021 at 09:34:10PM +0000, Daniel Scally wrote: > Add a CameraSensorHelperOv2680 class. The OV2680 is found in concert > with an IPU3 on the Lenovo Miix 510. The constants set are a bit of a > guess, as the datasheet doesn't document the gain control field any > further than giving its width in bits, but the default is 0x10 so we > assume that to be 1x gain. Would you be able to test if the gain is linear by capturing images with, for instance, gains set to 16, 32, 48 and 64 and see if the average relative luminance increases linearly ? > Signed-off-by: Daniel Scally <djrscally@gmail.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 0b0eb503..fd951505 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 CameraSensorHelperOv2680 : public CameraSensorHelper > +{ > +public: > + CameraSensorHelperOv2680() > + { > + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 16 }; > + } > +}; > +REGISTER_CAMERA_SENSOR_HELPER("ov2680", CameraSensorHelperOv2680) > + > class CameraSensorHelperOv5670 : public CameraSensorHelper > { > public:
Hi Laurent On 30/11/2021 21:56, Laurent Pinchart wrote: > Hi Daniel, > > Thank you for the patch. > > On Tue, Nov 30, 2021 at 09:34:10PM +0000, Daniel Scally wrote: >> Add a CameraSensorHelperOv2680 class. The OV2680 is found in concert >> with an IPU3 on the Lenovo Miix 510. The constants set are a bit of a >> guess, as the datasheet doesn't document the gain control field any >> further than giving its width in bits, but the default is 0x10 so we >> assume that to be 1x gain. > > Would you be able to test if the gain is linear by capturing images > with, for instance, gains set to 16, 32, 48 and 64 and see if the > average relative luminance increases linearly ? Sure; judging by eye you mean, or something more sophisticated? > >> Signed-off-by: Daniel Scally <djrscally@gmail.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 0b0eb503..fd951505 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 CameraSensorHelperOv2680 : public CameraSensorHelper >> +{ >> +public: >> + CameraSensorHelperOv2680() >> + { >> + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 16 }; >> + } >> +}; >> +REGISTER_CAMERA_SENSOR_HELPER("ov2680", CameraSensorHelperOv2680) >> + >> class CameraSensorHelperOv5670 : public CameraSensorHelper >> { >> public: >
Hi Daniel, On Tue, Nov 30, 2021 at 10:09:18PM +0000, Daniel Scally wrote: > On 30/11/2021 21:56, Laurent Pinchart wrote: > > On Tue, Nov 30, 2021 at 09:34:10PM +0000, Daniel Scally wrote: > >> Add a CameraSensorHelperOv2680 class. The OV2680 is found in concert > >> with an IPU3 on the Lenovo Miix 510. The constants set are a bit of a > >> guess, as the datasheet doesn't document the gain control field any > >> further than giving its width in bits, but the default is 0x10 so we > >> assume that to be 1x gain. > > > > Would you be able to test if the gain is linear by capturing images > > with, for instance, gains set to 16, 32, 48 and 64 and see if the > > average relative luminance increases linearly ? > > Sure; judging by eye you mean, or something more sophisticated? Averaging the pixel values in the image would be better. You should try to keep the scene luminance constant, and set the exposure time so that a gain of 64 will be a below saturation (80% of the range would be good for instance). > >> Signed-off-by: Daniel Scally <djrscally@gmail.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 0b0eb503..fd951505 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 CameraSensorHelperOv2680 : public CameraSensorHelper > >> +{ > >> +public: > >> + CameraSensorHelperOv2680() > >> + { > >> + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 16 }; > >> + } > >> +}; > >> +REGISTER_CAMERA_SENSOR_HELPER("ov2680", CameraSensorHelperOv2680) > >> + > >> class CameraSensorHelperOv5670 : public CameraSensorHelper > >> { > >> public:
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 0b0eb503..fd951505 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 CameraSensorHelperOv2680 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv2680() + { + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 16 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov2680", CameraSensorHelperOv2680) + class CameraSensorHelperOv5670 : public CameraSensorHelper { public:
Add a CameraSensorHelperOv2680 class. The OV2680 is found in concert with an IPU3 on the Lenovo Miix 510. The constants set are a bit of a guess, as the datasheet doesn't document the gain control field any further than giving its width in bits, but the default is 0x10 so we assume that to be 1x gain. Signed-off-by: Daniel Scally <djrscally@gmail.com> --- src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+)