[v5,4/6] ipa: rkisp1: algorithms: dpf: Simplify YAML key names
diff mbox series

Message ID 20251214181646.573675-5-rui.wang@ideasonboard.com
State New
Headers show
Series
  • refactor DPF parsing and initialization
Related show

Commit Message

Rui Wang Dec. 14, 2025, 6:16 p.m. UTC
Rename DPF tuning file keys to shorter, more concise names:
- DomainFilter -> filter
- NoiseLevelFunction -> nll
- FilterStrength -> strength

This improves readability and reduces verbosity in tuning files
while maintaining the same functionality. Error messages are
updated accordingly to reflect the new key names.

Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>
---
 src/ipa/rkisp1/algorithms/dpf.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp
index 677239ca..4818ef28 100644
--- a/src/ipa/rkisp1/algorithms/dpf.cpp
+++ b/src/ipa/rkisp1/algorithms/dpf.cpp
@@ -130,7 +130,7 @@  int Dpf::parseSingleConfig(const YamlObject &tuningData,
 	 * The domain kernel is configured with a 9x9 kernel for the green
 	 * pixels, and a 13x9 or 9x9 kernel for red and blue pixels.
 	 */
-	const YamlObject &dFObject = tuningData["DomainFilter"];
+	const YamlObject &dFObject = tuningData["filter"];
 
 	/*
 	 * For the green component, we have the 9x9 kernel specified
@@ -152,7 +152,7 @@  int Dpf::parseSingleConfig(const YamlObject &tuningData,
 	values = dFObject["g"].getList<uint8_t>().value_or(std::vector<uint8_t>{});
 	if (values.size() != RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS) {
 		LOG(RkISP1Dpf, Error)
-			<< "Invalid 'DomainFilter:g': expected "
+			<< "Invalid 'filter:g': expected "
 			<< RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS
 			<< " elements, got " << values.size();
 		return -EINVAL;
@@ -189,7 +189,7 @@  int Dpf::parseSingleConfig(const YamlObject &tuningData,
 	if (values.size() != RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS &&
 	    values.size() != RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS - 1) {
 		LOG(RkISP1Dpf, Error)
-			<< "Invalid 'DomainFilter:rb': expected "
+			<< "Invalid 'filter:rb': expected "
 			<< RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS - 1
 			<< " or " << RKISP1_CIF_ISP_DPF_MAX_SPATIAL_COEFFS
 			<< " elements, got " << values.size();
@@ -211,13 +211,13 @@  int Dpf::parseSingleConfig(const YamlObject &tuningData,
 	 * which stores a piecewise linear function that characterizes the
 	 * sensor noise profile as a noise level function curve (NLF).
 	 */
-	const YamlObject &rFObject = tuningData["NoiseLevelFunction"];
+	const YamlObject &rFObject = tuningData["nll"];
 
 	std::vector<uint16_t> nllValues;
 	nllValues = rFObject["coeff"].getList<uint16_t>().value_or(std::vector<uint16_t>{});
 	if (nllValues.size() != RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS) {
 		LOG(RkISP1Dpf, Error)
-			<< "Invalid 'RangeFilter:coeff': expected "
+			<< "Invalid 'nll:coeff': expected "
 			<< RKISP1_CIF_ISP_DPF_MAX_NLF_COEFFS
 			<< " elements, got " << nllValues.size();
 		return -EINVAL;
@@ -233,13 +233,13 @@  int Dpf::parseSingleConfig(const YamlObject &tuningData,
 		config.nll.scale_mode = RKISP1_CIF_ISP_NLL_SCALE_LOGARITHMIC;
 	} else {
 		LOG(RkISP1Dpf, Error)
-			<< "Invalid 'RangeFilter:scale-mode': expected "
+			<< "Invalid 'nll:scale-mode': expected "
 			<< "'linear' or 'logarithmic' value, got "
 			<< scaleMode;
 		return -EINVAL;
 	}
 
-	const YamlObject &fSObject = tuningData["FilterStrength"];
+	const YamlObject &fSObject = tuningData["strength"];
 
 	strengthConfig.r = fSObject["r"].get<uint8_t>().value_or(64);
 	strengthConfig.g = fSObject["g"].get<uint8_t>().value_or(64);