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

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

Commit Message

Jean-Michel Hautbois Nov. 11, 2021, 2:09 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>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/ipa/ipu3/ipu3.cpp | 2 ++
 1 file changed, 2 insertions(+)

Comments

Umang Jain Nov. 12, 2021, 12:44 p.m. UTC | #1
Hi JM,

Thank you for the patch

On 11/11/21 7:39 PM, Jean-Michel Hautbois wrote:
> We can set the controls::AnalogueGain metadata now that AGC is updating
> it correctly.
>
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>


Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>

> ---
>   src/ipa/ipu3/ipu3.cpp | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index dc6f2ced..a8d54a5d 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -628,6 +628,8 @@ void IPAIPU3::parseStatistics(unsigned int frame,
>   	int64_t frameDuration = (defVBlank_ + sensorInfo_.outputSize.height) * lineDuration_.get<std::micro>();
>   	ctrls.set(controls::FrameDuration, frameDuration);
>   
> +	ctrls.set(controls::AnalogueGain, context_.frameContext.agc.gain);
> +
>   	ctrls.set(controls::ColourTemperature, context_.frameContext.awb.temperatureK);
>   
>   	ctrls.set(controls::ExposureTime, context_.frameContext.sensor.exposure * lineDuration_.get<std::micro>());
Paul Elder Nov. 12, 2021, 11:25 p.m. UTC | #2
Hi Jean-Michel,

On Thu, Nov 11, 2021 at 03:09:28PM +0100, Jean-Michel Hautbois wrote:
> We can set the controls::AnalogueGain metadata now that AGC is updating

imo, s/set/report

Same for the subject. "Pass" makes it sound like it's input :/

> it correctly.
> 
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  src/ipa/ipu3/ipu3.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index dc6f2ced..a8d54a5d 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -628,6 +628,8 @@ void IPAIPU3::parseStatistics(unsigned int frame,
>  	int64_t frameDuration = (defVBlank_ + sensorInfo_.outputSize.height) * lineDuration_.get<std::micro>();
>  	ctrls.set(controls::FrameDuration, frameDuration);
>  
> +	ctrls.set(controls::AnalogueGain, context_.frameContext.agc.gain);
> +
>  	ctrls.set(controls::ColourTemperature, context_.frameContext.awb.temperatureK);
>  
>  	ctrls.set(controls::ExposureTime, context_.frameContext.sensor.exposure * lineDuration_.get<std::micro>());
> -- 
> 2.32.0
>

Patch
diff mbox series

diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index dc6f2ced..a8d54a5d 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -628,6 +628,8 @@  void IPAIPU3::parseStatistics(unsigned int frame,
 	int64_t frameDuration = (defVBlank_ + sensorInfo_.outputSize.height) * lineDuration_.get<std::micro>();
 	ctrls.set(controls::FrameDuration, frameDuration);
 
+	ctrls.set(controls::AnalogueGain, context_.frameContext.agc.gain);
+
 	ctrls.set(controls::ColourTemperature, context_.frameContext.awb.temperatureK);
 
 	ctrls.set(controls::ExposureTime, context_.frameContext.sensor.exposure * lineDuration_.get<std::micro>());