From patchwork Thu Nov 20 13:41:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaac Scott X-Patchwork-Id: 25100 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 B368FC3336 for ; Thu, 20 Nov 2025 13:41:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0B79C60A8B; Thu, 20 Nov 2025 14:41:16 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="EBBqpaQH"; dkim-atps=neutral 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 6F5B26069A for ; Thu, 20 Nov 2025 14:41:14 +0100 (CET) Received: from isaac-ThinkPad-T16-Gen-2.infra.iob (cpc90716-aztw32-2-0-cust408.18-1.cable.virginm.net [86.26.101.153]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8BF669CA; Thu, 20 Nov 2025 14:39:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1763645948; bh=EtEtF4jHaZ8G5dd9YkvK943xM933Xv/bSmhmmcW7XZs=; h=From:To:Cc:Subject:Date:From; b=EBBqpaQH+MHLp5JOU9WvRMRm1TFiU9plBR/kCdgWwYYwYJDUUDMjJ1HQ3GsRXXPyf aAv85+VPGj6LPaz/vHcai+x51aXnYMS+eeINy3+8Ac+9+mCfqpvgeQQciWb7tfLb2O 1TRZytowVLb0mdL0jn2+xRg2KiuNeh4ZR13ujcsc= From: Isaac Scott To: libcamera-devel@lists.libcamera.org Cc: Isaac Scott Subject: [PATCH v2] libipa: module: Allow algorithms to be disabled via the tuning file Date: Thu, 20 Nov 2025 13:41:01 +0000 Message-ID: <20251120134101.72892-1-isaac.scott@ideasonboard.com> X-Mailer: git-send-email 2.43.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" It is beneficial to have the option during development to disable and enable algorithms via the tuning file without having to delete their entries. Add support for an optional "enabled" parameter to accomplish this. Usage example: version: 1 algorithms: - Agc: enabled: true - Awb: enabled: false This will enable AGC, and disable AWB. If the enabled flag is not present, the algorithm will be enabled. Signed-off-by: Isaac Scott --- v1 of this patch can be found here: https://patchwork.libcamera.org/patch/23299/ Changelog: v1 -> v2: - Moved parsing to createAlgorithms() instead of createAlgorithm() - Changed "disabled" flag to "enabled: [boolean]" --- src/ipa/libipa/module.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ipa/libipa/module.h b/src/ipa/libipa/module.h index 0fb51916f..f8c4bb664 100644 --- a/src/ipa/libipa/module.h +++ b/src/ipa/libipa/module.h @@ -55,6 +55,15 @@ public: return -EINVAL; } + if (algo.contains("enabled")) { + if (algo["enabled"].get() == false) { + LOG(IPAModuleAlgo, Debug) + << "Algorithm " << i + << " is disabled via tuning file"; + continue; + } + } + int ret = createAlgorithm(context, algo); if (ret) { algorithms_.clear();