summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms
diff options
context:
space:
mode:
authorFlorian Sylvestre <fsylvestre@baylibre.com>2022-08-05 14:40:26 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-08-21 21:50:12 +0300
commit6d20a93177e89a35e5a2b2372df63c6505879258 (patch)
treeb811ff0f4e075f5a64b919db1789c831a9f6e317 /src/ipa/rkisp1/algorithms
parentea549c46d3307b8ff031166df936e98327d99c8e (diff)
ipa: rkisp1: Add enable field for LSC algorithm in IPA context
Add an enable variable in the lsc struct in IPASessionConfiguration which indicates if the LSC hardware module is enabled. This will allow other algorithms to retrieve this information. Signed-off-by: Florian Sylvestre <fsylvestre@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/algorithms')
-rw-r--r--src/ipa/rkisp1/algorithms/lsc.cpp10
-rw-r--r--src/ipa/rkisp1/algorithms/lsc.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp
index 05c8c0da..da287ac7 100644
--- a/src/ipa/rkisp1/algorithms/lsc.cpp
+++ b/src/ipa/rkisp1/algorithms/lsc.cpp
@@ -120,6 +120,16 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context,
}
/**
+ * \copydoc libcamera::ipa::Algorithm::configure
+ */
+int LensShadingCorrection::configure(IPAContext &context,
+ [[maybe_unused]] const IPACameraSensorInfo &configInfo)
+{
+ context.configuration.lsc.enabled = initialized_;
+ return 0;
+}
+
+/**
* \copydoc libcamera::ipa::Algorithm::prepare
*/
void LensShadingCorrection::prepare(IPAContext &context,
diff --git a/src/ipa/rkisp1/algorithms/lsc.h b/src/ipa/rkisp1/algorithms/lsc.h
index fdb2ec1d..f68602c0 100644
--- a/src/ipa/rkisp1/algorithms/lsc.h
+++ b/src/ipa/rkisp1/algorithms/lsc.h
@@ -20,6 +20,7 @@ public:
~LensShadingCorrection() = default;
int init(IPAContext &context, const YamlObject &tuningData) override;
+ int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
void prepare(IPAContext &context, rkisp1_params_cfg *params) override;
private: