Patch Detail
Show a patch.
GET /api/1.1/patches/17795/?format=api
{ "id": 17795, "url": "https://patchwork.libcamera.org/api/1.1/patches/17795/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17795/", "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": "<20221115090755.2921-4-naush@raspberrypi.com>", "date": "2022-11-15T09:07:50", "name": "[libcamera-devel,v6,3/8] pipeline: raspberrypi: delayed_controls: Template the ControlRingBuffer class", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "9caa4d5caded52652361c11a578f74231924aafc", "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/17795/mbox/", "series": [ { "id": 3609, "url": "https://patchwork.libcamera.org/api/1.1/series/3609/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3609", "date": "2022-11-15T09:07:47", "name": "Raspberry Pi AGC digital gain fixes", "version": 6, "mbox": "https://patchwork.libcamera.org/series/3609/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17795/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17795/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 3214CBE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 15 Nov 2022 09:08:07 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 670D06308E;\n\tTue, 15 Nov 2022 10:08:05 +0100 (CET)", "from mail-wr1-x431.google.com (mail-wr1-x431.google.com\n\t[IPv6:2a00:1450:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 11AC06307F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Nov 2022 10:08:03 +0100 (CET)", "by mail-wr1-x431.google.com with SMTP id a14so23107936wru.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Nov 2022 01:08:03 -0800 (PST)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tp25-20020a05600c1d9900b003c64c186206sm15143696wms.16.2022.11.15.01.08.01\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 15 Nov 2022 01:08:01 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1668503285;\n\tbh=MfJGzVF0xEaHzNXFhd8igfaQOfe1CDgC3OPO2CFqVWs=;\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=Lo31s/RG4flgOT5WHtas6VgycKeI6fWLhVcUy/5Kuygj7hBwvYIwOJnJU3y7ott/Z\n\tpj1+azQmVIjC8FAiVDKLVo5DqudyjdLjxPRO8OmDwIU+bfHm8HgDv/SA4jdTNyZODw\n\tytubN1efmaLcRPomsaqqzR5zDo2fLsRQ73QozWEGTxJYOi04nUmh0dJo0TU70rEGHk\n\tUj5RYX/iQ2I34Fa40iiYTOz2Eq9Ok8wMGfbLt+Eb/Cfr1zCrdu5hGA2WAyCZeCL6ev\n\tG/14CxKTFa6HFGhFF4mrIWURJlH7UIJtoCm8x1PYL0bdl0Vu3HkeQ5ipeV3tNklUgy\n\tSuzaAeJi37ASQ==", "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=9FLYHppxCNcOu0dK4WMQh2Nl/lRPe5xDxdYMrwqkS1s=;\n\tb=VftRBPRVTZxOp1ZTHk9r+v6tFnA3mJHco6eCeDunopuvTP/OVCR7N42QH/2hiqjawa\n\th+kLdtMwwxMbreob8aHBF9fguSngO5MiV7JcyieOMLbwECw9NuqOBI7mSiYXhQByzTrF\n\tn4g2nbhLbPTyMqxotTgNfDqpIMzZ+xxnDky/2zkPQTpk4D3jex9Wn4O1/KLEz/a9X1Kq\n\tBfM77F6wSXqp+hnzNhn/N6vMc2bzDnCn47rXF3wMdjjjtILgC1ymienymjfdCZs+3gcw\n\tObA/AffTbinQsyruX1o3keymzNU3mMG8WqUY0utkn9Aws/hllrkT46BCPbqZJJb3fur2\n\tsxQA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"VftRBPRV\"; 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=9FLYHppxCNcOu0dK4WMQh2Nl/lRPe5xDxdYMrwqkS1s=;\n\tb=WmAqAv50S5DBmE438Swivz0+60mZcRoUp6HK2kcUwsAv9zoaeMtnSZFAM7yiP5XCKk\n\tzSQZ/7vbJik2Rjfny+6mBoglOdL+scG7KiworzHKVPXWFET5KyYvcvZsG2ueTcmC0Xib\n\tGrV5xVv0PA2lBki+lLsN/q3+Df9M2t7y0mQ9AsYFE1DKAI6CCn2m95uiXAwHNjiqDA16\n\tQhDiFeG5nZtiK9Ya01vksS4EeEaS6a4JCFW4zb6dnd4tNrBic9BATfWjrzOtK/QcBsd4\n\tYej+DhnMkdgL2mryHA4vkZW3PnmhqXI+YD9LZ3EyUSLe9hpBFsXSkE4Co2sWomwYhXge\n\t4n5g==", "X-Gm-Message-State": "ANoB5pm6zqZ8qmlWFQEtbEz7YmNwzkOTn5hEmLIeUmJGkES57SBqOcR6\n\tx5tEp5PbK+RgrsXf+RtnWanoFyH/pR7U2g==", "X-Google-Smtp-Source": "AA0mqf7X+W3C1SlspDynAKcMpXTJbSNGA3lGtw0bvq2fMGRq/nM4PEpmEFjMI25RuyCHHr1LKBxGCQ==", "X-Received": "by 2002:adf:f502:0:b0:238:c1d5:3293 with SMTP id\n\tq2-20020adff502000000b00238c1d53293mr9733918wro.446.1668503282525; \n\tTue, 15 Nov 2022 01:08:02 -0800 (PST)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 15 Nov 2022 09:07:50 +0000", "Message-Id": "<20221115090755.2921-4-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20221115090755.2921-1-naush@raspberrypi.com>", "References": "<20221115090755.2921-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v6 3/8] pipeline: raspberrypi:\n\tdelayed_controls: Template the ControlRingBuffer 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>\n---\n .../pipeline/raspberrypi/delayed_controls.h | 13 +++++++------\n 1 file changed, 7 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/delayed_controls.h b/src/libcamera/pipeline/raspberrypi/delayed_controls.h\nindex f7f246482968..238b86ab6cb4 100644\n--- a/src/libcamera/pipeline/raspberrypi/delayed_controls.h\n+++ b/src/libcamera/pipeline/raspberrypi/delayed_controls.h\n@@ -56,17 +56,18 @@ private:\n \t};\n \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@@ -76,7 +77,7 @@ private:\n \n \tuint32_t queueCount_;\n \tuint32_t writeCount_;\n-\tstd::unordered_map<const ControlId *, ControlRingBuffer> values_;\n+\tstd::unordered_map<const ControlId *, RingBuffer<Info>> values_;\n };\n \n } /* namespace RPi */\n", "prefixes": [ "libcamera-devel", "v6", "3/8" ] }