[libcamera-devel,1/2] ipa: ipu3: agc: Reset frame count when configuring AGC
diff mbox series

Message ID 20220315133407.32348-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit f2624fed0467f870774386e2c947d7bfdb75ca1e
Headers show
Series
  • [libcamera-devel,1/2] ipa: ipu3: agc: Reset frame count when configuring AGC
Related show

Commit Message

Laurent Pinchart March 15, 2022, 1:34 p.m. UTC
The frame count is used to skip the gain and exposure filtering when
starting. It thus needs to be reset when configuring the algorithm, to
avoid slower convergence when stopping and restarting.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/ipa/ipu3/algorithms/agc.cpp | 1 +
 1 file changed, 1 insertion(+)


base-commit: e41854a4e6fde2dd9e2a2a7290670943235776cd

Comments

Nicolas Dufresne via libcamera-devel March 15, 2022, 1:38 p.m. UTC | #1
Hi Laurent,

On 15/03/2022 14:34, Laurent Pinchart via libcamera-devel wrote:
> The frame count is used to skip the gain and exposure filtering when
> starting. It thus needs to be reset when configuring the algorithm, to
> avoid slower convergence when stopping and restarting.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>

> ---
>   src/ipa/ipu3/algorithms/agc.cpp | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
> index 1eb1bcef2f02..70cff3fed43c 100644
> --- a/src/ipa/ipu3/algorithms/agc.cpp
> +++ b/src/ipa/ipu3/algorithms/agc.cpp
> @@ -102,6 +102,7 @@ int Agc::configure(IPAContext &context,
>   	frameContext.agc.gain = std::max(minAnalogueGain_, kMinAnalogueGain);
>   	frameContext.agc.exposure = 10ms / configuration.sensor.lineDuration;
>   
> +	frameCount_ = 0;
>   	return 0;
>   }
>   
> 
> base-commit: e41854a4e6fde2dd9e2a2a7290670943235776cd
Nicolas Dufresne via libcamera-devel March 15, 2022, 1:52 p.m. UTC | #2
Hi Laurent,

On 3/15/22 19:04, Laurent Pinchart via libcamera-devel wrote:
> The frame count is used to skip the gain and exposure filtering when
> starting. It thus needs to be reset when configuring the algorithm, to
> avoid slower convergence when stopping and restarting.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


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

> ---
>   src/ipa/ipu3/algorithms/agc.cpp | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
> index 1eb1bcef2f02..70cff3fed43c 100644
> --- a/src/ipa/ipu3/algorithms/agc.cpp
> +++ b/src/ipa/ipu3/algorithms/agc.cpp
> @@ -102,6 +102,7 @@ int Agc::configure(IPAContext &context,
>   	frameContext.agc.gain = std::max(minAnalogueGain_, kMinAnalogueGain);
>   	frameContext.agc.exposure = 10ms / configuration.sensor.lineDuration;
>   
> +	frameCount_ = 0;
>   	return 0;
>   }
>   
>
> base-commit: e41854a4e6fde2dd9e2a2a7290670943235776cd

Patch
diff mbox series

diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
index 1eb1bcef2f02..70cff3fed43c 100644
--- a/src/ipa/ipu3/algorithms/agc.cpp
+++ b/src/ipa/ipu3/algorithms/agc.cpp
@@ -102,6 +102,7 @@  int Agc::configure(IPAContext &context,
 	frameContext.agc.gain = std::max(minAnalogueGain_, kMinAnalogueGain);
 	frameContext.agc.exposure = 10ms / configuration.sensor.lineDuration;
 
+	frameCount_ = 0;
 	return 0;
 }