Patch Detail
Show a patch.
GET /api/1.1/patches/10615/?format=api
{ "id": 10615, "url": "https://patchwork.libcamera.org/api/1.1/patches/10615/?format=api", "web_url": "https://patchwork.libcamera.org/patch/10615/", "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": "<20201208204441.9356-4-david.plowman@raspberrypi.com>", "date": "2020-12-08T20:44:38", "name": "[libcamera-devel,v3,3/6] src: ipa: raspberrypi: awb: Add GetConvergenceFrames method to AWB base class", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0a5fa79ade5230258a0bd90fc599b7af96e0ad73", "submitter": { "id": 42, "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api", "name": "David Plowman", "email": "david.plowman@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/10615/mbox/", "series": [ { "id": 1515, "url": "https://patchwork.libcamera.org/api/1.1/series/1515/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1515", "date": "2020-12-08T20:44:35", "name": "Raspberry Pi AGC: initial frame drop count", "version": 3, "mbox": "https://patchwork.libcamera.org/series/1515/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/10615/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/10615/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 85F12BDB20\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 8 Dec 2020 20:44:49 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 41C1367E6F;\n\tTue, 8 Dec 2020 21:44:49 +0100 (CET)", "from mail-ed1-x531.google.com (mail-ed1-x531.google.com\n\t[IPv6:2a00:1450:4864:20::531])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6D2BF67E4D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 8 Dec 2020 21:44:47 +0100 (CET)", "by mail-ed1-x531.google.com with SMTP id i24so11129006edj.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 08 Dec 2020 12:44:47 -0800 (PST)", "from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\tbe6sm18441471edb.29.2020.12.08.12.44.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 08 Dec 2020 12:44:46 -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=\"hySDJF/3\"; 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=pvVockX49tEo+XYb/GBsyLuvcr9bEh20/7VlEgiMPRI=;\n\tb=hySDJF/3xxvInG0V0Gjgo0MM1BRwfYP8BU87H/IzIkwYzJ5E6/x+/nsiClgVTyED7Z\n\t1M4k2Pnz+ymdzt1kUTJ60ItJxfsbuzVYz6I930TYyhW4U5Q0hyvnm2BUw9fJfbr7gBdI\n\tztaOLaqycjY9asqeBUqitnj80TbW1KEBNMOzwQoyzgtqnXCABhYl4vliUvpb0uRBg27g\n\tnhQRYT5K5a+VZewEG7yqUzhgAV4cXYDMqtqAcadKlTyInfHHJCpfpyS4u3wrm5Ul0zF2\n\tZihVO/DR/opJFtUokwgTrpvn8szjiZZ7QCJXV8COMcbVraDvLv9YlXZoW21232HSSZLU\n\tG7aA==", "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=pvVockX49tEo+XYb/GBsyLuvcr9bEh20/7VlEgiMPRI=;\n\tb=PdbZPm9suXA45IJCUS1/b6A4nDwyPN6NXr6KlLksGPJ+a9rqus8Ty5XDJL9q+yu4GT\n\tFLzXpniJlNoEEF/io/ebbsR0KMNAnMjbil142/2TlkqL+eCWxH92ogeWx31rAJ8dFDS1\n\tWXJZBsEFC69RRWNLHHsbJgQgSvs0+Fhz/e7SCa1rGnEE2Y/grkZyge2dWHYScq2WVAk5\n\tqtidWPQmmklV7t03yg3fIGTOHkjmSD5fRCTWGtdv2s8k7fJX/cXBCKzomUlzIxDrAHTv\n\txVCnjENIKKJV3Tq920EGQ7S/6DZma94DlLaCcpZapXupBvkb0N4GIavAFD4BAT7FC036\n\trWqQ==", "X-Gm-Message-State": "AOAM5305/O7tNoVGQQLMTKempUpdnRO1CQ+kk12wpx1Ur85H8egZ9BBB\n\t0kZC84Hxb9yW1qSHHd3Cp/RvNk2OUMVUeNWj", "X-Google-Smtp-Source": "ABdhPJz5RRjZujl3SuxuJAMeZoJblkc7uEYC/6+3YYBA6v/4CO8SJ7e+F/iHMt/cbPHYQT1u5C/7zg==", "X-Received": "by 2002:a50:ab47:: with SMTP id\n\tt7mr26771256edc.289.1607460286723; \n\tTue, 08 Dec 2020 12:44:46 -0800 (PST)", "From": "David Plowman <david.plowman@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 8 Dec 2020 20:44:38 +0000", "Message-Id": "<20201208204441.9356-4-david.plowman@raspberrypi.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20201208204441.9356-1-david.plowman@raspberrypi.com>", "References": "<20201208204441.9356-1-david.plowman@raspberrypi.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v3 3/6] src: ipa: raspberrypi: awb: Add\n\tGetConvergenceFrames method to AWB 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 GetConvergenceFrames method to the AwbAlgorithm class which\ncan be called when the AWB is started from scratch. It suggests how\nmany frames should be dropped before displaying any (while the AWB\nconverges).\n\nThe Raspberry Pi specific implementation makes this customisable from\nthe tuning file.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/raspberrypi/controller/awb_algorithm.hpp | 1 +\n src/ipa/raspberrypi/controller/rpi/awb.cpp | 11 +++++++++++\n src/ipa/raspberrypi/controller/rpi/awb.hpp | 2 ++\n 3 files changed, 14 insertions(+)", "diff": "diff --git a/src/ipa/raspberrypi/controller/awb_algorithm.hpp b/src/ipa/raspberrypi/controller/awb_algorithm.hpp\nindex 5be0c9f4..96f88afc 100644\n--- a/src/ipa/raspberrypi/controller/awb_algorithm.hpp\n+++ b/src/ipa/raspberrypi/controller/awb_algorithm.hpp\n@@ -15,6 +15,7 @@ class AwbAlgorithm : public Algorithm\n public:\n \tAwbAlgorithm(Controller *controller) : Algorithm(controller) {}\n \t// An AWB algorithm must provide the following:\n+\tvirtual unsigned int GetConvergenceFrames() const = 0;\n \tvirtual void SetMode(std::string const &mode_name) = 0;\n \tvirtual void SetManualGains(double manual_r, double manual_b) = 0;\n };\ndiff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\nindex 020825e3..10600f75 100644\n--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n@@ -59,6 +59,7 @@ void AwbConfig::Read(boost::property_tree::ptree const ¶ms)\n \tbayes = params.get<int>(\"bayes\", 1);\n \tframe_period = params.get<uint16_t>(\"frame_period\", 10);\n \tstartup_frames = params.get<uint16_t>(\"startup_frames\", 10);\n+\tconvergence_frames = params.get<unsigned int>(\"convergence_frames\", 3);\n \tspeed = params.get<double>(\"speed\", 0.05);\n \tif (params.get_child_optional(\"ct_curve\"))\n \t\tread_ct_curve(ct_r, ct_b, params.get_child(\"ct_curve\"));\n@@ -165,6 +166,16 @@ void Awb::Initialise()\n \tprev_sync_results_ = sync_results_;\n }\n \n+unsigned int Awb::GetConvergenceFrames() const\n+{\n+\t// If colour gains have been explicitly set, there is no convergence\n+\t// to happen, so no need to drop any frames - return zero.\n+\tif (manual_r_ && manual_b_)\n+\t\treturn 0;\n+\telse\n+\t\treturn config_.convergence_frames;\n+}\n+\n void Awb::SetMode(std::string const &mode_name)\n {\n \tstd::unique_lock<std::mutex> lock(settings_mutex_);\ndiff --git a/src/ipa/raspberrypi/controller/rpi/awb.hpp b/src/ipa/raspberrypi/controller/rpi/awb.hpp\nindex 545d85a8..6fc045ce 100644\n--- a/src/ipa/raspberrypi/controller/rpi/awb.hpp\n+++ b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n@@ -37,6 +37,7 @@ struct AwbConfig {\n \tuint16_t frame_period;\n \t// number of initial frames for which speed taken as 1.0 (maximum)\n \tuint16_t startup_frames;\n+\tunsigned int convergence_frames; // approx number of frames to converge\n \tdouble speed; // IIR filter speed applied to algorithm results\n \tbool fast; // \"fast\" mode uses a 16x16 rather than 32x32 grid\n \tPwl ct_r; // function maps CT to r (= R/G)\n@@ -82,6 +83,7 @@ public:\n \tchar const *Name() const override;\n \tvoid Initialise() override;\n \tvoid Read(boost::property_tree::ptree const ¶ms) override;\n+\tunsigned int GetConvergenceFrames() const override;\n \tvoid SetMode(std::string const &name) override;\n \tvoid SetManualGains(double manual_r, double manual_b) override;\n \tvoid SwitchMode(CameraMode const &camera_mode, Metadata *metadata) override;\n", "prefixes": [ "libcamera-devel", "v3", "3/6" ] }