{"id":16531,"url":"https://patchwork.libcamera.org/api/1.1/patches/16531/?format=json","web_url":"https://patchwork.libcamera.org/patch/16531/","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":"<20220704152318.221213-2-fsylvestre@baylibre.com>","date":"2022-07-04T15:23:15","name":"[libcamera-devel,1/4] ipa: libipa: algorithm: Add queueRequest() to the Algorithm class","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"7a77c6c8e8c0264fec999beb58b2b4f02626c307","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/16531/mbox/","series":[{"id":3247,"url":"https://patchwork.libcamera.org/api/1.1/series/3247/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3247","date":"2022-07-04T15:23:14","name":"Add Demosaicing and Color Processing control for rkisp1","version":1,"mbox":"https://patchwork.libcamera.org/series/3247/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16531/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16531/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 93CE5BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  4 Jul 2022 15:23:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5437A6564E;\n\tMon,  4 Jul 2022 17:23:26 +0200 (CEST)","from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 89A9B6564A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  4 Jul 2022 17:23:23 +0200 (CEST)","by mail-wm1-x32e.google.com with SMTP id\n\tbe14-20020a05600c1e8e00b003a04a458c54so5852456wmb.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 04 Jul 2022 08:23:23 -0700 (PDT)","from BL087.. ([2a01:e34:eea9:e630:ca4a:68b5:560f:5682])\n\tby smtp.gmail.com with ESMTPSA id\n\tp15-20020a05600c204f00b0039c5cecf206sm19603199wmg.4.2022.07.04.08.23.22\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 04 Jul 2022 08:23:22 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656948206;\n\tbh=F0jri/bMLzBTIseBjTeOIjla4H+7zBN1XS4U9gcH06U=;\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=xnf4f7WylorvWEFQ6pd8tZr2CHgSRjX+sZ8KQQ83+71jXzPnksP8Lh1Hd/VfMpEAt\n\tkMm0iOPWI+jew1tH1Xa6zyk66L3eGJfDTaOCfDhzZxgxuQHRC9h5lVlra0j0dw9lHA\n\tXreVU3s9gKrUv8SNgDL+f5cFjhBQyvjOlFpDu4YkIc9vsi3tCQ7oA6wzGQ8JKh2ima\n\t82HTuemzumlY+GcI5XnXs6BsTVc/BmGyhX6uCzCeoikAURpq/bnmlOXe4Wcq+wiGjd\n\tdF9Wl8ZNNiAvy5AXd1jnH+8sgOh2fhlARATxfMO44tE0nqiNCjQWRTsf1XhXahAfqE\n\tQ5GK2F3aGj0vA==","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=7dqw86XhV/+eZ0xQ2KZBrqn22bOd7txa8tBccccq8PI=;\n\tb=U2RmQ8lXIwsRpXVtZWnQftebYt6eW13mk0SVxWYMzRs/Q/I/JN/7fRMuU857EGADWC\n\tUg786ZBUAQSFSONuuKv62jb2EOT3x45FZ8h2iKrmumUQjZ8CrmIPjbRCnTLA0lTQyV2Y\n\t1kBQ1RaQB+zYELJXJ9y6kEY6nd89eu33ZforrZqN3Zq4Vwp0hFXTx6T13rW+D2Dwl1Gv\n\tFpef+ooZjbt8kzcVTlG43lGjkX5Og6RUCNE60+UmiwgxoUakMr/lYFZjNt3hW/loKSam\n\t49PZEUS4HWkB3zDP/RFyN06iqGld9VFD804GBoz27dpqErzv3pOTIxL2ykRzYoQ27MI7\n\tz4sQ=="],"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=\"U2RmQ8lX\"; \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=7dqw86XhV/+eZ0xQ2KZBrqn22bOd7txa8tBccccq8PI=;\n\tb=D1wcsPdlUgf8D5GeC4cT/xkKxA4LBoS1UWsNbyOCQSSghM0KIxOrMmwrRuayDOiB9m\n\tr38hEkjvh+q3hN5iotVQxblFZqujEfXN/sWT0Qe/6DlIJO2aMSSuPkMLtoASkwuFivuH\n\tetfv4NHKSGw2T+GLpdatiFPQvuexTbjcnfpA2W5YBXpAApbws7ZMoOuEI5bfcYQJAd+o\n\tSjw+l5whozxCVneI6cR1veK3lx9Cy+8/Z6S+EftOcWYAiOUyAev7UgGwNQGxgWa8JIUx\n\ttC1HbckKNuQ1BeNkUPs0BD02YuozlxjyPrBjxyjJsq5iDpd3gPkZs3B06u8Zd96I7icJ\n\toCSg==","X-Gm-Message-State":"AJIora91h8ds24mMLXHJ9AbqNi9gNo3xN3/qDbtEpp8EHSgIihqf5NJl\n\tVH3CBycTBxQKVCidUFOtq91dcHJag39R7Q==","X-Google-Smtp-Source":"AGRyM1slce4K6GQYyYI/iKpSYFszHg5TY/JJdc/zMDYXcPtp4dFS3SoA8Ta9oybb28cAqv4awL6ceg==","X-Received":"by 2002:a7b:cb94:0:b0:3a2:af9a:e569 with SMTP id\n\tm20-20020a7bcb94000000b003a2af9ae569mr4232064wmi.144.1656948202886; \n\tMon, 04 Jul 2022 08:23:22 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Mon,  4 Jul 2022 17:23:15 +0200","Message-Id":"<20220704152318.221213-2-fsylvestre@baylibre.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20220704152318.221213-1-fsylvestre@baylibre.com>","References":"<20220704152318.221213-1-fsylvestre@baylibre.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 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>\n---\n src/ipa/ipu3/module.h        |  2 +-\n src/ipa/libipa/algorithm.cpp | 13 +++++++++++++\n src/ipa/libipa/algorithm.h   |  6 ++++++\n src/ipa/libipa/module.cpp    |  5 +++++\n src/ipa/libipa/module.h      |  3 ++-\n src/ipa/rkisp1/module.h      |  2 +-\n 6 files changed, 28 insertions(+), 3 deletions(-)","diff":"diff --git a/src/ipa/ipu3/module.h b/src/ipa/ipu3/module.h\nindex d94fc459..5c2179e0 100644\n--- a/src/ipa/ipu3/module.h\n+++ b/src/ipa/ipu3/module.h\n@@ -20,7 +20,7 @@ namespace libcamera {\n namespace ipa::ipu3 {\n \n using Module = ipa::Module<IPAContext, IPAFrameContext, IPAConfigInfo,\n-\t\t\t   ipu3_uapi_params, ipu3_uapi_stats_3a>;\n+\t\t\t   ipu3_uapi_params, ipu3_uapi_stats_3a, ControlList>;\n \n } /* namespace ipa::ipu3 */\n \ndiff --git a/src/ipa/libipa/algorithm.cpp b/src/ipa/libipa/algorithm.cpp\nindex 8549fe3f..1fb811ef 100644\n--- a/src/ipa/libipa/algorithm.cpp\n+++ b/src/ipa/libipa/algorithm.cpp\n@@ -81,6 +81,19 @@ 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 aplly the control values\n+ * \\param[in] controls The list of user controls\n+ *\n+ * This function provides controls values coming from the application to the\n+ * algorithm. A frame number is provided to indicate the concerned frame.\n+ * Each algorithm is responsible for retrieving the controls associated to\n+ * them.\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..aa846625 100644\n--- a/src/ipa/libipa/algorithm.h\n+++ b/src/ipa/libipa/algorithm.h\n@@ -40,6 +40,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 typename Module::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)\ndiff --git a/src/ipa/libipa/module.cpp b/src/ipa/libipa/module.cpp\nindex 77352104..e87a52fc 100644\n--- a/src/ipa/libipa/module.cpp\n+++ b/src/ipa/libipa/module.cpp\n@@ -77,6 +77,11 @@ namespace ipa {\n  * \\brief The type of the IPA statistics and ISP results\n  */\n \n+/**\n+ * \\typedef Module::ControlList\n+ * \\brief The type of the ISP runtime controls list\n+ */\n+\n /**\n  * \\fn Module::algorithms()\n  * \\brief Retrieve the list of instantiated algorithms\ndiff --git a/src/ipa/libipa/module.h b/src/ipa/libipa/module.h\nindex 4149a353..81d3bf7f 100644\n--- a/src/ipa/libipa/module.h\n+++ b/src/ipa/libipa/module.h\n@@ -26,7 +26,7 @@ LOG_DECLARE_CATEGORY(IPAModuleAlgo)\n namespace ipa {\n \n template<typename _Context, typename _FrameContext, typename _Config,\n-\t typename _Params, typename _Stats>\n+\t typename _Params, typename _Stats, typename _ControlList>\n class Module : public Loggable\n {\n public:\n@@ -35,6 +35,7 @@ public:\n \tusing Config = _Config;\n \tusing Params = _Params;\n \tusing Stats = _Stats;\n+\tusing ControlList = _ControlList;\n \n \tvirtual ~Module() {}\n \ndiff --git a/src/ipa/rkisp1/module.h b/src/ipa/rkisp1/module.h\nindex 89f83208..08381a08 100644\n--- a/src/ipa/rkisp1/module.h\n+++ b/src/ipa/rkisp1/module.h\n@@ -20,7 +20,7 @@ namespace libcamera {\n namespace ipa::rkisp1 {\n \n using Module = ipa::Module<IPAContext, IPAFrameContext, IPACameraSensorInfo,\n-\t\t\t   rkisp1_params_cfg, rkisp1_stat_buffer>;\n+\t\t\t   rkisp1_params_cfg, rkisp1_stat_buffer, ControlList>;\n \n } /* namespace ipa::rkisp1 */\n \n","prefixes":["libcamera-devel","1/4"]}