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:37:59 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-11-23 14:24:28 +0000
commitf185a168335edaebb5f661070d579b819bbc4ad2 (patch)
treeb295790ecfc8118677e646cba2ea02f1159dc6ef /src/ipa/raspberrypi/controller/rpi/agc.hpp
parent9db94a3635b8cc0963fdbc8e33c07890ce177359 (diff)
libcamera: ipa: raspberrypi: agc: Fetch AWB status only once
Introduce a function to fetch the AwbStatus (fetchAwbStatus), and call it unconditionally at the top of Prepare so that both Prepare and Process know thereafter that it's been done. 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.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp
index 2442fc03..e7ac480f 100644
--- a/src/ipa/raspberrypi/controller/rpi/agc.hpp
+++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp
@@ -83,11 +83,11 @@ private:
AgcConfig config_;
void housekeepConfig();
void fetchCurrentExposure(Metadata *image_metadata);
+ void fetchAwbStatus(Metadata *image_metadata);
void computeGain(bcm2835_isp_stats *statistics, Metadata *image_metadata,
double &gain, double &target_Y);
void computeTargetExposure(double gain);
- bool applyDigitalGain(Metadata *image_metadata, double gain,
- double target_Y);
+ bool applyDigitalGain(double gain, double target_Y);
void filterExposure(bool desaturate);
void divideUpExposure();
void writeAndFinish(Metadata *image_metadata, bool desaturate);
@@ -95,6 +95,7 @@ private:
AgcExposureMode *exposure_mode_;
AgcConstraintMode *constraint_mode_;
uint64_t frame_count_;
+ AwbStatus awb_;
struct ExposureValues {
ExposureValues() : shutter(0), analogue_gain(0),
total_exposure(0), total_exposure_no_dg(0) {}