{"id":26817,"url":"https://patchwork.libcamera.org/api/patches/26817/?format=json","web_url":"https://patchwork.libcamera.org/patch/26817/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260507-kbingham-simple-scaler-crop-v1-2-7a5af1948565@ideasonboard.com>","date":"2026-05-07T15:25:34","name":"[2/2] pipeline: simple: Report the ScalerCrop","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"68ef856e4f2625674cfd5d5ab45b4d307ee437c0","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/26817/mbox/","series":[{"id":5919,"url":"https://patchwork.libcamera.org/api/series/5919/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5919","date":"2026-05-07T15:25:32","name":"pipeline: simple: Add ScalerCrop reporting","version":1,"mbox":"https://patchwork.libcamera.org/series/5919/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26817/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26817/checks/","tags":{},"headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":["parsemail@patchwork.libcamera.org","kbingham@ideasonboard.com"],"Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id CFD85C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Jun 2026 15:46:32 +0000 (UTC)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net\n\t[86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5974478C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Jun 2026 17:46:09 +0200 (CEST)","from perceval.ideasonboard.com\n\tby perceval.ideasonboard.com with LMTP id YDkIDvGu/GlvrxQA4E0KoQ\n\t(envelope-from <kieran.bingham@ideasonboard.com>)\n\tfor <kbingham@ideasonboard.com>; Thu, 07 May 2026 17:25:37 +0200","from ping.linuxembedded.co.uk\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net\n\t[86.31.185.195])\tby\n\tperceval.ideasonboard.com (Postfix) with ESMTPSA id 68DCC1253;\n\tThu,  7 May 2026 17:25:36 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1780415169;\n\tbh=acfXknjvLpRckycmwdMd077p+m/slTzWsE2I/lABU5A=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:Resent-From:\n\tResent-To:From;\n\tb=Ho5HtYHGDFyr0fBhb7t2MwtU9NDp4mFSkTAWsDINi38rQaPPrwNAcxr/E0RaRdTUC\n\tiQ1GbScXE7DG4+Qh/Lb8hpLznA60oFEFH5I3wi6096+Q9o5S+DW+pB/8NUdJpTciZH\n\tqUiNnv3WiGU3AJoM7ZoGe8p4heOG1f2uk4az1KZk=","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1778167536;\n\tbh=acfXknjvLpRckycmwdMd077p+m/slTzWsE2I/lABU5A=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=uDJAsWJTLfMZFWqR99mI2h/NOrrxmbdYnAEZosm4uOpK2tGcs3jgmt2V/bsNOZfHO\n\tNBpdHgSFGLu3kP9OKiAib+lNaSPGH6jcKdrSfMlhMO68wJTORdInUlrmjBCRXUojRv\n\tb4g11x+M79EfXZNy70EB3A1bDO+sypSc5g3uDWqY="],"From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Date":"Thu, 07 May 2026 16:25:34 +0100","Subject":"[PATCH 2/2] pipeline: simple: Report the ScalerCrop","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","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 <kieran.bingham@ideasonboard.com>","X-Mailer":"b4 0.14.3","X-Developer-Signature":"v=1; a=ed25519-sha256; t=1778167539; l=1474;\n\ti=kieran.bingham@ideasonboard.com; s=20260207;\n\th=from:subject:message-id; \n\tbh=acfXknjvLpRckycmwdMd077p+m/slTzWsE2I/lABU5A=;\n\tb=4PDZLU+5ROeRf/TGsJyN7NKFvOm2PCIcUCHYOe0Fccc3FLwtJZm5MBL/knvGmZRld2ku5x44m\n\tFW87Y5zu7c9BE9CGYSGtEyde98jJejaoj2oAUMkpABNWthyhsPFfjxc","X-Developer-Key":"i=kieran.bingham@ideasonboard.com; a=ed25519;\n\tpk=FVXKN7YuwHc6UtbRUeTMAmranfsQomA+vnilfglWdaY=","X-TUID":"7A73C194qnNf","Resent-From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Resent-To":"parsemail@patchwork.libcamera.org"},"content":"Provide the analogCrop rectangle in the completed request metadata to\ninform the applications of the capture pixel region.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/pipeline/simple/simple.cpp | 5 +++++\n 1 file changed, 5 insertions(+)","diff":"diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex ee394c567a2c..35ee468a3663 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -362,6 +362,8 @@ public:\n \tstd::unique_ptr<SoftwareIsp> swIsp_;\n \tSimpleFrames frameInfo_;\n \n+\tRectangle scalerCrop_;\n+\n private:\n \tvoid tryPipeline(unsigned int code, const Size &size);\n \tstatic std::vector<const MediaPad *> routedSourcePads(MediaPad *sink);\n@@ -998,6 +1000,8 @@ void SimpleCameraData::tryCompleteRequest(Request *request)\n \tif (info->metadataRequired && !info->metadataProcessed)\n \t\treturn;\n \n+\trequest->_d()->metadata().set(controls::ScalerCrop, scalerCrop_);\n+\n \tframeInfo_.destroy(info->frame);\n \tpipe()->completeRequest(request);\n }\n@@ -1530,6 +1534,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c)\n \t\treturn ret;\n \n \tdata->properties_.set(properties::ScalerCropMaximum, sensorInfo.analogCrop);\n+\tdata->scalerCrop_ = sensorInfo.analogCrop;\n \n \t/* Configure the video node, taking into account any Bayer pattern change. */\n \tV4L2PixelFormat videoFormat;\n","prefixes":["2/2"]}