{"id":17317,"url":"https://patchwork.libcamera.org/api/patches/17317/?format=json","web_url":"https://patchwork.libcamera.org/patch/17317/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20220908014200.28728-9-laurent.pinchart@ideasonboard.com>","date":"2022-09-08T01:41:36","name":"[libcamera-devel,v4,08/32] ipa: libipa: algorithm: queueRequest(): Pass frame context","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"b64f093ac797cfdf9dff7c30cc20f1ab709c0a28","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17317/mbox/","series":[{"id":3476,"url":"https://patchwork.libcamera.org/api/series/3476/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3476","date":"2022-09-08T01:41:28","name":"ipa: Frame context queue, IPU3 & RkISP consolidation, and RkISP1 improvements","version":4,"mbox":"https://patchwork.libcamera.org/series/3476/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17317/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17317/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 6F931C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  8 Sep 2022 01:42:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 22818620B2;\n\tThu,  8 Sep 2022 03:42:31 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0D140620AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  8 Sep 2022 03:42:29 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 89DE56CC;\n\tThu,  8 Sep 2022 03:42:28 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662601351;\n\tbh=2SBmxcjPXeieBOv7B6wLXDN09vgXOa2LSsP84CgBLjc=;\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=upGitaWlVQBUYi9Hc2brjM0diHvZ8f4Jxa4kc4loIMvgoxF6wi8bhC/tdXIabkbNO\n\t4aQrgBM+SJiNbXPVeHtjEuc3CwUFmUH3n8DzkBYFsXJf/OzuGdUX5rQ3AYHJ4a78O+\n\tehm1PduVC/hJoXVjvF5JXVESNmdcgj64eJWQfc7iLRILPzCNRaIn/VgT7xhpWu/Mgr\n\tzemlkOyVG3szU1kSNeDnHFO5TnV/hGuAcjm22RYHQiCAixKssRXhu39x4SjZmZxTHq\n\tWjtk93ZXrfCZtK0MW2Jyrb/OmegL2hycoNE8QBfEo1+M3bWQahr1Djly3RPCEa41hV\n\tLjZtII+XsyFVA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662601348;\n\tbh=2SBmxcjPXeieBOv7B6wLXDN09vgXOa2LSsP84CgBLjc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=VP70YO5ItrlkNh08SLrxtF84/Ka6wsgXGgE9rp6cRTYRQzdpc05DZyykEsrKS1+QC\n\tt/SkDKfqlXJUmR7rfhS51yFF44r3ehFCn4Dcjad4bWhkP9PLY1KG0Q0vb3vpcqYLBh\n\tMv8D1HZd/9ZmpmkFCGzmLKtb9UqsTcU+ambKOmS4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"VP70YO5I\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Thu,  8 Sep 2022 04:41:36 +0300","Message-Id":"<20220908014200.28728-9-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.35.1","In-Reply-To":"<20220908014200.28728-1-laurent.pinchart@ideasonboard.com>","References":"<20220908014200.28728-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 08/32] ipa: libipa: algorithm:\n\tqueueRequest(): Pass frame context","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"From: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nIPA modules have access to incoming Request's controls list and\nneed to store them in the frame context at queueRequest() time.\n\nAs each algorithm is expected to have ownership of a certain set of\ncontrols it should have access to the frame context where they have been\nstored, and where the algorithm computation results can be stored to\nlater populate metadata.\n\nNow that both the IPU3 and RkISP1 IPA modules comply with the same\ninterface, propagate the queueRequest() call to algorithms in the IPU3\nIPA module.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/ipa/libipa/algorithm.cpp         | 1 +\n src/ipa/libipa/algorithm.h           | 1 +\n src/ipa/rkisp1/algorithms/awb.cpp    | 1 +\n src/ipa/rkisp1/algorithms/awb.h      | 1 +\n src/ipa/rkisp1/algorithms/cproc.cpp  | 1 +\n src/ipa/rkisp1/algorithms/cproc.h    | 1 +\n src/ipa/rkisp1/algorithms/dpf.cpp    | 1 +\n src/ipa/rkisp1/algorithms/dpf.h      | 1 +\n src/ipa/rkisp1/algorithms/filter.cpp | 1 +\n src/ipa/rkisp1/algorithms/filter.h   | 1 +\n src/ipa/rkisp1/rkisp1.cpp            | 5 ++++-\n 11 files changed, 14 insertions(+), 1 deletion(-)","diff":"diff --git a/src/ipa/libipa/algorithm.cpp b/src/ipa/libipa/algorithm.cpp\nindex 30eab67f71fc..c152b885aee1 100644\n--- a/src/ipa/libipa/algorithm.cpp\n+++ b/src/ipa/libipa/algorithm.cpp\n@@ -88,6 +88,7 @@ namespace ipa {\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] frameContext The current frame's context\n  * \\param[in] controls The list of user controls\n  *\n  * This function is called for each request queued to the camera. It provides\ndiff --git a/src/ipa/libipa/algorithm.h b/src/ipa/libipa/algorithm.h\nindex ee93d260ca3f..d8601f9ccaff 100644\n--- a/src/ipa/libipa/algorithm.h\n+++ b/src/ipa/libipa/algorithm.h\n@@ -47,6 +47,7 @@ public:\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]] typename Module::FrameContext &frameContext,\n \t\t\t\t  [[maybe_unused]] const ControlList &controls)\n \t{\n \t}\ndiff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\nindex aefba6382807..a23c32015454 100644\n--- a/src/ipa/rkisp1/algorithms/awb.cpp\n+++ b/src/ipa/rkisp1/algorithms/awb.cpp\n@@ -128,6 +128,7 @@ void Awb::prepare(IPAContext &context,\n  */\n void Awb::queueRequest(IPAContext &context,\n \t\t       [[maybe_unused]] const uint32_t frame,\n+\t\t       [[maybe_unused]] IPAFrameContext &frameContext,\n \t\t       const ControlList &controls)\n {\n \tauto &awb = context.frameContext.awb;\ndiff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h\nindex 806e11a2ec93..6d4a39467038 100644\n--- a/src/ipa/rkisp1/algorithms/awb.h\n+++ b/src/ipa/rkisp1/algorithms/awb.h\n@@ -24,6 +24,7 @@ public:\n \t\t     IPAFrameContext &frameContext,\n \t\t     rkisp1_params_cfg *params) override;\n \tvoid queueRequest(IPAContext &context, const uint32_t frame,\n+\t\t\t  IPAFrameContext &frameContext,\n \t\t\t  const ControlList &controls) override;\n \tvoid process(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameCtx,\ndiff --git a/src/ipa/rkisp1/algorithms/cproc.cpp b/src/ipa/rkisp1/algorithms/cproc.cpp\nindex c0505c68765b..bc4a07073706 100644\n--- a/src/ipa/rkisp1/algorithms/cproc.cpp\n+++ b/src/ipa/rkisp1/algorithms/cproc.cpp\n@@ -38,6 +38,7 @@ LOG_DEFINE_CATEGORY(RkISP1CProc)\n  */\n void ColorProcessing::queueRequest(IPAContext &context,\n \t\t\t\t   [[maybe_unused]] const uint32_t frame,\n+\t\t\t\t   [[maybe_unused]] IPAFrameContext &frameContext,\n \t\t\t\t   const ControlList &controls)\n {\n \tauto &cproc = context.frameContext.cproc;\ndiff --git a/src/ipa/rkisp1/algorithms/cproc.h b/src/ipa/rkisp1/algorithms/cproc.h\nindex 02c3d9c95488..ba6e901ae110 100644\n--- a/src/ipa/rkisp1/algorithms/cproc.h\n+++ b/src/ipa/rkisp1/algorithms/cproc.h\n@@ -22,6 +22,7 @@ public:\n \t~ColorProcessing() = default;\n \n \tvoid queueRequest(IPAContext &context, const uint32_t frame,\n+\t\t\t  IPAFrameContext &frameContext,\n \t\t\t  const ControlList &controls) override;\n \tvoid prepare(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\ndiff --git a/src/ipa/rkisp1/algorithms/dpf.cpp b/src/ipa/rkisp1/algorithms/dpf.cpp\nindex 8286f83facc1..be024fc5fe90 100644\n--- a/src/ipa/rkisp1/algorithms/dpf.cpp\n+++ b/src/ipa/rkisp1/algorithms/dpf.cpp\n@@ -176,6 +176,7 @@ int Dpf::init([[maybe_unused]] IPAContext &context,\n  */\n void Dpf::queueRequest(IPAContext &context,\n \t\t       [[maybe_unused]] const uint32_t frame,\n+\t\t       [[maybe_unused]] IPAFrameContext &frameContext,\n \t\t       const ControlList &controls)\n {\n \tauto &dpf = context.frameContext.dpf;\ndiff --git a/src/ipa/rkisp1/algorithms/dpf.h b/src/ipa/rkisp1/algorithms/dpf.h\nindex 656d78dee67c..e232cad4ee87 100644\n--- a/src/ipa/rkisp1/algorithms/dpf.h\n+++ b/src/ipa/rkisp1/algorithms/dpf.h\n@@ -23,6 +23,7 @@ public:\n \n \tint init(IPAContext &context, const YamlObject &tuningData) override;\n \tvoid queueRequest(IPAContext &context, const uint32_t frame,\n+\t\t\t  IPAFrameContext &frameContext,\n \t\t\t  const ControlList &controls) override;\n \tvoid prepare(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\ndiff --git a/src/ipa/rkisp1/algorithms/filter.cpp b/src/ipa/rkisp1/algorithms/filter.cpp\nindex 02562339d008..6aa5476aa25e 100644\n--- a/src/ipa/rkisp1/algorithms/filter.cpp\n+++ b/src/ipa/rkisp1/algorithms/filter.cpp\n@@ -44,6 +44,7 @@ static constexpr uint32_t kFiltModeDefault = 0x000004f2;\n  */\n void Filter::queueRequest(IPAContext &context,\n \t\t\t  [[maybe_unused]] const uint32_t frame,\n+\t\t\t  [[maybe_unused]] IPAFrameContext &frameContext,\n \t\t\t  const ControlList &controls)\n {\n \tauto &filter = context.frameContext.filter;\ndiff --git a/src/ipa/rkisp1/algorithms/filter.h b/src/ipa/rkisp1/algorithms/filter.h\nindex ac69657e2f0f..3fd882ea41dc 100644\n--- a/src/ipa/rkisp1/algorithms/filter.h\n+++ b/src/ipa/rkisp1/algorithms/filter.h\n@@ -22,6 +22,7 @@ public:\n \t~Filter() = default;\n \n \tvoid queueRequest(IPAContext &context, const uint32_t frame,\n+\t\t\t  IPAFrameContext &frameContext,\n \t\t\t  const ControlList &controls) override;\n \tvoid prepare(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex b2593a584a1a..07210d16b5b5 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -292,8 +292,11 @@ void IPARkISP1::unmapBuffers(const std::vector<unsigned int> &ids)\n \n void IPARkISP1::queueRequest(const uint32_t frame, const ControlList &controls)\n {\n+\t/* \\todo Obtain the frame context to pass to process from the FCQueue */\n+\tIPAFrameContext frameContext;\n+\n \tfor (auto const &algo : algorithms())\n-\t\talgo->queueRequest(context_, frame, controls);\n+\t\talgo->queueRequest(context_, frame, frameContext, controls);\n }\n \n void IPARkISP1::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)\n","prefixes":["libcamera-devel","v4","08/32"]}