From patchwork Tue Jan 20 12:26:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 25877 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6A68DBDCBF for ; Tue, 20 Jan 2026 12:26:27 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2473361FBF; Tue, 20 Jan 2026 13:26:27 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MMfUBGzq"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3F4E261A35 for ; Tue, 20 Jan 2026 13:26:25 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:b09a:fcc3:e9a4:a9a8]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 25BF221B1; Tue, 20 Jan 2026 13:25:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768911954; bh=Q66L+qBP3d9HUh5DEB9HQOwvALS5AmnZ9rrQY4rui1k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MMfUBGzq8Pif2f4fheoK3tsSg4MLxUl/towbishdkW9kfR5O+RqeM6lBCNV38JU4B Gj3VTm++3HON3gMx7exSt9BjQ/2f7vhF30yNRQQwbX8OmtLbm9VGsLuVqGs4Nwe6eP w2R1nXZrMLLYat0+Phz1dJ7RIa53vudeGMkq2zvc= From: Stefan Klug Date: Tue, 20 Jan 2026 13:26:10 +0100 Subject: [PATCH v5 05/15] ipa: rkisp1: lsc: Rename res to ret MIME-Version: 1.0 Message-Id: <20260120-sklug-lsc-resampling-v2-dev-v5-5-ef5cec7b299f@ideasonboard.com> References: <20260120-sklug-lsc-resampling-v2-dev-v5-0-ef5cec7b299f@ideasonboard.com> In-Reply-To: <20260120-sklug-lsc-resampling-v2-dev-v5-0-ef5cec7b299f@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , =?utf-8?q?Barnab=C3=A1s_P?= =?utf-8?b?xZFjemU=?= , Rui Wang X-Mailer: b4 0.14.2 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Rename res to ret as that is used in libcamera for return codes. Signed-off-by: Stefan Klug Reviewed-by: Barnabás Pőcze Reviewed-by: Rui Wang --- Changes in v2: - Restored old variable order - Collected tags --- 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 bb58386ae646ad6089322ba63d2a9e89664884d2..68e262a2b057d12a9019a6a92c1b300272b04c4d 100644 --- a/src/ipa/rkisp1/algorithms/lsc.cpp +++ b/src/ipa/rkisp1/algorithms/lsc.cpp @@ -321,27 +321,28 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context, } std::map lscData; - int res = 0; + int ret = 0; + std::string type = tuningData["type"].get("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));