From patchwork Tue Sep 27 02:36:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17422 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id BCAD3C327E for ; Tue, 27 Sep 2022 02:37:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8802062290; Tue, 27 Sep 2022 04:37:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1664246238; bh=48ozrf+iyxWSMIBRE+QVZz1G+ZWEjToS+6cGvsIwVbo=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=RbTImtf+T9DMtld7LtC74PgxPuWpBpvzRTjlXRuStJvzOzuKKQevC4YYQ133297uB ni1D2k4umWFcsLdwmYL51LG0BbU8icENCIuo9DF4o0QTnao35U7zcYZd3Bl1jLvMu2 bQOCAIgkSlT5Wnc4XSsQT0DBbRYQ3GRotyKu4Gg9qV0gdDPBwYTy6Cn03yvNjcmicv mJzhG0rEzVG6+T12YXD+W+oEf+fJr/Ri5UGFfyKdGPdbKUxaTGIkxOSdQ6w+dUtQwe 4+y6Pt84CwGTDqVdcWldcMFbP8ujT4GtWRKn1uj1dGafT6SAzFnM9/Iklc/Xbd110C 8LDjR0HGx2qvg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F1CE16228F for ; Tue, 27 Sep 2022 04:37:15 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="eCPOWuNM"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 76A3A47C for ; Tue, 27 Sep 2022 04:37:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1664246235; bh=48ozrf+iyxWSMIBRE+QVZz1G+ZWEjToS+6cGvsIwVbo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eCPOWuNMvMIxMmXtYDmDU9L+byLgOEvDOz9ORFx2Nzh1ey841DySUaFr6KJvc9D3b EgJMdkwkpZ55crlglmPAmR2lX3BUey02w7qhD0lmBJ2OGtfAse0T71I7hsta5fbyDx O4Xa/v+Ww5JnaxBFwELV9hynXjs/W0EG8JF3onZw= To: libcamera-devel@lists.libcamera.org Date: Tue, 27 Sep 2022 05:36:20 +0300 Message-Id: <20220927023642.12341-12-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220927023642.12341-1-laurent.pinchart@ideasonboard.com> References: <20220927023642.12341-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 11/33] ipa: ipu3: Pass controls to algorithm's queueRequest() handler X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Call the Algorithm::queueRequest() function of all algorithms when a request is queued, to pass the request controls to the algorithms. We can now drop the copy of the control list stored in IPAFrameContext as it isn't used anymore. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- Changes since v4: - Drop todo comment --- src/ipa/ipu3/ipa_context.cpp | 3 --- src/ipa/ipu3/ipa_context.h | 3 --- src/ipa/ipu3/ipu3.cpp | 5 ++--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/ipa/ipu3/ipa_context.cpp b/src/ipa/ipu3/ipa_context.cpp index 6904ccbbdf8b..bd71b615365d 100644 --- a/src/ipa/ipu3/ipa_context.cpp +++ b/src/ipa/ipu3/ipa_context.cpp @@ -168,9 +168,6 @@ namespace libcamera::ipa::ipu3 { * \struct IPAFrameContext * \brief IPU3-specific FrameContext * - * \var IPAFrameContext::frameControls - * \brief Controls sent in by the application while queuing the request - * * \var IPAFrameContext::sensor * \brief Effective sensor values that were applied for the frame * diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h index bfc0196e098a..36099353e9f2 100644 --- a/src/ipa/ipu3/ipa_context.h +++ b/src/ipa/ipu3/ipa_context.h @@ -12,7 +12,6 @@ #include -#include #include #include @@ -78,8 +77,6 @@ struct IPAFrameContext : public FrameContext { uint32_t exposure; double gain; } sensor; - - ControlList frameControls; }; struct IPAContext { diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 96dc2af2cb73..d1ea081d595d 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -663,11 +663,10 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame, */ void IPAIPU3::queueRequest(const uint32_t frame, const ControlList &controls) { - /* \todo Start processing for 'frame' based on 'controls'. */ IPAFrameContext &frameContext = context_.frameContexts.alloc(frame); - /* \todo Implement queueRequest to each algorithm. */ - frameContext.frameControls = controls; + for (auto const &algo : algorithms()) + algo->queueRequest(context_, frame, frameContext, controls); } /**