From patchwork Fri Aug 15 10:29:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24117 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 90C0CBDCC1 for ; Fri, 15 Aug 2025 10:30:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4A42569267; Fri, 15 Aug 2025 12:30:14 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ekhfKApd"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5FFD06925A for ; Fri, 15 Aug 2025 12:30:13 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:83d1:ae5d:93a6:6837]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 7CBE156D; Fri, 15 Aug 2025 12:29:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1755253758; bh=Ko31T+X17SoBcAz6+/B5dhBV8juu/jmvyP0sWpDiBBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ekhfKApdZoF1Oqd0ZkqBO0u4En4aFgrQr6sodPl+4notkasQAzdY+tqqcDkJm3bzj sjRCB88fyLrWbTgWAaOijvZGXl+bWMvTxYZhHl6Wh5eoEFU8XjEcb9ptKA0PaBHyo0 XdrxLP9IeaxkZ2Poox4G89xbFHwZStyxRidGP8dA= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v3 07/19] libipa: agc_mean_luminance: Fix constraint logging Date: Fri, 15 Aug 2025 12:29:27 +0200 Message-ID: <20250815102945.1602071-8-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250815102945.1602071-1-stefan.klug@ideasonboard.com> References: <20250815102945.1602071-1-stefan.klug@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" The debug log statements in constraintClampGain() are after the assignment of gain. So they correctly log when the constraint applies, but the gain values logged are the same. Fix that. Fixes: 42e18c96bcb7 ("libipa: agc_mean_luminance: Add debug logging") Signed-off-by: Stefan Klug Reviewed-by: Daniel Scally Reviewed-by: Kieran Bingham --- Changes in v3: - Added this patch --- src/ipa/libipa/agc_mean_luminance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp index ff96a381ffce..fce1a5064870 100644 --- a/src/ipa/libipa/agc_mean_luminance.cpp +++ b/src/ipa/libipa/agc_mean_luminance.cpp @@ -488,18 +488,18 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex, if (constraint.bound == AgcConstraint::Bound::Lower && newGain > gain) { - gain = newGain; LOG(AgcMeanLuminance, Debug) << "Apply lower bound: " << gain << " to " << newGain; + gain = newGain; } if (constraint.bound == AgcConstraint::Bound::Upper && newGain < gain) { - gain = newGain; LOG(AgcMeanLuminance, Debug) << "Apply upper bound: " << gain << " to " << newGain; + gain = newGain; } }