From patchwork Wed Dec 16 11:22:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 10671 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 24CFAC0F1A for ; Wed, 16 Dec 2020 11:22:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CB95561592; Wed, 16 Dec 2020 12:22:08 +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="IOivdRXh"; dkim-atps=neutral Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 36CD96158A for ; Wed, 16 Dec 2020 12:22:07 +0100 (CET) Received: by mail-wr1-x42f.google.com with SMTP id q18so15295586wrn.1 for ; Wed, 16 Dec 2020 03:22:07 -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=gH8HMYcOquTPDuesHKOTcqJ/C07iagYJVPlUMXZ+2JM=; b=IOivdRXhvi+CfuYbzXoDtzCtn/eEwFUm1ea8BcfaR/UDKkz7/LGsFJ0mjIp3HzXBvC j/2MHMQO7qS3Lk2QLF+J1lDTiz9ollB8eNu8gdqUD0ZesNBgVwgd4GzkTYkC6BIzjRiC sZJnxkbsblpiFZWzFU49A1JggsSH9rPThw3UGZxXJgv0HM03SOSaJTM7FKT6eqN4HuEe EbOTAgn9R5R+i/01PYTylESsu/N9/34C90nl6kxtZ0YcPzQXQOna9ushfNPosaxJjelL 72FwmgRC11LqC/kttjEbAjNj2Hhsu3b2tbstwd7VSnesXms97KLKDeEtOuGZHsLwsP9b uM2Q== 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=gH8HMYcOquTPDuesHKOTcqJ/C07iagYJVPlUMXZ+2JM=; b=k2LZSV41hXpBgih8TK7EaOJMPsT2r6OkJhpBxzEOSOWwBMsFuhHfvaQyJylXUlFxQC mzHKO2XVNbjFX1nkU9DAmRBylJ+MXMkGp6lY6jes0SvStd3GKIzpYo9H4If9ltZYokC+ u3v3XCHH1ob+BG7E5PEFhRLfQhJ2FDVcXWURoawd4TvdsZVbkhBceSnWNarmKTCSvjQu aM1AWY0e8JUOKz2upmHA8/hhCb7cdp2AbDk2KBEUjctk+JS4M5LKPByKMPBMGsKTwCXG l6KDrR0nvNERt/9c4kj51Hl9GvcyrVyBtZWTMz0x6POgdtqtoNYf1sOWY/SMRvsF7xkS G8+g== X-Gm-Message-State: AOAM531Es5M1r4wDYebhA0NeuyRnYR86xfDTuMvRpZv8xyhCoW58VG+n 6ZdJeiweUPR8tVGTvzmCOaZz2KFrvbBQ/g== X-Google-Smtp-Source: ABdhPJw9YzNpIttlUosdOQnIxTlB0Zo2q+3RU4AhUD48JqI8Njt6tVgsN1B/D0N8CzcC/qmLctgOqw== X-Received: by 2002:a5d:6902:: with SMTP id t2mr37733385wru.214.1608117726590; Wed, 16 Dec 2020 03:22:06 -0800 (PST) Received: from naushir-VirtualBox.pitowers.org ([2a00:1098:3142:14:a00:27ff:fe4d:f6a2]) by smtp.gmail.com with ESMTPSA id l8sm2766941wrb.73.2020.12.16.03.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Dec 2020 03:22:05 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Wed, 16 Dec 2020 11:22:00 +0000 Message-Id: <20201216112202.5063-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201216112202.5063-1-naush@raspberrypi.com> References: <20201216112202.5063-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v9 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