From patchwork Tue Sep 27 02:36:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17440 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 480E1C327E for ; Tue, 27 Sep 2022 02:37:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1089B6236A; Tue, 27 Sep 2022 04:37:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1664246267; bh=lBdRG10Dae6rR63qGMuMOGUHyO2yRK3Bsr7qu44b0aY=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=p0u+T8ikBfL8STqY1kjfwkw7EZAbgbX+iRtavMQARZ6I5S8Kt4DPhHqTzJMy+bfB4 4VMQ4lKdTpC8b9b5+svkh9QEBAmY+i37vqEkMqipR4KZbzt9aYG2xL3nryYPkmZUee dpeKcJbGrL73okXWSolQmi8IGWt7UXDIclAxxmkJhOub/y5kmPxkurvLcSpUfYvOFa yo7NvT5HwxQYr0VCMjCyyTj+CJpRjV5vyLeqjCzawiuSOIgC9umK9Wu3D8fnUrpa9I B6KG4EvfwxroSAWeqkXVBJ3FtcOeD/pnr0wQxUNdsM/672dn05i0b2wOrpfMV2XQL7 fmeeQ4wpci5Sg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0FD94622F1 for ; Tue, 27 Sep 2022 04:37:45 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FRVTpTdK"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 89759E5 for ; Tue, 27 Sep 2022 04:37:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1664246264; bh=lBdRG10Dae6rR63qGMuMOGUHyO2yRK3Bsr7qu44b0aY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FRVTpTdKUsxdjz1gNDvM2k0wyuHAA/B4y5b9ElIPY8Bj+Ltyn4u8wHQdzKItBuMt/ LYt17LbcMruXZGOiLtxEUioqzuSlaXJ9Su/g5xnS4th2C5h4bh39l49qJJZZ7Id1Qv cuB0OAg+AbfPf1lLpFFs8WCFH6Udu83GEYKBZM4g= To: libcamera-devel@lists.libcamera.org Date: Tue, 27 Sep 2022 05:36:38 +0300 Message-Id: <20220927023642.12341-30-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220927023642.12341-1-laurent.pinchart@ideasonboard.com> References: <20220927023642.12341-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 29/33] ipa: rkisp1: awb: Log means, gains and temperature in debug message 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: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Extend the debug message in Awb::process() to log the means and color temperature in addition to the gains. This is useful for debugging the algorithm behaviour. While at it, set the showpoint flag to print a fixed number of digits after the decimal point, making logs more readable. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/ipa/rkisp1/algorithms/awb.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index cde5b981df61..139c8239504f 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -9,6 +9,7 @@ #include #include +#include #include @@ -271,8 +272,12 @@ void Awb::process(IPAContext &context, activeState.awb.gains.automatic.blue = std::clamp(blueGain, 0.0, 1023.0 / 256); activeState.awb.gains.automatic.green = 1.0; - LOG(RkISP1Awb, Debug) << "Gain found for red: " << activeState.awb.gains.automatic.red - << " and for blue: " << activeState.awb.gains.automatic.blue; + LOG(RkISP1Awb, Debug) << std::showpoint + << "Means [" << redMean << ", " << greenMean << ", " << blueMean + << "], gains [" << activeState.awb.gains.automatic.red << ", " + << activeState.awb.gains.automatic.green << ", " + << activeState.awb.gains.automatic.blue << "], temp " + << frameContext.awb.temperatureK << "K"; } REGISTER_IPA_ALGORITHM(Awb, "Awb")