summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/agc.hpp
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2020-11-23 07:38:04 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-11-23 14:24:49 +0000
commit1ea9ce9bdd1f42d468f3a8e71282215f46a2464c (patch)
tree20a9c1a095b260aa27c9967cfe4ec6f3e090b86d /src/ipa/raspberrypi/controller/rpi/agc.hpp
parent7de5506c30b36575de7bbead7fda243ec1019005 (diff)
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>
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/agc.hpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/agc.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp
index 859a9650..47ebb324 100644
--- a/src/ipa/raspberrypi/controller/rpi/agc.hpp
+++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp
@@ -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_;