Show a patch.

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

{
    "id": 16394,
    "url": "https://patchwork.libcamera.org/api/patches/16394/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16394/",
    "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": "<20220627162732.33160-14-jacopo@jmondi.org>",
    "date": "2022-06-27T16:27:30",
    "name": "[libcamera-devel,13/15] libcamera: ipu3: ipa: Use an updated lineDuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "0f2dadacacbc2a3f5d4127ad47454c3226d319ae",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16394/mbox/",
    "series": [
        {
            "id": 3224,
            "url": "https://patchwork.libcamera.org/api/series/3224/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3224",
            "date": "2022-06-27T16:27:17",
            "name": "Internal controls, sensor delays and IPA init/configure rework",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3224/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16394/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16394/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 E8455BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jun 2022 16:28:03 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 85E4965648;\n\tMon, 27 Jun 2022 18:28:03 +0200 (CEST)",
            "from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7984265640\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jun 2022 18:27:53 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 9AA8320004;\n\tMon, 27 Jun 2022 16:27:52 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656347283;\n\tbh=FuSvLWC6rEDGiyWw4GH9+mSsVBs1AMYnTSQKdxD+VlI=;\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=prIp1BM5lgzrUZhsYMTK0HWB3eQslrmzMC00t6i+45uLIcTvR7cQoo898orP3TJM1\n\tOxpPKU9yFfYcBk62VJD+t2P72JpVAE54Wahcgb+7MktylnByUTqhekrUKzbK5R4HSQ\n\tqNvxyytkVzNg8yVW/ZxXWb98uBSfYeBvx6usAWTPVxNOUwSZrxj/EZUb2K77s2Gfae\n\tLV0P/sDAK+j45LJ9acVsVHDZRWbsQansVnP/k3fVRCqv3xGdW0LtVQh+cdlmVmxWFv\n\txF9MecBdvOdRN1ECIzPFqp2EgcOeccxydVAUn67WCFZpOuSbur9NuBVOcy5s1Esx4w\n\tZSLC7nPlvzezA==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 27 Jun 2022 18:27:30 +0200",
        "Message-Id": "<20220627162732.33160-14-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.36.1",
        "In-Reply-To": "<20220627162732.33160-1-jacopo@jmondi.org>",
        "References": "<20220627162732.33160-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 13/15] libcamera: ipu3: ipa: Use an\n\tupdated lineDuration",
        "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 3efbc84c4ef1..1f80a10bc48d 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@@ -234,8 +235,7 @@ bool IPAIPU3::validateSensorControls()\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@@ -247,7 +247,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 815530dd640b..44e65d9f2d46 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -1267,12 +1267,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",
        "13/15"
    ]
}