From patchwork Tue Aug 2 10:09:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16897 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 12DECC3275 for ; Tue, 2 Aug 2022 10:10:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 36D8263315; Tue, 2 Aug 2022 12:10:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659435005; bh=AmB1e30hGxPfzVY3M6vh363cczc+bdNJ2fvani0M8Y4=; 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=tBGrgrnrDuO2IofvgK+UA1s587Hm6TYr4a7e+OVupRmbCMl9chhcmnqPRHg7lABDp JF+SU+1QAFed7m8NWDsZIUchw/r4Vz5/wrGnQvrU5bT/P+1V4Nxo40mLJkDUdEs/n/ 9rYpiLt0Rsne7IINk/jzJKbCaQMLRMJXsTWMdp++6iT4Vn7ORVDa4su3qto4lVh9VW o3KaMsbWRIVO0vpybGayGscTDPpchRgr27vtwoalYA0Yx2lsMDikK/HW3MkQvApbZg G+KQP1qi7gAq3YN8umErjqMpEA0/ZnVmuVorW5dCdlYG66TG2cLYN2k/7rm4Zh428k U2azBmxkqdeWA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3FED2603E6 for ; Tue, 2 Aug 2022 12:10:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="I9lPqiVx"; 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 CDC1C25B for ; Tue, 2 Aug 2022 12:10:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1659435004; bh=AmB1e30hGxPfzVY3M6vh363cczc+bdNJ2fvani0M8Y4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=I9lPqiVx+WjcbKd07sH6k+/8hvJ3zI0O5ihFhBS476GU1At51yzIEDmxONIG0PCPO 1aRqe+gV/ApTlF/m6jPPegOoPVBJtWKls2yI0XAKzAgkelq3A2XJpzZ7t5YphZhi10 UEOmk+W3VL288hNpMUL1P0I22qh0Ut/CQWJYPHsY= To: libcamera-devel@lists.libcamera.org Date: Tue, 2 Aug 2022 13:09:54 +0300 Message-Id: <20220802100955.1546-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220802100955.1546-1-laurent.pinchart@ideasonboard.com> References: <20220802100955.1546-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 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 */