[{"id":24536,"web_url":"https://patchwork.libcamera.org/comment/24536/","msgid":"<5cd2c8b0-d519-c4d5-e858-b69c5bd8d5a8@ideasonboard.com>","date":"2022-08-11T06:45:13","subject":"Re: [libcamera-devel] [PATCH v2 07/10] ipa: rkisp1: Convert to use\n\tthe FCQueue","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch\n\nOn 8/5/22 19:23, Jacopo Mondi via libcamera-devel wrote:\n> From: Kieran Bingham via libcamera-devel <libcamera-devel@lists.libcamera.org>\n>\n> Establish a queue of FrameContexts using the new FCQueue and use it to\n> supply the FrameContext to the algorithms.\n>\n> The algorithms on the RKISP1 do not use this yet themselves, but are\n> able to do so after the introduction of this patch.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n>   src/ipa/rkisp1/ipa_context.h | 2 ++\n>   src/ipa/rkisp1/rkisp1.cpp    | 6 +++---\n>   2 files changed, 5 insertions(+), 3 deletions(-)\n>\n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index c42bcd73b314..dd756f4025d1 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -86,6 +86,8 @@ struct RKISP1FrameContext : public IPAFrameContext {\n>   struct IPAContext {\n>   \tIPASessionConfiguration configuration;\n>   \tIPAActiveState activeState;\n> +\n> +\tFCQueue<RKISP1FrameContext> frameContexts;\n>   };\n>   \n>   } /* namespace ipa::rkisp1 */\n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index a2483f27cf52..2c7fdde55f49 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -192,6 +192,7 @@ int IPARkISP1::start()\n>   void IPARkISP1::stop()\n>   {\n>   \t/* Clean the IPA context at the end of the streaming session. */\n> +\tcontext_.frameContexts.clear();\n>   \tcontext_ = {};\n>   }\n>   \n> @@ -318,6 +319,8 @@ void IPARkISP1::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)\n>   void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId,\n>   \t\t\t\t   const ControlList &sensorControls)\n>   {\n> +\tRKISP1FrameContext &frameContext = context_.frameContexts.get(frame);\n> +\n>   \tconst rkisp1_stat_buffer *stats =\n>   \t\treinterpret_cast<rkisp1_stat_buffer *>(\n>   \t\t\tmappedBuffers_.at(bufferId).planes()[0].data());\n> @@ -329,9 +332,6 @@ void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId\n>   \n>   \tunsigned int aeState = 0;\n>   \n> -\t/* \\todo Obtain the frame context to pass to process from the FCQueue */\n> -\tRKISP1FrameContext frameContext;\n> -\n>   \tfor (auto const &algo : algorithms())\n>   \t\talgo->process(context_, frameContext, stats);\n>","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 98E71C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Aug 2022 06:45:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F36866332B;\n\tThu, 11 Aug 2022 08:45:21 +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 9D9A261FA8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Aug 2022 08:45:20 +0200 (CEST)","from [IPV6:2401:4900:1f3f:c7a1:27b3:9637:38a7:6084] (unknown\n\t[IPv6:2401:4900:1f3f:c7a1:27b3:9637:38a7:6084])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8569B3F1;\n\tThu, 11 Aug 2022 08:45:19 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660200322;\n\tbh=vkwKni7u6KHeWn2apmEyMnWAl9WGcI4qLs5hlx7L1WA=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=XYbHPTjsHPpCkDfoo20ven6QwPEeg6ri18HQ62ikk994NHsOgi1TbYPh3ACEwFmb6\n\taq5GxElRJEPKzI4pkQYi188MAOZqWlUd76PnNDMgQuKY1igNc+9k+JDiePF3LvmPl4\n\tlCk2j/1m+gkxGSb6J8inK0uwvpsyN3ASq5GgPIuXg1IsJx2cHrLyTKLTELzYGp2xDo\n\tnwKhiktx+79iNwTVVLtrWR6gCxEC7Qx7nPlzjVeQJ5Fn70PbYHPLo74qlV7J+ZdOCL\n\tS+lliwli6OwCqsPb1ltUt5UFaJVmbYgzKD1poZzUTgW/+Npo4tw8ls/DBzpJbJ6Kfe\n\tqwrL9YisckO8g==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660200320;\n\tbh=vkwKni7u6KHeWn2apmEyMnWAl9WGcI4qLs5hlx7L1WA=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=G8frUboyNkDIQdSQCru4/q7vEG9FmZVO5iPOM1MbgTQ36imFnSM9GC1aphK4VJcfr\n\tP4fNKynXx0yFTnC0H2Dgw8XlKCxGuXHXbFE/jvLZpRcdW5OUp68bn238yzomEhVEjq\n\tgo+VP83M7h+16YJuoFLomzzd3ynjO0dpAn8pJvT4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"G8frUboy\"; dkim-atps=neutral","Message-ID":"<5cd2c8b0-d519-c4d5-e858-b69c5bd8d5a8@ideasonboard.com>","Date":"Thu, 11 Aug 2022 12:15:13 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","References":"<20220805135312.47497-1-jacopo@jmondi.org>\n\t<20220805135312.47497-8-jacopo@jmondi.org>","In-Reply-To":"<20220805135312.47497-8-jacopo@jmondi.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 07/10] ipa: rkisp1: Convert to use\n\tthe FCQueue","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":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]