summaryrefslogtreecommitdiff
path: root/src/ipa/rpi/controller/rpi/cac.h
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2023-10-13 08:48:32 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-10-18 11:01:22 +0100
commitded9004e91dd2487f3ec1827eaab8c80b0e02e68 (patch)
treef508bb314903a3f99063f3b0f92720f4db231618 /src/ipa/rpi/controller/rpi/cac.h
parentc9fb1d44d850904a95d73e8773548485de1de081 (diff)
ipa: rpi: Add new algorithms for PiSP
Add new CAC, HDR, Saturation and Tonemapping algorithms. Add a new Denoise algorithm that handles spatial/temporal/colour denoise through one interface. With this change, the old SDN algorithm is now considered deprecated and a warning message will be displayed if it is enabled. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/rpi/controller/rpi/cac.h')
-rw-r--r--src/ipa/rpi/controller/rpi/cac.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/ipa/rpi/controller/rpi/cac.h b/src/ipa/rpi/controller/rpi/cac.h
new file mode 100644
index 00000000..419180ab
--- /dev/null
+++ b/src/ipa/rpi/controller/rpi/cac.h
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+/*
+ * Copyright (C) 2023, Raspberry Pi Ltd
+ *
+ * cac.hpp - CAC control algorithm
+ */
+#pragma once
+
+#include "algorithm.h"
+#include "cac_status.h"
+
+namespace RPiController {
+
+struct CacConfig {
+ std::vector<double> lutRx;
+ std::vector<double> lutRy;
+ std::vector<double> lutBx;
+ std::vector<double> lutBy;
+};
+
+class Cac : public Algorithm
+{
+public:
+ Cac(Controller *controller = NULL);
+ char const *name() const override;
+ int read(const libcamera::YamlObject &params) override;
+ void initialise() override;
+ void prepare(Metadata *imageMetadata) override;
+ void setStrength(std::vector<double> &inputArray, std::vector<double> &outputArray,
+ double strengthFactor);
+
+private:
+ CacConfig config_;
+ CacStatus cacStatus_;
+ void arrayToSet(const libcamera::YamlObject &params, std::vector<double> &inputArray);
+};
+
+} // namespace RPiController