From patchwork Thu May 7 15:25:33 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 26678 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 8AE69C32F6 for ; Thu, 7 May 2026 15:25:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F125662FEC; Thu, 7 May 2026 17:25:42 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vFEgevxW"; 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 8706462FEC for ; Thu, 7 May 2026 17:25:40 +0200 (CEST) Received: from ping.linuxembedded.co.uk (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 31A569CE; Thu, 7 May 2026 17:25:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778167536; bh=kkfDVlBkpeOaZhtjuTuzPlCDhaYwqFiu2UrRjJFCIek=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=vFEgevxWUgQaaCU0vl9aXlaCEnTeAs2IXM45Iskk4ZBFhyQchEbf2jQhMnTIpL+vD 2jX7TWSjKnqHvXTSVXddNBkHs67CNNLq9x9OfmUfMFku/LyiHkSqpqa3Lc3GKp2L5g zOO7vtGhewQSAIZNtnEYPKd6yQ8haZbCC7aZ7FXo= From: Kieran Bingham Date: Thu, 07 May 2026 16:25:33 +0100 Subject: [PATCH 1/2] pipeline: simple: Report ScalerCropMaximum camera property MIME-Version: 1.0 Message-Id: <20260507-kbingham-simple-scaler-crop-v1-1-7a5af1948565@ideasonboard.com> References: <20260507-kbingham-simple-scaler-crop-v1-0-7a5af1948565@ideasonboard.com> In-Reply-To: <20260507-kbingham-simple-scaler-crop-v1-0-7a5af1948565@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778167539; l=1351; i=kieran.bingham@ideasonboard.com; s=20260207; h=from:subject:message-id; bh=kkfDVlBkpeOaZhtjuTuzPlCDhaYwqFiu2UrRjJFCIek=; b=R+p9maN8PE0q10jTFERf8Xpg/MFtOb9i/xSrvu1SFYMhzBxmIao/wToyaGq+Ggz9lSmhlELGP DNVyjFeNMmUAd48atI2P5xhsONygA9R1jrcqQ0x8AscTcrMASvksqmR X-Developer-Key: i=kieran.bingham@ideasonboard.com; a=ed25519; pk=FVXKN7YuwHc6UtbRUeTMAmranfsQomA+vnilfglWdaY= 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" Even without a specific scaler, this gives the application information about the rectangle that conveys the pixels being displayed in the mode. Provide the analog crop region to the camera properties. Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/simple/simple.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index c6fe12d65b18..ee394c567a2c 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "libcamera/internal/camera.h" @@ -1523,6 +1524,13 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) if (ret < 0) return ret; + IPACameraSensorInfo sensorInfo; + ret = data->sensor_->sensorInfo(&sensorInfo); + if (ret) + return ret; + + data->properties_.set(properties::ScalerCropMaximum, sensorInfo.analogCrop); + /* Configure the video node, taking into account any Bayer pattern change. */ V4L2PixelFormat videoFormat; if (format.code == pipeConfig->code) {