summaryrefslogtreecommitdiff
path: root/src/ipa/ipu3/ipu3_agc.h
diff options
context:
space:
mode:
authorJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-08-19 14:51:56 +0200
committerJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-08-20 12:11:29 +0200
commit16266def40cda947aaa1a50009e89f639c26e7cf (patch)
tree519479c7ed2aa31388a4f11ed302171ff6ba20a5 /src/ipa/ipu3/ipu3_agc.h
parent4eb4073ec708ba1e4b4ef0375496dedc1308b3dc (diff)
ipa: ipu3: convert AGC to the new algorithm interface
In preparation for using the AGC through the new algorithm interfaces, convert the existing code to use the new function types. Now that the process call is rewritten, re-enable the compiler flag to warn when a function declaration hides virtual functions from a base class (-Woverloaded-virtual). We never use converged_ so remove its declaration. The controls may not need to be updated at each call, but it should be decided on the context side and not by a specific call by using a lock status in the Agc structure for instance. As the params_ local variable is not useful anymore, remove it here too. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3/ipu3_agc.h')
-rw-r--r--src/ipa/ipu3/ipu3_agc.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/ipa/ipu3/ipu3_agc.h b/src/ipa/ipu3/ipu3_agc.h
index 2d86127d..0e922664 100644
--- a/src/ipa/ipu3/ipu3_agc.h
+++ b/src/ipa/ipu3/ipu3_agc.h
@@ -29,10 +29,8 @@ public:
IPU3Agc();
~IPU3Agc() = default;
- void initialise(struct ipu3_uapi_grid_config &bdsGrid, const IPACameraSensorInfo &sensorInfo);
- void process(const ipu3_uapi_stats_3a *stats, uint32_t &exposure, double &gain);
- bool converged() { return converged_; }
- bool updateControls() { return updateControls_; }
+ int configure(IPAContext &context, const IPAConfigInfo &configInfo) override;
+ void process(IPAContext &context, const ipu3_uapi_stats_3a *stats) override;
private:
void processBrightness(const ipu3_uapi_stats_3a *stats);
@@ -44,9 +42,6 @@ private:
uint64_t frameCount_;
uint64_t lastFrame_;
- bool converged_;
- bool updateControls_;
-
double iqMean_;
Duration lineDuration_;