From patchwork Tue Jun 16 12:08:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 26906 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 F41F8C3261 for ; Tue, 16 Jun 2026 12:08:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AB523625C7; Tue, 16 Jun 2026 14:08:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="kGg0GnrE"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 11002625BE for ; Tue, 16 Jun 2026 14:08:51 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:f9ec:e24d:190b:e780]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9C5EF448; Tue, 16 Jun 2026 14:08:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781611697; bh=C/I69GSC4xY5D/ERQJaGTeiu1kqenc4C47Y0yml3MV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kGg0GnrEyXFcGrs6jcOjEOYAKIoanyuzgRJB1wrzdxYN8MsYNwWbs9LxwqU1Z5te6 Cy5xYN36K9QR787PQUHjiVKKIlVDHdraS89N2Ya3CdVlCevADHIFl5Io8jYSn4POwm 9FsQ4clygQWyrtMuTpYZ6fOi07NLfUhADLY/UP2Q= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v1 2/2] libcamera: ipa: core: Rename IPACameraSensorInfo::activeAreaSize to pixelArraySize Date: Tue, 16 Jun 2026 14:08:15 +0200 Message-ID: <20260616120828.375547-3-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616120828.375547-1-stefan.klug@ideasonboard.com> References: <20260616120828.375547-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 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 IPACameraSensorInfo::activeAreaSize to IPACameraSensorInfo::pixelArraySize to better describe the content. Signed-off-by: Stefan Klug --- include/libcamera/ipa/core.mojom | 4 ++-- src/ipa/rkisp1/algorithms/lsc.cpp | 6 +----- src/ipa/rpi/common/ipa_base.cpp | 4 ++-- src/libcamera/sensor/camera_sensor_legacy.cpp | 2 +- src/libcamera/sensor/camera_sensor_raw.cpp | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom index 5da780f5d256..f2e9b0997819 100644 --- a/include/libcamera/ipa/core.mojom +++ b/include/libcamera/ipa/core.mojom @@ -153,7 +153,7 @@ module libcamera; */ /** - * \var IPACameraSensorInfo::activeAreaSize + * \var IPACameraSensorInfo::pixelArraySize * \brief The size of the physical pixel array of the sensor in pixels */ @@ -243,7 +243,7 @@ struct IPACameraSensorInfo { uint32 bitsPerPixel; uint32 cfaPattern; - Size activeAreaSize; + Size pixelArraySize; Rectangle analogCrop; Size outputSize; diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp index 25f7c512b35c..a3029414ed6e 100644 --- a/src/ipa/rkisp1/algorithms/lsc.cpp +++ b/src/ipa/rkisp1/algorithms/lsc.cpp @@ -401,11 +401,7 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context, ret = loader.parseLscData(yamlSets, lscData); } else if (type == "polynomial") { LOG(RkISP1Lsc, Debug) << "Loading polynomial LSC data."; - /* - * \todo: Most likely the reference frame should be native_size. - * Let's wait how the internal discussions progress. - */ - auto loader = LscPolynomialLoader(context.sensorInfo.activeAreaSize); + auto loader = LscPolynomialLoader(context.sensorInfo.pixelArraySize); ret = loader.parseLscData(yamlSets, lscData); } else { LOG(RkISP1Lsc, Error) << "Unsupported LSC data type '" diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index dacafa578c98..fc0eb3bf4b5c 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -567,8 +567,8 @@ void IpaBase::setMode(const IPACameraSensorInfo &sensorInfo) mode_.bitdepth = sensorInfo.bitsPerPixel; mode_.width = sensorInfo.outputSize.width; mode_.height = sensorInfo.outputSize.height; - mode_.sensorWidth = sensorInfo.activeAreaSize.width; - mode_.sensorHeight = sensorInfo.activeAreaSize.height; + mode_.sensorWidth = sensorInfo.pixelArraySize.width; + mode_.sensorHeight = sensorInfo.pixelArraySize.height; mode_.cropX = sensorInfo.analogCrop.x; mode_.cropY = sensorInfo.analogCrop.y; mode_.pixelRate = sensorInfo.pixelRate; diff --git a/src/libcamera/sensor/camera_sensor_legacy.cpp b/src/libcamera/sensor/camera_sensor_legacy.cpp index 482e387d3b24..e3e97b5b9ef3 100644 --- a/src/libcamera/sensor/camera_sensor_legacy.cpp +++ b/src/libcamera/sensor/camera_sensor_legacy.cpp @@ -880,7 +880,7 @@ int CameraSensorLegacy::sensorInfo(IPACameraSensorInfo *info) const * rectangle needs to be re-read as it depends on the sensor * configuration. */ - info->activeAreaSize = { activeArea_.width, activeArea_.height }; + info->pixelArraySize = { pixelArraySize_.width, pixelArraySize_.height }; /* * \todo Support for retreiving the crop rectangle is scheduled to diff --git a/src/libcamera/sensor/camera_sensor_raw.cpp b/src/libcamera/sensor/camera_sensor_raw.cpp index 410edeb68983..62da78acc513 100644 --- a/src/libcamera/sensor/camera_sensor_raw.cpp +++ b/src/libcamera/sensor/camera_sensor_raw.cpp @@ -998,7 +998,7 @@ int CameraSensorRaw::sensorInfo(IPACameraSensorInfo *info) const * rectangle needs to be re-read as it depends on the sensor * configuration. */ - info->activeAreaSize = { activeArea_.width, activeArea_.height }; + info->pixelArraySize = { activeArea_.width, activeArea_.height }; int ret = subdev_->getSelection(streams_.image.sink, V4L2_SEL_TGT_CROP, &info->analogCrop);