ipa: raspberrypi: Pass the maximum allowable shutter speed into the AGC
In order to provide an optimal split between shutter speed and gain, the AGC must know the maximum allowable shutter speed, as limited by the maximum frame duration (either application provided or the default). Add a new API function, SetMaxShutter, to the AgcAlgorithm class. The IPA provides the maximum shutter speed for AGC calculations. This applies to both the manual and auto AGC modes. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
362301b131
commit
47d243c44a
4 changed files with 48 additions and 15 deletions
|
@ -1065,6 +1065,18 @@ void IPARPi::applyFrameDurations(double minFrameDuration, double maxFrameDuratio
|
|||
libcameraMetadata_.set(controls::FrameDurations,
|
||||
{ static_cast<int64_t>(minFrameDuration_),
|
||||
static_cast<int64_t>(maxFrameDuration_) });
|
||||
|
||||
/*
|
||||
* Calculate the maximum exposure time possible for the AGC to use.
|
||||
* GetVBlanking() will update maxShutter with the largest exposure
|
||||
* value possible.
|
||||
*/
|
||||
double maxShutter = std::numeric_limits<double>::max();
|
||||
helper_->GetVBlanking(maxShutter, minFrameDuration_, maxFrameDuration_);
|
||||
|
||||
RPiController::AgcAlgorithm *agc = dynamic_cast<RPiController::AgcAlgorithm *>(
|
||||
controller_.GetAlgorithm("agc"));
|
||||
agc->SetMaxShutter(maxShutter);
|
||||
}
|
||||
|
||||
void IPARPi::applyAGC(const struct AgcStatus *agcStatus, ControlList &ctrls)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue