From patchwork Tue Sep 8 13:56:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 28206 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 C0B7FC3350 for ; Tue, 8 Sep 2026 14:01:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 072F46863D; Tue, 8 Sep 2026 16:00:57 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="t5GrwIA7"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 19AED68622 for ; Tue, 8 Sep 2026 16:00:56 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:cb02:bddb:7f62:3e6d]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8CE148FD; Tue, 8 Sep 2026 15:59:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1788875960; bh=Ce5uXPj4f6iMmal0CqaiJyT9ofB6p/+xCJsJwvFw9rY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t5GrwIA78HGl4i1mOTEI3meZtaRz1kVkGy+P1kQoR2jn3g7PKfn6m3VmGqqrAHpzK k1tYgry4KpbMQ3CqoayQTwojpZFyi1IgH/UB75mcfsf/22u63kMB72sbFFrvZLkRF8 EPaoRYFfPQ4V8qzqGKwSo8cHjI2ZYFTKFyZv32yA= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Jacopo Mondi Subject: [PATCH v3 3/3] libcamera: ipa: core: Add IPACameraSensorInfo::pixelArraySize property Date: Tue, 8 Sep 2026 15:56:21 +0200 Message-ID: <20260908135949.3842255-4-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908135949.3842255-1-stefan.klug@ideasonboard.com> References: <20260908135949.3842255-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" Add a IPACameraSensorInfo::pixelArraySize property to communicate the full size of the pixel array to the IPA. This property is not used today but will be useful to do sanity checks on coordinates handled in the algorithms. Signed-off-by: Stefan Klug Reviewed-by: Jacopo Mondi --- Changes in v3: - Collected tag --- include/libcamera/ipa/core.mojom | 6 ++++++ src/libcamera/sensor/camera_sensor_legacy.cpp | 1 + src/libcamera/sensor/camera_sensor_raw.cpp | 1 + 3 files changed, 8 insertions(+) diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom index 32ff25bbfc2b..4e7d75b02c04 100644 --- a/include/libcamera/ipa/core.mojom +++ b/include/libcamera/ipa/core.mojom @@ -152,6 +152,11 @@ module libcamera; * RGB for sensors that don't have a CFA. */ +/** + * \var IPACameraSensorInfo::pixelArraySize + * \brief The size of the physical pixel array of the sensor in pixels + */ + /** * \var IPACameraSensorInfo::activeArea * \brief The active pixel area of the sensor, relative to the physical pixel @@ -250,6 +255,7 @@ struct IPACameraSensorInfo { uint32 bitsPerPixel; uint32 cfaPattern; + Size pixelArraySize; Rectangle activeArea; Rectangle analogCrop; Size outputSize; diff --git a/src/libcamera/sensor/camera_sensor_legacy.cpp b/src/libcamera/sensor/camera_sensor_legacy.cpp index a4d94a25690b..e8d2f21e6175 100644 --- a/src/libcamera/sensor/camera_sensor_legacy.cpp +++ b/src/libcamera/sensor/camera_sensor_legacy.cpp @@ -887,6 +887,7 @@ int CameraSensorLegacy::sensorInfo(IPACameraSensorInfo *info) const return -EINVAL; info->model = model(); + info->pixelArraySize = pixelArraySize_; /* * The active area is a static property, while the crop rectangle needs diff --git a/src/libcamera/sensor/camera_sensor_raw.cpp b/src/libcamera/sensor/camera_sensor_raw.cpp index 3974295ee418..34558478b2a6 100644 --- a/src/libcamera/sensor/camera_sensor_raw.cpp +++ b/src/libcamera/sensor/camera_sensor_raw.cpp @@ -1007,6 +1007,7 @@ int CameraSensorRaw::setEmbeddedDataEnabled(bool enable) int CameraSensorRaw::sensorInfo(IPACameraSensorInfo *info) const { info->model = model(); + info->pixelArraySize = pixelArraySize_; /* * The active area is a static property, while the crop rectangle needs