libcamera: src: ipa: raspberrypi: agc: Improve AE locked logic

Previously we required that the sensor absolutely reaches the target
exposure, but this can fail if frame rates or analogue gains are
limited. Instead insist only that we get several frames with the same
exposure time, analogue gain and that the algorithm's target exposure
hasn't changed either.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
David Plowman 2020-11-23 07:38:04 +00:00 committed by Kieran Bingham
parent 7de5506c30
commit 1ea9ce9bdd
2 changed files with 44 additions and 25 deletions

View file

@ -82,6 +82,7 @@ public:
void Process(StatisticsPtr &stats, Metadata *image_metadata) override;
private:
void updateLockStatus(DeviceStatus const &device_status);
AgcConfig config_;
void housekeepConfig();
void fetchCurrentExposure(Metadata *image_metadata);
@ -111,6 +112,8 @@ private:
ExposureValues filtered_; // these values are filtered towards target
AgcStatus status_;
int lock_count_;
DeviceStatus last_device_status_;
double last_target_exposure_;
// Below here the "settings" that applications can change.
std::string metering_mode_name_;
std::string exposure_mode_name_;