Patch Detail
Show a patch.
GET /api/patches/17626/?format=api
{ "id": 17626, "url": "https://patchwork.libcamera.org/api/patches/17626/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17626/", "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": "<20221019090107.19975-2-naush@raspberrypi.com>", "date": "2022-10-19T09:01:01", "name": "[libcamera-devel,v4,1/7] delayed_controls: Template the ControlRingBuffer class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "bf8843fac7e7dadb891edbfeaf07056d3ae994ad", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17626/mbox/", "series": [ { "id": 3566, "url": "https://patchwork.libcamera.org/api/series/3566/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3566", "date": "2022-10-19T09:01:00", "name": "Raspberry Pi AGC digital gain fixes", "version": 4, "mbox": "https://patchwork.libcamera.org/series/3566/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17626/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17626/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 24902C327C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 Oct 2022 09:01:19 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A167062E3E;\n\tWed, 19 Oct 2022 11:01:18 +0200 (CEST)", "from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 89BA462DD7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Oct 2022 11:01:17 +0200 (CEST)", "by mail-wm1-x335.google.com with SMTP id\n\tl14-20020a05600c1d0e00b003c6ecc94285so420626wms.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Oct 2022 02:01:17 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tr9-20020a05600c458900b003b47b913901sm1017595wmo.1.2022.10.19.02.01.16\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 19 Oct 2022 02:01:16 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1666170078;\n\tbh=bR2XcJuN9v/o7WELV1bz1uQ//2GkfmEfO0JjDU9qjxk=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=0Ue9THUhpmedFyaLuXpRdIMyNnw2+UjnWoUdil+ZwyLWI7U8MNSVkDBANANtpcvKn\n\tY1smdm7L4i2rHrforawfayOoAPABrnGGhd2USV2jGUPTlSu+Yrg9qkI5uOY68PtIp5\n\tgEzRW3NW02yx5OLCmryHPxhQf+Dz6bUjrrdqVGZJKLrbZP6ger53iw0UKZPtat3GKE\n\tQ+g4mLKUMWqL8vwyowIxGX82HKKVPxHOSIGon+Mwpd79CoibVWinxwAvz0za6wk2zz\n\tZY//pQu6i34PYPga6Kvk7gbtg+nNm2D2ZijEPIpzQgeZyQsr7nAto4O0ENVp7Gth6m\n\tQZlCZfSaU08Hg==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=ZPzBiNF1VfWzy9TrECDZS8BLt3LUNp1q4BLHZaXn4hI=;\n\tb=A7HI0cCDLgxsQ51FHSxhdQG+JiHsPChwLafwFzSdapY05K6vKZ8K4IdlI1PgXgT28M\n\tiPiIFQ2n6Zr+vkzoD6x3nZcyttxZ5KrxEHywtygT/di+CxsjpW1rHY0P3sV0Pju1J5EX\n\t27+PDhaWFWukcU5XCd5ldy2bAswXlCLZj2txPQPpGUKoimMQqKFgS99xxsy/51RPlq3+\n\tO7lDWfHZEx1N7cPsb807qZOVcEV6/jmvs/oVHuNf0LuCUEagIy5fyvK/EDlEis5Xp0YZ\n\t66VYGRKafzys1Asp/w7/5HsOmAcbC45OuhJiq4Wzg99g2Noo2Y20pKmI8MKAQLOzKKqv\n\tN6OQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"A7HI0cCD\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=ZPzBiNF1VfWzy9TrECDZS8BLt3LUNp1q4BLHZaXn4hI=;\n\tb=032Mdb/VZGWp/OyLU5G9Qzjp5fM63tL6+BIwVYsnxzEusn5C7Ft74FIZ2moIt2UZ9d\n\tlRI8IXaONiTV+kg/KitrTzV9ERMGuovkEqeFZ8zu3Hj5wGF9kRfZyiiupVIkimDkfdBI\n\tyv5qzBeYL3Mze/nvEwi7hDUr2qXytl8nviUSr6/yoxoO6R/T1SMa7eQFQCP8HCRwaPqS\n\tYQM+2tRq90jIa/mrkW8NQQ7B5Rgr/6dQAMW/5gav7Zcvq6ZUp4g9Jum52Mu390SPI6D3\n\tYlrSXmzpmKv1zLiw34bqwIpVVV2WMfQ/boUn7k38rOJSvyfEN5AAQjbT+F4nz/XmN3YL\n\tqiGA==", "X-Gm-Message-State": "ACrzQf3oOwRGgqSDYoRD5wEt10kDOeIpDQ0jSgpPddWdBVZg2oapfq1f\n\tXNtfUCYd5z8NsiU1AsmT4/bzeM9CWCzKgw==", "X-Google-Smtp-Source": "AMsMyM6eOCslnk3MdtGr4VLRjX1+jb5e59QrYHUjLcJAMHpWyrOcumpKhg1ypuROGiMHcwHvz/Rd4A==", "X-Received": "by 2002:a05:600c:288:b0:3c6:c44a:1d30 with SMTP id\n\t8-20020a05600c028800b003c6c44a1d30mr25849475wmk.46.1666170077080; \n\tWed, 19 Oct 2022 02:01:17 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 19 Oct 2022 10:01:01 +0100", "Message-Id": "<20221019090107.19975-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20221019090107.19975-1-naush@raspberrypi.com>", "References": "<20221019090107.19975-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v4 1/7] delayed_controls: Template the\n\tControlRingBuffer class", "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>", "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Convert ControlRingBuffer to a templated class to allow arbitrary ring buffer\narray types to be defined. Rename ControlRingBuffer to RingBuffer to indicate\nthis.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nTested-by: David Plowman <david.plowman@raspberrypi.com>\n---\n include/libcamera/internal/delayed_controls.h | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)", "diff": "diff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h\nindex aef37077103c..de8026e3e4f0 100644\n--- a/include/libcamera/internal/delayed_controls.h\n+++ b/include/libcamera/internal/delayed_controls.h\n@@ -53,17 +53,18 @@ private:\n \n \t/* \\todo Make the listSize configurable at instance creation time. */\n \tstatic constexpr int listSize = 16;\n-\tclass ControlRingBuffer : public std::array<Info, listSize>\n+\ttemplate<typename T>\n+\tclass RingBuffer : public std::array<T, listSize>\n \t{\n \tpublic:\n-\t\tInfo &operator[](unsigned int index)\n+\t\tT &operator[](unsigned int index)\n \t\t{\n-\t\t\treturn std::array<Info, listSize>::operator[](index % listSize);\n+\t\t\treturn std::array<T, listSize>::operator[](index % listSize);\n \t\t}\n \n-\t\tconst Info &operator[](unsigned int index) const\n+\t\tconst T &operator[](unsigned int index) const\n \t\t{\n-\t\t\treturn std::array<Info, listSize>::operator[](index % listSize);\n+\t\t\treturn std::array<T, listSize>::operator[](index % listSize);\n \t\t}\n \t};\n \n@@ -75,7 +76,7 @@ private:\n \tuint32_t queueCount_;\n \tuint32_t writeCount_;\n \t/* \\todo Evaluate if we should index on ControlId * or unsigned int */\n-\tstd::unordered_map<const ControlId *, ControlRingBuffer> values_;\n+\tstd::unordered_map<const ControlId *, RingBuffer<Info>> values_;\n };\n \n } /* namespace libcamera */\n", "prefixes": [ "libcamera-devel", "v4", "1/7" ] }