From patchwork Thu Dec 10 16:33:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 10635 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 ED324BD80A for ; Thu, 10 Dec 2020 16:33:42 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7272567F75; Thu, 10 Dec 2020 17:33:42 +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="sINuxwAN"; 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 3B6D367F6E for ; Thu, 10 Dec 2020 17:33:41 +0100 (CET) Received: by mail-wm1-x334.google.com with SMTP id g185so5959090wmf.3 for ; Thu, 10 Dec 2020 08:33:41 -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:mime-version :content-transfer-encoding; bh=eIR3MVGby/dymFl1XAhYVzklHGNpDFvUa4zqKMvXn+k=; b=sINuxwANNjeRgMIxKVQMwwDHZAvAEtRhR7cGvItcrwtNgap41fVzN3sbyBSWvvyUxo oefcEMr2yxX50CGm9zAGDC4L9dMedXLEit1J8GI6UUtYRc1lehhqKEMBGXEZDTGOgLbs 1D5WOGVAharmC86+6mclKyQLmZvLuiL+kDXFTeS/Q63vo9WKNMwkjv/prFwTQ6mNBZq1 D3zxO+DPLCxNC7apphVy5GjSye34nXKMRmRPpFY29uLogaqlgU00JJgDlAibIdLk7gCU F0rLRvrD+lvSbsC5jMfBwQUdkYd5iKFVVsUsbt1Y4vIYToixLkoBm+OSGU5rGmBdITtD 1E5g== 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:mime-version :content-transfer-encoding; bh=eIR3MVGby/dymFl1XAhYVzklHGNpDFvUa4zqKMvXn+k=; b=Sn00cwyOeBbyCikaZKOAM/w8p/G+LIpa0J1D2XiHLGARsDgK3w6xcFmJrRI9e4Ix9o m6enH80e/udVe+gojRe3KfjyqMW2hFDK+v0qm5ZhS7izDa3ZuU7br0MfRis2f7Ey/yyY +XR9TGzM9wJhlQDkgxnWOX2uq8+7XOLk7Ri6s2hCnSd/FmYTjjfuHzWTf/YjS9/W+YUc iob/+5nVeOhpGw9WaJEwmzd34vcZ8GV3JDOOg/0zf9aREff2+45n5T/iOPr5qu2njyTR ML7d2VddCkO8PyWb4oxb23bQ8g6PRfm5MR0/bjdDhXDZELksT5n0X88lsojMVps0nIyy ispA== X-Gm-Message-State: AOAM532o34jJaNWX9VknsSqnHbX3GMhSvDX7w69h8HpwvHsfIxjHU9v/ Oy2BLeUty9BdrTm3+vCENJ3FNRrtwRF1iQ== X-Google-Smtp-Source: ABdhPJwvKq1wgY+DavL4nOi9E5wSd4M0EWyP7vbeSGoCul6OyzmOrkRYEw7QS7cNBQc1dXpW/eLJyw== X-Received: by 2002:a1c:98c7:: with SMTP id a190mr9100581wme.184.1607618020610; Thu, 10 Dec 2020 08:33:40 -0800 (PST) Received: from naushir-VirtualBox.pitowers.org ([2a00:1098:3142:14:a00:27ff:fe4d:f6a2]) by smtp.gmail.com with ESMTPSA id v7sm9589433wma.26.2020.12.10.08.33.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Dec 2020 08:33:39 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Thu, 10 Dec 2020 16:33:35 +0000 Message-Id: <20201210163337.212857-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 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 a float 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 --- src/libcamera/control_ids.yaml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 6d6f0fee..5ee31865 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -306,6 +306,46 @@ 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 times 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. Setting both values to 0 resets the + frame duration to the IPA defaults. + + The maximum frame duration provides the absolute limit to the shutter + speed available to the AE algorithm. This limit also overrides any + limits set by the exposure mode (AeExposureMode). Similarly, a manual + ExposureTime value provided by the application may also be clipped by + this limit. + + \sa AeExposureMode + \sa ExposureTime + + \todo Refer to the frame duration limits property to describe how + application-provided values gets clipped. + + When reported by pipelines, the control expresses the duration of the + sensor frame used to produce streams part of the completed Request. + The minimum and maximum values shall then be the same, as the sensor + frame duration is a fixed parameter. 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). + # ---------------------------------------------------------------------------- # Draft controls section