Patch Detail
Show a patch.
GET /api/patches/13600/?format=api
{ "id": 13600, "url": "https://patchwork.libcamera.org/api/patches/13600/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13600/", "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": "<20210902042303.2254-13-laurent.pinchart@ideasonboard.com>", "date": "2021-09-02T04:23:03", "name": "[libcamera-devel,RFC,v1,12/12] libcamera: v4l2_videodevice: Use utils::enumerate()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "0d1ead1a80f892233dfb5ae435736bf58a2682b8", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13600/mbox/", "series": [ { "id": 2435, "url": "https://patchwork.libcamera.org/api/series/2435/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2435", "date": "2021-09-02T04:22:51", "name": "libcamera: Handle fallout of FrameBuffer offset support", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2435/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13600/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13600/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 32725C324A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 2 Sep 2021 04:23:34 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 98BA469173;\n\tThu, 2 Sep 2021 06:23:33 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AE5F269167\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 2 Sep 2021 06:23:27 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5317D45E;\n\tThu, 2 Sep 2021 06:23:27 +0200 (CEST)" ], "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=\"DWjuTxzx\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1630556607;\n\tbh=lQuIPtySiPaYQ3lohbAWNwQ8tei909kkgfLYGjUF/Bs=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=DWjuTxzxXQH5REDGGm0AQ1EYeORXzPKqfzTMwvQ5iF68t6gazwo0NG9MzIyXz+1BH\n\t9kD7uk/tEHn3R5FISCjR1+qbQHI4fmau3249gDYyvN4wUQfGLWfh7aykHB5Jzutlu4\n\t+A/8ojKCIPbqVuA1fz4vhqh1s1C19n64etDgSzT4=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 2 Sep 2021 07:23:03 +0300", "Message-Id": "<20210902042303.2254-13-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.31.1", "In-Reply-To": "<20210902042303.2254-1-laurent.pinchart@ideasonboard.com>", "References": "<20210902042303.2254-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH v1 12/12] libcamera: v4l2_videodevice:\n\tUse utils::enumerate()", "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": "Replace a manual counter with the utils::enumerate() utility function.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/v4l2_videodevice.cpp | 11 +++++------\n 1 file changed, 5 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex b80b9038a914..8a7d847c060e 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -1338,13 +1338,12 @@ std::unique_ptr<FrameBuffer> V4L2VideoDevice::createBuffer(unsigned int index)\n \t\tplanes.resize(formatInfo_->numPlanes());\n \t\tconst FileDescriptor &fd = planes[0].fd;\n \t\tsize_t offset = 0;\n-\t\tfor (size_t i = 0; i < planes.size(); ++i) {\n-\t\t\tplanes[i].fd = fd;\n-\t\t\tplanes[i].offset = offset;\n-\n+\t\tfor (auto [i, plane] : utils::enumerate(planes)) {\n+\t\t\tplane.fd = fd;\n+\t\t\tplane.offset = offset;\n \t\t\t/* \\todo Take the V4L2 stride into account */\n-\t\t\tplanes[i].length = formatInfo_->planeSize(format_.size, i);\n-\t\t\toffset += planes[i].length;\n+\t\t\tplane.length = formatInfo_->planeSize(format_.size, i);\n+\t\t\toffset += plane.length;\n \t\t}\n \t}\n \n", "prefixes": [ "libcamera-devel", "RFC", "v1", "12/12" ] }