[libcamera-devel] [RFC PATCH 3/4] ipa: ipu3: Register algorithms

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Aug 2 12:09:54 CEST 2022


To prepare for dynamic instantiation of algorithms from the tuning file,
register the algorithms with the Module class.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
 src/ipa/ipu3/algorithms/af.cpp           | 2 ++
 src/ipa/ipu3/algorithms/agc.cpp          | 2 ++
 src/ipa/ipu3/algorithms/awb.cpp          | 2 ++
 src/ipa/ipu3/algorithms/blc.cpp          | 2 ++
 src/ipa/ipu3/algorithms/tone_mapping.cpp | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp
index d07521a090ac..4835a0345931 100644
--- a/src/ipa/ipu3/algorithms/af.cpp
+++ b/src/ipa/ipu3/algorithms/af.cpp
@@ -450,6 +450,8 @@ void Af::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameCon
 	}
 }
 
+REGISTER_IPA_ALGORITHM(Af, "Af")
+
 } /* namespace ipa::ipu3::algorithms */
 
 } /* namespace libcamera */
diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
index 5bc64ae52214..ed4809d98007 100644
--- a/src/ipa/ipu3/algorithms/agc.cpp
+++ b/src/ipa/ipu3/algorithms/agc.cpp
@@ -363,6 +363,8 @@ void Agc::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameCo
 	frameCount_++;
 }
 
+REGISTER_IPA_ALGORITHM(Agc, "Agc")
+
 } /* namespace ipa::ipu3::algorithms */
 
 } /* namespace libcamera */
diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp
index 704267222a31..b658ee546b87 100644
--- a/src/ipa/ipu3/algorithms/awb.cpp
+++ b/src/ipa/ipu3/algorithms/awb.cpp
@@ -483,6 +483,8 @@ void Awb::prepare(IPAContext &context, ipu3_uapi_params *params)
 	params->use.acc_ccm = 1;
 }
 
+REGISTER_IPA_ALGORITHM(Awb, "Awb")
+
 } /* namespace ipa::ipu3::algorithms */
 
 } /* namespace libcamera */
diff --git a/src/ipa/ipu3/algorithms/blc.cpp b/src/ipa/ipu3/algorithms/blc.cpp
index 78ab7bff549f..c561aa858b96 100644
--- a/src/ipa/ipu3/algorithms/blc.cpp
+++ b/src/ipa/ipu3/algorithms/blc.cpp
@@ -62,6 +62,8 @@ void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context,
 	params->use.obgrid_param = 1;
 }
 
+REGISTER_IPA_ALGORITHM(BlackLevelCorrection, "BlackLevelCorrection")
+
 } /* namespace ipa::ipu3::algorithms */
 
 } /* namespace libcamera */
diff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp
index f86e79b24a67..49a5558b6faa 100644
--- a/src/ipa/ipu3/algorithms/tone_mapping.cpp
+++ b/src/ipa/ipu3/algorithms/tone_mapping.cpp
@@ -105,6 +105,8 @@ void ToneMapping::process(IPAContext &context, [[maybe_unused]] IPAFrameContext
 	context.activeState.toneMapping.gamma = gamma_;
 }
 
+REGISTER_IPA_ALGORITHM(ToneMapping, "ToneMapping")
+
 } /* namespace ipa::ipu3::algorithms */
 
 } /* namespace libcamera */
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list