Cover Letter Detail
Show a cover letter.
GET /api/covers/24389/?format=api
{ "id": 24389, "url": "https://patchwork.libcamera.org/api/covers/24389/?format=api", "web_url": "https://patchwork.libcamera.org/cover/24389/", "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": "<20250918144333.108695-1-stefan.klug@ideasonboard.com>", "date": "2025-09-18T14:43:09", "name": "[v4,00/19] Implement WDR algorithm", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/cover/24389/mbox/", "series": [ { "id": 5449, "url": "https://patchwork.libcamera.org/api/series/5449/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5449", "date": "2025-09-18T14:43:09", "name": "Implement WDR algorithm", "version": 4, "mbox": "https://patchwork.libcamera.org/series/5449/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/covers/24389/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 9D011C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Sep 2025 14:43:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 82BD56936F;\n\tThu, 18 Sep 2025 16:43:47 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 260F962C3B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Sep 2025 16:43:46 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:ace3:d2c2:5eff:9cc5])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 490EA55A;\n\tThu, 18 Sep 2025 16:42:26 +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=\"o2/rb8QT\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758206546;\n\tbh=EpfHZGZnWSDXfJfwC/KMBlCFTc7HWPavEpaRRRvFATs=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=o2/rb8QTcec3SN5taeKSj3PUWJhvg/V1MuHEWOBykfc2l7D2MPUufl6fHWW+xzemV\n\tOs35hETy2HStBjR2brkcynICDrwimPw1ykIREmtszoybBAJLN1SY40e+b5BFXSl2dE\n\tS4eCbKpWvF3khb6tVxdqSdOTr+Wj1ggpEStc0msY=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v4 00/19] Implement WDR algorithm", "Date": "Thu, 18 Sep 2025 16:43:09 +0200", "Message-ID": "<20250918144333.108695-1-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.48.1", "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\nThis series implements a global tone mapping algorithm for rkisp1. The\ndetails of the algorithms are explained in patch 15/16, so I won't\nrepeat them here.\n\nv1 of the series was here:\nhttps://patchwork.libcamera.org/project/libcamera/list/?series=5122\n\nv2 was here:\nhttps://patchwork.libcamera.org/project/libcamera/list/?series=5364\n\nv3 was here:\nhttps://patchwork.libcamera.org/project/libcamera/list/?series=5382\n\nChanges in v4:\n\nSome smaller fixes from the review. Please see individual patches for\nthe local changelog.\n\nChanges in v3:\n\nI hope I addressed all points from the last review. Some feedback got me\nthinking and that lead to the WDR algorithm being reworked a bit.\nBasically I replaced the former regulation loop + WDR-exposure-value\nwith a additional constraint in the AGC regulation. That allowed me to\nditch the PID controller (for now). I believe the structure is easier\nnow. For that to work I needed a way to add constraints to the AGC at\nruntime. The current implementation is in patch 16. I'm not entirely\nhappy with that due to dynamic allocations in the scope of the frame\ncontext. So maybe we have to come up with a neater way there.\n\nChanges in v2:\n\nCompared to v1 of the series there were quite some changes. The old\nseries contained mitigation for exposure quantization using the AWB\ngains. During my work on HDR stitching support it got clear that we need\nto use the compression curve from the companding block of the imx8mp.\nThat curve can serve as a way better gain than the AWB gains, so I added\na compression algorithm (patches 1-2) which then is used for the\nquantization correction. The quantization correction was generalized to\nsupport exposure and gain quantization effects (patches 3-9). Patch 10\nspilled over from the WDR preparation series and now has a (possibly)\nbetter commit message. The rest is the actual WDR implementation that\nwas mostly there in v1. I fixed a few bugs and included changes from\nreview (thanks Paul). The details are in the individual patches.\n\nBest regards,\nStefan\n\nStefan Klug (19):\n ipa: rkisp1: Add basic compression algorithm\n tuning: rksip1: Add a static Compress entry\n libipa: camera_sensor_helper: Add quantizeGain() function\n libipa: exposure_mode_helper: Take exposure/gain quantization into\n account\n libipa: exposure_mode_helper: Remove double calculation of\n lastStageGain\n libipa: exposure_mode_helper: Remove unnecessary clamp calls\n libipa: agc_mean_luminance: Fix constraint logging\n libipa: agc_mean_luminance: Configure the exposure mode helpers\n libipa: exposure_mode_helper: Calculate quantization gain in\n splitExposure()\n ipa: rkisp1: agc: Add correction for exposure quantization\n pipeline: rkisp1: Add error log when parameter queuing fails\n include: linux: Partially update linux headers from\n v6.16-rc1-310-gd968e50b5c26\n ipa: rkisp1: Switch histogram to RGB combined mode\n pipeline: rkisp1: Query kernel for available params blocks\n libipa: agc_mean_luminance: Introduce effectiveYTarget() accessor\n libipa: agc_mean_luminance: Add support for additional constraints\n rkisp1: agc: Agc add yTarget to frame context\n ipa: rkisp1: Add WDR algorithm\n tuning: rksip1: Add a static WideDynamicRange entry\n\n include/libcamera/ipa/rkisp1.mojom | 2 +-\n include/linux/rkisp1-config.h | 108 ++++-\n include/linux/v4l2-controls.h | 6 +\n src/ipa/ipu3/algorithms/agc.cpp | 6 +-\n src/ipa/libipa/agc_mean_luminance.cpp | 59 ++-\n src/ipa/libipa/agc_mean_luminance.h | 8 +-\n src/ipa/libipa/camera_sensor_helper.cpp | 23 ++\n src/ipa/libipa/camera_sensor_helper.h | 1 +\n src/ipa/libipa/exposure_mode_helper.cpp | 108 +++--\n src/ipa/libipa/exposure_mode_helper.h | 12 +-\n src/ipa/mali-c55/algorithms/agc.cpp | 7 +-\n src/ipa/rkisp1/algorithms/agc.cpp | 85 +++-\n src/ipa/rkisp1/algorithms/blc.cpp | 4 +-\n src/ipa/rkisp1/algorithms/compress.cpp | 102 +++++\n src/ipa/rkisp1/algorithms/compress.h | 30 ++\n src/ipa/rkisp1/algorithms/goc.cpp | 4 +-\n src/ipa/rkisp1/algorithms/lux.cpp | 2 +-\n src/ipa/rkisp1/algorithms/meson.build | 2 +\n src/ipa/rkisp1/algorithms/wdr.cpp | 493 +++++++++++++++++++++++\n src/ipa/rkisp1/algorithms/wdr.h | 58 +++\n src/ipa/rkisp1/ipa_context.cpp | 19 +\n src/ipa/rkisp1/ipa_context.h | 32 +-\n src/ipa/rkisp1/params.cpp | 1 +\n src/ipa/rkisp1/params.h | 2 +\n src/ipa/rkisp1/rkisp1.cpp | 12 +-\n src/libcamera/control_ids_draft.yaml | 62 +++\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 38 +-\n utils/tuning/rkisp1.py | 8 +-\n 28 files changed, 1210 insertions(+), 84 deletions(-)\n create mode 100644 src/ipa/rkisp1/algorithms/compress.cpp\n create mode 100644 src/ipa/rkisp1/algorithms/compress.h\n create mode 100644 src/ipa/rkisp1/algorithms/wdr.cpp\n create mode 100644 src/ipa/rkisp1/algorithms/wdr.h" }