From patchwork Fri Sep 19 09:40:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24417 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 772B6C328C for ; Fri, 19 Sep 2025 09:41:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C08716B5B2; Fri, 19 Sep 2025 11:41:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="oQQQBmaE"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 23A166B5A7 for ; Fri, 19 Sep 2025 11:41:17 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:4d54:eab8:98ca:163b]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id EED6C819; Fri, 19 Sep 2025 11:39:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1758274797; bh=0vf3lFwYoPER+hvWa/iUoCJV/5mJeZC6GD89iKVaKnw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oQQQBmaEAK7lNmVbPGkvBIl7CXfVRofSkLXxYleAp5/bHL0TmK8wYxrqnR4DdGQSx jjTk9cJQM4ah7n4eeLAHmDUxrZrOXVX9wTBzMwFlhACSPXKXFtX9Oi/067ZS4TNWnz vt8M6hM98fEx+Pdr7wIAXkWuJrj8w6D9NWc0+iqg= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Daniel Scally , Kieran Bingham , Paul Elder Subject: [PATCH v5 08/19] libipa: agc_mean_luminance: Configure the exposure mode helpers Date: Fri, 19 Sep 2025 11:40:23 +0200 Message-ID: <20250919094041.183031-9-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250919094041.183031-1-stefan.klug@ideasonboard.com> References: <20250919094041.183031-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" Add a function to configure the exposure mode helpers with the line length and sensor helper to take quantization effects into account. Signed-off-by: Stefan Klug Reviewed-by: Daniel Scally Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- Changes in v4: - Fixed wrong variable name in configure() documentation - Collected tags Changes in v3: - Renamed lineLength to lineDuration - Collected tag --- src/ipa/libipa/agc_mean_luminance.cpp | 15 +++++++++++++++ src/ipa/libipa/agc_mean_luminance.h | 1 + 2 files changed, 16 insertions(+) diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp index fce1a5064870..ea4709bf4e49 100644 --- a/src/ipa/libipa/agc_mean_luminance.cpp +++ b/src/ipa/libipa/agc_mean_luminance.cpp @@ -311,6 +311,21 @@ int AgcMeanLuminance::parseExposureModes(const YamlObject &tuningData) return 0; } +/** + * \brief Configure the exposure mode helpers + * \param[in] lineDuration The sensor line length + * \param[in] sensorHelper The sensor helper + * + * This function configures the exposure mode helpers so they can correctly + * take quantization effects into account. + */ +void AgcMeanLuminance::configure(utils::Duration lineDuration, + const CameraSensorHelper *sensorHelper) +{ + for (auto &[id, helper] : exposureModeHelpers_) + helper->configure(lineDuration, sensorHelper); +} + /** * \brief Parse tuning data for AeConstraintMode and AeExposureMode controls * \param[in] tuningData the YamlObject representing the tuning data diff --git a/src/ipa/libipa/agc_mean_luminance.h b/src/ipa/libipa/agc_mean_luminance.h index cad7ef845487..49985481ac51 100644 --- a/src/ipa/libipa/agc_mean_luminance.h +++ b/src/ipa/libipa/agc_mean_luminance.h @@ -42,6 +42,7 @@ public: double yTarget; }; + void configure(utils::Duration lineDuration, const CameraSensorHelper *sensorHelper); int parseTuningData(const YamlObject &tuningData); void setExposureCompensation(double gain)