From patchwork Fri Jun 5 14:09:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 3949 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E7CB61645 for ; Fri, 5 Jun 2020 16:07:11 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from localhost.localdomain (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id A143120003; Fri, 5 Jun 2020 14:07:10 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 5 Jun 2020 16:09:59 +0200 Message-Id: <20200605141002.49119-6-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200605141002.49119-1-jacopo@jmondi.org> References: <20200605141002.49119-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 5/8] libcamera: properties: Add FrameDurationLimits 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: , X-List-Received-Date: Fri, 05 Jun 2020 14:07:11 -0000 Add a camera property to express the minimum and maximum frame durations. Signed-off-by: Jacopo Mondi --- Cc Naush and Dave as this could potentially conflict with their on-going FPS handling series. Sending it out for discussion. --- src/libcamera/property_ids.yaml | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) -- 2.27.0 diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml index ce627fa042ba..d703ab31eaac 100644 --- a/src/libcamera/property_ids.yaml +++ b/src/libcamera/property_ids.yaml @@ -386,4 +386,51 @@ controls: | | | | +--------------------+ + + - FrameDurationLimits: + type: int32_t + size: [2] + description: | + The camera supported frame durations interval. + + This property reports the camera minimum and maximum frame durations (in + this order) expressed in nanoseconds to report the limits of the + achievable frame rate. + + Camera devices should here report durations calculated by inspecting the + camera sensor supported frame rate interval, and adding to it any + known additional delay caused by the image acquisition process that + incurs in the time between a frame is captured and delivered to + applications. + + The here reported durations represent the time interval that occurs + between the delivery of two consecutive frames for the fastest and + slower streams, without considering additional delays introduced by the + sharing of system resources when multiple streams are captured at the + same time. + + This implies that the minimum reported frame duration, which corresponds + to the highest possible camera frame rate, is calculated without taking + into consideration how multiple streams capture requests sent to + the camera as part of the same capture session might influence the frame + delivery rate by, in example, introducing delays due to the requirement + of time-sharing components part of the image acquisition pipeline. In + example, request containing two scaled-down streams might require + time-sharing the single scaler available in the system, introducing an + additional delay that prevents the camera to deliver frames at the + here reported rate. + + In the same way, the maximum frame duration, which corresponds to the + lowest possible frame rate, does not take into consideration additional + processing delays introduced by image encoding and processing that + happens sporadically, in example, to produce still images in JPEG + format. + + As a consequence, application should inspect this property to know the + camera capability limits, but should not assume the here reported values + are achievable under all circumstances. + + # \todo Expand to better describe how stalling streams (ie JPEG) impacts + # the frame rate calculation. + ...