Patch Detail
Show a patch.
GET /api/patches/16002/?format=api
{ "id": 16002, "url": "https://patchwork.libcamera.org/api/patches/16002/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16002/", "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": "<20220523092435.475510-3-fsylvestre@baylibre.com>", "date": "2022-05-23T09:24:32", "name": "[libcamera-devel,libcamera-devel,2/5] ipa: libipa: Add init() function to the Algorithm class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "2e84c6c5dbde6274e6fe7223444f607c65980667", "submitter": { "id": 123, "url": "https://patchwork.libcamera.org/api/people/123/?format=api", "name": "Florian Sylvestre", "email": "fsylvestre@baylibre.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16002/mbox/", "series": [ { "id": 3133, "url": "https://patchwork.libcamera.org/api/series/3133/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3133", "date": "2022-05-23T09:24:30", "name": "Add configuration file support for rkisp1 blc algo", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3133/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16002/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16002/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 BC644BD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 May 2022 09:24:50 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D46A86566D;\n\tMon, 23 May 2022 11:24:49 +0200 (CEST)", "from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com\n\t[IPv6:2a00:1450:4864:20::32f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 130666565E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 May 2022 11:24:46 +0200 (CEST)", "by mail-wm1-x32f.google.com with SMTP id o9so666937wmd.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 May 2022 02:24:46 -0700 (PDT)", "from BL087.. ([2a01:e34:eea9:e630:1bc6:bcdb:60b7:f1d3])\n\tby smtp.gmail.com with ESMTPSA id\n\tw22-20020a1cf616000000b003942a244eebsm8034250wmc.48.2022.05.23.02.24.44\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 23 May 2022 02:24:44 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1653297890;\n\tbh=IOYq8ESWic3swOVBQrSCimHXwEZ4ZyhdhnWaNpOd7O0=;\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=eUht9LQh0yQd0IHsz8EuYqYjFSstBEe5VZVN0trJ0OzqXZHevaqwYFnKwZw46d6xv\n\tdNivQDafWqd5obwxmP1r8IaNptaH3Jgzbj081JakV/hJNBUsHymLjure2T96Gcheog\n\tjXysvtOjMdlJN/LtxQSAsUSC/Yeijds3Nca/16t+G1FzJAOoYXbNM73rhZq9x7flSL\n\tbnRTLqWPopa8TgCth1YWoslSHBwm/2SIBvgEC2rPQohELCrNM1dLN48klm5mKw/AA8\n\tVcE6slrX8cA3sLWrwgU6VY9v7HvLLGwUUBd/B9sH95u5tZapJbxSFTUzibAnw3QGTg\n\tCvg+is85iByeQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=baylibre-com.20210112.gappssmtp.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=1DvUzTGwqBhOBuZt/0h7g+g5MxcYSFWLZ7UT0nopWWY=;\n\tb=LyCRfCJZ4x5EG/uHg5coLvLEkn0ElJkntmN7gLvlk6bOEushXqMHxV8vmdFtF6RFly\n\tgF3VUqQJP0hOif97qbIPEi8iX++dayyef9RjidVCseFk0RTpGBg7wUnMMxMzAiD2CjVx\n\thX/r850NvFKJe5E+fko+YX0SE4noEXaVA/aUjuuuA1PBjbgm46cUnPhJYcAEtoy5wjO8\n\tuC0OU/zFqejzynUlUCoooJ9QQUi5eJMs06sgNePl0I6G/58vR4yAXpR1EJOtcdDCsuCF\n\tzcMfQU46RBiKnGcq+hiN3hnxKFw83DmZwa/qG+Fp6/ikaeteWG+A/IMuEDBcI2viCjqz\n\tJmmQ==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=baylibre-com.20210112.gappssmtp.com\n\theader.i=@baylibre-com.20210112.gappssmtp.com header.b=\"LyCRfCJZ\"; \n\tdkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=1DvUzTGwqBhOBuZt/0h7g+g5MxcYSFWLZ7UT0nopWWY=;\n\tb=sKC/01pG2TBbgtjI2QWK30PVGrG98q2FJ5xEKLgWyp40Hb9BJNLInIAFEbEOAwW6Tu\n\tY0IEy7qYq2RM5X0+muaQO7zh9tOskONJud8FqmL0G0JBRlAdHLOy5d8dU0nRDTDsE6y+\n\tNGZ4rRx3umNiGkzy8048iwfZ7j06Gd+nuEdIWgwCMkHc3Wz+80C5EzP0l/N0wyYZRHSd\n\ttxYbxayx2q6uRJ7eo/3tWf6u63oXefy8uxQ55gLygv3SvAiULGQZVhHheMJsScZz6/Lm\n\tCkRr4NFDbE6w3K6/7K8oadJx7xVwt9o4YaP8sS3jmdZyLqTt3KQ0ODuTfXNeBvKhBmH4\n\tpSpg==", "X-Gm-Message-State": "AOAM533jyDjvQkEK/m/Yw99v5uOwA62XrLpUdS5nE9luRmdCcbcZXSai\n\tAm4VSeM5NeO9SwDV4DDWML3iOJae1qCYFQ==", "X-Google-Smtp-Source": "ABdhPJxtsmjeaLCV5Yi/Ni5cZOoTaWivdnwW7xR9SWVilNj4+QThHyardifQDHQoCJ46Dlfp6QKJew==", "X-Received": "by 2002:a05:600c:4fd2:b0:397:4c02:958f with SMTP id\n\to18-20020a05600c4fd200b003974c02958fmr3550495wmq.180.1653297885369; \n\tMon, 23 May 2022 02:24:45 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 23 May 2022 11:24:32 +0200", "Message-Id": "<20220523092435.475510-3-fsylvestre@baylibre.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220523092435.475510-1-fsylvestre@baylibre.com>", "References": "<20220523092435.475510-1-fsylvestre@baylibre.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [libcamera-devel 2/5] ipa: libipa: Add init()\n\tfunction to the Algorithm 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": "Florian Sylvestre via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Florian Sylvestre <fsylvestre@baylibre.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add the init() function that will be called during algorithm initialization\nto provide each algorithm the list of algorithms tuning data.\nEach algorithm will be responsible to grab their corresponding parameters.\n\nSigned-off-by: Florian Sylvestre <fsylvestre@baylibre.com>\n---\n src/ipa/libipa/algorithm.cpp | 15 +++++++++++++++\n src/ipa/libipa/algorithm.h | 10 +++++++++-\n 2 files changed, 24 insertions(+), 1 deletion(-)", "diff": "diff --git a/src/ipa/libipa/algorithm.cpp b/src/ipa/libipa/algorithm.cpp\nindex 398d5372..269a4beb 100644\n--- a/src/ipa/libipa/algorithm.cpp\n+++ b/src/ipa/libipa/algorithm.cpp\n@@ -29,6 +29,21 @@ namespace ipa {\n * to manage algorithms regardless of their specific type.\n */\n \n+/**\n+ * \\fn Algorithm::init()\n+ * \\brief Configure the Algorithm with default parameters\n+ * \\param[in] context The shared IPA context\n+ * \\param[in] params The initial parameters used to tune algorithms\n+ *\n+ * This function is called once before the camera is running to get default\n+ * algorithm parameters.\n+ *\n+ * Algorithms are responsible to read the parameters given and extract their\n+ * parameter configuration.\n+ *\n+ * \\return 0 if successful, an error code otherwise\n+ */\n+\n /**\n * \\fn Algorithm::configure()\n * \\brief Configure the Algorithm given an IPAConfigInfo\ndiff --git a/src/ipa/libipa/algorithm.h b/src/ipa/libipa/algorithm.h\nindex 766aee5d..f5be1caf 100644\n--- a/src/ipa/libipa/algorithm.h\n+++ b/src/ipa/libipa/algorithm.h\n@@ -10,12 +10,20 @@ namespace libcamera {\n \n namespace ipa {\n \n-template<typename Context, typename Config, typename Params, typename Stats>\n+template<typename Context, typename TuningData,\n+\t typename Config, typename Params, typename Stats>\n+\n class Algorithm\n {\n public:\n \tvirtual ~Algorithm() {}\n \n+\tvirtual int init([[maybe_unused]] Context &context,\n+\t\t\t [[maybe_unused]] const TuningData *params)\n+\t{\n+\t\treturn 0;\n+\t}\n+\n \tvirtual int configure([[maybe_unused]] Context &context,\n \t\t\t [[maybe_unused]] const Config &configInfo)\n \t{\n", "prefixes": [ "libcamera-devel", "libcamera-devel", "2/5" ] }