From patchwork Tue Jan 19 15:30:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 10900 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 31759C0F1C for ; Tue, 19 Jan 2021 15:30:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A99456815B; Tue, 19 Jan 2021 16:30:53 +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="VVpGZT6M"; dkim-atps=neutral Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 818DD6814E for ; Tue, 19 Jan 2021 16:30:52 +0100 (CET) Received: by mail-wm1-x336.google.com with SMTP id c127so116322wmf.5 for ; Tue, 19 Jan 2021 07:30:52 -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=HDZCTbJRCBRdw1De4jc2Td6h4U0eYFlyY/7WXINUGog=; b=VVpGZT6M6iTk4R1HyCkHUKz2Tvnhcbzn/PpzGQLqOjnOl1PsRNNaDHmJK7JpBKqvy6 gHerrl14jT+nX2r3qxTN4XqrMNFocVADbtVy+oq73+7bOlE8/R0VwYUnDhD5AQuyNK3M yC1lyg0zK9HRmtxnPLHhJdSxcINs1tg0EpDhvtUYI8haUlXIz7+1JAsOE2lRkGZ0yJoK ZnMfJFeuId4+L9kM9KTb9SjYmCf8Lr4RMIi1nms6TM8A1gyNOOoUDRBPlxlKozSHW1VZ kkEOrBTKkUf6uU7osk0ad7VYxFtGOQAMbP9LFVyqASj6UtxXSqEIRawV4IhNUM95KV5G 9utg== 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=HDZCTbJRCBRdw1De4jc2Td6h4U0eYFlyY/7WXINUGog=; b=l/i354k8jDnrprY8Pfx77XMQRFK/oC6V5pYiguqLw78Mqs142J6a8852ouuEGQe4jN HO9JMDzQlNN7m0qGOxvo5vabIU2fVyOGNy/Qf3sj3QO41XmkGUbaHUPBqv/t+RKqLI6d rNwFx+e4vfsCLDo0FGqvU9hVOd0ZgJPT6eu4ifRdlWR0feau71uXKE+IhWcpIbLTT2BJ 0pJHXyN/Vr+MQLaC8xjDlZKg8DYhXFDF2fAH/3wfrgn1BLbGYWYkn3etFBKk8CpaiKq2 kU4PBvxSSic5gH3LJbnYW3tmgKN+Cz39f9tWIklDdKw8XxyTjMwhdhA/+NUan4+wIvk2 88hQ== X-Gm-Message-State: AOAM5329KmepCyNIyyvEX1kLLQKiJBB0hnfLbQDQPIgBEPtE/yZjBtX0 SfMWltBo0NCjBrOAB4GN2v16BGEv7nQ0Fg== X-Google-Smtp-Source: ABdhPJzMfW4qX3qnbcVKZnncFaiK9dUmvbxDB0y46fE//+X0znkzkv1fTxMQfiXlf0jaHX4fxBd5mA== X-Received: by 2002:a1c:a784:: with SMTP id q126mr197637wme.52.1611070251950; Tue, 19 Jan 2021 07:30:51 -0800 (PST) Received: from naushir-VirtualBox.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id k9sm5373970wma.17.2021.01.19.07.30.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 07:30:51 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Tue, 19 Jan 2021 15:30:45 +0000 Message-Id: <20210119153047.468190-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v12 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: Laurent Pinchart --- src/libcamera/control_ids.yaml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 6d6f0fee508b..36c37161a3d5 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -306,6 +306,42 @@ 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 limits 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. Setting both values to 0 reverts to using the + IPA provided defaults. + + 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. When reported in + metadata, the control expresses the minimum and maximum frame + durations used after being clipped to the sensor provided frame + duration limits. + + \sa AeExposureMode + \sa ExposureTime + + \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). + + \todo Provide an explicit definition of default control values, for + this and all other controls. + size: [2] + # ---------------------------------------------------------------------------- # Draft controls section