ipa: rpi: Advance the delay context counter even when IPAs don't run
The delay context counter must be advanced even when we decide not to run prepare/process. Otherwise, when we skip them at higher framerates, the current IPA context counter will catch up and overwrite the delay context. It's safe to advance the counter because the metadata is always copied forward a slot when we decide not to run the IPAs. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
4b5541b086
commit
56f8f6b409
@@ -501,10 +501,9 @@ void IpaBase::prepareIsp(const PrepareParams ¶ms)
|
||||
void IpaBase::processStats(const ProcessParams ¶ms)
|
||||
{
|
||||
unsigned int ipaContext = params.ipaContext % rpiMetadata_.size();
|
||||
RPiController::Metadata &rpiMetadata = rpiMetadata_[ipaContext];
|
||||
|
||||
if (processPending_ && frameCount_ >= mistrustCount_) {
|
||||
RPiController::Metadata &rpiMetadata = rpiMetadata_[ipaContext];
|
||||
|
||||
auto it = buffers_.find(params.buffers.stats);
|
||||
if (it == buffers_.end()) {
|
||||
LOG(IPARPI, Error) << "Could not find stats buffer!";
|
||||
@@ -518,14 +517,14 @@ void IpaBase::processStats(const ProcessParams ¶ms)
|
||||
|
||||
helper_->process(statistics, rpiMetadata);
|
||||
controller_.process(statistics, &rpiMetadata);
|
||||
}
|
||||
|
||||
struct AgcStatus agcStatus;
|
||||
if (rpiMetadata.get("agc.status", agcStatus) == 0) {
|
||||
ControlList ctrls(sensorCtrls_);
|
||||
applyAGC(&agcStatus, ctrls);
|
||||
setDelayedControls.emit(ctrls, ipaContext);
|
||||
setCameraTimeoutValue();
|
||||
}
|
||||
struct AgcStatus agcStatus;
|
||||
if (rpiMetadata.get("agc.status", agcStatus) == 0) {
|
||||
ControlList ctrls(sensorCtrls_);
|
||||
applyAGC(&agcStatus, ctrls);
|
||||
setDelayedControls.emit(ctrls, ipaContext);
|
||||
setCameraTimeoutValue();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user