From patchwork Fri Feb 21 09:20:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 22814 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 68690BDCC1 for ; Fri, 21 Feb 2025 09:21:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 61FCC686A4; Fri, 21 Feb 2025 10:21:06 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="H9v2tdTQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 90D0C6185B for ; Fri, 21 Feb 2025 10:21:04 +0100 (CET) Received: from neptunite.hamster-moth.ts.net (unknown [IPv6:2404:7a81:160:2100:d97a:61eb:567:25d8]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C2ECC89A; Fri, 21 Feb 2025 10:19:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740129580; bh=dfak1shL4T8GhRBZKEwch1fizI3jirfGzNlJ7afD4Oo=; h=From:To:Cc:Subject:Date:From; b=H9v2tdTQ+Nfwbm0OMGQmGVudNLTC/udyMnYDpnxF18kbRj/5SYaI/EZJP3iaxgGMw xkv5OzCZ6E8jMXZR0UolgtkxdY8oZ9rVRyIEixdV9Esjpf0BJuoPeUWzL+a1Of+4/E AQmWYSOZTyaWsTe0y/LufkxomoWveCgSl49Hbeig= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , isaac.scott@ideasonboard.com Subject: [PATCH v2 0/3] ipa: rkisp1: Honor FrameDurationLimits Date: Fri, 21 Feb 2025 18:20:42 +0900 Message-Id: <20250221092045.3896021-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 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. This series 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. 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. v2 notably also fixes honoring FrameDurationLimits for raw streams, which v1 didn't support. v2 also fixes bitrot :) 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 | 77 +++++++++++++++++------- src/ipa/rkisp1/algorithms/agc.h | 3 + src/ipa/rkisp1/ipa_context.cpp | 16 ++++- src/ipa/rkisp1/ipa_context.h | 4 ++ src/ipa/rkisp1/rkisp1.cpp | 8 ++- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 1 + 6 files changed, 84 insertions(+), 25 deletions(-)