From f84e5e01a4dbec6183c53810d1e579d32674aaae Mon Sep 17 00:00:00 2001 From: Jean-Michel Hautbois Date: Thu, 24 Feb 2022 12:33:43 +0100 Subject: ipa: rkisp1: Use frame counter for the request queued Introduce a frameCount variable in the IPAFrameContext which increments each time a request is queued. It is reset at configure call, when the camera is started. This will allow the frameCount to be used by other algorithms, without having to keep multiple private frame counters. Signed-off-by: Jean-Michel Hautbois Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart --- src/ipa/rkisp1/rkisp1.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ipa/rkisp1/rkisp1.cpp') 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, -- cgit v1.2.1