@@ -320,28 +320,29 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context,
return -EINVAL;
}
+ int ret = 0;
std::map<unsigned int, Components> lscData;
- int res = 0;
+
std::string type = tuningData["type"].get<std::string>("table");
if (type == "table") {
LOG(RkISP1Lsc, Debug) << "Loading tabular LSC data.";
auto loader = LscTableLoader();
- res = loader.parseLscData(yamlSets, lscData);
+ ret = loader.parseLscData(yamlSets, lscData);
} else if (type == "polynomial") {
LOG(RkISP1Lsc, Debug) << "Loading polynomial LSC data.";
auto loader = LscPolynomialLoader(context.sensorInfo.activeAreaSize,
context.sensorInfo.analogCrop,
xSize_,
ySize_);
- res = loader.parseLscData(yamlSets, lscData);
+ ret = loader.parseLscData(yamlSets, lscData);
} else {
LOG(RkISP1Lsc, Error) << "Unsupported LSC data type '"
<< type << "'";
- res = -EINVAL;
+ ret = -EINVAL;
}
- if (res)
- return res;
+ if (ret)
+ return ret;
sets_.setData(std::move(lscData));
Rename res to ret as that is used in libcamera for return codes. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- src/ipa/rkisp1/algorithms/lsc.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)