From patchwork Fri Sep 18 09:10:47 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 28333 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 CF1D1BE175 for ; Fri, 18 Sep 2026 09:18:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 858E968703; Fri, 18 Sep 2026 11:18:56 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vivy1OtF"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F25486849B for ; Fri, 18 Sep 2026 11:18:54 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:6c1f:355d:1c19:aba6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 35297230; Fri, 18 Sep 2026 11:17:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1789723032; bh=PjX3rP3tlx4s2X93doMXHp2ykFb3Om8mmx5MdGleGkE=; h=From:To:Cc:Subject:Date:From; b=vivy1OtFL6PpUC0yTEQQS119U1HWywu+dCwiFHRJOmSPfA/ONVJRlNcOHyQv2BFRo +MkPn9EqP1vucyGGmkUGCMQzhYID70D1GmUpHm1WiLujyqroLqWJagkW0XLG0Oem10 6jCmC0QUTCnhpng3RaxzROtm3jFlTTF+D3oycRKQ= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v4 0/4] Clarify rectangle behavior Date: Fri, 18 Sep 2026 11:10:47 +0200 Message-ID: <20260918091835.2332386-1-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.53.0 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" Hi all, This series changes the behavior of PixelArraySize to represent the physical sensor area instead of the readable pixel area. The reasoning is explained in a bit more detail in patch 2. Patch 3 applies that idea to the IPA interface. Patch 4 adds an additional property for completeness sake which we could drop. With these patches applied I am able to draw proper bounding rectangles in camshark. An implemented is available in https://gitlab.freedesktop.org/camera/camshark/-/tree/sklug/next?ref_type=heads Version 4 renames PixelArraySize to PixelArrayArea for various reasons explained in patch 2. In addition patch 1 was added that drops the PixelArrayOpticalBlackRectangles property as it turned out to be completely unused. Version 3 prevents negative crop rectangles in the rpi ipa and issues a warning in that case. Aside from that a few minor stylistic fixes from the review were applied. Best regards, Stefan Stefan Klug (4): libcamera: property_ids_core: Drop PixelArrayOpticalBlackRectangles libcamera: Clarify meaning of PixelArraySize and other rectangles libcamera: ipa: core: Use native coordinates for IPACameraSensorInfo::analogCrop libcamera: ipa: core: Add IPACameraSensorInfo::pixelArrayArea property include/libcamera/ipa/core.mojom | 37 +++- src/android/camera_capabilities.cpp | 6 +- src/ipa/mali-c55/algorithms/lsc.cpp | 11 +- src/ipa/rkisp1/algorithms/lsc.cpp | 11 +- src/ipa/rpi/common/ipa_base.cpp | 20 +- src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 2 +- src/libcamera/property_ids_core.yaml | 204 ++++++------------ src/libcamera/sensor/camera_sensor_legacy.cpp | 54 ++--- src/libcamera/sensor/camera_sensor_raw.cpp | 36 ++-- 9 files changed, 163 insertions(+), 218 deletions(-)