Patch Detail
Show a patch.
GET /api/patches/11122/?format=api
{ "id": 11122, "url": "https://patchwork.libcamera.org/api/patches/11122/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11122/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210203162600.206297-6-jacopo@jmondi.org>", "date": "2021-02-03T16:25:58", "name": "[libcamera-devel,5/7] libcamera: ipu3: Always report crop region", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "474fbd0ca57f88d9cf5e93ad8deb035044e3d876", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11122/mbox/", "series": [ { "id": 1645, "url": "https://patchwork.libcamera.org/api/series/1645/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1645", "date": "2021-02-03T16:25:53", "name": "android: Report all the missing metadata tags", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1645/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11122/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11122/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 79C2ABD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 3 Feb 2021 16:25:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1CBDB68463;\n\tWed, 3 Feb 2021 17:25:48 +0100 (CET)", "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8040768456\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 3 Feb 2021 17:25:45 +0100 (CET)", "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 30017200005\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 3 Feb 2021 16:25:45 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 3 Feb 2021 17:25:58 +0100", "Message-Id": "<20210203162600.206297-6-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.30.0", "In-Reply-To": "<20210203162600.206297-1-jacopo@jmondi.org>", "References": "<20210203162600.206297-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 5/7] libcamera: ipu3: Always report crop\n\tregion", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Report the crop region for every completed request.\n\nThe crop region is initialized as the sensor's analogue crop\nrectangle and updated when a Request with a new region completes.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 13 +++++++++----\n 1 file changed, 9 insertions(+), 4 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex db0d6b91be70..a9c8e180d1c4 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -65,6 +65,7 @@ public:\n \tStream rawStream_;\n \n \tuint32_t exposureTime_;\n+\tRectangle cropRegion;\n };\n \n class IPU3CameraConfiguration : public CameraConfiguration\n@@ -472,6 +473,10 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)\n \tif (ret)\n \t\treturn ret;\n \n+\tCameraSensorInfo sensorInfo;\n+\tcio2->sensor()->sensorInfo(&sensorInfo);\n+\tdata->cropRegion = sensorInfo.analogCrop;\n+\n \t/*\n \t * If the ImgU gets configured, its driver seems to expect that\n \t * buffers will be queued to its outputs, as otherwise the next\n@@ -967,10 +972,10 @@ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer)\n \t/* \\todo Move the ExposureTime control to the IPA. */\n \trequest->metadata().set(controls::ExposureTime, exposureTime_);\n \t/* \\todo Actually apply the scaler crop region to the ImgU. */\n-\tif (request->controls().contains(controls::ScalerCrop)) {\n-\t\tRectangle cropRegion = request->controls().get(controls::ScalerCrop);\n-\t\trequest->metadata().set(controls::ScalerCrop, cropRegion);\n-\t}\n+\tif (request->controls().contains(controls::ScalerCrop))\n+\t\tcropRegion = request->controls().get(controls::ScalerCrop);\n+\trequest->metadata().set(controls::ScalerCrop, cropRegion);\n+\n \tpipe_->completeRequest(request);\n }\n \n", "prefixes": [ "libcamera-devel", "5/7" ] }