summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ipa/rkisp1/ipa_context.cpp11
-rw-r--r--src/ipa/rkisp1/ipa_context.h4
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp3
3 files changed, 16 insertions, 2 deletions
diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
index 9cb2a9fd..c22e02d5 100644
--- a/src/ipa/rkisp1/ipa_context.cpp
+++ b/src/ipa/rkisp1/ipa_context.cpp
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
- * Copyright (C) 2021, Ideas On Board
+ * Copyright (C) 2021-2022, Ideas On Board
*
* ipa_context.cpp - RkISP1 IPA Context
*/
@@ -113,4 +113,13 @@ namespace libcamera::ipa::rkisp1 {
* \brief Analogue gain multiplier
*/
+/**
+ * \var IPAFrameContext::frameCount
+ * \brief Counter of requests queued to the IPA module
+ *
+ * The counter is reset to 0 when the IPA module is configured, and is
+ * incremented for each request being queued, after calling the
+ * Algorithm::prepare() function of all algorithms.
+ */
+
} /* namespace libcamera::ipa::rkisp1 */
diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
index b94ade0c..212fa052 100644
--- a/src/ipa/rkisp1/ipa_context.h
+++ b/src/ipa/rkisp1/ipa_context.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
- * Copyright (C) 2021, Ideas On Board
+ * Copyright (C) 2021-2022, Ideas On Board
*
* ipa_context.h - RkISP1 IPA Context
*
@@ -43,6 +43,8 @@ struct IPAFrameContext {
uint32_t exposure;
double gain;
} sensor;
+
+ unsigned int frameCount;
};
struct IPAContext {
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 2225a84d..493811d9 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -190,6 +190,8 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info,
context_.configuration.agc.minAnalogueGain = camHelper_->gain(minGain);
context_.configuration.agc.maxAnalogueGain = camHelper_->gain(maxGain);
+ context_.frameContext.frameCount = 0;
+
for (auto const &algo : algorithms_) {
int ret = algo->configure(context_, info);
if (ret)
@@ -243,6 +245,7 @@ void IPARkISP1::queueRequest(const uint32_t frame, const uint32_t bufferId,
algo->prepare(context_, params);
paramsBufferReady.emit(frame);
+ context_.frameContext.frameCount++;
}
void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId,