From patchwork Mon Nov 16 17:49:00 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 28918 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 0487CC3304 for ; Mon, 16 Nov 2026 17:49:42 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D84676A85C; Mon, 16 Nov 2026 18:49:33 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sDvurNxO"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BE0E66A851 for ; Mon, 16 Nov 2026 18:49:25 +0100 (CET) Received: from pb-laptop.local (185.221.140.49.nat.pool.zt.hu [185.221.140.49]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 50BFF929; Mon, 16 Nov 2026 18:46:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1794851218; bh=CeRj0042k0gogHjx8dJpuEK+OPXgTngmrKq2+vhNdck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sDvurNxOxoyxyBEsqLHmCgQKjhmzJ9GsaCEjY6c/b/fb5COXA8p5iIOmjRJJEh0tZ ycmXrC5ucaFgf1b8hsw+2+Ds+HZhIsFgFpCkODpAUoeN4rarvqxEYf/cHnIv76qV8M t+Nz4ijjm2JX+0AnpDb6CYSH0oowJgy/qb4hgLpk= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham , Jacopo Mondi Subject: [PATCH v5 04/22] ipa: libipa: awb: Log rgb means immediately Date: Mon, 16 Nov 2026 18:49:00 +0100 Message-ID: <20261116174919.1056403-5-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261116174919.1056403-1-barnabas.pocze@ideasonboard.com> References: <20261116174919.1056403-1-barnabas.pocze@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" Log the rgb means immediately upon entering `process()`, and also log whether it is valid or not. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/ipa/libipa/awb.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index 3b95fecee8..c4153bcf8d 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -367,7 +367,13 @@ void AwbAlgorithmBase::process(awb::ActiveState &state, const AwbStats &stats, unsigned int lux, ControlList &metadata) { - if (!stats.valid()) + const bool valid = stats.valid(); + + LOG(Awb, Debug) << std::showpoint + << "means: " << stats.rgbMeans() + << (!valid ? " (invalid)" : ""); + + if (!valid) return; auto awbResult = impl_->calculateAwb(stats, lux, { currentMode_->ctLo, @@ -394,8 +400,8 @@ void AwbAlgorithmBase::process(awb::ActiveState &state, static_cast(frameContext.gains.b()) }); metadata.set(controls::ColourTemperature, frameContext.colourTemperature); - LOG(Awb, Debug) << std::showpoint << "Means " << stats.rgbMeans() - << ", gains " << state.automatic.gains + LOG(Awb, Debug) << std::showpoint + << "gains " << state.automatic.gains << ", temp " << state.automatic.colourTemperature << "K"; }