From patchwork Thu Aug 27 10:41:00 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: 28111 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 947D3C0F2A for ; Thu, 27 Aug 2026 10:41:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CF85668465; Thu, 27 Aug 2026 12:41:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="lXtCsu4Z"; 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 372F4683A7 for ; Thu, 27 Aug 2026 12:41:11 +0200 (CEST) Received: from pb-laptop.local (185.221.143.32.nat.pool.zt.hu [185.221.143.32]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 75EB1C1 for ; Thu, 27 Aug 2026 12:39:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1787827184; bh=wykQTImCSWjnjnWaYBJlJzWj62UcdidgEqyrgo8ZGlg=; h=From:To:Subject:Date:From; b=lXtCsu4ZZ3DfcUtkIMK0YJOiw50WsHfTnJ8fCCb3RZj8GrfzShi0+G52x7wjfGsG7 FYLq9oGqxiq7bYvEn0la4lFojFZovlJYmbkl3aL1pjyPpf5MiIxGjqxu1KmWfyZcWQ BPCgyGSQldyv/ORVSYoFMldmZ/l4+y3w5gRggGQ4= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1 0/8] ipa: libipa: agc: Take exposure margin into account Date: Thu, 27 Aug 2026 12:41:00 +0200 Message-ID: <20260827104108.1432632-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.55.0 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 maximum available exposure depends on the frame duration, but this is not considered by the current agc implementation, it fixes the maximum exposure time based on whatever configuration was used to configure the algorithm. This means that in certain situations the full exposure range might not be used, even in dark scenes. This a first attempt at adapting https://patchwork.libcamera.org/project/libcamera/list/?series=5590 on the current master branch. But now that the agc handling is largely unified, only fewer changes are needed to make this work on every platform. So effectively only patch 6 is taken directly, but only the exposure margin introduction part of it. This was mainly tested on rkisp1+imx219 and softisp+ov2740. TODO: add the exposure margin to the new camera sensor helpers Barnabás Pőcze (7): ipa: libipa: agc: Keep frame duration limits ordered ipa: libipa: agc: Retrieve `FrameDurationLimits` earlier ipa: libipa: agc: Calculate vblank and frame duration sooner ipa: libipa: agc: Take parameters from active state for calculation libcamera: pipeline: Set vblank on more platforms ipa: libipa: agc: Rework frame duration limit calculation ipa: libipa: agc: Take exposure margin into account Jacopo Mondi (1): ipa: camera_sensor_helper: Introduce exposure margin src/ipa/ipu3/algorithms/agc.cpp | 2 +- src/ipa/ipu3/ipu3.cpp | 3 +- src/ipa/libipa/agc.cpp | 219 +++++++++++-------- src/ipa/libipa/agc.h | 18 +- src/ipa/libipa/camera_sensor_helper.cpp | 59 +++++ src/ipa/libipa/camera_sensor_helper.h | 2 + src/ipa/mali-c55/algorithms/agc.cpp | 2 +- src/ipa/mali-c55/mali-c55.cpp | 3 +- src/ipa/rkisp1/algorithms/agc.cpp | 2 +- src/ipa/rkisp1/rkisp1.cpp | 4 +- src/ipa/softisp/algorithms/agc.cpp | 2 +- src/ipa/softisp/softisp.cpp | 3 +- src/libcamera/pipeline/ipu3/ipu3.cpp | 1 + src/libcamera/pipeline/mali-c55/mali-c55.cpp | 1 + src/libcamera/pipeline/simple/simple.cpp | 1 + 15 files changed, 205 insertions(+), 117 deletions(-) --- 2.55.0