From patchwork Tue Aug 9 14:46:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17045 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 DFBFCC3272 for ; Tue, 9 Aug 2022 14:46:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9D3C563332; Tue, 9 Aug 2022 16:46:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1660056395; bh=cB0sNuJW9kaQRqnBRrtSb7A7iSpFwIN8aH/WgHsezXo=; 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=y6V5ZnexLTD+6Pri7WPP55WuHoQzZlYWWopvdwHBLn9J6I+8xouDKWwVX+Idgl2kV RCy9WCNinIPnJILr2pBOEHRfC/2JzCOdn7gEjT25IVaawyc5KP+VScrGsUY6VeWLuA cAnseHQ80P/uVqU4VK+7K81DsLNI8edUcbgTILvEvO9PnNIxP6Bmz57Ux8yb+YJ9g8 nwnW+BiFeuqwd7LWixJf+4QrhSEDyfA4iWOrYx0+DXAYL0p3KeErMP8suG12ZpnqEq m17stx4zAV6tSSWIF4WFtNoMj1wMxzkuIu2RutqjbvYadP3U2+Liw4UKq0fg1PpQl9 IceshhpfBolCQ== 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 4505963328 for ; Tue, 9 Aug 2022 16:46:33 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RZJET2NX"; 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 D0573481 for ; Tue, 9 Aug 2022 16:46:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1660056393; bh=cB0sNuJW9kaQRqnBRrtSb7A7iSpFwIN8aH/WgHsezXo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RZJET2NX4KZJANq9wWibn7soaElZpK9bfyf/AnCjM0zhsVfXbRrRTVyjY7I/MxVXQ 6sbFer73p48XGeZWAX4CjNHa6+O7XLzilsrzUisWLsV4avyOd4Zro8Ss96yfQnaYm6 PImxmqhcVvoMuT1eTTVdR7GKV8PlZmi3IZ3Pb4d8= To: libcamera-devel@lists.libcamera.org Date: Tue, 9 Aug 2022 17:46:16 +0300 Message-Id: <20220809144617.27983-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220809144617.27983-1-laurent.pinchart@ideasonboard.com> References: <20220809144617.27983-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/4] ipa: ipu3: Register algorithms 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" To prepare for dynamic instantiation of algorithms from the tuning file, register the algorithms with the Module class. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/ipa/ipu3/algorithms/af.cpp | 2 ++ src/ipa/ipu3/algorithms/agc.cpp | 2 ++ src/ipa/ipu3/algorithms/awb.cpp | 2 ++ src/ipa/ipu3/algorithms/blc.cpp | 2 ++ src/ipa/ipu3/algorithms/tone_mapping.cpp | 2 ++ 5 files changed, 10 insertions(+) diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp index d07521a090ac..4835a0345931 100644 --- a/src/ipa/ipu3/algorithms/af.cpp +++ b/src/ipa/ipu3/algorithms/af.cpp @@ -450,6 +450,8 @@ void Af::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameCon } } +REGISTER_IPA_ALGORITHM(Af, "Af") + } /* namespace ipa::ipu3::algorithms */ } /* namespace libcamera */ diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp index 5bc64ae52214..ed4809d98007 100644 --- a/src/ipa/ipu3/algorithms/agc.cpp +++ b/src/ipa/ipu3/algorithms/agc.cpp @@ -363,6 +363,8 @@ void Agc::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameCo frameCount_++; } +REGISTER_IPA_ALGORITHM(Agc, "Agc") + } /* namespace ipa::ipu3::algorithms */ } /* namespace libcamera */ diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp index 704267222a31..b658ee546b87 100644 --- a/src/ipa/ipu3/algorithms/awb.cpp +++ b/src/ipa/ipu3/algorithms/awb.cpp @@ -483,6 +483,8 @@ void Awb::prepare(IPAContext &context, ipu3_uapi_params *params) params->use.acc_ccm = 1; } +REGISTER_IPA_ALGORITHM(Awb, "Awb") + } /* namespace ipa::ipu3::algorithms */ } /* namespace libcamera */ diff --git a/src/ipa/ipu3/algorithms/blc.cpp b/src/ipa/ipu3/algorithms/blc.cpp index 78ab7bff549f..c561aa858b96 100644 --- a/src/ipa/ipu3/algorithms/blc.cpp +++ b/src/ipa/ipu3/algorithms/blc.cpp @@ -62,6 +62,8 @@ void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context, params->use.obgrid_param = 1; } +REGISTER_IPA_ALGORITHM(BlackLevelCorrection, "BlackLevelCorrection") + } /* namespace ipa::ipu3::algorithms */ } /* namespace libcamera */ diff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp index f86e79b24a67..49a5558b6faa 100644 --- a/src/ipa/ipu3/algorithms/tone_mapping.cpp +++ b/src/ipa/ipu3/algorithms/tone_mapping.cpp @@ -105,6 +105,8 @@ void ToneMapping::process(IPAContext &context, [[maybe_unused]] IPAFrameContext context.activeState.toneMapping.gamma = gamma_; } +REGISTER_IPA_ALGORITHM(ToneMapping, "ToneMapping") + } /* namespace ipa::ipu3::algorithms */ } /* namespace libcamera */