From patchwork Sun Jun 16 16:39:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20330 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 97E10C3237 for ; Sun, 16 Jun 2024 16:39:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5232065497; Sun, 16 Jun 2024 18:39:38 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="cGH7JqIK"; 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 9DDC365490 for ; Sun, 16 Jun 2024 18:39:34 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0FEA6581 for ; Sun, 16 Jun 2024 18:39:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718555958; bh=bKLtOf6T59SA9mfNixAx/+I8pUBY+yw0kkTKyQ+dW4U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cGH7JqIKM9XPLuiJ5kuF7OIFZXEXoknaNBEh2oo0O0hQI09lJZ0HBly+L4YEo2PCY o69gy55UL157XbW4DMEvZa9pJNvw7Fej1uuyTORyEDxp0lNMekgDD4vQ8tif+pOPqj UckWaLaOW1Jf1S05Ab7FZdkHHcvRSQ641UjiDwHY= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 02/12] ipa: libipa: agc_mean_luminance: Fix enumerator names Date: Sun, 16 Jun 2024 19:39:00 +0300 Message-ID: <20240616163910.5506-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240616163910.5506-1-laurent.pinchart@ideasonboard.com> References: <20240616163910.5506-1-laurent.pinchart@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" Enumerators in libcamera start with an upper case letter. Fix the AgcConstraint::Bound enumerators. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder Reviewed-by: Daniel Scally --- src/ipa/libipa/agc_mean_luminance.cpp | 10 +++++----- src/ipa/libipa/agc_mean_luminance.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp index 271b5ae4bc97..f97ef11771c4 100644 --- a/src/ipa/libipa/agc_mean_luminance.cpp +++ b/src/ipa/libipa/agc_mean_luminance.cpp @@ -59,9 +59,9 @@ static constexpr double kDefaultRelativeLuminanceTarget = 0.16; /** * \enum AgcMeanLuminance::AgcConstraint::Bound * \brief Specify whether the constraint defines a lower or upper bound - * \var AgcMeanLuminance::AgcConstraint::lower + * \var AgcMeanLuminance::AgcConstraint::Lower * \brief The constraint defines a lower bound - * \var AgcMeanLuminance::AgcConstraint::upper + * \var AgcMeanLuminance::AgcConstraint::Upper * \brief The constraint defines an upper bound */ @@ -209,7 +209,7 @@ int AgcMeanLuminance::parseConstraintModes(const YamlObject &tuningData) */ if (constraintModes_.empty()) { AgcConstraint constraint = { - AgcConstraint::Bound::lower, + AgcConstraint::Bound::Lower, 0.98, 1.0, 0.5 @@ -467,11 +467,11 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex, double newGain = constraint.yTarget * hist.bins() / hist.interQuantileMean(constraint.qLo, constraint.qHi); - if (constraint.bound == AgcConstraint::Bound::lower && + if (constraint.bound == AgcConstraint::Bound::Lower && newGain > gain) gain = newGain; - if (constraint.bound == AgcConstraint::Bound::upper && + if (constraint.bound == AgcConstraint::Bound::Upper && newGain < gain) gain = newGain; } diff --git a/src/ipa/libipa/agc_mean_luminance.h b/src/ipa/libipa/agc_mean_luminance.h index 0a81c6d285b8..d1bddda5d162 100644 --- a/src/ipa/libipa/agc_mean_luminance.h +++ b/src/ipa/libipa/agc_mean_luminance.h @@ -31,8 +31,8 @@ public: struct AgcConstraint { enum class Bound { - lower = 0, - upper = 1 + Lower = 0, + Upper = 1 }; Bound bound; double qLo;