Patch Detail
Show a patch.
GET /api/patches/15059/?format=api
{ "id": 15059, "url": "https://patchwork.libcamera.org/api/patches/15059/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15059/", "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": "<20211206233948.1351206-4-kieran.bingham@ideasonboard.com>", "date": "2021-12-06T23:39:43", "name": "[libcamera-devel,3/8] cam: Use SensorTimestamp rather than buffer metadata", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "7e259aa27454acb55a19eb4792b326477cbf91dd", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": { "id": 11, "url": "https://patchwork.libcamera.org/api/users/11/?format=api", "username": "kbingham", "first_name": "Kieran", "last_name": "Bingham", "email": "kieran.bingham@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/15059/mbox/", "series": [ { "id": 2822, "url": "https://patchwork.libcamera.org/api/series/2822/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2822", "date": "2021-12-06T23:39:40", "name": "Request metadata: SensorSequence", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2822/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15059/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15059/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 D7B94BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 6 Dec 2021 23:40:00 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DDD8E60897;\n\tTue, 7 Dec 2021 00:39:58 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0F640607DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 7 Dec 2021 00:39:55 +0100 (CET)", "from Monstersaurus.local\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ACCDD11FE;\n\tTue, 7 Dec 2021 00:39:54 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"TYk2xxT3\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1638833994;\n\tbh=jyFT+4JF+7jG1gz19qvWB1h+iBfIhy527w6TaN2IIJk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=TYk2xxT31CtDlMBfj96d3zQD3XiOxHqJuoAjtzBtxtXB+DUdDZkIDAyyOzUFowaXq\n\t8IJKgdRU6WTf8Tyir4muBN2GNcr//reABVRI0zvA2eTWC+tPOlTw/cCPwRGY2mv3Y5\n\t2p46g5E4ekLr0Pd6lU/SnA8T9d81P9bm5fMZI5HE=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Date": "Mon, 6 Dec 2021 23:39:43 +0000", "Message-Id": "<20211206233948.1351206-4-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20211206233948.1351206-1-kieran.bingham@ideasonboard.com>", "References": "<20211206233948.1351206-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 3/8] cam: Use SensorTimestamp rather than\n\tbuffer metadata", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The SensorTimestamp is defined to be the time of capture of the image.\nWhile all streams should have the same timestamp, this is not always\ndefined or guaranteed as ISP drivers may not forward sequence numbers\nand timestamps from their input buffer.\n\nUse the Request metadata to get the SensorTimestamp which must be\nset by the pipeline handlers according to the data from the capture\ndevice.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/cam/camera_session.cpp | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/cam/camera_session.cpp b/src/cam/camera_session.cpp\nindex 1bf460fa3fb7..50170723c30f 100644\n--- a/src/cam/camera_session.cpp\n+++ b/src/cam/camera_session.cpp\n@@ -359,10 +359,11 @@ void CameraSession::processRequest(Request *request)\n \tconst Request::BufferMap &buffers = request->buffers();\n \n \t/*\n-\t * Compute the frame rate. The timestamp is arbitrarily retrieved from\n-\t * the first buffer, as all buffers should have matching timestamps.\n+\t * Compute the frame rate. The timestamp is retrieved from the\n+\t * SensorTimestamp property, though all streams should have the\n+\t * same timestamp.\n \t */\n-\tuint64_t ts = buffers.begin()->second->metadata().timestamp;\n+\tuint64_t ts = request->metadata().get(controls::SensorTimestamp);\n \tdouble fps = ts - last_;\n \tfps = last_ != 0 && fps ? 1000000000.0 / fps : 0.0;\n \tlast_ = ts;\n", "prefixes": [ "libcamera-devel", "3/8" ] }