Show a patch.

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

{
    "id": 16476,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/16476/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16476/",
    "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": "<20220630133902.321099-19-jacopo@jmondi.org>",
    "date": "2022-06-30T13:38:57",
    "name": "[libcamera-devel,v3,18/23] ipa: ipu3: Use an up to date lineDuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "0f2dadacacbc2a3f5d4127ad47454c3226d319ae",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16476/mbox/",
    "series": [
        {
            "id": 3238,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3238/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3238",
            "date": "2022-06-30T13:38:39",
            "name": "Internal controls, sensor delays and IPA rework",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/3238/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16476/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16476/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 BFB86BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Jun 2022 13:39:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 37DB9656A5;\n\tThu, 30 Jun 2022 15:39:51 +0200 (CEST)",
            "from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A1F5656A5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Jun 2022 15:39:43 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 75DC4240005;\n\tThu, 30 Jun 2022 13:39:41 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656596391;\n\tbh=OV37ZwdCo/y5iOkMfZufy1rAHArxcLauP5pn50vF+QY=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=c/lunPlTt8xmw1tCdTKZNPt8yvnJO4rYcmq5smBy7rV82H3aFkfK6wj8evU27Puqf\n\tTNsKiu+ZDmrVhNZd6b3mtLYdF2vG2nvcKQegc+GpRKhDTJ57aICsQboEUp8PM9kach\n\tsx40sUuKpAso5wyEl/KBe1KpMBJ9L/Imfj8xA1ta0ulGjXV4CyWr5CP8TAPSnVjhQ4\n\t+tcOq/tA5oOSYjOVxr0BsHOh5mUCV9AMSu/1tDsoqjmty4q6vt2BXKcKuSrqxxvnVz\n\tpzsBAKIuhvI4MuuS6EIAHMe+6FsA+rpWEtF9WMuNevyg+kRYmKHlooOhRJq2tVyXAH\n\t5k4bkQYlhLd5w==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 30 Jun 2022 15:38:57 +0200",
        "Message-Id": "<20220630133902.321099-19-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.36.1",
        "In-Reply-To": "<20220630133902.321099-1-jacopo@jmondi.org>",
        "References": "<20220630133902.321099-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 18/23] ipa: ipu3: Use an up to date\n\tlineDuration",
        "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>",
        "From": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo@jmondi.org>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The IPA module computes the lineDuration value in the init() function\nonly, and uses it when processing statistics to recompute the shutter\nduration.\n\nAs the lineDuration varies when a new mode is applied to the sensor,\ncomputing it once at IPA initialization time is not enough.\n\nRe-calculate the line duration value at IPA configure() time to make\nsure the module always uses an updated value.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n include/libcamera/ipa/ipu3.mojom     | 3 +--\n src/ipa/ipu3/ipu3.cpp                | 9 ++++-----\n src/libcamera/pipeline/ipu3/ipu3.cpp | 7 +------\n 3 files changed, 6 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom\nindex 5818cd3a6846..64fe65fdd5fc 100644\n--- a/include/libcamera/ipa/ipu3.mojom\n+++ b/include/libcamera/ipa/ipu3.mojom\n@@ -17,8 +17,7 @@ struct IPAConfigInfo {\n };\n \n interface IPAIPU3Interface {\n-\tinit(libcamera.IPASettings settings,\n-\t     libcamera.IPACameraSensorInfo sensorInfo)\n+\tinit(libcamera.IPASettings settings)\n \t\t=> (int32 ret);\n \tstart() => (int32 ret);\n \tstop();\ndiff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 44a7d13225df..eb97c8be5431 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -132,8 +132,7 @@ namespace ipa::ipu3 {\n class IPAIPU3 : public IPAIPU3Interface\n {\n public:\n-\tint init(const IPASettings &settings,\n-\t\t const IPACameraSensorInfo &sensorInfo) override;\n+\tint init(const IPASettings &settings) override;\n \n \tint start() override;\n \tvoid stop() override;\n@@ -181,6 +180,8 @@ void IPAIPU3::updateSessionConfiguration(const IPAConfigInfo &info)\n {\n \tconst IPACameraSensorInfo &sensorInfo = info.sensorInfo;\n \tcontext_.configuration.sensor.vBlank = sensorInfo.vblank;\n+\tcontext_.configuration.sensor.lineDuration = sensorInfo.lineLength * 1.0s\n+\t\t\t\t\t\t   / sensorInfo.pixelRate;\n \n \tconst ControlInfoMap &sensorControls = info.sensorControls;\n \n@@ -229,8 +230,7 @@ bool IPAIPU3::validateSensorControls(const ControlInfoMap &sensorControls)\n  * handler, computes the limits of the controls it handles and returns\n  * them in the \\a ipaControls output parameter.\n  */\n-int IPAIPU3::init(const IPASettings &settings,\n-\t\t  const IPACameraSensorInfo &sensorInfo)\n+int IPAIPU3::init(const IPASettings &settings)\n {\n \tcamHelper_ = CameraSensorHelperFactory::create(settings.sensorModel);\n \tif (camHelper_ == nullptr) {\n@@ -242,7 +242,6 @@ int IPAIPU3::init(const IPASettings &settings,\n \n \t/* Clean context */\n \tcontext_.configuration = {};\n-\tcontext_.configuration.sensor.lineDuration = sensorInfo.lineLength * 1.0s / sensorInfo.pixelRate;\n \n \t/* Construct our Algorithms */\n \talgorithms_.push_back(std::make_unique<algorithms::Af>());\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex ce207c968075..55b96137f065 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1237,12 +1237,7 @@ int IPU3CameraData::loadIPA()\n \tif (ret)\n \t\treturn ret;\n \n-\tIPACameraSensorInfo sensorInfo{};\n-\tret = sensor->sensorInfo(&sensorInfo);\n-\tif (ret)\n-\t\treturn ret;\n-\n-\tret = ipa_->init(IPASettings{ \"\", sensor->model() }, sensorInfo);\n+\tret = ipa_->init(IPASettings{ \"\", sensor->model() });\n \tif (ret) {\n \t\tLOG(IPU3, Error) << \"Failed to initialise the IPU3 IPA\";\n \t\treturn ret;\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "18/23"
    ]
}