From patchwork Mon Jun 16 22:15:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 23580 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 1454EC3237 for ; Mon, 16 Jun 2025 22:15:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0CEBF68DCB; Tue, 17 Jun 2025 00:15:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MoLLH83m"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CCE1661548 for ; Tue, 17 Jun 2025 00:15:27 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C45E122A for ; Tue, 17 Jun 2025 00:15:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1750112116; bh=edUcuUXEpMTDOWltcqArEjteoDTSr9+SgCOfVQZElQs=; h=From:To:Subject:Date:From; b=MoLLH83mWCjDoc2507POk2WZo3uyycbk1LRjKamq80Pr+2zFrXaqp+MRL3+iuX9c9 zE91f6pChI4jqOj2pSuv76HKGkNQfrzYJObfx6tzuSpY5ZON/ljG0L/BncUuLeJZIe iR6nsbcNvi+e1CUR2lPtDHNofM271ooM+Dk3mZyg= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH] ipa: rkisp1: Move Sharpness control creation to Filter algorithm Date: Tue, 17 Jun 2025 01:15:11 +0300 Message-ID: <20250616221511.1374-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Sharpness control is used solely by the Filter algorithm. Create it there, to avoid exposing it to applications when the algorithm is disabled. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/ipa/rkisp1/algorithms/filter.cpp | 11 +++++++++++ src/ipa/rkisp1/algorithms/filter.h | 1 + src/ipa/rkisp1/rkisp1.cpp | 1 - 3 files changed, 12 insertions(+), 1 deletion(-) base-commit: b3ff75d7589a263412ad63008b3c8518d40e6316 -- Regards, Laurent Pinchart diff --git a/src/ipa/rkisp1/algorithms/filter.cpp b/src/ipa/rkisp1/algorithms/filter.cpp index 7598ef8a9f47..8ad79801792f 100644 --- a/src/ipa/rkisp1/algorithms/filter.cpp +++ b/src/ipa/rkisp1/algorithms/filter.cpp @@ -39,6 +39,17 @@ LOG_DEFINE_CATEGORY(RkISP1Filter) static constexpr uint32_t kFiltLumWeightDefault = 0x00022040; static constexpr uint32_t kFiltModeDefault = 0x000004f2; +/** + * \copydoc libcamera::ipa::Algorithm::init + */ +int Filter::init(IPAContext &context, + [[maybe_unused]] const YamlObject &tuningData) +{ + auto &cmap = context.ctrlMap; + cmap[&controls::Sharpness] = ControlInfo(0.0f, 10.0f, 1.0f); + + return 0; +} /** * \copydoc libcamera::ipa::Algorithm::queueRequest */ diff --git a/src/ipa/rkisp1/algorithms/filter.h b/src/ipa/rkisp1/algorithms/filter.h index 8f858e574fa2..37d8938d37bd 100644 --- a/src/ipa/rkisp1/algorithms/filter.h +++ b/src/ipa/rkisp1/algorithms/filter.h @@ -21,6 +21,7 @@ public: Filter() = default; ~Filter() = default; + int init(IPAContext &context, const YamlObject &tuningData) override; void queueRequest(IPAContext &context, const uint32_t frame, IPAFrameContext &frameContext, const ControlList &controls) override; diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 1ed7d7d92166..cf66d5553dcd 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -116,7 +116,6 @@ const IPAHwSettings ipaHwSettingsV12{ /* List of controls handled by the RkISP1 IPA */ const ControlInfoMap::Map rkisp1Controls{ { &controls::DebugMetadataEnable, ControlInfo(false, true, false) }, - { &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) }, { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }, };