summaryrefslogtreecommitdiff
path: root/src/ipa/ipu3
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-10-16 12:20:16 +0200
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-10-30 15:48:18 +0100
commit93aa0ba55d6eaa0164fbe1d6c82fa245d3b2e5b1 (patch)
treeb041ccd8c2a4d6b2d837e24c1e1c666cc360b139 /src/ipa/ipu3
parent66df26f7aa655c31a876c3f9baa4389a583b776e (diff)
libipa: FCQueue: Initialize FrameContext with activeState
Pass to the FCQueue the algorithm's active state to use the most recent state of IPA algorithms to initialize a FrameContext. Modify all IPA modules that use libipa to pass a const ActiveState reference to the FCQueue function and make their IPAActiveState implementation derive a base ActiveState structure. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3')
-rw-r--r--src/ipa/ipu3/ipa_context.h2
-rw-r--r--src/ipa/ipu3/ipu3.cpp9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h
index c85d1e34..526af2ac 100644
--- a/src/ipa/ipu3/ipa_context.h
+++ b/src/ipa/ipu3/ipa_context.h
@@ -46,7 +46,7 @@ struct IPASessionConfiguration {
} sensor;
};
-struct IPAActiveState {
+struct IPAActiveState : public ActiveState {
struct {
uint32_t focus;
double maxVariance;
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 10a8c86d..84c443a0 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -561,7 +561,8 @@ void IPAIPU3::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)
*/
params->use = {};
- IPAFrameContext &frameContext = context_.frameContexts.get(frame);
+ IPAFrameContext &frameContext = context_.frameContexts.get(frame,
+ context_.activeState);
for (auto const &algo : algorithms())
algo->prepare(context_, frame, frameContext, params);
@@ -594,7 +595,8 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,
const ipu3_uapi_stats_3a *stats =
reinterpret_cast<ipu3_uapi_stats_3a *>(mem.data());
- IPAFrameContext &frameContext = context_.frameContexts.get(frame);
+ IPAFrameContext &frameContext = context_.frameContexts.get(frame,
+ context_.activeState);
frameContext.sensor.exposure = sensorControls.get(V4L2_CID_EXPOSURE).get<int32_t>();
frameContext.sensor.gain = camHelper_->gain(sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get<int32_t>());
@@ -627,7 +629,8 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,
*/
void IPAIPU3::queueRequest(const uint32_t frame, const ControlList &controls)
{
- IPAFrameContext &frameContext = context_.frameContexts.alloc(frame);
+ IPAFrameContext &frameContext = context_.frameContexts.alloc(frame,
+ context_.activeState);
for (auto const &algo : algorithms())
algo->queueRequest(context_, frame, frameContext, controls);