| Message ID | 20260506230722.1041596-2-devve.3@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting d3vv3 (2026-05-07 00:07:13) > From: Stuart J Mackintosh <sjm@opendigital.cc> > > Add a CameraSensorHelper for the OmniVision OV01A10 image sensor, > used in Dell XPS 13 and other laptops with the Intel IPU6 camera > subsystem. > > The analogue gain register (0x3508) uses a Q6.8 fixed-point format, > with the minimum value OV01A10_ANAL_GAIN_MIN = 0x100 representing > unity gain. This gives the linear model: > > gain = code / 256 > > Hans de Goede confirmed linear behaviour by monitoring the 18% grey > patch of a Macbeth chart under controlled lighting while stepping the > gain control. > > The black level of 0x40 at 10 bits (4096 scaled to 16 bits) was > confirmed by dark frame measurement with the lens covered. > > Without this helper, libcamera's AGC algorithm cannot convert between > gain codes and real gain values, causing auto-exposure oscillation and > the following warning: > > IPASoft: Failed to create camera sensor helper for ov01a10 > > Signed-off-by: Stuart J Mackintosh <sjm@opendigital.cc> > --- > src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp > index e3e3e535..72466867 100644 > --- a/src/ipa/libipa/camera_sensor_helper.cpp > +++ b/src/ipa/libipa/camera_sensor_helper.cpp > @@ -653,6 +653,18 @@ public: > }; > REGISTER_CAMERA_SENSOR_HELPER("imx708", CameraSensorHelperImx708) > > +class CameraSensorHelperOv01a10 : public CameraSensorHelper > +{ > +public: > + CameraSensorHelperOv01a10() > + { > + /* From dark frame measurement: 0x40 at 10bits. */ > + blackLevel_ = 4096; > + gain_ = AnalogueGainLinear{ 1, 0, 0, 256 }; > + } > +}; > +REGISTER_CAMERA_SENSOR_HELPER("ov01a10", CameraSensorHelperOv01a10) ov01a10 is upstream, and the above looks reasonable so Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > + > class CameraSensorHelperOv2685 : public CameraSensorHelper > { > public: > -- > 2.54.0 >
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index e3e3e535..72466867 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -653,6 +653,18 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx708", CameraSensorHelperImx708) +class CameraSensorHelperOv01a10 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv01a10() + { + /* From dark frame measurement: 0x40 at 10bits. */ + blackLevel_ = 4096; + gain_ = AnalogueGainLinear{ 1, 0, 0, 256 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov01a10", CameraSensorHelperOv01a10) + class CameraSensorHelperOv2685 : public CameraSensorHelper { public: