[libcamera-devel,22/22] ipa: ipu3: Pass the AnalogueGain control
diff mbox series

Message ID 20211108131350.130665-23-jeanmichel.hautbois@ideasonboard.com
State Superseded
Headers show
Series
  • IPA: IPU3: Introduce per-frame controls
Related show

Commit Message

Jean-Michel Hautbois Nov. 8, 2021, 1:13 p.m. UTC
We can set the controls::AnalogueGain metadata now that AGC is updating
it correctly.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
---
 src/ipa/ipu3/ipu3.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Kieran Bingham Nov. 8, 2021, 4:24 p.m. UTC | #1
Quoting Jean-Michel Hautbois (2021-11-08 13:13:50)
> We can set the controls::AnalogueGain metadata now that AGC is updating
> it correctly.
> 

Yes, I believe this is the right time to be setting the AnalogueGain.


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> ---
>  src/ipa/ipu3/ipu3.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index 24c77be8..46cbc68d 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -702,6 +702,7 @@ void IPAIPU3::parseStatistics(unsigned int frame,
>         ctrls.set(controls::ColourTemperature, context_.frameContext->awb.temperatureK);
>         int32_t exposureTime = context_.frameContext->agc.exposure * lineDuration;
>         ctrls.set(controls::ExposureTime, exposureTime);
> +       ctrls.set(controls::AnalogueGain, context_.frameContext->agc.gain);
>  
>         /*
>          * \todo We should be able to add 'anything' (with a Control) in here to
> -- 
> 2.32.0
>

Patch
diff mbox series

diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 24c77be8..46cbc68d 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -702,6 +702,7 @@  void IPAIPU3::parseStatistics(unsigned int frame,
 	ctrls.set(controls::ColourTemperature, context_.frameContext->awb.temperatureK);
 	int32_t exposureTime = context_.frameContext->agc.exposure * lineDuration;
 	ctrls.set(controls::ExposureTime, exposureTime);
+	ctrls.set(controls::AnalogueGain, context_.frameContext->agc.gain);
 
 	/*
 	 * \todo We should be able to add 'anything' (with a Control) in here to