From patchwork Mon May 12 23:58:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 23361 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 8C960C3200 for ; Mon, 12 May 2025 23:59:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B5E6C68B40; Tue, 13 May 2025 01:59:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ewRKbVlN"; 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 6A9886175B for ; Tue, 13 May 2025 01:58:59 +0200 (CEST) Received: from pyrite.hamster-moth.ts.net (unknown [IPv6:2a01:cb16:207c:d42d:582a:8fec:5220:cfc6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9F176353; Tue, 13 May 2025 01:58:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1747094324; bh=xZ/sV1t0k+8UR8NfIfPfrKgeTZ1e0Cs+FfJzmbTk03Y=; h=From:To:Cc:Subject:Date:From; b=ewRKbVlN1gX7yIm2ePl3M+tcriJ1z2GB8xEpP4gXUB8OxwzysihUspWzMvOxZ9JqQ 5OWBtfCXav1PM8yWtyDTEoZiw5Jrig3FoAeWPuPdGxwjLT7hzcotwM3tmFzgn18pYj CwrLXmPUcAYtRzUuSkhMu0XbeuIQkN4xqHk8TBQk= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , Kieran Bingham Subject: [PATCH v2] ipa: rkisp1: awb: Declare ControlInfo in AWB Date: Tue, 13 May 2025 01:58:45 +0200 Message-Id: <20250512235845.630232-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 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 ControlInfo information for AwbEnable and ColourGains were declared and exposed in the top-level IPA. These should instead be exposed by the AWB part of the IPA, as it doesn't make sense to support these controls when AWB is disabled, for example. Move the declaration of these controls out of the top-level IPA and into AWB. Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/rkisp1/algorithms/awb.cpp | 2 ++ src/ipa/rkisp1/rkisp1.cpp | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index eafe93081..8991f9cfa 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -90,6 +90,8 @@ int Awb::init(IPAContext &context, const YamlObject &tuningData) cmap[&controls::ColourTemperature] = ControlInfo(kMinColourTemperature, kMaxColourTemperature, kDefaultColourTemperature); + cmap[&controls::AwbEnable] = ControlInfo(false, true); + cmap[&controls::ColourGains] = ControlInfo(0.0f, 3.996f, 1.0f); if (!tuningData.contains("algorithm")) LOG(RkISP1Awb, Info) << "No AWB algorithm specified." diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 70ce0cba2..1ed7d7d92 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -115,8 +115,6 @@ const IPAHwSettings ipaHwSettingsV12{ /* List of controls handled by the RkISP1 IPA */ const ControlInfoMap::Map rkisp1Controls{ - { &controls::AwbEnable, ControlInfo(false, true) }, - { &controls::ColourGains, ControlInfo(0.0f, 3.996f, 1.0f) }, { &controls::DebugMetadataEnable, ControlInfo(false, true, false) }, { &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) }, { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },