Patch Detail
Show a patch.
GET /api/patches/10544/?format=api
{ "id": 10544, "url": "https://patchwork.libcamera.org/api/patches/10544/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10544/", "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": "<20201202115253.14705-4-david.plowman@raspberrypi.com>", "date": "2020-12-02T11:52:51", "name": "[libcamera-devel,3/5] src: ipa: raspberrypi: agc: Add GetDropFrames method to AGC base class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "1e7d799cac863e52ed5f4d9e4115b016d1834ae5", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/10544/mbox/", "series": [ { "id": 1500, "url": "https://patchwork.libcamera.org/api/series/1500/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1500", "date": "2020-12-02T11:52:48", "name": "Raspberry Pi AGC: initial frame drop count", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1500/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10544/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10544/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 C962FBE177\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 2 Dec 2020 11:53:02 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 85477635AF;\n\tWed, 2 Dec 2020 12:53:02 +0100 (CET)", "from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com\n\t[IPv6:2a00:1450:4864:20::42b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F002635A1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 2 Dec 2020 12:53:01 +0100 (CET)", "by mail-wr1-x42b.google.com with SMTP id g14so3505179wrm.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 02 Dec 2020 03:53:01 -0800 (PST)", "from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tn189sm1739215wmf.20.2020.12.02.03.52.59\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 02 Dec 2020 03:52:59 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"pQYEFlNm\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=rHVELqS19rTQ4tecujAhRQFO0ru7LWVkfSyFhbGD/bA=;\n\tb=pQYEFlNmCHkhR8QdgLVu5pTH2KKevhIKhJ74rar+HOt8tY1O00tmp+e5x243Eow2IX\n\twBGboqe0ud3m9dfpOQNayWZbOrSStQjF/LrzhcCt8TICohtrcZk6vJUlreOGpd950zzN\n\tTu9uK0YIYhIvf+Xhqe3p8lQ1e3R8wueOJf2i0i69jYy6agKNGnsybpeH1fENodvBFVS3\n\tK2Gr4cMN1Qt8iVl1gEUf0otdJyaq6RAOtGAVrhahi/LBpn+noZukxznFyfiu43lXOs2Z\n\t60grsNrkvNFavvB2V/ywERJmNA0N8HTH+V7VCZdPkTwE6IcK/uummKQP3xddN/d1WdKP\n\td9uA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=rHVELqS19rTQ4tecujAhRQFO0ru7LWVkfSyFhbGD/bA=;\n\tb=YAsaVPFy4RDaGTRzLpE6zi1C9TY7T/itz7/oWBvKhb5uGEiC9HcGvUAGnwK8TinKvj\n\tr6fL3jR+u6ZaK3vAcCgSpcjZtgpxtz1gXMBSZPq4E6fsM6RrbxxX5I0oTGrXCsY0VB4j\n\tkAvjYXFmkaDtyBhaXwXYP530gGtg9NtK+3ZfGQAI3uTncwLkeuVuWcGQIio/5ospeYKo\n\tg4sdTML4KASjTr0fFxsZqn3vMio5ZSEmLBDihG37XN/+Mhm1KHKULr5wh6aCY0VGI5Vr\n\tBX7c9Tonjpa2u28FQV/XzD93fXjx4B8JsNw8E/wasKCvk6K2o6MgdQ485/9b27LLNr67\n\tNsxA==", "X-Gm-Message-State": "AOAM531x7jhteS1iZ+pwvNvHoRBH5T2KfgjRJu3KeuAdUD6v7sp7ZkIO\n\tD9t45U1tuIqpd9V3HnrVe0Q4wcXM/Sra8Ofg", "X-Google-Smtp-Source": "ABdhPJyqqpZyiW/57Sn3NUfP2mPwsltUyFTH305D0cirTS8t47bBprSTSwvnlgP+XfoQadAjfBsxZA==", "X-Received": "by 2002:adf:dd04:: with SMTP id a4mr2999482wrm.77.1606909980599; \n\tWed, 02 Dec 2020 03:53:00 -0800 (PST)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 2 Dec 2020 11:52:51 +0000", "Message-Id": "<20201202115253.14705-4-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20201202115253.14705-1-david.plowman@raspberrypi.com>", "References": "<20201202115253.14705-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH 3/5] src: ipa: raspberrypi: agc: Add\n\tGetDropFrames method to AGC base 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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "We add a GetDropFrames method to the AgcAlgorithm class which can be\ncalled when the AGC is started from scratch. It suggests how many\nframes should be dropped before displaying any (while the AGC\nconverges).\n\nThe Raspberry Pi specific implementation makes this customisable from\nthe tuning file.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/agc_algorithm.hpp | 1 +\n src/ipa/raspberrypi/controller/rpi/agc.cpp | 11 +++++++++++\n src/ipa/raspberrypi/controller/rpi/agc.hpp | 2 ++\n 3 files changed, 14 insertions(+)", "diff": "diff --git a/src/ipa/raspberrypi/controller/agc_algorithm.hpp b/src/ipa/raspberrypi/controller/agc_algorithm.hpp\nindex b4ea54fb..bfc9743f 100644\n--- a/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n+++ b/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n@@ -15,6 +15,7 @@ class AgcAlgorithm : public Algorithm\n public:\n \tAgcAlgorithm(Controller *controller) : Algorithm(controller) {}\n \t// An AGC algorithm must provide the following:\n+\tvirtual unsigned int GetDropFrames() const = 0;\n \tvirtual void SetEv(double ev) = 0;\n \tvirtual void SetFlickerPeriod(double flicker_period) = 0;\n \tvirtual void SetFixedShutter(double fixed_shutter) = 0; // microseconds\ndiff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\nindex 9da18c31..94c02d47 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n@@ -142,6 +142,7 @@ void AgcConfig::Read(boost::property_tree::ptree const ¶ms)\n \tY_target.Read(params.get_child(\"y_target\"));\n \tspeed = params.get<double>(\"speed\", 0.2);\n \tstartup_frames = params.get<uint16_t>(\"startup_frames\", 10);\n+\tdrop_frames = params.get<unsigned int>(\"drop_frames\", 6);\n \tfast_reduce_threshold =\n \t\tparams.get<double>(\"fast_reduce_threshold\", 0.4);\n \tbase_ev = params.get<double>(\"base_ev\", 1.0);\n@@ -206,6 +207,16 @@ void Agc::Resume()\n \tfixed_analogue_gain_ = 0;\n }\n \n+unsigned int Agc::GetDropFrames() const\n+{\n+\t// If shutter and gain have been explicitly set, there is no\n+\t// convergence to happen, so no need to drop any frames.\n+\tif (fixed_shutter_ && fixed_analogue_gain_)\n+\t\treturn 0;\n+\telse\n+\t\treturn config_.drop_frames;\n+}\n+\n void Agc::SetEv(double ev)\n {\n \tev_ = ev;\ndiff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp\nindex 95db1812..1de4d505 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.hpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp\n@@ -52,6 +52,7 @@ struct AgcConfig {\n \tPwl Y_target;\n \tdouble speed;\n \tuint16_t startup_frames;\n+\tunsigned int drop_frames;\n \tdouble max_change;\n \tdouble min_change;\n \tdouble fast_reduce_threshold;\n@@ -74,6 +75,7 @@ public:\n \tbool IsPaused() const override;\n \tvoid Pause() override;\n \tvoid Resume() override;\n+\tunsigned int GetDropFrames() const override;\n \tvoid SetEv(double ev) override;\n \tvoid SetFlickerPeriod(double flicker_period) override;\n \tvoid SetFixedShutter(double fixed_shutter) override; // microseconds\n", "prefixes": [ "libcamera-devel", "3/5" ] }