summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/awb.h
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>2022-05-12 10:42:43 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-28 05:41:15 +0300
commitdf7b9826d7522b7328069c9765e6ba646a050a5e (patch)
treea809326761b5787f85ea7d4a047c7a9989ca3f98 /src/ipa/rkisp1/algorithms/awb.h
parentef38cbe9de93aa22a2232a56017aecfeed5ed232 (diff)
ipa: rkisp1: awb: Add support for RGB means
RkISP actually supports two modes for color means, RGB and YCbCr. The variables where the means are stored are identically named regardless of the color means mode that's been selected. Since the gains are computed in RGB mode, a conversion needs to be done when the mode is YCbCr, which is unnecessary when RGB mode is selected. This adds support for RGB means mode too, by checking at runtime which mode is selected at a given time. The default is still set to YCbCr mode for now. Cc: Quentin Schulz <foss+libcamera@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/ipa/rkisp1/algorithms/awb.h')
-rw-r--r--src/ipa/rkisp1/algorithms/awb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h
index 6d4a3946..d76b5382 100644
--- a/src/ipa/rkisp1/algorithms/awb.h
+++ b/src/ipa/rkisp1/algorithms/awb.h
@@ -16,7 +16,7 @@ namespace ipa::rkisp1::algorithms {
class Awb : public Algorithm
{
public:
- Awb() = default;
+ Awb();
~Awb() = default;
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
@@ -32,6 +32,8 @@ public:
private:
uint32_t estimateCCT(double red, double green, double blue);
+
+ bool rgbMode_;
};
} /* namespace ipa::rkisp1::algorithms */