[{"id":24066,"web_url":"https://patchwork.libcamera.org/comment/24066/","msgid":"<ab7d8bef-1c98-e052-a052-15edd7b0620a@ideasonboard.com>","date":"2022-07-22T21:06:39","subject":"Re: [libcamera-devel] [RFC PATCH 07/12] 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 Kieran,\n\nOn 7/21/22 17:43, Kieran Bingham via libcamera-devel wrote:\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> ---\n>   src/ipa/rkisp1/ipa_context.h | 2 ++\n>   src/ipa/rkisp1/rkisp1.cpp    | 9 +++++----\n>   2 files changed, 7 insertions(+), 4 deletions(-)\n>\n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index a64dbc75fdd2..dc4fa5d1ddba 100644\n> --- a/src/ipa/rkisp1/ipa_context.h\n> +++ b/src/ipa/rkisp1/ipa_context.h\n> @@ -72,6 +72,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 7481e67e70f6..a2b7b25a53e5 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -205,7 +205,9 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info,\n>   \t\t<< \" Gain: \" << minGain << \"-\" << maxGain;\n>   \n>   \t/* Clean context at configuration */\n> -\tcontext_ = {};\n> +\tcontext_.configuration = {};\n> +\tcontext_.activeState = {};\n> +\tcontext_.frameContexts.clear();\n\n\n  stop() too needs this\n\n>   \n>   \t/* Set the hardware revision for the algorithms. */\n>   \tcontext_.configuration.hw.revision = hwRevision_;\n> @@ -290,6 +292,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> @@ -301,9 +305,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 F0FF7BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Jul 2022 21:06:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 52A616330F;\n\tFri, 22 Jul 2022 23:06:46 +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 58B31601B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Jul 2022 23:06:44 +0200 (CEST)","from [IPV6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9] (unknown\n\t[IPv6:2401:4900:1f3f:a2d:c6dd:7a7c:3d3c:dbb9])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4D3756D5;\n\tFri, 22 Jul 2022 23:06:43 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658524006;\n\tbh=PQPv4QDqLmOB3k6HIylr/rs69/HocqeZl9d9cy8PBhU=;\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=EoMrU55gRlTfAMN19C5VNoUBzwDjGFvTUJzhBNyRElej6WNQeTm2ePsXl6CRVaEYM\n\t/NDia8wvKXh4fmS9J++UbLXYI1iDINTwqz9bFthBc6RT/KmjjehSiq/UHYYTz+UtiD\n\tF1TgPbN11hymgNCX75iPqWS/88KW816N1mTvSWO56JvARJp/DQZ404AeYTPwrRLIh4\n\tQKsAMDOOlA+S67GPGBZaUETIb9P5Ukyuwiat5W+7DxDT+UP1dI2ZTbcgLx++otBZ4/\n\tNSOKRpymUcZFpm8ROqn6kLxXr7aLas36fE+AGCHMzxlL3ApNPz0cR2lqk8UfV+6sAi\n\tIqT8I6GO6yKvw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1658524003;\n\tbh=PQPv4QDqLmOB3k6HIylr/rs69/HocqeZl9d9cy8PBhU=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=MIU/LrR+vnUjAP1coU0bmuenYesQUzDoMqliQrjtX9RLWEraumidEUSg3MwiFIIgC\n\tN6KTx8bRClmNe2Xg9VedQyvVHGGNp0ULy+AQ2Uw7ZkUyn6+aGNKDIen6b2QPLhIKrA\n\twiCoH8SxgS3eM5MIoB/VLNG5sxT0sQ265XCbjvU4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"MIU/LrR+\"; dkim-atps=neutral","Message-ID":"<ab7d8bef-1c98-e052-a052-15edd7b0620a@ideasonboard.com>","Date":"Sat, 23 Jul 2022 02:36:39 +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":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20220721121310.1286862-1-kieran.bingham@ideasonboard.com>\n\t<20220721121310.1286862-8-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20220721121310.1286862-8-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [RFC PATCH 07/12] 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>"}}]