From patchwork Fri Sep 13 15:47:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 21263 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 F16DBC324C for ; Fri, 13 Sep 2024 15:47:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DF9B9634F5; Fri, 13 Sep 2024 17:47:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Nqs/a9O+"; 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 01F9D634F4 for ; Fri, 13 Sep 2024 17:47:56 +0200 (CEST) Received: from pyrite.hamster-moth.ts.net (213-229-8-243.static.upcbusiness.at [213.229.8.243]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D7334EA5; Fri, 13 Sep 2024 17:46:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1726242398; bh=uxV63thanafJMmplBdAZyxYNV9uTOh6rE6yj9a0T0Y8=; h=From:To:Cc:Subject:Date:From; b=Nqs/a9O+pznm85PPUxJ/3Y3s/sJSerC1HcsWh3anH2jckuqNiosaY/WvPwB5yuv6l UOAPjSiolMRcBLWPxgPcwr1KdCWAWpPE2S81t2CZ5OlyhbGSXhir+D/7JzH9+JAqci mPSNqedYLQX9FzQe0wRX0fvD0jh0DtaMlobDZHBk= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [PATCH] ipa: rkisp1: awb: Declare ControlInfo in AWB Date: Fri, 13 Sep 2024 17:47:40 +0200 Message-Id: <20240913154740.678284-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 --- 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 edd36ef47..13247762f 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -52,6 +52,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); MatrixInterpolator gains; int ret = gains.readYaml(tuningData["gains"], "ct", "gains"); diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 56541190a..a20b83c98 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -116,8 +116,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::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) }, { &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) }, };