From patchwork Mon Nov 9 16:12:43 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: 28834 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 E3D48C3304 for ; Mon, 9 Nov 2026 16:13:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 304956A7FC; Mon, 9 Nov 2026 17:13:11 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="pgaGlEiC"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 201D56A7E2 for ; Mon, 9 Nov 2026 17:12:54 +0100 (CET) Received: from pb-laptop.local (185.221.143.99.nat.pool.zt.hu [185.221.143.99]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6070E1AED; Mon, 9 Nov 2026 17:10:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1794240632; bh=AA1smewD9kw4DaOElHkHcS4wOm5tW6DrzW6hhlX0+Sc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pgaGlEiCw3AeU7auPHS6PEZPIcQs8g4Wp/x+tSDqSGXvH8WwH+IXan/rVoJ4OCe4v ur3Me+ChQYKgeFMoq2ekcvZnG5cfJ3ts26LUP/3ELcYvQP6RKlgKeUxKpmCOMFVY8t xNtNsfRPcRy40eF8Af0pMhiaXc9EcMbXODt40TKM= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Stefan Klug Subject: [PATCH v8 16/18] ipa: libipa: agc: Do not run faster than 30fps by default Date: Mon, 9 Nov 2026 17:12:43 +0100 Message-ID: <20261109161246.513264-17-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261109161246.513264-1-barnabas.pocze@ideasonboard.com> References: <20261109161246.513264-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" In auto mode, by default the camera should not run faster than 30fps unless the user explicitly adjusts `FrameDurationLimits`. This matches the behaviour of the raspberry pi agc algorithm. Signed-off-by: Barnabás Pőcze Reviewed-by: Jacopo Mondi Reviewed-by: Stefan Klug --- src/ipa/libipa/agc.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ipa/libipa/agc.cpp b/src/ipa/libipa/agc.cpp index 298e403d2d..bed725e185 100644 --- a/src/ipa/libipa/agc.cpp +++ b/src/ipa/libipa/agc.cpp @@ -475,6 +475,13 @@ int AgcAlgorithm::configure(agc::Session &session, agc::ActiveState &state, }, }, impl_); + if (session.autoAllowed) { + /* By default do not run faster than 30fps. */ + state.minFrameDuration = std::clamp( + utils::Duration(1.0s / 30), + session.minFrameDuration, session.maxFrameDuration); + } + /* \todo Move this to the `Camera` class. */ config.ctrlMap[&controls::AeEnable] = ControlInfo{ false, session.autoAllowed, session.autoAllowed