summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/rpi/awb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi/awb.cpp')
-rw-r--r--src/ipa/raspberrypi/controller/rpi/awb.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp
index 469d0e53..020825e3 100644
--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp
@@ -179,6 +179,20 @@ void Awb::SetManualGains(double manual_r, double manual_b)
manual_b_ = manual_b;
}
+void Awb::SwitchMode([[maybe_unused]] CameraMode const &camera_mode,
+ Metadata *metadata)
+{
+ // If fixed colour gains have been set, we should let other algorithms
+ // know by writing it into the image metadata.
+ if (manual_r_ != 0.0 && manual_b_ != 0.0) {
+ prev_sync_results_.gain_r = manual_r_;
+ prev_sync_results_.gain_g = 1.0;
+ prev_sync_results_.gain_b = manual_b_;
+ sync_results_ = prev_sync_results_;
+ }
+ metadata->Set("awb.status", prev_sync_results_);
+}
+
void Awb::fetchAsyncResults()
{
RPI_LOG("Fetch AWB results");