[PATCH v5 11/18] libcamera: software_isp: Call Algorithm::prepare
Milan Zamazal
mzamazal at redhat.com
Fri Aug 30 09:25:47 CEST 2024
This patch adds Algorithm::prepare call for the defined algorithms.
This is preparation only since there are currently no Algorithm based
algorithms defined.
Signed-off-by: Milan Zamazal <mzamazal at redhat.com>
Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>
---
include/libcamera/ipa/soft.mojom | 1 +
src/ipa/simple/soft_simple.cpp | 8 ++++++++
src/libcamera/software_isp/software_isp.cpp | 1 +
3 files changed, 10 insertions(+)
diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom
index 0ca2869c..bc70d4e4 100644
--- a/include/libcamera/ipa/soft.mojom
+++ b/include/libcamera/ipa/soft.mojom
@@ -24,6 +24,7 @@ interface IPASoftInterface {
=> (int32 ret);
[async] queueRequest(uint32 frame, libcamera.ControlList sensorControls);
+ [async] prepare(uint32 frame);
[async] processStats(uint32 frame,
uint32 bufferId,
libcamera.ControlList sensorControls);
diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp
index eb3bbd92..d52242be 100644
--- a/src/ipa/simple/soft_simple.cpp
+++ b/src/ipa/simple/soft_simple.cpp
@@ -79,6 +79,7 @@ public:
void stop() override;
void queueRequest(const uint32_t frame, const ControlList &controls) override;
+ void prepare(const uint32_t frame) override;
void processStats(const uint32_t frame, const uint32_t bufferId,
const ControlList &sensorControls) override;
@@ -279,6 +280,13 @@ void IPASoftSimple::queueRequest(const uint32_t frame, const ControlList &contro
algo->queueRequest(context_, frame, frameContext, controls);
}
+void IPASoftSimple::prepare(const uint32_t frame)
+{
+ IPAFrameContext &frameContext = context_.frameContexts.get(frame);
+ for (auto const &algo : algorithms())
+ algo->prepare(context_, frame, frameContext, params_);
+}
+
void IPASoftSimple::processStats([[maybe_unused]] const uint32_t frame,
[[maybe_unused]] const uint32_t bufferId,
const ControlList &sensorControls)
diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp
index eda18947..dbf27f31 100644
--- a/src/libcamera/software_isp/software_isp.cpp
+++ b/src/libcamera/software_isp/software_isp.cpp
@@ -352,6 +352,7 @@ void SoftwareIsp::stop()
*/
void SoftwareIsp::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output)
{
+ ipa_->prepare(frame);
debayer_->invokeMethod(&DebayerCpu::process,
ConnectionTypeQueued, frame, input, output, debayerParams_);
}
--
2.44.1
More information about the libcamera-devel
mailing list