From patchwork Mon Oct 14 15:47:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 21620 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 EBFB6C32F4 for ; Mon, 14 Oct 2024 15:47:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E295365380; Mon, 14 Oct 2024 17:47:53 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="t492nNF6"; 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 6AA4F63525 for ; Mon, 14 Oct 2024 17:47:51 +0200 (CEST) Received: from Monstersaurus.lgs-net.com (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 46F098BE; Mon, 14 Oct 2024 17:46:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1728920770; bh=rvFRESRYO9zXAj4VDtSMmzeuQdof242S5gbdBEdOkZc=; h=From:To:Cc:Subject:Date:From; b=t492nNF6moYYQIiy1Fi4TQzxA5L58Uctejc+YL8v06UzCUnJjsCZEx5FYbh/0ax6a BSUzcZqxphUxG5d8qhNgz+1j5Op/wCCtfKUuCnPaNQpAM0NiMnT8+MWrnXQS4KfxOl aWzofpMMzSfQkt4E0q7OjEUp/h4B9OueTuooSacM= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [PATCH 0/3] ipa: rkisp1: Honor FrameDurationLimits Date: Mon, 14 Oct 2024 16:47:44 +0100 Message-Id: <20241014154747.2295253-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 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 RKISP1 will presently only adhere to the 'Maximum' FrameDurationLimit, which describes the 'slowest' frame rate allowed. Pauls' work here in "rkisp1: Honor the FrameDurationLimits control" adds support for ensuring that the 'Minimum' FrameDurationLimit can also be used to specify a limit for the 'fastest' frame rate that is acceptable. This allows for instance setting a camera to operate only between 10FPS or 1FPS with a capture script such as : frames: - 0: FrameDurationLimits: [ 100000, 1000000] which is how I have tested this. I've taken Paul's patch from a separate branch and made some modifications here to support initialising the FrameDurationLimits in the AGC implementation from the ControlInfoMap when constructed or updated. This clears out a todo in the agc.cpp (\o/) and hopefully simplifies the vblank calculation. An extra patch ("ipa: rkisp1: Alias lineDuration") helps make this addition easier to parse with smaller line lengths on the repeated use of the Line Duration calculaion. Kieran Bingham (2): ipa: rkisp1: Initialise AGC from FrameDurationLimits controls ipa: rkisp1: Alias lineDuration Paul Elder (1): rkisp1: Honor the FrameDurationLimits control src/ipa/rkisp1/algorithms/agc.cpp | 68 ++++++++++++++++-------- src/ipa/rkisp1/ipa_context.cpp | 16 +++++- src/ipa/rkisp1/ipa_context.h | 4 ++ src/ipa/rkisp1/rkisp1.cpp | 7 +-- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 7 +++ 5 files changed, 77 insertions(+), 25 deletions(-)