[PATCH v3 09/16] libcamera: ipa: add Soft IPA

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Feb 15 18:17:34 CET 2024


Quoting Milan Zamazal (2024-02-15 16:31:07)
> Hans de Goede <hdegoede at redhat.com> writes:
> 
> > From: Andrey Konovalov <andrey.konovalov at linaro.org>
> >
> > Define the Soft IPA main and event interfaces, add the Soft IPA
> > implementation.
> >
> > The current src/ipa/meson.build assumes the IPA name to match the
> > pipeline name. For this reason "-Dipas=simple" is used for the
> > Soft IPA module.
> >
> > Auto exposure/gain and AWB implementation by Dennis, Toon and Martti.
> >
> > Auto exposure/gain targets a Mean Sample Value of 2.5 following
> > the MSV calculation algorithm from:
> > https://www.araa.asn.au/acra/acra2007/papers/paper84final.pdf
> >
> > Tested-by: Bryan O'Donoghue <bryan.odonoghue at linaro.org> # sc8280xp Lenovo x13s
> > Tested-by: Pavel Machek <pavel at ucw.cz>
> > Reviewed-by: Pavel Machek <pavel at ucw.cz>
> > Signed-off-by: Andrey Konovalov <andrey.konovalov at linaro.org>
> > Co-developed-by: Dennis Bonke <admin at dennisbonke.com>
> > Signed-off-by: Dennis Bonke <admin at dennisbonke.com>
> > Co-developed-by: Marttico <g.martti at gmail.com>
> > Signed-off-by: Marttico <g.martti at gmail.com>
> > Co-developed-by: Toon Langendam <t.langendam at gmail.com>
> > Signed-off-by: Toon Langendam <t.langendam at gmail.com>
> > Signed-off-by: Hans de Goede <hdegoede at redhat.com>

Definitely a team effort ;-) I like it! It's a big project after all.

<snip>

> > +{
> > +     const ControlInfo &exposure_info = sensorInfoMap.find(V4L2_CID_EXPOSURE)->second;
> > +     const ControlInfo &gain_info = sensorInfoMap.find(V4L2_CID_ANALOGUE_GAIN)->second;
> > +
> > +     exposure_min_ = exposure_info.min().get<int>();
> > +     if (!exposure_min_) {
> > +             LOG(IPASoft, Warning) << "Minimum exposure is zero, that can't be linear";

Indeed, these should be going through the CameraSensorHelper class to
convert and manage gains.

At some level/point you will need to know what the gain codes are as a
multiplier. The CameraSensor helpers are expected to provide that sensor
specific calculation for you.



--
Kieran


More information about the libcamera-devel mailing list