From patchwork Fri Sep 18 09:10:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 28337 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 690CCC3357 for ; Fri, 18 Sep 2026 09:19:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C1EE668725; Fri, 18 Sep 2026 11:19:06 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RV4dc0gP"; 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 224C668702 for ; Fri, 18 Sep 2026 11:19:05 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:6c1f:355d:1c19:aba6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5A6E8C6A; Fri, 18 Sep 2026 11:17:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1789723042; bh=k9oVCCxtlSjAwm9LKTrYfGLSajdbBjAJjzTS2KDu98Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RV4dc0gPEYNUln/QaCnKfEg8B+gnwLngOdNGlHt8ZOtv838oAK96gxduzDffgMl3b Dwm8iCBtk3GGPjKm4EUYgZVZJ+Vs31I8E11UrdWNm0rWb3/e8QkRqLKJAoRtVZbCX5 UUgyvF3S39F+KDt0V1hV6pqbmVD06vFkdsU0OMX0= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Jacopo Mondi Subject: [PATCH v4 4/4] libcamera: ipa: core: Add IPACameraSensorInfo::pixelArrayArea property Date: Fri, 18 Sep 2026 11:10:51 +0200 Message-ID: <20260918091835.2332386-5-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260918091835.2332386-1-stefan.klug@ideasonboard.com> References: <20260918091835.2332386-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::pixelArrayArea property to communicate the full area 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 v4: - switch from pixelArraySize to pixelArrayArea Changes in v3: - Collected tag --- include/libcamera/ipa/core.mojom | 8 ++++++++ src/libcamera/sensor/camera_sensor_legacy.cpp | 1 + src/libcamera/sensor/camera_sensor_raw.cpp | 1 + 3 files changed, 10 insertions(+) diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom index 32ff25bbfc2b..5ff3d79c4366 100644 --- a/include/libcamera/ipa/core.mojom +++ b/include/libcamera/ipa/core.mojom @@ -152,6 +152,13 @@ module libcamera; * RGB for sensors that don't have a CFA. */ +/** + * \var IPACameraSensorInfo::pixelArrayArea + * \brief The area of the physical pixel array of the sensor in pixels + * + * The top left corner of this rectangle is always at (0,0). + */ + /** * \var IPACameraSensorInfo::activeArea * \brief The active pixel area of the sensor, relative to the physical pixel @@ -250,6 +257,7 @@ struct IPACameraSensorInfo { uint32 bitsPerPixel; uint32 cfaPattern; + Rectangle pixelArrayArea; 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 62f346aa06df..bbe3f2e8fc7d 100644 --- a/src/libcamera/sensor/camera_sensor_legacy.cpp +++ b/src/libcamera/sensor/camera_sensor_legacy.cpp @@ -886,6 +886,7 @@ int CameraSensorLegacy::sensorInfo(IPACameraSensorInfo *info) const return -EINVAL; info->model = model(); + info->pixelArrayArea = pixelArrayArea_; /* * 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 940e7514ae93..389b9ddfe19f 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->pixelArrayArea = pixelArrayArea_; /* * The active area is a static property, while the crop rectangle needs