Show a cover letter.

GET /api/covers/24439/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 24439,
    "url": "https://patchwork.libcamera.org/api/covers/24439/?format=api",
    "web_url": "https://patchwork.libcamera.org/cover/24439/",
    "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": "<20250923190657.21453-1-hansg@kernel.org>",
    "date": "2025-09-23T19:06:52",
    "name": "[0/5] ipa: software_isp: AGC: Fox AGC oscillation bug",
    "submitter": {
        "id": 239,
        "url": "https://patchwork.libcamera.org/api/people/239/?format=api",
        "name": "Hans de Goede",
        "email": "hansg@kernel.org"
    },
    "mbox": "https://patchwork.libcamera.org/cover/24439/mbox/",
    "series": [
        {
            "id": 5455,
            "url": "https://patchwork.libcamera.org/api/series/5455/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5455",
            "date": "2025-09-23T19:06:52",
            "name": "ipa: software_isp: AGC: Fox AGC oscillation bug",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5455/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/covers/24439/comments/",
    "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 11F38BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Sep 2025 19:07:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 580AD6B5FF;\n\tTue, 23 Sep 2025 21:07:05 +0200 (CEST)",
            "from sea.source.kernel.org (sea.source.kernel.org\n\t[IPv6:2600:3c0a:e001:78e:0:1991:8:25])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8CBB36B5A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Sep 2025 21:07:02 +0200 (CEST)",
            "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby sea.source.kernel.org (Postfix) with ESMTP id B49F144130\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Sep 2025 19:07:00 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id AFB1CC4CEF5;\n\tTue, 23 Sep 2025 19:06:59 +0000 (UTC)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=kernel.org header.i=@kernel.org\n\theader.b=\"S2OhudSN\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1758654420;\n\tbh=HnqliwoujGcaYuaSJXBGDv+pr/yNHgJ4qCdL/dh4d3A=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=S2OhudSNeRCV2SXEDh8xg/imsCxL1yjOU4YtwjQPJSR3Qbpoe336E37VGSPQJoP8M\n\tAwcr0ySsxvNSy9Vv3pZfnxrFVlvXWZBC/Iwhr4+P9+R7n5W8uPJP8HGEWT31B4buiS\n\t7AnHtp1byi9gaQwB4DnvrYvW+1uYV/0V0zmzSEV+meGEAUzihvtq1Nt7bcL0OOcVC6\n\t64+IIFkSR5Nvkj3qOvxkxCsWDyfAV/YwcE9WY0ZFjBzQrikpYYqzrRZmvYyQMyM+Lk\n\tkdiZWLMKPambRc61TD+iKOMglCcW1EUS3RkFsjz2Pf6hDigZZHDYK7YXlhGynRtdsI\n\t8w6Qwb/rWs0ig==",
        "From": "Hans de Goede <hansg@kernel.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Hans de Goede <hansg@kernel.org>",
        "Subject": "[PATCH 0/5] ipa: software_isp: AGC: Fox AGC oscillation bug",
        "Date": "Tue, 23 Sep 2025 21:06:52 +0200",
        "Message-ID": "<20250923190657.21453-1-hansg@kernel.org>",
        "X-Mailer": "git-send-email 2.51.0",
        "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": "Hi All,\n\nDue to a combination of not having correct control-delay information for\nvarious sensors as well as the generic nature of the simple-pipeline +\nsoftware-ISP meaning that any pipeline delays are unknown it is impossible\nto get reliable control-delay values.\n\nWrong control-delay values can lead to pretty bad oscilation. An example\noscilation which I observed while debugging this went as follows:\n\n1. gain is set at 910 of 1000 max\n2. a new frame is processed and is found to not be bright enough, gain gets\n   changed to 1000\n3. the gain gets applied 1 frame earlier then expected\n4. a new frame with gain 1000 is processed and is now found to be too bright\n   (gain overshoot), the AGC code starts with the old gain of 910 due to\n   the control-delay issue and decreases this to 820, this gets applied\n   1 frame earlier then expected\n5. a new frame with gain 820 get processed, this frame is not bright\n   enough so the gain gets increased from 1000 to 1000 (clipped at max),\n   this gets applied 1 frame earlier then expected\n6. a new frame with gain 1000 is processed and is now found to be too bright\n   (gain overshoot), the AGC code starts with the old gain of 820 due to\n   the control-delay issue and decreases this to 740, this gets applied\n   1 frame earlier then expected ...\n\nThis repeats over and over increasing the oscilation (by decreasing the low\ngain value)  until the gain bounces between gain-min and gain max leading\nto pretty bad flickering.\n\nThis series fixes this by remembering the last set gain and exposure values\ninstead of using the delayed-ctrls values, combined with skipping a fixed\nnumber of frames after changing values.\n\nThis effectively reverts commit bb1aa92eb9ee (\"libcamera: software_isp:\nInitialize exposure+gain before agc calculations\"). That commit was added\nto fix the initial gain and exposure starting at 0, this series initializes\nthe cached values with the actual sensor values on the first frame to\navoid re-introducing this problem.\n\nThis deviates from how other ISPs do things which is not ideal, but atm\nit is not possible to fix the wrong control-delay values, so this is\nthe best we can do.\n\nRegards,\n\nHans\n\n\nHans de Goede (5):\n  ipa: software_isp: Fix context_.configuration.agc.againMin init\n  ipa: software_isp: AGC: do not lower gain below default gain value\n  ipa: software_isp: AGC: Raise exposure or gain not both at the same\n    time\n  ipa: software_isp: AGC: Only use integers for exposure calculations\n  ipa: software_isp: AGC: Stop using delayed control for previous values\n\n src/ipa/simple/algorithms/agc.cpp | 53 +++++++++++++++++++++----------\n src/ipa/simple/algorithms/agc.h   |  3 +-\n src/ipa/simple/ipa_context.h      |  8 ++++-\n src/ipa/simple/soft_simple.cpp    | 11 +++++--\n 4 files changed, 53 insertions(+), 22 deletions(-)"
}