diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-11-18 21:27:56 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-11-26 19:05:20 +0200 |
commit | cb3e3095d611462d839d6aec29d8a39cd38abf7c (patch) | |
tree | 64fb39260baf609656a0877261d85d730d8854dd /src/ipa/ipu3/algorithms/awb.h | |
parent | 4251193c3544ec105e75452c52d9c88384335df2 (diff) |
ipa: ipu3: awb: Replace Awb::RGB class with ipa::RGB
Now that libipa has a generic RGB class, replaces the local
implementation from the IPU3 AWB algorithm.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Diffstat (limited to 'src/ipa/ipu3/algorithms/awb.h')
-rw-r--r-- | src/ipa/ipu3/algorithms/awb.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/ipa/ipu3/algorithms/awb.h b/src/ipa/ipu3/algorithms/awb.h index a13c49ac..1916990a 100644 --- a/src/ipa/ipu3/algorithms/awb.h +++ b/src/ipa/ipu3/algorithms/awb.h @@ -13,6 +13,8 @@ #include <libcamera/geometry.h> +#include "libipa/vector.h" + #include "algorithm.h" namespace libcamera { @@ -48,20 +50,6 @@ public: ControlList &metadata) override; private: - /* \todo Make these structs available to all the ISPs ? */ - struct RGB { - RGB(double _R = 0, double _G = 0, double _B = 0) - : R(_R), G(_G), B(_B) - { - } - double R, G, B; - RGB &operator+=(RGB const &other) - { - R += other.R, G += other.G, B += other.B; - return *this; - } - }; - struct AwbStatus { double temperatureK; double redGain; @@ -78,7 +66,7 @@ private: static constexpr uint16_t threshold(float value); static constexpr uint16_t gainValue(double gain); - std::vector<RGB> zones_; + std::vector<RGB<double>> zones_; Accumulator awbStats_[kAwbStatsSizeX * kAwbStatsSizeY]; AwbStatus asyncResults_; |