Show a patch.

GET /api/1.1/patches/17398/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 17398,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17398/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17398/",
    "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": "<20220926095737.30506-2-naush@raspberrypi.com>",
    "date": "2022-09-26T09:57:31",
    "name": "[libcamera-devel,v3,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/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17398/mbox/",
    "series": [
        {
            "id": 3503,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3503/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3503",
            "date": "2022-09-26T09:57:30",
            "name": "Raspberry Pi AGC digital gain fixes",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/3503/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17398/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17398/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 E9A2BBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Sep 2022 09:57:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 730C862255;\n\tMon, 26 Sep 2022 11:57:51 +0200 (CEST)",
            "from mail-wr1-x434.google.com (mail-wr1-x434.google.com\n\t[IPv6:2a00:1450:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 697AD6224C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 11:57:49 +0200 (CEST)",
            "by mail-wr1-x434.google.com with SMTP id r7so9390058wrm.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Sep 2022 02:57:49 -0700 (PDT)",
            "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tp22-20020a05600c419600b003a4efb794d7sm10160671wmh.36.2022.09.26.02.57.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 26 Sep 2022 02:57:47 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664186271;\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=W1K4adyrOf0LiDhLHih5ghv2vmmTlqE8mMFhoG7rawIy+XP2Keb3gRdnrTm3A7GIM\n\tIkRLVEGvvub48TRUTPiMaf0zAKGR3T1BvsWMtkKXXJPV6muCacMuv45GaZ4XVo5MXN\n\tcMxc/apIcHSG8/n/JLnCAuvQRHI707ZUYnXZ46iqD0eNGC5GsFa2r5eXiwExuz0JgN\n\toTHqZ/6r0kZ1jSBvtK3fvjlG4glL037ZPVEBjH7/S9XV2D+7EjI44MIfa9JbnNdWxU\n\t3+3R9FtYuxFC66WlnxpAjlG8CzMA3o7tehGKVEakMlCkP5LQSGG1I7W7S9OxYVZj3R\n\tkGRwE3bn7105A==",
            "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\tbh=ZPzBiNF1VfWzy9TrECDZS8BLt3LUNp1q4BLHZaXn4hI=;\n\tb=DPt/ksiH78sHZTwA46IjGmkcEr5OVpN/CIrZFfnL9+aporFn5yq2yTT+f30M9EEBTa\n\t+BQkPtzTnk6/JofAibh/oKlWXDHBxorbxqN1NB8OerqkwN32SHvsIewWaG6r7jsWt60b\n\tqGqhTG6tXclPpFEF7lk3X81t1Z5UoeWEjOFhOglj3L6ns7m3D3a4rFFR/X7aiRf7hgzl\n\t0Qm/i7B8sn79h5vo75sY54Db21diiwJXNVzP5E6z53TTM+VweeJEyyWkpA+mIn4+Rczg\n\tOLFWvt+s0UvLarSPdErMpsXOaq5MUtOqCUBi9nDnztlPWYdv4gBn1aX30+siXij5DMoG\n\tUIGw=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"DPt/ksiH\"; 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;\n\tbh=ZPzBiNF1VfWzy9TrECDZS8BLt3LUNp1q4BLHZaXn4hI=;\n\tb=0fhKbDot5S7hMxuQB9VupuFYqKpRN3i+q+amwi/8VYCizqLEwd5FtUtG5q597C9PzN\n\tw2KSPTx0CO69i9J2EC3YpDzH/Hw4or0vwoEa9AeNBRMOVf9zm7kk5B225EycJ6h7NALA\n\tlUWFKnS5cta4M8OjvEZgaYQPWDH8li0UyoqUEch8aZTskXB6kd0mmD/HoJYE0MlaBtEA\n\t5ujwDhknYOsOnBKiDm4fEYI0RqyulZml7UIDVsKVAlmtk5zo83SwEYNAOUBIqHFby/+Q\n\tcVwXzYK+KuKkgB8jx3UOPwQinhUO70kjkLFLhNti/KNVGhkCTDMVPZU5IVK8SB71Dex4\n\tQp0g==",
        "X-Gm-Message-State": "ACrzQf2g3UETA65Z9mGEpL9Qwn8pQDcwiWbMMwa4A5YhokKKbdH6B1fl\n\tzSzs8RU2jB3mAwjVfIrpJxO6j87C6dcQtZLk",
        "X-Google-Smtp-Source": "AMsMyM7wFHHAA3CKtnkeQh9FRAO5EDMgArziysnZ15yjNWlv4shy7G5NmBCf3OZTJyBn2VLikvsfsQ==",
        "X-Received": "by 2002:adf:fe06:0:b0:228:db6f:41ae with SMTP id\n\tn6-20020adffe06000000b00228db6f41aemr13626894wrr.577.1664186268893; \n\tMon, 26 Sep 2022 02:57:48 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 26 Sep 2022 10:57:31 +0100",
        "Message-Id": "<20220926095737.30506-2-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220926095737.30506-1-naush@raspberrypi.com>",
        "References": "<20220926095737.30506-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 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",
        "v3",
        "1/7"
    ]
}