[RFC,v4,02/23] ipa: libipa: agc: Change `AgcMSV` exposure mode
diff mbox series

Message ID 20261026132045.269007-3-barnabas.pocze@ideasonboard.com
State Superseded
Headers show
Series
  • ipa: libipa: agc: Take exposure margin into account
Related show

Commit Message

Barnabás Pőcze Oct. 26, 2026, 1:20 p.m. UTC
The `AgcMSV` implementation does not really support exposure modes like
`AgcMeanLuminance`. Instead it works by maximizing exposure time, then
analogue gain. This behaviour is best described by the newly introduced
"Maximize" exposure mode, so report that.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 src/ipa/libipa/agc.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jacopo Mondi Oct. 27, 2026, 8:07 a.m. UTC | #1
Hi Barnabás

On Mon, Oct 26, 2026 at 02:20:24PM +0100, Barnabás Pőcze wrote:
> The `AgcMSV` implementation does not really support exposure modes like
> `AgcMeanLuminance`. Instead it works by maximizing exposure time, then
> analogue gain. This behaviour is best described by the newly introduced
> "Maximize" exposure mode, so report that.
>
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> ---
>  src/ipa/libipa/agc.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp
> index 51b05e3c2a..e23cb13cb7 100644
> --- a/src/ipa/libipa/agc.cpp
> +++ b/src/ipa/libipa/agc.cpp
> @@ -487,9 +487,9 @@ int AgcAlgorithm::configure(agc::Session &session, agc::ActiveState &state,
>
>  	std::visit(utils::overloaded{
>  		[&](AgcMSV &) {
> -			/* No constraint/exposure mode support. */
> +			/* No constraint mode support. */
>  			state.constraintMode = controls::AeConstraintModeEnum::ConstraintNormal;
> -			state.exposureMode = controls::AeExposureModeEnum::ExposureNormal;
> +			state.exposureMode = controls::AeExposureModeEnum::ExposureMaximize;

Just for you to consider: is this mode "Maximize" or "Uncontrained" ?

On the patch
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

>
>  			state.automatic.yTarget = 0; /* Not supported. */
>
> --
> 2.56.0
>
Barnabás Pőcze Oct. 27, 2026, 8:47 a.m. UTC | #2
2026. 10. 27. 9:07 keltezéssel, Jacopo Mondi írta:
> Hi Barnabás
> 
> On Mon, Oct 26, 2026 at 02:20:24PM +0100, Barnabás Pőcze wrote:
>> The `AgcMSV` implementation does not really support exposure modes like
>> `AgcMeanLuminance`. Instead it works by maximizing exposure time, then
>> analogue gain. This behaviour is best described by the newly introduced
>> "Maximize" exposure mode, so report that.
>>
>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
>> ---
>>   src/ipa/libipa/agc.cpp | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp
>> index 51b05e3c2a..e23cb13cb7 100644
>> --- a/src/ipa/libipa/agc.cpp
>> +++ b/src/ipa/libipa/agc.cpp
>> @@ -487,9 +487,9 @@ int AgcAlgorithm::configure(agc::Session &session, agc::ActiveState &state,
>>
>>   	std::visit(utils::overloaded{
>>   		[&](AgcMSV &) {
>> -			/* No constraint/exposure mode support. */
>> +			/* No constraint mode support. */
>>   			state.constraintMode = controls::AeConstraintModeEnum::ConstraintNormal;
>> -			state.exposureMode = controls::AeExposureModeEnum::ExposureNormal;
>> +			state.exposureMode = controls::AeExposureModeEnum::ExposureMaximize;
> 
> Just for you to consider: is this mode "Maximize" or "Uncontrained" ?

Well, I like the name "maximize", but if the only requirement of this mode is that the
exposure time and gain can go as high as the hardware allows it, then maybe "unconstrained"
is better.


> 
> On the patch
> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> 
>>
>>   			state.automatic.yTarget = 0; /* Not supported. */
>>
>> --
>> 2.56.0
>>
Jacopo Mondi Oct. 27, 2026, 11:56 a.m. UTC | #3
Hi Barnabás

On Tue, Oct 27, 2026 at 09:47:07AM +0100, Barnabás Pőcze wrote:
> 2026. 10. 27. 9:07 keltezéssel, Jacopo Mondi írta:
> > Hi Barnabás
> >
> > On Mon, Oct 26, 2026 at 02:20:24PM +0100, Barnabás Pőcze wrote:
> > > The `AgcMSV` implementation does not really support exposure modes like
> > > `AgcMeanLuminance`. Instead it works by maximizing exposure time, then
> > > analogue gain. This behaviour is best described by the newly introduced
> > > "Maximize" exposure mode, so report that.
> > >
> > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> > > ---
> > >   src/ipa/libipa/agc.cpp | 4 ++--
> > >   1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp
> > > index 51b05e3c2a..e23cb13cb7 100644
> > > --- a/src/ipa/libipa/agc.cpp
> > > +++ b/src/ipa/libipa/agc.cpp
> > > @@ -487,9 +487,9 @@ int AgcAlgorithm::configure(agc::Session &session, agc::ActiveState &state,
> > >
> > >   	std::visit(utils::overloaded{
> > >   		[&](AgcMSV &) {
> > > -			/* No constraint/exposure mode support. */
> > > +			/* No constraint mode support. */
> > >   			state.constraintMode = controls::AeConstraintModeEnum::ConstraintNormal;
> > > -			state.exposureMode = controls::AeExposureModeEnum::ExposureNormal;
> > > +			state.exposureMode = controls::AeExposureModeEnum::ExposureMaximize;
> >
> > Just for you to consider: is this mode "Maximize" or "Uncontrained" ?
>
> Well, I like the name "maximize", but if the only requirement of this mode is that the
> exposure time and gain can go as high as the hardware allows it, then maybe "unconstrained"
> is better.
>

Unless someone else has a strong opinion on this, your patches, your
call ;)

>
> >
> > On the patch
> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> >
> > >
> > >   			state.automatic.yTarget = 0; /* Not supported. */
> > >
> > > --
> > > 2.56.0
> > >
>

Patch
diff mbox series

diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp
index 51b05e3c2a..e23cb13cb7 100644
--- a/src/ipa/libipa/agc.cpp
+++ b/src/ipa/libipa/agc.cpp
@@ -487,9 +487,9 @@  int AgcAlgorithm::configure(agc::Session &session, agc::ActiveState &state,
 
 	std::visit(utils::overloaded{
 		[&](AgcMSV &) {
-			/* No constraint/exposure mode support. */
+			/* No constraint mode support. */
 			state.constraintMode = controls::AeConstraintModeEnum::ConstraintNormal;
-			state.exposureMode = controls::AeExposureModeEnum::ExposureNormal;
+			state.exposureMode = controls::AeExposureModeEnum::ExposureMaximize;
 
 			state.automatic.yTarget = 0; /* Not supported. */