summaryrefslogtreecommitdiff
path: root/src/ipa/simple
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/simple
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/simple')
-rw-r--r--src/ipa/simple/ipa_context.h2
-rw-r--r--src/ipa/simple/soft_simple.cpp9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h
index fd121eeb..9319d776 100644
--- a/src/ipa/simple/ipa_context.h
+++ b/src/ipa/simple/ipa_context.h
@@ -28,7 +28,7 @@ struct IPASessionConfiguration {
} black;
};
-struct IPAActiveState {
+struct IPAActiveState : public ActiveState {
struct {
uint8_t level;
} blc;
diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp
index c8ad55a2..e8dbce7d 100644
--- a/src/ipa/simple/soft_simple.cpp
+++ b/src/ipa/simple/soft_simple.cpp
@@ -266,7 +266,8 @@ void IPASoftSimple::stop()
void IPASoftSimple::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);
@@ -274,7 +275,8 @@ void IPASoftSimple::queueRequest(const uint32_t frame, const ControlList &contro
void IPASoftSimple::fillParamsBuffer(const uint32_t frame)
{
- 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_);
setIspParams.emit();
@@ -284,7 +286,8 @@ void IPASoftSimple::processStats(const uint32_t frame,
[[maybe_unused]] const uint32_t bufferId,
const ControlList &sensorControls)
{
- 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>();