From patchwork Fri Dec 11 15:45:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 10648 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 9ACF9BD80A for ; Fri, 11 Dec 2020 15:45:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E458C67FA5; Fri, 11 Dec 2020 16:45:32 +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="XIQaKFbj"; dkim-atps=neutral Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 86D3B67F06 for ; Fri, 11 Dec 2020 16:45:30 +0100 (CET) Received: by mail-wr1-x42b.google.com with SMTP id r7so9490929wrc.5 for ; Fri, 11 Dec 2020 07:45:30 -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=gH8HMYcOquTPDuesHKOTcqJ/C07iagYJVPlUMXZ+2JM=; b=XIQaKFbjJervKr5MKTd08z7SEDAvlrU1Jd2iuIvfPwQklcpbjbVb4cxSF2rnL7YHTP APM2TNTF7jFgyqh5wDQaWS0VGYuzS7lu/dc/2J8W9r3mKgDr2zy8/cISCQtxYTJQckAt 6doHIxEZnkJhITsPHiA4xozTnIaPY6mIzIhRQbqoqjMmO/Vu4ycF+Pp56bcLCqKOiwdQ +AhUAxSRfm5URC4KF6rSk/G01Ry1mkV4n2it+SDxDMW+Y8qwQa0mDxOw0P+6wu5JMMu7 Mwk78csnv/VlmXLHaBoRbho8GO3zdjyWhOHSiqt0hT2cvQebLdnpnByM5rTgrwjCW8DA mmXQ== 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=gH8HMYcOquTPDuesHKOTcqJ/C07iagYJVPlUMXZ+2JM=; b=dfgq7HeMKC5rrEAJKjfTLFID37yTrv0AeX+n+B+NIhOH54BDTSOYFQH2Z+qceMicbj M6JpRkwsGYFxDUF3JkYK7F7KuzEu1af2wf0DLn6jys2DzWvX2RJHsvH3HYF5zNGSFJVJ BBkWKdQOI8tHlSBa0v/uGMa8h0vF9t3ZMUUUo/rW92W85HP3xHFHQGtX7JjIS3svLmXL NV1ztv78GvYeFjZZl62qJP6sFugVvpwhP8qgF2ZsiyxxrsS30W9X+/zNLX8GL65eS2Wz CGokB6y5dZo3IA60+djxoLCOO7RSkipcDo8TKKRooTZONuFLgjRNCKpZOLmcW9wzWItr 9kxw== X-Gm-Message-State: AOAM532jTtHzmwSePoKsQz6o9mHKNzHoqn4/1/7ZYmdThoznDVWCQBLn iy6qqOWWEpq5+CiE1f6z2K/c1hyTIf5mNQ== X-Google-Smtp-Source: ABdhPJxXRpTTMpqUWZ75lnIRORAdDQhKaTUPCR2QNME2WZcLVVdOAUa1JDd4Bi/V29VIXJAKaVQNCw== X-Received: by 2002:adf:eac7:: with SMTP id o7mr14865231wrn.23.1607701529768; Fri, 11 Dec 2020 07:45:29 -0800 (PST) Received: from naushir-VirtualBox.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id 89sm16281248wre.51.2020.12.11.07.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 07:45:29 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Dec 2020 15:45:23 +0000 Message-Id: <20201211154525.5141-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v8 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 --- 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..43a7cfb7 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 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 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). + size: [2] + # ---------------------------------------------------------------------------- # Draft controls section