summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/awb.h
diff options
context:
space:
mode:
authorStefan Klug <stefan.klug@ideasonboard.com>2024-12-19 18:57:19 +0100
committerStefan Klug <stefan.klug@ideasonboard.com>2024-12-20 17:22:42 +0100
commit886e0328c325bd71e3bc430cb8fd3eb9b10a890b (patch)
treeebd48e73f442191546b0d014d8905e3406255078 /src/ipa/rkisp1/algorithms/awb.h
parent4d2618fb1096131d3295d7ff25efa5d37a89a56f (diff)
ipa: rkisp1: awb: Load white balance gains from tuning file
For the implementation of a manual colour temperature setting, it is necessary to read predefined colour gains per colour temperature from the tuning file. Implement this in a backwards compatible way. If no gains are contained in the tuning file, loading just continues as before. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/algorithms/awb.h')
-rw-r--r--src/ipa/rkisp1/algorithms/awb.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h
index 6ac3a5c3..e4248048 100644
--- a/src/ipa/rkisp1/algorithms/awb.h
+++ b/src/ipa/rkisp1/algorithms/awb.h
@@ -7,6 +7,11 @@
#pragma once
+#include <optional>
+
+#include "libipa/interpolator.h"
+#include "libipa/vector.h"
+
#include "algorithm.h"
namespace libcamera {
@@ -19,6 +24,7 @@ public:
Awb();
~Awb() = default;
+ int init(IPAContext &context, const YamlObject &tuningData) override;
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
void queueRequest(IPAContext &context, const uint32_t frame,
IPAFrameContext &frameContext,
@@ -32,6 +38,7 @@ public:
ControlList &metadata) override;
private:
+ std::optional<Interpolator<Vector<double, 2>>> colourGainCurve_;
bool rgbMode_;
};