Show a patch.

GET /api/1.1/patches/12400/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 12400,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/12400/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12400/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20210525091812.1225580-1-paul.elder@ideasonboard.com>",
    "date": "2021-05-25T09:18:10",
    "name": "[libcamera-devel,v3,1/3] controls: Split FrameDurations into FrameDuration and FrameDurationLimits",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5abcfcc363d231278378bf38fc8e54aa64efca2e",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12400/mbox/",
    "series": [
        {
            "id": 2062,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2062/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2062",
            "date": "2021-05-25T09:18:10",
            "name": "[libcamera-devel,v3,1/3] controls: Split FrameDurations into FrameDuration and FrameDurationLimits",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/2062/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12400/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12400/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 4ED95C3202\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 May 2021 09:18:31 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6E9EB68924;\n\tTue, 25 May 2021 11:18:30 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B4C65602AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 May 2021 11:18:28 +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 9610C344;\n\tTue, 25 May 2021 11:18:26 +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=\"vtnB5tPa\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621934308;\n\tbh=LkkMbl2O5JFipHf5/BIrEey7RDVriSz2Ee6zNKngQsg=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=vtnB5tPa0aXQJqQHlxwVRs5Llb8110YqfvqoHDwQLxwkVA/kWacmV3iDAXzZT3xjt\n\t3aGIddSrGCSgg3QWyZ+RzxixjcvQNh5lIc94c/weU2wMhgl+McVQhM84AQyVwvC7W4\n\tTOFH0vOSvrcSP1dg5SvNru9dKw7NEs4JJkQxgQf4=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 25 May 2021 18:18:10 +0900",
        "Message-Id": "<20210525091812.1225580-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 v3 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>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v3:\n- mention that the control is meant to be returned in metadata\n- s/nominal/instantaneous\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       | 9 ++++++++-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 6 +++---\n 5 files changed, 15 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 e5bb8159..0c4752ec 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -859,7 +859,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@@ -1074,7 +1074,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..f62ade48 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -323,7 +323,14 @@ 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 instantaneous frame duration from start of frame exposure to start\n+        of next exposure, expressed in microseconds. This control is meant to\n+        be returned in metadata.\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 25203256..15ba5cf8 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -983,9 +983,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",
        "v3",
        "1/3"
    ]
}