From patchwork Fri Aug 8 14:12:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24078 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 40A53BDCC1 for ; Fri, 8 Aug 2025 14:14:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EF90669227; Fri, 8 Aug 2025 16:14:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="XrG2rMgV"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7467269221 for ; Fri, 8 Aug 2025 16:14:03 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:3ea1:35ac:90da:a221]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 822B3208E; Fri, 8 Aug 2025 16:13:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1754662393; bh=kgAL0wYC4ybpEhOj80FIQaZ838qoD/KbaGZkQmdfubY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XrG2rMgVaLo2jx/pNVVnFmCHhe7otZ+jq6jcWJufIA79wIJa07X78b6Bg5C2SeUJS Ku3OIHJpVHijv3UUvP8wqv/nB3BpUja7pInVOwJKN2saUTv0Q/7jcOJ14b1KGKb1WE t5GmrZNKG32zAE7ZunCR0/QEkO5sgkf5PAmCWS/M= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 07/16] libipa: agc_mean_luminance: Configure the exposure mode helpers Date: Fri, 8 Aug 2025 16:12:45 +0200 Message-ID: <20250808141315.413839-8-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250808141315.413839-1-stefan.klug@ideasonboard.com> References: <20250808141315.413839-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 --- 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 ff96a381ffce..58c4dfc9add2 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] lineLength 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 lineLength, + const CameraSensorHelper *sensorHelper) +{ + for (auto &[id, helper] : exposureModeHelpers_) + helper->configure(lineLength, 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..a7c7e006af42 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 lineLength, const CameraSensorHelper *sensorHelper); int parseTuningData(const YamlObject &tuningData); void setExposureCompensation(double gain)