From patchwork Fri Dec 18 10:06:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 10678 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com 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 BD971C0F1A for ; Fri, 18 Dec 2020 10:07:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 766AE61593; Fri, 18 Dec 2020 11:07:02 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="T851rUO2"; dkim-atps=neutral Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 014C361593 for ; Fri, 18 Dec 2020 11:07:00 +0100 (CET) Received: by mail-wm1-x334.google.com with SMTP id k10so1762962wmi.3 for ; Fri, 18 Dec 2020 02:07:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=toNVQHPqikeKHtw7h2O9IrIFWTVBv1gYRnO0mkIhmkI=; b=T851rUO2KEyKQjqzHFtOjycWN2hK6AsAwcIx6JRUomxEDneQ0j/9Rvvj/s+xyHRHBt AAJiWfwJ0Yw1RxC51dtvGY+tXz96DMlz5FuChrwW5WStswiu/MTL4GUlu0fX0FBWBECu e4rGgbWMuXlERP5Ty2CmOQqzcM1hnGgMNZG6GAGHnTkRIugs6rPo3LMr0aik4VpN+zhQ tdkkFKA9qjeZVj6HDwMfSxa5My8D0ad4AfjTDkk1gE8jCp+/6JjmpnBLhjgSCXO8p9s+ 8Oi770goABjH3+CQXHuUBX2lKqhEPYr9KDx5EKFIPDPk4h3+B55QlNj1nIum9sR9i8yC hfIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=toNVQHPqikeKHtw7h2O9IrIFWTVBv1gYRnO0mkIhmkI=; b=suAH5i0YEp6tapWA68vgMqFdUyd3aGE0hUwwSwlTRs6S/OUU11d1iqW+ZwA6lIL0u1 i4hMFlybADuOflI4eg1y4o4N5omUUW79fPcitTgrrGJYK8/9q1Meet/XFriGmAPUDeLm QuIcqmNFi2GKnXt05uaWo+0O2FdOWRlm3m9K3dVdwNlSVsUB9jrKmmnf6T/KrEga+TUq dtKMSXaE6GkGFZnTUOfoNQGDvrFVCg6Ws75UCJcaeOhsos+V8uPRuDj10SkzKwEip9Gn seMvqEv18aQ8tscFUztOhawV/o4m+gkZ5/mOIdJKwne3JPZHGnQ3vQqNZHgsWzeNzWSO 3L0g== X-Gm-Message-State: AOAM533Jjf7hkY9IKpAhE8RAvbnkY7SJmmkLHoO7+QETXYlSeQSoG1EF PdkVmaQQKJKmP3AXfB6BZjZtqbVCa3SoPg== X-Google-Smtp-Source: ABdhPJxXt10EUc//r3RT/SsVg4FT5ogpacwT/BlK79WJDifkZ+xalms015oviK6fcqZPdWR0dI/QCQ== X-Received: by 2002:a05:600c:208:: with SMTP id 8mr3523582wmi.146.1608286019428; Fri, 18 Dec 2020 02:06:59 -0800 (PST) Received: from naushir-VirtualBox.pitowers.org ([2a00:1098:3142:14:a00:27ff:fe4d:f6a2]) by smtp.gmail.com with ESMTPSA id c4sm11836424wmf.19.2020.12.18.02.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Dec 2020 02:06:58 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 18 Dec 2020 10:06:25 +0000 Message-Id: <20201218100626.205134-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201218100626.205134-1-naush@raspberrypi.com> References: <20201218100626.205134-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v10 1/3] libcamera: controls: Add frame duration control 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" Add an int64_t array control (controls::FrameDurations) to specify the minimum and maximum (in that order) frame duration to be used by the camera sensor. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Tested-by: David Plowman Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/libcamera/control_ids.yaml | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 6d6f0fee..a58bff18 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -306,6 +306,47 @@ controls: maximum valid value is given by the properties::ScalerCropMaximum property, and the two can be used to implement digital zoom. + - FrameDurations: + type: int64_t + description: | + The minimum and maximum (in that order) frame duration, + expressed in micro-seconds. + + When provided by applications, the control specifies the sensor frame + duration interval the pipeline has to use. This could also limit the + largest exposure time the sensor can use. For example, if a maximum + frame duration of 33ms is requested (corresponding to 30 frames per + second), the sensor will not be able to raise the exposure time above + 33ms. A fixed frame duration is achieved by setting the minimum and + maximum values to be the same. + + The maximum frame duration provides the absolute limit to the shutter + speed computed by the AE algorithm and it overrides any exposure mode + setting specified with controls::AeExposureMode. Similarly, when a + manual exposure time is set through controls::ExposureTime, it also + gets clipped to the limits set by this control. + + \sa AeExposureMode + \sa ExposureTime + + \todo Refer to the frame duration limits property to describe how + application-provided values gets clipped and reset. + + When reported by pipelines, the control expresses the minimum and + maximum frame durations used after being clipped to what the current + sensor mode supports, and what is achievable based on the exposure + mode setting specified with controls::AeExposureMode or manual + exposure time set through controls::ExposureTime. The sensor frame + duration is one of the parameter that defines the capture frame rate + but it does not alone provide enough information to fully calculate it + as it does not account for pipeline processing delays. + + \todo Define how to calculate the capture frame rate by + defining controls to report additional delays introduced by + the capture pipeline or post-processing stages (ie JPEG + conversion, frame scaling). + size: [2] + # ---------------------------------------------------------------------------- # Draft controls section