| Message ID | 20251014075252.2876485-6-stefan.klug@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
2025. 10. 14. 9:52 keltezéssel, Stefan Klug írta: > 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(-) > > diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp > index bb58386ae646..e4938dbd657c 100644 > --- a/src/ipa/rkisp1/algorithms/lsc.cpp > +++ b/src/ipa/rkisp1/algorithms/lsc.cpp > @@ -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; > + I think I liked the previous order better. Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > 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)); >
On 2025-10-14 03:52, Stefan Klug wrote: > 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(-) > > diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp > index bb58386ae646..e4938dbd657c 100644 > --- a/src/ipa/rkisp1/algorithms/lsc.cpp > +++ b/src/ipa/rkisp1/algorithms/lsc.cpp > @@ -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)); > Reviewed-by: Rui Wang <rui.wang@ideasonboard.com> Reviewed-by: Rui Wang <rui.wang@ideasonboard.com> Reviewed-by: Rui Wang <rui.wang@ideasonboard.com>
diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp index bb58386ae646..e4938dbd657c 100644 --- a/src/ipa/rkisp1/algorithms/lsc.cpp +++ b/src/ipa/rkisp1/algorithms/lsc.cpp @@ -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(-)