From patchwork Tue Nov 26 12:17:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 22097 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 3B85EC0DA4 for ; Tue, 26 Nov 2024 12:17:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2B6136606B; Tue, 26 Nov 2024 13:17:14 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="lnovhjc/"; 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 D36D165FC2 for ; Tue, 26 Nov 2024 13:17:10 +0100 (CET) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4349e4e252dso20285795e9.0 for ; Tue, 26 Nov 2024 04:17:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1732623430; x=1733228230; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7MekyyvjV9BUA61aYivNYBgsJqgear49qOGSEpffSBw=; b=lnovhjc/4XdtvDdWrmDKDqnYjs8KTn5+dSEG1AtXP/MwArZ+p9eU7vrEKm/Tfdp5JC y0t8asDncDakIySwpTP1iCa0eyfMyH5AfDvPIL4bh9kfKbGn1fHfcrFh8CND0YgeEEWj rvbJM9iCmHJPcU9hZpe1Ram0fnHeQYdXQEr7wlvvJPwx1ApA1qW8dwYZyOt3Pjf45VCw BpJe7fVBfxvMwD1KUcNeidCWsGovC+woOTFK8ckjPE9nf0VrJs8Xr0cccAtIFqciSAJy 2YXdBQg16d7hcFRRGxcm77nf0V+iyOvbxvEZvOw96MES7QW+lmd09eF/ChELTcT1XVjJ k8+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732623430; x=1733228230; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7MekyyvjV9BUA61aYivNYBgsJqgear49qOGSEpffSBw=; b=EJo5Y/nwu9hhrfhnDkMhlsCUedb4LJHqCd3lbtbXXngIx4O1fQeC46bdwXNJnpcYqW n53+VEwcB3xYl3p6q70jJ39lpBrZbiXBG5hbxzXSmY8Ld5KT2MY2qkJ9dcyoheMRBlCP b8FDGhfwWjfuvEL7jwgv4KzgYTlKqxlekqmaDhl8EdP9P3dqK/ZI1NCRtVafugbn6l98 0OeUbSBCUW54Zj6if9o+s7vEC8asyOXdPmaaBxW/4EpswJlf0RBY+VFQVFaGgdIffCwj ZyVIR6fwnZDthzRLfpYobV3aKQR91jwxQyy7rsze7sqkkZtxSR5v2syWuJvqxFyuYG/9 519A== X-Gm-Message-State: AOJu0YwTJ3xElMqN/71oUQ1VZpS0Rg+dMCk3EvJvYEUSU8jzaCbui72P oOC8ugEoc/XTwpSg3bZnDCcKZ36q/1LnHIZ4b0FHh1bOgtxBKuXDS1RHQ1iV+h0FV9TPev6WQzr 2 X-Gm-Gg: ASbGnctYiOFwS4di997FIA5v3LApYvBHbT6OXGhJSf+4v80GTMUKECbpoFSud6vz4XT rbI26+oipnfDsurXuwtzZM6PdZEpA0ULdZXO8rC8FQY/yFY2Z8T7W7hsTH3GRqeLdtdr50Xl2i1 gh5dTYoQmHrv/D6gY58rI8SkJh7/xHidaWxITKS26j/rRG1tY7oz4SLgbFve1Jb4YY1+tlN/o5z jJMYCClYVYSKzxvCfFu/yfHOVctxZ96NMExsU3jAb+tt9NrAhw9i4uXg9JPe9HnrZwLj0TRoVe4 BzIoJA== X-Google-Smtp-Source: AGHT+IE+rr/wBmIH5npheKEyT/l9g+6IsP7kCtrqZsqYaDsj3H6Kip/TBXppd6kIR1yJb3ZQAluHnA== X-Received: by 2002:a05:600c:6a06:b0:434:9fb5:fe04 with SMTP id 5b1f17b1804b1-4349fb5ff09mr52287715e9.28.1732623430029; Tue, 26 Nov 2024 04:17:10 -0800 (PST) Received: from raspberrypi.pitowers.org ([2a00:1098:3142:1f:c68a:6be1:5ba3:eddd]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434a15d86a4sm51070325e9.36.2024.11.26.04.17.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 04:17:09 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman Subject: [RFC PATCH 1/3] controls: Add FrameWallClock and FrameWallClockRaw controls Date: Tue, 26 Nov 2024 12:17:04 +0000 Message-Id: <20241126121706.4350-2-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241126121706.4350-1-david.plowman@raspberrypi.com> References: <20241126121706.4350-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 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" We add FrameWallClockRaw, a direct "raw" measurement of the wall clock timestamp for the frame, and FrameWallClock, for a smoothed (de-jittered) version of the same number. Signed-off-by: David Plowman --- src/libcamera/control_ids_core.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index d34a2d06..7cf0f481 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -973,4 +973,33 @@ controls: description: | Enable or disable the debug metadata. + - FrameWallClockRaw: + type: int64_t + description: | + The time in microseconds since the system clock's epoch. + + This is a direct measurement of the number of microseconds since the + system clock's epoch. Because of the way it is sampled, this value is + likely to be subject to significant amounts of system and system + load-dependent jitter, typically of many milliseconds in duration. + + For a smoothed version of this timestamp, use the FramwWallClock + control. + + \sa FrameWallClock + + The FrameWallClockRaw control can only be returned in metadata. + + - FrameWallClock: + type: int64_t + description: | + The time in microseconds since the system clock's epoch. + + This is a smoothed version of the FrameWallClockRaw timestamp, which + should show much reduced amounts of jitter. + + \sa FrameWallClockRaw + + The FrameWallClock control can only be returned in metadata. + ...