Patch Detail
Show a patch.
GET /api/1.1/patches/15364/?format=api
{ "id": 15364, "url": "https://patchwork.libcamera.org/api/1.1/patches/15364/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15364/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20220214123951.3919523-1-kieran.bingham@ideasonboard.com>", "date": "2022-02-14T12:39:51", "name": "[libcamera-devel] v4l2: v4l2_camera_proxy: Fix timestamp calculation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "c41f73ecc78cb12de59eac894a874b75d5ec5db1", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15364/mbox/", "series": [ { "id": 2931, "url": "https://patchwork.libcamera.org/api/1.1/series/2931/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2931", "date": "2022-02-14T12:39:51", "name": "[libcamera-devel] v4l2: v4l2_camera_proxy: Fix timestamp calculation", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2931/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15364/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15364/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 121BEBE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Feb 2022 12:39:57 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 491AF6112B;\n\tMon, 14 Feb 2022 13:39:56 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D0F46610A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Feb 2022 13:39:54 +0100 (CET)", "from Monstersaurus.ksquared.org.uk.beta.tailscale.net\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 525FF47F;\n\tMon, 14 Feb 2022 13: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=\"n2qlyJD+\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1644842394;\n\tbh=bSWCfIRHvAQaw1jkb2EPTR7S/D92oVhiMuO2I+DAeRg=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=n2qlyJD+1jGmJ5tQl238h5Ai/xcSDtzvIfXj4Lt5MualCu9zZTEv1br//7StNxXwC\n\tKrQjM8ld4JzILMBz7LIXXFryFmGKu8JYGsVSySZS9sNBmC6UQ25MH5SfkeZaNQxoNR\n\taEFnBr7GDcc6VvaHI6Xae1xHikZpZI4ZLd3zPfp8=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Date": "Mon, 14 Feb 2022 12:39:51 +0000", "Message-Id": "<20220214123951.3919523-1-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.32.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] v4l2: v4l2_camera_proxy: Fix timestamp\n\tcalculation", "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>", "Cc": "soyer@irl.hu", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The V4L2 Compatibility layer is returning timestamps for buffers which\nare incorrectly calculated from the frame metadata.\n\nThe sec component of the timestamp is correct, but the nsec component is\nout, leaving frame captures reporting non-monotonically increasing\ntimestamps, and incorrect frame rate calculations.\n\nFix the usecs calculation reported by the V4L2 adaptation layer.\n\nBug: https://bugs.libcamera.org/show_bug.cgi?id=118\nFixes: 0ce8f2390b52 (\"v4l2: v4l2_compat: Add V4L2 compatibility layer\")\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/v4l2/v4l2_camera_proxy.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex 45822feff317..67b2c50c0f7e 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -234,7 +234,7 @@ void V4L2CameraProxy::updateBuffers()\n \t\t\t\t\t\t\t});\n \t\t\tbuf.field = V4L2_FIELD_NONE;\n \t\t\tbuf.timestamp.tv_sec = fmd.timestamp / 1000000000;\n-\t\t\tbuf.timestamp.tv_usec = fmd.timestamp % 1000000;\n+\t\t\tbuf.timestamp.tv_usec = fmd.timestamp / 1000 % 1000000;\n \t\t\tbuf.sequence = fmd.sequence;\n \n \t\t\tbuf.flags |= V4L2_BUF_FLAG_DONE;\n", "prefixes": [ "libcamera-devel" ] }