Patch Detail
Show a patch.
GET /api/patches/12383/?format=api
{ "id": 12383, "url": "https://patchwork.libcamera.org/api/patches/12383/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12383/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210524094123.1187354-1-paul.elder@ideasonboard.com>", "date": "2021-05-24T09:41:21", "name": "[libcamera-devel,v2,1/3] controls: Split FrameDurations into FrameDuration and FrameDurationLimits", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "a7eede726dbd61bf3c955d1e5d0ee79e630485f5", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12383/mbox/", "series": [ { "id": 2054, "url": "https://patchwork.libcamera.org/api/series/2054/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2054", "date": "2021-05-24T09:41:21", "name": "[libcamera-devel,v2,1/3] controls: Split FrameDurations into FrameDuration and FrameDurationLimits", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2054/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12383/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12383/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3E3C7C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 May 2021 09:41:46 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6DD6C68919;\n\tMon, 24 May 2021 11:41:45 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2EAD3602B1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 May 2021 11:41:44 +0200 (CEST)", "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B66501315;\n\tMon, 24 May 2021 11:41:42 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"LP6elPQa\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621849303;\n\tbh=GE4lpxILJTxBXAw4pQM2MuTHqGglrsjRTfDYsfUgAvU=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=LP6elPQad5lpzjZys21DOWssIaj9FMxRUOOX5yy3xzX3ZRAk4rnj+w0JKy7ZtjJTk\n\tr3TCX7nUQ5aVWMDQj9sHKgah/25ByfKDgFP2ELLGt+FWMzndzBiHM5EqVobLcya+lL\n\tWDLTFBuMzlAYHVSIoXsoY0QnsQf1l5F/DuMBROuQ=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 24 May 2021 18:41:21 +0900", "Message-Id": "<20210524094123.1187354-1-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 1/3] controls: Split FrameDurations\n\tinto FrameDuration and FrameDurationLimits", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "We need a separate control to report the nominal frame duration, but\nit's also useful to report the min/max frame duration values that will\nbe used. Split the FrameDurations control into FrameDuration and\nFrameDurationLimits respectively to support both of these.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/ipa/raspberrypi.h | 2 +-\n src/android/camera_device.cpp | 2 +-\n src/ipa/raspberrypi/raspberrypi.cpp | 4 ++--\n src/libcamera/control_ids.yaml | 8 +++++++-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 6 +++---\n 5 files changed, 14 insertions(+), 8 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\nindex d10c1733..a8790000 100644\n--- a/include/libcamera/ipa/raspberrypi.h\n+++ b/include/libcamera/ipa/raspberrypi.h\n@@ -44,7 +44,7 @@ static const ControlInfoMap Controls = {\n \t{ &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n \t{ &controls::ColourCorrectionMatrix, ControlInfo(-16.0f, 16.0f) },\n \t{ &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n-\t{ &controls::FrameDurations, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },\n+\t{ &controls::FrameDurationLimits, ControlInfo(INT64_C(1000), INT64_C(1000000000)) },\n \t{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },\n };\n \ndiff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex b32e8be5..0eea2b95 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -824,7 +824,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \n \tint64_t minFrameDurationNsec = -1;\n \tint64_t maxFrameDurationNsec = -1;\n-\tconst auto frameDurationsInfo = controlsInfo.find(&controls::FrameDurations);\n+\tconst auto frameDurationsInfo = controlsInfo.find(&controls::FrameDurationLimits);\n \tif (frameDurationsInfo != controlsInfo.end()) {\n \t\tminFrameDurationNsec = frameDurationsInfo->second.min().get<int64_t>() * 1000;\n \t\tmaxFrameDurationNsec = frameDurationsInfo->second.max().get<int64_t>() * 1000;\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 52d91db2..79a327e2 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -860,7 +860,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n \t\t\tbreak;\n \t\t}\n \n-\t\tcase controls::FRAME_DURATIONS: {\n+\t\tcase controls::FRAME_DURATION_LIMITS: {\n \t\t\tauto frameDurations = ctrl.second.get<Span<const int64_t>>();\n \t\t\tapplyFrameDurations(frameDurations[0], frameDurations[1]);\n \t\t\tbreak;\n@@ -1075,7 +1075,7 @@ void IPARPi::applyFrameDurations(double minFrameDuration, double maxFrameDuratio\n \tmaxFrameDuration_ = std::max(maxFrameDuration_, minFrameDuration_);\n \n \t/* Return the validated limits via metadata. */\n-\tlibcameraMetadata_.set(controls::FrameDurations,\n+\tlibcameraMetadata_.set(controls::FrameDurationLimits,\n \t\t\t { static_cast<int64_t>(minFrameDuration_),\n \t\t\t\t static_cast<int64_t>(maxFrameDuration_) });\n \ndiff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex 88d81ac4..338fbdc9 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -323,7 +323,13 @@ controls:\n step to respect the received gain factor and shall report\n their total value in the request metadata.\n \n- - FrameDurations:\n+ - FrameDuration:\n+ type: int64_t\n+ description: |\n+ The nominal frame duration from start of frame exposure to start of\n+ next exposure, expressed in microseconds.\n+\n+ - FrameDurationLimits:\n type: int64_t\n description: |\n The minimum and maximum (in that order) frame duration,\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 8ae47c6d..6e17753f 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -980,9 +980,9 @@ int PipelineHandlerIPU3::initControls(IPU3CameraData *data)\n \t\tframeDurations[i] = frameSize / (sensorInfo.pixelRate / 1000000U);\n \t}\n \n-\tcontrols[&controls::FrameDurations] = ControlInfo(frameDurations[0],\n-\t\t\t\t\t\t\t frameDurations[1],\n-\t\t\t\t\t\t\t frameDurations[2]);\n+\tcontrols[&controls::FrameDuration] = ControlInfo(frameDurations[0],\n+\t\t\t\t\t\t\t frameDurations[1],\n+\t\t\t\t\t\t\t frameDurations[2]);\n \n \t/*\n \t * Compute the scaler crop limits.\n", "prefixes": [ "libcamera-devel", "v2", "1/3" ] }