From patchwork Mon Jun 17 23:25:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 20351 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 35FB8BD87C for ; Mon, 17 Jun 2024 23:25:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 767BB65498; Tue, 18 Jun 2024 01:25:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GDM6U9pB"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 879FA6548B for ; Tue, 18 Jun 2024 01:25:29 +0200 (CEST) Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 40555DD9; Tue, 18 Jun 2024 01:25:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718666712; bh=R12+deRfTEHoHMFdRNStxNheQe4WfA4EzGBJahshAnc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GDM6U9pBGota1jXYNlnmU7Rz27cWu7fO/ffUBf/I4tUXs7ZXFRdwpbPoWCd522l7m p8vvbBK32bqEtxm9tO2afj8Lea8I///ltNoTQthKwNOSg6PNTJbPP/rMyHNObnBkK8 xoZYeh8o2BJEHBaCOY9mjpxhly95dEBjWMHKPYDc= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH 2/3] ipa: simple: Report the ColourGains in metadata Date: Tue, 18 Jun 2024 00:25:24 +0100 Message-Id: <20240617232525.878530-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240617232525.878530-1-kieran.bingham@ideasonboard.com> References: <20240617232525.878530-1-kieran.bingham@ideasonboard.com> 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" Provide the determined colour gains back into the metadata to add to completed requests. Signed-off-by: Kieran Bingham --- src/ipa/simple/soft_simple.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp index 09c7b575301e..d35d28c26a3b 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -305,6 +305,10 @@ void IPASoftSimple::processStats(const ControlList &sensorControls) params_->blue[i] = gammaTable_[idx]; } + const float maxGain = 1024.0; + const float gains[] = { gainR / maxGain, gainB / maxGain }; + metadata.set(controls::ColourGains, gains); + setIspParams.emit(metadata); /* \todo Switch to the libipa/algorithm.h API someday. */