ipa: rpi: Rename dropFrameCount_ to invalidCount_

Rename dropFrameCount_ to invalidCount_ to better reflect its use as
frames are no longer dropped by the pipeline handler.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Naushir Patuck 2025-06-06 11:55:24 +01:00 committed by Kieran Bingham
parent a402f9ebc1
commit 8d2cd0b5b8
2 changed files with 7 additions and 7 deletions

View file

@ -327,7 +327,7 @@ void IpaBase::start(const ControlList &controls, StartResult *result)
unsigned int agcConvergenceFrames = 0, awbConvergenceFrames = 0;
frameCount_ = 0;
if (firstStart_) {
dropFrameCount_ = helper_->hideFramesStartup();
invalidCount_ = helper_->hideFramesStartup();
mistrustCount_ = helper_->mistrustFramesStartup();
/*
@ -353,14 +353,14 @@ void IpaBase::start(const ControlList &controls, StartResult *result)
awbConvergenceFrames += mistrustCount_;
}
} else {
dropFrameCount_ = helper_->hideFramesModeSwitch();
invalidCount_ = helper_->hideFramesModeSwitch();
mistrustCount_ = helper_->mistrustFramesModeSwitch();
}
result->startupFrameCount = std::max({ agcConvergenceFrames, awbConvergenceFrames });
result->invalidFrameCount = dropFrameCount_;
result->invalidFrameCount = invalidCount_;
dropFrameCount_ = std::max({ dropFrameCount_, agcConvergenceFrames, awbConvergenceFrames });
invalidCount_ = std::max({ invalidCount_, agcConvergenceFrames, awbConvergenceFrames });
LOG(IPARPI, Debug) << "Startup frames: " << result->startupFrameCount
<< " Invalid frames: " << result->invalidFrameCount;
@ -443,7 +443,7 @@ void IpaBase::prepareIsp(const PrepareParams &params)
/* Allow a 10% margin on the comparison below. */
Duration delta = (frameTimestamp - lastRunTimestamp_) * 1.0ns;
if (lastRunTimestamp_ && frameCount_ > dropFrameCount_ &&
if (lastRunTimestamp_ && frameCount_ > invalidCount_ &&
delta < controllerMinFrameDuration * 0.9 && !hdrChange) {
/*
* Ensure we merge the previous frame's metadata with the current

View file

@ -115,8 +115,8 @@ private:
/* How many frames we should avoid running control algos on. */
unsigned int mistrustCount_;
/* Number of frames that need to be dropped on startup. */
unsigned int dropFrameCount_;
/* Number of frames that need to be marked as dropped on startup. */
unsigned int invalidCount_;
/* Frame timestamp for the last run of the controller. */
uint64_t lastRunTimestamp_;