| Message ID | 20260817114349.994123-43-barnabas.pocze@ideasonboard.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
Hi Barnabás On Mon, Aug 17, 2026 at 01:43:43PM +0200, Barnabás Pőcze wrote: > When manual gain control is enabled in `AgcAlgorithm`, the limits will > be set to that particular value. This is very likely larger than 1.0. > In this case, however, the algorithm should still adjust the exposure > time if it can. So compare the gain with the maximum of 1.0 and the > configured min gain, in order to ensure that the exposure will be > adjusted if the lower boundary of the allowed analogue gains is reached. > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Thanks j > --- > src/ipa/libipa/agc_msv.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/ipa/libipa/agc_msv.cpp b/src/ipa/libipa/agc_msv.cpp > index 7c6aa39b80..1995ea3707 100644 > --- a/src/ipa/libipa/agc_msv.cpp > +++ b/src/ipa/libipa/agc_msv.cpp > @@ -220,7 +220,7 @@ AgcMSV::Result AgcMSV::updateExposure(uint32_t exposure, double again, float exp > } > } else { > /* Scene too bright: decrease gain first, then exposure. */ > - if (again > limits_.gain1) { > + if (again > std::max(limits_.gain1, limits_.gain[0])) { > double next = again * factor; > again = std::min(next, again - limits_.gainMinStep); > } else { > -- > 2.55.0 >
diff --git a/src/ipa/libipa/agc_msv.cpp b/src/ipa/libipa/agc_msv.cpp index 7c6aa39b80..1995ea3707 100644 --- a/src/ipa/libipa/agc_msv.cpp +++ b/src/ipa/libipa/agc_msv.cpp @@ -220,7 +220,7 @@ AgcMSV::Result AgcMSV::updateExposure(uint32_t exposure, double again, float exp } } else { /* Scene too bright: decrease gain first, then exposure. */ - if (again > limits_.gain1) { + if (again > std::max(limits_.gain1, limits_.gain[0])) { double next = again * factor; again = std::min(next, again - limits_.gainMinStep); } else {