[RFC,v4,10/23] ipa: libipa: agc: Do not report auto controls if not available
diff mbox series

Message ID 20261026132045.269007-11-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
If the auto mode is disabled for the session, do not report controls
in metadata that are related to controlling the auto algorithm.

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

Comments

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

On Mon, Oct 26, 2026 at 02:20:32PM +0100, Barnabás Pőcze wrote:
> If the auto mode is disabled for the session, do not report controls
> in metadata that are related to controlling the auto algorithm.
>
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> ---
>  src/ipa/libipa/agc.cpp | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp
> index fb615f0af2..7e85faf649 100644
> --- a/src/ipa/libipa/agc.cpp
> +++ b/src/ipa/libipa/agc.cpp
> @@ -1134,9 +1134,11 @@ void AgcAlgorithm::fillMetadata(const agc::Session &session,
>  						 ? controls::AnalogueGainModeAuto
>  						 : controls::AnalogueGainModeManual);
>
> -	metadata.set(controls::AeExposureMode, frameContext.exposureMode);
> -	metadata.set(controls::AeConstraintMode, frameContext.constraintMode);
> -	metadata.set(controls::ExposureValue, frameContext.exposureValue);
> +	if (session.autoAllowed) {
> +		metadata.set(controls::AeExposureMode, frameContext.exposureMode);

Shouldn't Manual be reported here ?
I understand it might not have much value reporting it every frame

> +		metadata.set(controls::AeConstraintMode, frameContext.constraintMode);
> +		metadata.set(controls::ExposureValue, frameContext.exposureValue);
> +	}
>  }
>
>  } /* namespace ipa */
> --
> 2.56.0
>
Barnabás Pőcze Oct. 27, 2026, 8:35 a.m. UTC | #2
2026. 10. 27. 9:29 keltezéssel, Jacopo Mondi írta:
> Hi Barnabás
> 
> On Mon, Oct 26, 2026 at 02:20:32PM +0100, Barnabás Pőcze wrote:
>> If the auto mode is disabled for the session, do not report controls
>> in metadata that are related to controlling the auto algorithm.
>>
>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
>> ---
>>   src/ipa/libipa/agc.cpp | 8 +++++---
>>   1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp
>> index fb615f0af2..7e85faf649 100644
>> --- a/src/ipa/libipa/agc.cpp
>> +++ b/src/ipa/libipa/agc.cpp
>> @@ -1134,9 +1134,11 @@ void AgcAlgorithm::fillMetadata(const agc::Session &session,
>>   						 ? controls::AnalogueGainModeAuto
>>   						 : controls::AnalogueGainModeManual);
>>
>> -	metadata.set(controls::AeExposureMode, frameContext.exposureMode);
>> -	metadata.set(controls::AeConstraintMode, frameContext.constraintMode);
>> -	metadata.set(controls::ExposureValue, frameContext.exposureValue);
>> +	if (session.autoAllowed) {
>> +		metadata.set(controls::AeExposureMode, frameContext.exposureMode);
> 
> Shouldn't Manual be reported here ?
> I understand it might not have much value reporting it every frame

How do you mean? There is no "Manual" exposure mode.


> 
>> +		metadata.set(controls::AeConstraintMode, frameContext.constraintMode);
>> +		metadata.set(controls::ExposureValue, frameContext.exposureValue);
>> +	}
>>   }
>>
>>   } /* namespace ipa */
>> --
>> 2.56.0
>>
Jacopo Mondi Oct. 27, 2026, 8:47 a.m. UTC | #3
Hi Barnabás

On Tue, Oct 27, 2026 at 09:35:57AM +0100, Barnabás Pőcze wrote:
> 2026. 10. 27. 9:29 keltezéssel, Jacopo Mondi írta:
> > Hi Barnabás
> >
> > On Mon, Oct 26, 2026 at 02:20:32PM +0100, Barnabás Pőcze wrote:
> > > If the auto mode is disabled for the session, do not report controls
> > > in metadata that are related to controlling the auto algorithm.
> > >
> > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
> > > ---
> > >   src/ipa/libipa/agc.cpp | 8 +++++---
> > >   1 file changed, 5 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp
> > > index fb615f0af2..7e85faf649 100644
> > > --- a/src/ipa/libipa/agc.cpp
> > > +++ b/src/ipa/libipa/agc.cpp
> > > @@ -1134,9 +1134,11 @@ void AgcAlgorithm::fillMetadata(const agc::Session &session,
> > >   						 ? controls::AnalogueGainModeAuto
> > >   						 : controls::AnalogueGainModeManual);
> > >
> > > -	metadata.set(controls::AeExposureMode, frameContext.exposureMode);
> > > -	metadata.set(controls::AeConstraintMode, frameContext.constraintMode);
> > > -	metadata.set(controls::ExposureValue, frameContext.exposureValue);
> > > +	if (session.autoAllowed) {
> > > +		metadata.set(controls::AeExposureMode, frameContext.exposureMode);
> >
> > Shouldn't Manual be reported here ?
> > I understand it might not have much value reporting it every frame
>
> How do you mean? There is no "Manual" exposure mode.

I clearly confused this with AeEnable :)

Sorry for the noise
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

>
>
> >
> > > +		metadata.set(controls::AeConstraintMode, frameContext.constraintMode);
> > > +		metadata.set(controls::ExposureValue, frameContext.exposureValue);
> > > +	}
> > >   }
> > >
> > >   } /* namespace ipa */
> > > --
> > > 2.56.0
> > >
>

Patch
diff mbox series

diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp
index fb615f0af2..7e85faf649 100644
--- a/src/ipa/libipa/agc.cpp
+++ b/src/ipa/libipa/agc.cpp
@@ -1134,9 +1134,11 @@  void AgcAlgorithm::fillMetadata(const agc::Session &session,
 						 ? controls::AnalogueGainModeAuto
 						 : controls::AnalogueGainModeManual);
 
-	metadata.set(controls::AeExposureMode, frameContext.exposureMode);
-	metadata.set(controls::AeConstraintMode, frameContext.constraintMode);
-	metadata.set(controls::ExposureValue, frameContext.exposureValue);
+	if (session.autoAllowed) {
+		metadata.set(controls::AeExposureMode, frameContext.exposureMode);
+		metadata.set(controls::AeConstraintMode, frameContext.constraintMode);
+		metadata.set(controls::ExposureValue, frameContext.exposureValue);
+	}
 }
 
 } /* namespace ipa */