From patchwork Tue Jul 8 08:49:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 23773 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 8B21BC0DA4 for ; Tue, 8 Jul 2025 08:52:01 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4CF9268EDB; Tue, 8 Jul 2025 10:51:57 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="BZRTnWxe"; dkim-atps=neutral Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 03BC168ECF for ; Tue, 8 Jul 2025 10:51:52 +0200 (CEST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4536c6b2506so533495e9.0 for ; Tue, 08 Jul 2025 01:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1751964711; x=1752569511; 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=mP3dAtSOY17lXEDnIpHG+DfuHaWI4Jfgef3EOZELwok=; b=BZRTnWxeh3HuL81EPtliA0NMwABG8rt8OErqFQ6qE+wyK9XgcCfeW7j5qWCGWql/iM 9SR/B0hn9YJg09IlV2pOpmTMGPlM+lcozCr7ftwt4/xg7nwnYV+8oFKj6oN9sE68t8Yu rxejHJWsbmWCimO6nrdqAmGcvoWNBxfQf5fFY6LlA5U/BOwdpZFGD0R4vQm06PXGXBaq EAKAyQlgvUBd3PfX1UkT9B34zL5QM39CIvrI7+Q7cqGKJhkHcQi6y+Npjkd76ZVIP3ES BGKoJ9TG4SWlzgWLcD2mOxWOjP284209I/YKlIk284g4tyRyCmPZQbgPrGzGFDfzfrLO nudg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751964711; x=1752569511; 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=mP3dAtSOY17lXEDnIpHG+DfuHaWI4Jfgef3EOZELwok=; b=Ma0VLA74vyecJJisRNCEbgYBzXOklNfJbmu0v3grDiytuS+43Bp2DSrhxztwBeASsg yQKvUdV7F4vEwx4kbW5tcd6kmIql7R5aGd/Vw8rZ+Mo/62O8wn7ALW4kXS0A+7nWqOI8 tUUCWhhBJF6CjuaPdM4qacrFgaqgANc5nehZkUW7JEKjr1VFqkBWbMJKmP5mnPkKUvC0 g0eP9BlI2wSygzadtwMdzjSgePYItjMKDhDfVt4aVkTmOJh65PrSquuFMQr53jKVhr7s w+RKCiQvklvG7LFw9TcYDiui+BwwsOEjxpb4TZqvjOv0NCihxcwIlO1t9+tWpguBUZ4L tZUA== X-Gm-Message-State: AOJu0Yx2LsG/IwdAb4da87iduS7KHuOB3T4NBuoXZ7Avp6hJXuMNjoA6 qHH3hlTlDgQFVd9u0o+e2gOy2rxsoqgAeh05GjKqjwif9LrJMOTeXzo51deMI4rPD0a8Egzol8w KjDKR X-Gm-Gg: ASbGnctzgbNqicgn0/ue9DPV22ENHFw6NQP1+fj0AWC24WCTTAVE6KOfCe6iCmd5jIO IEx9sBrdKy4iCC9tSlbCv5qBe2VSOxt/oQkzew6Wci0wfawAaPhKhl3pBlE9W7vRvPbIgUcNy91 ZTVNAn5gqz75FRyzSiFtNywg3eoqRbYJ2mBNV7jR11FICxLmrnZFWOT63YwLeMQsGqJiFYqWPUI w3jkakNg8dQf4MNFpBqcKYonShYKEjkjSyG38bLQTQgtVZLwWxlZ1hK8qX1zVsLQb31Kr4LuTTU R+z+aM9oiPqAxU19FFd8ag+gohVJHdoA7QVesf/sa8YreSEz/ip1N4CBGk4S4j1cOlDxB8g/sec rzmqZ7ZRogQ0= X-Google-Smtp-Source: AGHT+IHYxlI2mQviMmXGEU/jWjM1kqz/pVXDNU5/55/wnhovobpXMffRPumWSvdH0TIutbtjORIc6A== X-Received: by 2002:a05:600c:1d1d:b0:453:7011:fcdb with SMTP id 5b1f17b1804b1-454b35ee163mr54990635e9.1.1751964710965; Tue, 08 Jul 2025 01:51:50 -0700 (PDT) Received: from NAUSH-P-DELL.tail9c427.ts.net ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-454cd4938ffsm15112805e9.21.2025.07.08.01.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jul 2025 01:51:50 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH v1 1/2] libcamera: controls: Remove hypenation in control description text Date: Tue, 8 Jul 2025 09:49:14 +0100 Message-ID: <20250708085147.752248-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250708085147.752248-1-naush@raspberrypi.com> References: <20250708085147.752248-1-naush@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" Remove the hypenation in "micro-seconds" in the description for the ExposureTime control to match the rest of the document. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Kieran Bingham --- src/libcamera/control_ids_core.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index 46f51436c215..566e1533702f 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -212,7 +212,7 @@ controls: description: | Exposure time for the frame applied in the sensor device. - This value is specified in micro-seconds. + This value is specified in microseconds. This control will only take effect if ExposureTimeMode is Manual. If this control is set when ExposureTimeMode is Auto, the value will be From patchwork Tue Jul 8 08:49:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 23774 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 D06A3C0DA4 for ; Tue, 8 Jul 2025 08:52:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D5FC068ED9; Tue, 8 Jul 2025 10:51:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="ScPGHqrH"; 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 6A0A468ED8 for ; Tue, 8 Jul 2025 10:51:52 +0200 (CEST) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3a4eb4dfd8eso651681f8f.2 for ; Tue, 08 Jul 2025 01:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1751964712; x=1752569512; 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=Cwrk/J36Sca+wZPcZjNJQiPdG4DcMzwpKlU4oI1zKXU=; b=ScPGHqrHiuqnPesie2Z4u49NYPOQdFsa5icWkRETbj/n7GZ0qP/KWp/bgIFjWHfgaU DFNXE2SvvOnl6vLWVQUBdPQZZP3Ez+rcD3uUmQg6qUyV6RmkrG8zxIUmNSnfMIj1Eh0v lmz4k8cJ6bcTnpmXtsvVMzrDmxhG9jbtgbFePBpqbZ01QWVG0lhzIRte0ojXxsoNONe9 yWq03zLuf/v4qmEXpF2R4PVRM71ncJAjtvmxJdAzARmCe9uG/jmblxqIuP+3qfhVpjXk IBhK3A59rIirewk9/l6u1Sx1jwe3jNhnL5TkbMmEPVr6GL9wC+/YPYh70P8r1BVz1vdM +l7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751964712; x=1752569512; 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=Cwrk/J36Sca+wZPcZjNJQiPdG4DcMzwpKlU4oI1zKXU=; b=sq0GUliLdLEnjg0mX2Tra5itdI4hINPC0Wy9hy0mu/hkzhxnu/sDUMTzmzMvWaMDpt O7XatslF7XwcojBB0zV8LE7l3XL5iWv5Un70kRghh7WayADcHAgVOtAmIDZH1ut+jpSW 1iqL7aTuSj4FDZPxDzomFWRIJ+dUIvbDJx17qoV0MuJ0h0z8a1OVfagbZT5PuonyDmKu JDrxC3ZpHy/pdjsGDhDHt7ZYgYTWly4uNIaAtNY+nWdZisA++ALqiYFScRpps36+n2BG BgIVZh1HUrip56AuFAqVwdMB9bhOGQ3VG7DUyMKdyr0ZOes56CifBWdzK/ch0yBkRoKr 59LQ== X-Gm-Message-State: AOJu0Yw869xaFuTcieePuZtbvvzapCHWeuQ+dJifuFvqZTQGxJib+zdE 3LQCuth7FNgVR5OQo+G+tRq97zbKdw13RIeHxS8iiMSnpl18f4gTzbwxfI1pF6sn/kgT8uZFhsN fZ4NH X-Gm-Gg: ASbGnctYBpPlndipv77QH19Brs9HXkWxg6O2YorE1DG5Y8yMyXt8jQaHteNiiI2xMvC tiF98kQZfM8NG77lpcy6RLh89S6yELgMXGBq6burO1QxTIHRiWIQozZxPL1tHdkkbWL3HoNzDLk TO7uk9Bg+Mjo9vKNS2uysghBM/jkLrfZA2B5WyfXmGK9bqc/XXi+gWIsx2jt5ArNACitYb6r8xD mzd1D6BsqNKwDiSAZei80VB2QQkH2K1K9xlu9ClWOMWsqrEvcTfdaQQf9L3myQ28PSnQJQB9oUg wUH75IP2tt5mDLzAmJbem2oPZrTYo1uLlOW53605mYS++EqJFEaQekj2x036a7xlct6U1wg+q1M PQzis7JgPniU= X-Google-Smtp-Source: AGHT+IGqdkfUFXV6EAZ2r54LHsw8oM9XpWttqpC8nxJanzeFnk0UBysKPSMJ6zJrZWao/crchDk23g== X-Received: by 2002:a05:600c:a30a:b0:453:bf1:8895 with SMTP id 5b1f17b1804b1-454ccefa197mr6476165e9.5.1751964711519; Tue, 08 Jul 2025 01:51:51 -0700 (PDT) Received: from NAUSH-P-DELL.tail9c427.ts.net ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-454cd4938ffsm15112805e9.21.2025.07.08.01.51.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jul 2025 01:51:51 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH v1 2/2] libcamera: controls: Use nanoseconds units for FrameWallClock Date: Tue, 8 Jul 2025 09:49:15 +0100 Message-ID: <20250708085147.752248-3-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250708085147.752248-1-naush@raspberrypi.com> References: <20250708085147.752248-1-naush@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" Use nanoseconds for the FrameWallClock control to match the units for other timestamp controls, including SensorTimestamp. Update the RPi pipeline handlers to match the new nanoseconds units when converting from SensorTimestamp to FrameWallClock. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Kieran Bingham --- src/libcamera/control_ids_core.yaml | 3 ++- src/libcamera/pipeline/rpi/pisp/pisp.cpp | 2 +- src/libcamera/pipeline/rpi/vc4/vc4.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index 566e1533702f..eec4b4f937ee 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -1274,7 +1274,8 @@ controls: description: | This timestamp corresponds to the same moment in time as the SensorTimestamp, but is represented as a wall clock time as measured by - the CLOCK_REALTIME clock. + the CLOCK_REALTIME clock. Like SensorTimestamp, the timestamp value is + expressed in nanoseconds. Being a wall clock measurement, it can be used to synchronise timing across different devices. diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp index 2df91bacf3be..92b9070c1bc2 100644 --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp @@ -1760,7 +1760,7 @@ void PiSPCameraData::cfeBufferDequeue(FrameBuffer *buffer) */ wallClockRecovery_.addSample(); uint64_t sensorTimestamp = buffer->metadata().timestamp; - uint64_t wallClockTimestamp = wallClockRecovery_.getOutput(sensorTimestamp / 1000); + uint64_t wallClockTimestamp = wallClockRecovery_.getOutput(sensorTimestamp); ctrl.set(controls::SensorTimestamp, sensorTimestamp); ctrl.set(controls::FrameWallClock, wallClockTimestamp); diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp index e99a7edf809c..5cadef52712f 100644 --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp @@ -778,7 +778,7 @@ void Vc4CameraData::unicamBufferDequeue(FrameBuffer *buffer) */ wallClockRecovery_.addSample(); uint64_t sensorTimestamp = buffer->metadata().timestamp; - uint64_t wallClockTimestamp = wallClockRecovery_.getOutput(sensorTimestamp / 1000); + uint64_t wallClockTimestamp = wallClockRecovery_.getOutput(sensorTimestamp); ctrl.set(controls::SensorTimestamp, sensorTimestamp); ctrl.set(controls::FrameWallClock, wallClockTimestamp);