Show a patch.

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

{
    "id": 20338,
    "url": "https://patchwork.libcamera.org/api/patches/20338/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20338/",
    "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": "<20240616163910.5506-11-laurent.pinchart@ideasonboard.com>",
    "date": "2024-06-16T16:39:08",
    "name": "[10/12] ipa: rkisp1: agc: Rename maxShutterSpeed to maxFrameDuration",
    "commit_ref": "14056bceb536e952f745704a4bc3856bad4686ea",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c872839b0ea2c832dd2975ac80782104e243864a",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20338/mbox/",
    "series": [
        {
            "id": 4400,
            "url": "https://patchwork.libcamera.org/api/series/4400/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4400",
            "date": "2024-06-16T16:38:58",
            "name": "ipa: rkisp1: Miscellaneous AGC fixes",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4400/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20338/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20338/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 C1C7FC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 16 Jun 2024 16:39:59 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4D293654AE;\n\tSun, 16 Jun 2024 18:39:59 +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 03B4E6549A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 16 Jun 2024 18:39:45 +0200 (CEST)",
            "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 99FE9669\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 16 Jun 2024 18:39:28 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"rTAqpTA0\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718555968;\n\tbh=ec3VZDnl/loOa8Me0JXcaDm2cGq95C0t9RVxYa4T6VA=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=rTAqpTA0a7pINwQaDekaK37SznK56IkN77JZs6L3ihtFCx5hA2deL94KAOyGNxl5p\n\t6RA1ADOlAs/AODrc79dtD7UPMQUvsni4KrHIv6kTJZxZHHcyYOF7hgIAkhjduZvbfY\n\tw8/onGYukbmnRcJ6Q+J2oIgjJmCK7Z5tIGD+jnhk=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Subject": "[PATCH 10/12] ipa: rkisp1: agc: Rename maxShutterSpeed to\n\tmaxFrameDuration",
        "Date": "Sun, 16 Jun 2024 19:39:08 +0300",
        "Message-ID": "<20240616163910.5506-11-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.44.2",
        "In-Reply-To": "<20240616163910.5506-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20240616163910.5506-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "The AGC active state and frame context both contain a variable named\nmaxShutterSpeed. The variable is used to limit the maximum shutter speed\nwhen computing the exposure time and gains, but stores the maximum frame\nduration, not clamped by the sensor's maximum shutter speed. Rename it\nto maxFrameDuration.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/rkisp1/algorithms/agc.cpp | 10 +++++-----\n src/ipa/rkisp1/ipa_context.cpp    |  4 ++--\n src/ipa/rkisp1/ipa_context.h      |  4 ++--\n 3 files changed, 9 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\nindex 6a199b47c9ad..5b917557b887 100644\n--- a/src/ipa/rkisp1/algorithms/agc.cpp\n+++ b/src/ipa/rkisp1/algorithms/agc.cpp\n@@ -182,7 +182,7 @@ int Agc::configure(IPAContext &context, const IPACameraSensorInfo &configInfo)\n \t * except it's computed in the IPA and not here so we'd have to\n \t * recompute it.\n \t */\n-\tcontext.activeState.agc.maxShutterSpeed = context.configuration.sensor.maxShutterSpeed;\n+\tcontext.activeState.agc.maxFrameDuration = context.configuration.sensor.maxShutterSpeed;\n \n \t/*\n \t * Define the measurement window for AGC as a centered rectangle\n@@ -269,11 +269,11 @@ void Agc::queueRequest(IPAContext &context,\n \n \tconst auto &frameDurationLimits = controls.get(controls::FrameDurationLimits);\n \tif (frameDurationLimits) {\n-\t\tutils::Duration maxShutterSpeed =\n+\t\tutils::Duration maxFrameDuration =\n \t\t\tstd::chrono::milliseconds((*frameDurationLimits).back());\n-\t\tagc.maxShutterSpeed = maxShutterSpeed;\n+\t\tagc.maxFrameDuration = maxFrameDuration;\n \t}\n-\tframeContext.agc.maxShutterSpeed = agc.maxShutterSpeed;\n+\tframeContext.agc.maxFrameDuration = agc.maxFrameDuration;\n }\n \n /**\n@@ -421,7 +421,7 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,\n \texpMeans_ = { params->ae.exp_mean, context.hw->numAeCells };\n \n \tutils::Duration maxShutterSpeed = std::min(context.configuration.sensor.maxShutterSpeed,\n-\t\t\t\t\t\t   frameContext.agc.maxShutterSpeed);\n+\t\t\t\t\t\t   frameContext.agc.maxFrameDuration);\n \tsetLimits(context.configuration.sensor.minShutterSpeed,\n \t\t  maxShutterSpeed,\n \t\t  context.configuration.sensor.minAnalogueGain,\ndiff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\nindex 9e445dcca933..ab6cfae17feb 100644\n--- a/src/ipa/rkisp1/ipa_context.cpp\n+++ b/src/ipa/rkisp1/ipa_context.cpp\n@@ -172,7 +172,7 @@ namespace libcamera::ipa::rkisp1 {\n  * \\var IPAActiveState::agc.meteringMode\n  * \\brief Metering mode as set by the AeMeteringMode control\n  *\n- * \\var IPAActiveState::agc.maxShutterSpeed\n+ * \\var IPAActiveState::agc.maxFrameDuration\n  * \\brief Maximum frame duration as set by the FrameDurationLimits control\n  */\n \n@@ -314,7 +314,7 @@ namespace libcamera::ipa::rkisp1 {\n  * \\var IPAFrameContext::agc.meteringMode\n  * \\brief Metering mode as set by the AeMeteringMode control\n  *\n- * \\var IPAFrameContext::agc.maxShutterSpeed\n+ * \\var IPAFrameContext::agc.maxFrameDuration\n  * \\brief Maximum frame duration as set by the FrameDurationLimits control\n  *\n  * \\var IPAFrameContext::agc.update\ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex 6022480d4fd2..734856cdb199 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -72,7 +72,7 @@ struct IPAActiveState {\n \t\tcontrols::AeConstraintModeEnum constraintMode;\n \t\tcontrols::AeExposureModeEnum exposureMode;\n \t\tcontrols::AeMeteringModeEnum meteringMode;\n-\t\tutils::Duration maxShutterSpeed;\n+\t\tutils::Duration maxFrameDuration;\n \t} agc;\n \n \tstruct {\n@@ -121,7 +121,7 @@ struct IPAFrameContext : public FrameContext {\n \t\tcontrols::AeConstraintModeEnum constraintMode;\n \t\tcontrols::AeExposureModeEnum exposureMode;\n \t\tcontrols::AeMeteringModeEnum meteringMode;\n-\t\tutils::Duration maxShutterSpeed;\n+\t\tutils::Duration maxFrameDuration;\n \t\tbool update;\n \t} agc;\n \n",
    "prefixes": [
        "10/12"
    ]
}