From patchwork Thu May 7 15:25:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 26817 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by patchwork.libcamera.org (Postfix) with ESMTPS id CFD85C328C for ; Tue, 2 Jun 2026 15:46:32 +0000 (UTC) Received: from monstersaurus.ideasonboard.com (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5974478C for ; Tue, 2 Jun 2026 17:46:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1780415169; bh=acfXknjvLpRckycmwdMd077p+m/slTzWsE2I/lABU5A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Resent-From: Resent-To:From; b=Ho5HtYHGDFyr0fBhb7t2MwtU9NDp4mFSkTAWsDINi38rQaPPrwNAcxr/E0RaRdTUC iQ1GbScXE7DG4+Qh/Lb8hpLznA60oFEFH5I3wi6096+Q9o5S+DW+pB/8NUdJpTciZH qUiNnv3WiGU3AJoM7ZoGe8p4heOG1f2uk4az1KZk= Delivered-To: kbingham@ideasonboard.com Received: from perceval.ideasonboard.com by perceval.ideasonboard.com with LMTP id YDkIDvGu/GlvrxQA4E0KoQ (envelope-from ) for ; Thu, 07 May 2026 17:25:37 +0200 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 68DCC1253; 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=acfXknjvLpRckycmwdMd077p+m/slTzWsE2I/lABU5A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=uDJAsWJTLfMZFWqR99mI2h/NOrrxmbdYnAEZosm4uOpK2tGcs3jgmt2V/bsNOZfHO NBpdHgSFGLu3kP9OKiAib+lNaSPGH6jcKdrSfMlhMO68wJTORdInUlrmjBCRXUojRv b4g11x+M79EfXZNy70EB3A1bDO+sypSc5g3uDWqY= From: Kieran Bingham Date: Thu, 07 May 2026 16:25:34 +0100 Subject: [PATCH 2/2] pipeline: simple: Report the ScalerCrop MIME-Version: 1.0 Message-Id: <20260507-kbingham-simple-scaler-crop-v1-2-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=1474; i=kieran.bingham@ideasonboard.com; s=20260207; h=from:subject:message-id; bh=acfXknjvLpRckycmwdMd077p+m/slTzWsE2I/lABU5A=; b=4PDZLU+5ROeRf/TGsJyN7NKFvOm2PCIcUCHYOe0Fccc3FLwtJZm5MBL/knvGmZRld2ku5x44m FW87Y5zu7c9BE9CGYSGtEyde98jJejaoj2oAUMkpABNWthyhsPFfjxc X-Developer-Key: i=kieran.bingham@ideasonboard.com; a=ed25519; pk=FVXKN7YuwHc6UtbRUeTMAmranfsQomA+vnilfglWdaY= X-TUID: 7A73C194qnNf Resent-From: Kieran Bingham Resent-To: parsemail@patchwork.libcamera.org Provide the analogCrop rectangle in the completed request metadata to inform the applications of the capture pixel region. Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/simple/simple.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index ee394c567a2c..35ee468a3663 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -362,6 +362,8 @@ public: std::unique_ptr swIsp_; SimpleFrames frameInfo_; + Rectangle scalerCrop_; + private: void tryPipeline(unsigned int code, const Size &size); static std::vector routedSourcePads(MediaPad *sink); @@ -998,6 +1000,8 @@ void SimpleCameraData::tryCompleteRequest(Request *request) if (info->metadataRequired && !info->metadataProcessed) return; + request->_d()->metadata().set(controls::ScalerCrop, scalerCrop_); + frameInfo_.destroy(info->frame); pipe()->completeRequest(request); } @@ -1530,6 +1534,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) return ret; data->properties_.set(properties::ScalerCropMaximum, sensorInfo.analogCrop); + data->scalerCrop_ = sensorInfo.analogCrop; /* Configure the video node, taking into account any Bayer pattern change. */ V4L2PixelFormat videoFormat;