From patchwork Mon Jun 17 23:25:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 20352 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 671D1C3293 for ; Mon, 17 Jun 2024 23:25:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8DFBD65492; Tue, 18 Jun 2024 01:25:37 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="YwnUz4hZ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AF6476548D 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 87918289; 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=k3z1LjbhTNsU24ot7ttzPLAmYANO1cMflxdo1Clym20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YwnUz4hZ8Ga+HBywIWKicBCGjCkvD/ZFftrSA/Tlhr66qzQO5BOcTaFhxv9zmhSqL DjCbnSjOAA7ULMpjWvRsTPUp1i3MK2IhT72mchtPjLl/NksqF4MOVomvyGUstWeKpX dRq4AigAB7csfreIezQjUyGTZN8zcyhEGT067ngs= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH 3/3] ipa: simple: Report black levels in metadata Date: Tue, 18 Jun 2024 00:25:25 +0100 Message-Id: <20240617232525.878530-4-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 black level values in the metadata to add to the 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 d35d28c26a3b..460fb216d49a 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -309,6 +309,10 @@ void IPASoftSimple::processStats(const ControlList &sensorControls) const float gains[] = { gainR / maxGain, gainB / maxGain }; metadata.set(controls::ColourGains, gains); + /* Assign each of the R G G B channels as the same black level. */ + const auto blackLevels = { blackLevel, blackLevel, blackLevel, blackLevel }; + metadata.set(controls::SensorBlackLevels, blackLevels); + setIspParams.emit(metadata); /* \todo Switch to the libipa/algorithm.h API someday. */