{"id":16706,"url":"https://patchwork.libcamera.org/api/1.1/patches/16706/?format=json","web_url":"https://patchwork.libcamera.org/patch/16706/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220720154221.50937-2-fsylvestre@baylibre.com>","date":"2022-07-20T15:42:18","name":"[libcamera-devel,v2,1/4] ipa: libipa: algorithm: Add queueRequest() to the Algorithm class","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"0c9ce2d4357a7bfcad1c5e51fbd8f7b9224a9911","submitter":{"id":123,"url":"https://patchwork.libcamera.org/api/1.1/people/123/?format=json","name":"Florian Sylvestre","email":"fsylvestre@baylibre.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16706/mbox/","series":[{"id":3310,"url":"https://patchwork.libcamera.org/api/1.1/series/3310/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3310","date":"2022-07-20T15:42:17","name":"Add Demosaicing and Color Processing control for rkisp1","version":2,"mbox":"https://patchwork.libcamera.org/series/3310/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16706/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16706/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 54D19BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 20 Jul 2022 15:42:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0EFEB63318;\n\tWed, 20 Jul 2022 17:42:34 +0200 (CEST)","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 7BFCE6330D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Jul 2022 17:42:32 +0200 (CEST)","by mail-wr1-x42b.google.com with SMTP id z13so7118498wro.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Jul 2022 08:42:32 -0700 (PDT)","from BL087.. ([2a01:e34:eea9:e630:516d:f303:6345:b768])\n\tby smtp.gmail.com with ESMTPSA id\n\td2-20020adffbc2000000b0021e489ec78bsm2159294wrs.21.2022.07.20.08.42.31\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 20 Jul 2022 08:42:31 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658331754;\n\tbh=QXWBpXyd0SowZcrnrw816J37WkH0rmmWPGgP0X8vZJs=;\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=mg+Ay0RMvSVMbKP1vSRJH9//POT0m4LVF1sz7MNXwIPWNEBQVZ3n0aMQHomf2dSGw\n\tWK4vPeYacr2FTmFUpMUq73DwW1a1aUFdr0v9991bQE8fqmlkL+gMgtxmeVW4eX2UEF\n\tlEWM7aQoAZoFX92l80ni87II0uqAQuDiAbVK/C/xVpe4p0K5RiYWF3DZm3p4YBZN1y\n\tiTH+7XMXU2+P7wXJMhzYnLLqfOIzFRWHIzyRAk4qX65A9d7EleTM6gyXHeLBwpRcSi\n\tkRqEuwontI43MIczDr+sAFyRfu56hm9tx4TLGlpf1oPNuw2JSqpLNmQjjxjqACFgeT\n\tHZXSPHdgkpdBw==","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=W1TeYFQ7GLWFHVHmgPIyyLYNxD2xypTxkXFayFTwW0U=;\n\tb=hq7BA65H//O26TS1rf6V3SZYnbkc6NY+JiDBrvbUHqL7OqvzVJ0PlabXz14+I3zkj7\n\tK+uVcNRJapfG/WVlv3ThleKlwcA8MJu93/A/8g6MRbl53kpQoTRfEHrCoXWgOzaRbHk5\n\tCh+wwhvNEwkx6NflfK6e8XqC8gPAO4ESLCjMN08F5SBJhl1SbSEoB3/yS+ui9PVzOXrX\n\tXFlTnJOxEqoDl9YJ1rGod0eKXxuMixT/tQCuJS/gcNpB78CgBvK5jsOnKnC4/CRxg7Ab\n\tzwkITcZS9rbrWc8gyjhvnJDnkQLVDmzyglKXnKaizWlfpPtqskaW7OlgfpjK97tRzOJW\n\t3eeQ=="],"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=\"hq7BA65H\"; \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=W1TeYFQ7GLWFHVHmgPIyyLYNxD2xypTxkXFayFTwW0U=;\n\tb=eaOLLN4a0CvBsGrxZ3PsePX78Y+z92BfeoHCxjD8GVvyF6Ulx/c7cmu4jjOUbEyoCH\n\to+pChWVvVYPmkSoRu8PO4/qSZGmCjr6v8G/zDg7pV5eFGPyE49rMqbBI45QQ0ZEFBIAU\n\tQVePECkpjktauvIMNw6pdaM3oGqZU5+SXY52wKXcCtA+oAjfdJYQxMze+yauRIUoaum4\n\trp2Pl01+MqYg9Mzc+sEFBhdUqPoQMfP0qUDA62GI2yxwC4TynauopNr6Bbmv5PLmZUda\n\tQXWNeaph0YIH5KOq6B8QnSk29c3f4eFEL1Sv3fpAZ4GIHgU/jR2DNgGZbVnWy92IChPI\n\tuT+Q==","X-Gm-Message-State":"AJIora8zOK8l21jOcMGybF0tOP2wU+I8Cmwck1wdJv3kJjWvGI5U4Ibk\n\teZ02yvWfsbl1FPqPI5GsrUOVUGj1ly5c5Ij4","X-Google-Smtp-Source":"AGRyM1t99KD9VjY3urxiUxo6BorNK2G+v79rVEci6GROkpcxFtNWAdEbO6owIpDONO1iROqTHUIitA==","X-Received":"by 2002:adf:fcc6:0:b0:21d:8093:1b5c with SMTP id\n\tf6-20020adffcc6000000b0021d80931b5cmr30550606wrs.41.1658331751910; \n\tWed, 20 Jul 2022 08:42:31 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 20 Jul 2022 17:42:18 +0200","Message-Id":"<20220720154221.50937-2-fsylvestre@baylibre.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20220720154221.50937-1-fsylvestre@baylibre.com>","References":"<20220720154221.50937-1-fsylvestre@baylibre.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 1/4] ipa: libipa: algorithm: Add\n\tqueueRequest() 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 queueRequest() function to the Algorithm class. The queueRequest() function\nprovides controls values coming from the application to each algorithm.\nEach algorithm is responsible for retrieving the controls associated to them.\n\nSigned-off-by: Florian Sylvestre <fsylvestre@baylibre.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/libipa/algorithm.cpp | 16 ++++++++++++++++\n src/ipa/libipa/algorithm.h   |  8 ++++++++\n 2 files changed, 24 insertions(+)","diff":"diff --git a/src/ipa/libipa/algorithm.cpp b/src/ipa/libipa/algorithm.cpp\nindex 8549fe3f..38200e57 100644\n--- a/src/ipa/libipa/algorithm.cpp\n+++ b/src/ipa/libipa/algorithm.cpp\n@@ -81,6 +81,22 @@ namespace ipa {\n  * includes setting fields and flags that enable those processing blocks.\n  */\n \n+/**\n+ * \\fn Algorithm::queueRequest()\n+ * \\brief Provide control values to the algorithm\n+ * \\param[in] context The shared IPA context\n+ * \\param[in] frame The frame number to apply the control values\n+ * \\param[in] controls The list of user controls\n+ *\n+ * This function is called for each request queued to the camera. It provides\n+ * the controls stored in the request to the algorithm. The \\a frame number\n+ * is the Request sequence number and identifies the desired corresponding\n+ * frame to target for the controls to take effect.\n+ *\n+ * Algorithms shall read the applicable controls and store their value for later\n+ * use during frame processing.\n+ */\n+\n /**\n  * \\fn Algorithm::process()\n  * \\brief Process ISP statistics, and run algorithm operations\ndiff --git a/src/ipa/libipa/algorithm.h b/src/ipa/libipa/algorithm.h\nindex 2a8871d8..ccc659a6 100644\n--- a/src/ipa/libipa/algorithm.h\n+++ b/src/ipa/libipa/algorithm.h\n@@ -9,6 +9,8 @@\n #include <memory>\n #include <string>\n \n+#include <libcamera/controls.h>\n+\n namespace libcamera {\n \n class YamlObject;\n@@ -40,6 +42,12 @@ public:\n \t{\n \t}\n \n+\tvirtual void queueRequest([[maybe_unused]] typename Module::Context &context,\n+\t\t\t\t  [[maybe_unused]] const uint32_t frame,\n+\t\t\t\t  [[maybe_unused]] const ControlList &controls)\n+\t{\n+\t}\n+\n \tvirtual void process([[maybe_unused]] typename Module::Context &context,\n \t\t\t     [[maybe_unused]] typename Module::FrameContext *frameContext,\n \t\t\t     [[maybe_unused]] const typename Module::Stats *stats)\n","prefixes":["libcamera-devel","v2","1/4"]}