ipa: rpi: Fix frame count logic when running algorithms
The frame counter test to determine if we run the IPA algorithms has a logic bug where it treats dropFrameCount_ and mistrustCount_ as frame numbers, not counts of frames (which it is). The implication is that startup convergence and initial settings take one extra frame to apply. Fix this. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Tested-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
870943f80a
commit
51533fecae
1 changed files with 2 additions and 2 deletions
|
@ -409,7 +409,7 @@ void IpaBase::prepareIsp(const PrepareParams ¶ms)
|
||||||
|
|
||||||
/* Allow a 10% margin on the comparison below. */
|
/* Allow a 10% margin on the comparison below. */
|
||||||
Duration delta = (frameTimestamp - lastRunTimestamp_) * 1.0ns;
|
Duration delta = (frameTimestamp - lastRunTimestamp_) * 1.0ns;
|
||||||
if (lastRunTimestamp_ && frameCount_ > dropFrameCount_ &&
|
if (lastRunTimestamp_ && frameCount_ >= dropFrameCount_ &&
|
||||||
delta < controllerMinFrameDuration * 0.9) {
|
delta < controllerMinFrameDuration * 0.9) {
|
||||||
/*
|
/*
|
||||||
* Ensure we merge the previous frame's metadata with the current
|
* Ensure we merge the previous frame's metadata with the current
|
||||||
|
@ -451,7 +451,7 @@ void IpaBase::processStats(const ProcessParams ¶ms)
|
||||||
{
|
{
|
||||||
unsigned int ipaContext = params.ipaContext % rpiMetadata_.size();
|
unsigned int ipaContext = params.ipaContext % rpiMetadata_.size();
|
||||||
|
|
||||||
if (processPending_ && frameCount_ > mistrustCount_) {
|
if (processPending_ && frameCount_ >= mistrustCount_) {
|
||||||
RPiController::Metadata &rpiMetadata = rpiMetadata_[ipaContext];
|
RPiController::Metadata &rpiMetadata = rpiMetadata_[ipaContext];
|
||||||
|
|
||||||
auto it = buffers_.find(params.buffers.stats);
|
auto it = buffers_.find(params.buffers.stats);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue