summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rkisp1')
-rw-r--r--src/ipa/rkisp1/algorithms/agc.cpp8
-rw-r--r--src/ipa/rkisp1/algorithms/agc.h4
-rw-r--r--src/ipa/rkisp1/algorithms/algorithm.h5
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp9
4 files changed, 26 insertions, 0 deletions
diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index 17d074d9..1e41df5b 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -204,6 +204,14 @@ int Agc::configure(IPAContext &context, const IPACameraSensorInfo &configInfo)
return 0;
}
+void Agc::initFrameContext(IPAContext &context,
+ IPAFrameContext &frameContext)
+{
+ auto &agc = context.activeState.agc;
+
+ frameContext.agc.meteringMode = agc.meteringMode;
+}
+
/**
* \copydoc libcamera::ipa::Algorithm::queueRequest
*/
diff --git a/src/ipa/rkisp1/algorithms/agc.h b/src/ipa/rkisp1/algorithms/agc.h
index aa86f2c5..c1adf91b 100644
--- a/src/ipa/rkisp1/algorithms/agc.h
+++ b/src/ipa/rkisp1/algorithms/agc.h
@@ -30,6 +30,10 @@ public:
int init(IPAContext &context, const YamlObject &tuningData) override;
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
+
+ void initFrameContext(IPAContext &context,
+ IPAFrameContext &frameContext) override;
+
void queueRequest(IPAContext &context,
const uint32_t frame,
IPAFrameContext &frameContext,
diff --git a/src/ipa/rkisp1/algorithms/algorithm.h b/src/ipa/rkisp1/algorithms/algorithm.h
index 715cfcd8..82603b7b 100644
--- a/src/ipa/rkisp1/algorithms/algorithm.h
+++ b/src/ipa/rkisp1/algorithms/algorithm.h
@@ -23,6 +23,11 @@ public:
{
}
+ virtual void initFrameContext([[maybe_unused]] IPAContext &context,
+ [[maybe_unused]] IPAFrameContext &frameContext)
+ {
+ }
+
bool disabled_;
bool supportsRaw_;
};
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 005c17ca..78459c80 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -353,6 +353,15 @@ void IPARkISP1::processStats(const uint32_t frame, const uint32_t bufferId,
{
IPAFrameContext &frameContext = context_.frameContexts.get(frame);
+ if (frameContext.underrun) {
+ for (auto const &a : algorithms()) {
+ Algorithm *algo = static_cast<Algorithm *>(a.get());
+ if (algo->disabled_)
+ continue;
+ algo->initFrameContext(context_, frameContext);
+ }
+ }
+
/*
* In raw capture mode, the ISP is bypassed and no statistics buffer is
* provided.