From 93aa0ba55d6eaa0164fbe1d6c82fa245d3b2e5b1 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Wed, 16 Oct 2024 12:20:16 +0200 Subject: 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 --- src/ipa/simple/ipa_context.h | 2 +- src/ipa/simple/soft_simple.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src/ipa/simple') 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(); -- cgit v1.2.1