ipa: raspberrypi: Store dropped frame count in a member variable
Store the number of dropped frames on startup in a member variable. This will be used in a subsequent change for rate limiting the controller algorithms. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
82e4a98026
commit
3099e91c7b
1 changed files with 8 additions and 6 deletions
|
@ -143,6 +143,9 @@ private:
|
||||||
/* How many frames we should avoid running control algos on. */
|
/* How many frames we should avoid running control algos on. */
|
||||||
unsigned int mistrustCount_;
|
unsigned int mistrustCount_;
|
||||||
|
|
||||||
|
/* Number of frames that need to be dropped on startup. */
|
||||||
|
unsigned int dropFrameCount_;
|
||||||
|
|
||||||
/* LS table allocation passed in from the pipeline handler. */
|
/* LS table allocation passed in from the pipeline handler. */
|
||||||
FileDescriptor lsTableHandle_;
|
FileDescriptor lsTableHandle_;
|
||||||
void *lsTable_;
|
void *lsTable_;
|
||||||
|
@ -220,9 +223,8 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf
|
||||||
*/
|
*/
|
||||||
frameCount_ = 0;
|
frameCount_ = 0;
|
||||||
checkCount_ = 0;
|
checkCount_ = 0;
|
||||||
unsigned int dropFrame = 0;
|
|
||||||
if (firstStart_) {
|
if (firstStart_) {
|
||||||
dropFrame = helper_->HideFramesStartup();
|
dropFrameCount_ = helper_->HideFramesStartup();
|
||||||
mistrustCount_ = helper_->MistrustFramesStartup();
|
mistrustCount_ = helper_->MistrustFramesStartup();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -250,14 +252,14 @@ void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConf
|
||||||
awbConvergenceFrames += mistrustCount_;
|
awbConvergenceFrames += mistrustCount_;
|
||||||
}
|
}
|
||||||
|
|
||||||
dropFrame = std::max({ dropFrame, agcConvergenceFrames, awbConvergenceFrames });
|
dropFrameCount_ = std::max({ dropFrameCount_, agcConvergenceFrames, awbConvergenceFrames });
|
||||||
LOG(IPARPI, Debug) << "Drop " << dropFrame << " frames on startup";
|
LOG(IPARPI, Debug) << "Drop " << dropFrameCount_ << " frames on startup";
|
||||||
} else {
|
} else {
|
||||||
dropFrame = helper_->HideFramesModeSwitch();
|
dropFrameCount_ = helper_->HideFramesModeSwitch();
|
||||||
mistrustCount_ = helper_->MistrustFramesModeSwitch();
|
mistrustCount_ = helper_->MistrustFramesModeSwitch();
|
||||||
}
|
}
|
||||||
|
|
||||||
startConfig->dropFrameCount = dropFrame;
|
startConfig->dropFrameCount = dropFrameCount_;
|
||||||
|
|
||||||
firstStart_ = false;
|
firstStart_ = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue