Show a patch.

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

{
    "id": 20041,
    "url": "https://patchwork.libcamera.org/api/patches/20041/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20041/",
    "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": "<20240510100208.12188-7-naush@raspberrypi.com>",
    "date": "2024-05-10T10:02:07",
    "name": "[v3,6/7] ipa: rpi: Add HDR support",
    "commit_ref": "706578ecc803fbffed9eaab60f0d15501281a2b4",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1d90acd971f47cc702ce53e1c28d48f4af8f7545",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20041/mbox/",
    "series": [
        {
            "id": 4305,
            "url": "https://patchwork.libcamera.org/api/series/4305/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4305",
            "date": "2024-05-10T10:02:01",
            "name": "Pre Raspberry Pi 5 support changes",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/4305/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20041/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20041/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 8E378BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 May 2024 10:02:30 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3657763464;\n\tFri, 10 May 2024 12:02:27 +0200 (CEST)",
            "from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com\n\t[IPv6:2a00:1450:4864:20::22d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3041B6343B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 May 2024 12:02:18 +0200 (CEST)",
            "by mail-lj1-x22d.google.com with SMTP id\n\t38308e7fff4ca-2db13ca0363so27235191fa.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 May 2024 03:02:18 -0700 (PDT)",
            "from localhost.localdomain ([188.39.149.98])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-41fccee9318sm57936385e9.30.2024.05.10.03.02.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 10 May 2024 03:02:14 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"cYWOLNMh\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1715335337; x=1715940137;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=3SHpBBIFOPtU6PeCrSN8aipbmdT9TwVSlSg4by6EEaY=;\n\tb=cYWOLNMhRQGy0GdQMbnwa4kJZ4k8sVvP7o7EkqoMa9TOyBOXVrVEwcfvhyqH6iY/YV\n\tUmo4t41WUheXCuBURlEXTNSjZAUiiIaUq4PjMpDiaNCBayP3dcUMgEXAECk/djA2LPte\n\tObTQcE99c7NpMJN91UHIWVLhaEDVRGXcen+F/yYmOeYjvet+uO3ZciTLkkRPY2qIJFoV\n\tMr/ipfM1822XD7KwoeX//bjD3czbTyB+2lMQuiuDG2Mk53NFTKugsN7dd2O4n+TCkc7y\n\tu3OS3zeyrX5aRXTHs8uKpdGB0cLrsrCXIWuWK9cIJswxVXxkIMMBfHLjUe3voy4Vlm3L\n\t2X8w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1715335337; x=1715940137;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=3SHpBBIFOPtU6PeCrSN8aipbmdT9TwVSlSg4by6EEaY=;\n\tb=BzqtHVTEvG7qwCaTB8OMKzJXeakDbXQJBinRFSWI9L/HwgVAAASU+Ur1WWZLt0GTIx\n\tbE2LAjFXv3Kj9E9SsMi0tA1KrV0cUan5L6tLzHMoRCo0ICGw6EEoQJFF23detP1PGw/o\n\tSihR9HKH8LrMSy8sRZeC8GyQTisUhZyeMbkEARdKewI7atNKGtWUCm9Nmao+bDPLUUMa\n\tEZqo/puNwEQLuJtkUS3Nt3tVEaPTxEOSFbvC3AuMqbPKHNKzlMb1JBSssAHN0cS8CfjF\n\t55SNMTqv0C+T4aztVcM3m8wc/RGnY1+Mis0+BaufefXboDla7+woivXNnCO6rFiAsO2U\n\txlCQ==",
        "X-Gm-Message-State": "AOJu0Yz7BvlbASZZ4s33wPm7iwVwjDarg7i3pLSebhvW1e+UjvvL9fx2\n\tpXi6Y7EHxBhee0YzWunlhvrcDIZxBQiJRWAMVfDmRZLptpABVnGjUizLsxZ+30GzbFZgfVy1mA9\n\t7",
        "X-Google-Smtp-Source": "AGHT+IHonBUMyPC6flWwiUABQPYpnpmXAgJNMUwviT6iOBpDjlLsmrma2GDIKwsHhljZACBWtdN+hw==",
        "X-Received": "by 2002:a05:651c:1a21:b0:2e2:64d:6849 with SMTP id\n\t38308e7fff4ca-2e52039dc74mr19025111fa.50.1715335335451; \n\tFri, 10 May 2024 03:02:15 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Subject": "[PATCH v3 6/7] ipa: rpi: Add HDR support",
        "Date": "Fri, 10 May 2024 11:02:07 +0100",
        "Message-Id": "<20240510100208.12188-7-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240510100208.12188-1-naush@raspberrypi.com>",
        "References": "<20240510100208.12188-1-naush@raspberrypi.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": "Add support for the following HDR modes in the Raspberry Pi IPA:\n- Night mode\n- Single exposure mode\n- Multi-exposure (merged and unmerged)\n\nThe algorithm is updated to expect the HDR short channel to meter\nexplicitly for highlights. This means that it will not in general\nunder-expose the short channel more than is actually necessary.\n\nWhen images don't have much saturation, it's good to detect this so\nthat some of the boost we want to apply to the dark areas can be\nimplemented as regular gain. This means we can then adjust the tone\ncurve less, leading to less flat looking images.\n\nThe impact on the HDR algorithm is then that this determines how we\nbuild tonemaps dynamically. The highlights are more-or-less correct\nnow, so we have to build a power-type curve that gives us the\nappropriately configured targets in the lower part of the histogram.\n\nWe allow the tuning file to supply the maximum spatial gain value,\nrather than the whole curve (though it can supply this if it\nwants). Some parameter defaults are tweaked to be generally better\nacross the range of our cameras.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\nAcked-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/ipa/rpi/common/ipa_base.cpp             |  78 ++-\n src/ipa/rpi/common/ipa_base.h               |   7 +\n src/ipa/rpi/controller/rpi/hdr.cpp          | 112 +++-\n src/ipa/rpi/controller/rpi/hdr.h            |  10 +-\n src/ipa/rpi/vc4/data/imx219.json            | 607 ++++++++++---------\n src/ipa/rpi/vc4/data/imx219_noir.json       | 607 ++++++++++---------\n src/ipa/rpi/vc4/data/imx290.json            |  15 +-\n src/ipa/rpi/vc4/data/imx296.json            |  17 +-\n src/ipa/rpi/vc4/data/imx296_mono.json       |  17 +-\n src/ipa/rpi/vc4/data/imx378.json            |  15 +-\n src/ipa/rpi/vc4/data/imx477.json            | 615 ++++++++++----------\n src/ipa/rpi/vc4/data/imx477_noir.json       | 607 ++++++++++---------\n src/ipa/rpi/vc4/data/imx477_scientific.json |  15 +-\n src/ipa/rpi/vc4/data/imx477_v1.json         |  15 +-\n src/ipa/rpi/vc4/data/imx519.json            |  15 +-\n src/ipa/rpi/vc4/data/imx708.json            | 555 +++++++++---------\n src/ipa/rpi/vc4/data/imx708_noir.json       | 555 +++++++++---------\n src/ipa/rpi/vc4/data/imx708_wide.json       | 555 +++++++++---------\n src/ipa/rpi/vc4/data/imx708_wide_noir.json  | 555 +++++++++---------\n src/ipa/rpi/vc4/data/ov5647.json            | 611 +++++++++----------\n src/ipa/rpi/vc4/data/ov5647_noir.json       |  15 +-\n src/ipa/rpi/vc4/data/ov9281_mono.json       |   5 +-\n src/ipa/rpi/vc4/data/se327m12.json          |  15 +-\n src/ipa/rpi/vc4/data/uncalibrated.json      |   5 +-\n 24 files changed, 3040 insertions(+), 2583 deletions(-)",
    "diff": "diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex 31b7985eea0b..61490bd6263e 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -25,7 +25,6 @@\n #include \"controller/contrast_algorithm.h\"\n #include \"controller/denoise_algorithm.h\"\n #include \"controller/hdr_algorithm.h\"\n-#include \"controller/hdr_status.h\"\n #include \"controller/lux_status.h\"\n #include \"controller/sharpen_algorithm.h\"\n #include \"controller/statistics.h\"\n@@ -104,9 +103,8 @@ LOG_DEFINE_CATEGORY(IPARPI)\n namespace ipa::RPi {\n \n IpaBase::IpaBase()\n-\t: controller_(), frameLengths_(FrameLengthsQueueSize, 0s), statsMetadataOutput_(false),\n-\t  frameCount_(0), mistrustCount_(0), lastRunTimestamp_(0), firstStart_(true),\n-\t  flickerState_({ 0, 0s })\n+\t: controller_(), frameLengths_(FrameLengthsQueueSize, 0s), stitchSwapBuffers_(false), frameCount_(0),\n+\t  mistrustCount_(0), lastRunTimestamp_(0), firstStart_(true), flickerState_({ 0, 0s })\n {\n }\n \n@@ -299,6 +297,8 @@ void IpaBase::start(const ControlList &controls, StartResult *result)\n \t\tresult->controls = std::move(ctrls);\n \t\tsetCameraTimeoutValue();\n \t}\n+\t/* Make a note of this as it tells us the HDR status of the first few frames. */\n+\thdrStatus_ = agcStatus.hdr;\n \n \t/*\n \t * Initialise frame counts, and decide how many frames must be hidden or\n@@ -402,11 +402,17 @@ void IpaBase::prepareIsp(const PrepareParams &params)\n \t * sensor exposure/gain changes. So fetch it from the metadata list\n \t * indexed by the IPA cookie returned, and put it in the current frame\n \t * metadata.\n+\t *\n+\t * Note if the HDR mode has changed, as things like tonemaps may need updating.\n \t */\n \tAgcStatus agcStatus;\n+\tbool hdrChange = false;\n \tRPiController::Metadata &delayedMetadata = rpiMetadata_[params.delayContext];\n-\tif (!delayedMetadata.get<AgcStatus>(\"agc.status\", agcStatus))\n+\tif (!delayedMetadata.get<AgcStatus>(\"agc.status\", agcStatus)) {\n \t\trpiMetadata.set(\"agc.delayed_status\", agcStatus);\n+\t\thdrChange = agcStatus.hdr.mode != hdrStatus_.mode;\n+\t\thdrStatus_ = agcStatus.hdr;\n+\t}\n \n \t/*\n \t * This may overwrite the DeviceStatus using values from the sensor\n@@ -417,7 +423,7 @@ void IpaBase::prepareIsp(const PrepareParams &params)\n \t/* Allow a 10% margin on the comparison below. */\n \tDuration delta = (frameTimestamp - lastRunTimestamp_) * 1.0ns;\n \tif (lastRunTimestamp_ && frameCount_ > dropFrameCount_ &&\n-\t    delta < controllerMinFrameDuration * 0.9) {\n+\t    delta < controllerMinFrameDuration * 0.9 && !hdrChange) {\n \t\t/*\n \t\t * Ensure we merge the previous frame's metadata with the current\n \t\t * frame. This will not overwrite exposure/gain values for the\n@@ -454,7 +460,7 @@ void IpaBase::prepareIsp(const PrepareParams &params)\n \t\treportMetadata(ipaContext);\n \n \t/* Ready to push the input buffer into the ISP. */\n-\tprepareIspComplete.emit(params.buffers, false);\n+\tprepareIspComplete.emit(params.buffers, stitchSwapBuffers_);\n }\n \n void IpaBase::processStats(const ProcessParams &params)\n@@ -701,14 +707,18 @@ static const std::map<int32_t, RPiController::AfAlgorithm::AfPause> AfPauseTable\n \n static const std::map<int32_t, std::string> HdrModeTable = {\n \t{ controls::HdrModeOff, \"Off\" },\n+\t{ controls::HdrModeMultiExposureUnmerged, \"MultiExposureUnmerged\" },\n \t{ controls::HdrModeMultiExposure, \"MultiExposure\" },\n \t{ controls::HdrModeSingleExposure, \"SingleExposure\" },\n+\t{ controls::HdrModeNight, \"Night\" },\n };\n \n void IpaBase::applyControls(const ControlList &controls)\n {\n \tusing RPiController::AgcAlgorithm;\n \tusing RPiController::AfAlgorithm;\n+\tusing RPiController::ContrastAlgorithm;\n+\tusing RPiController::DenoiseAlgorithm;\n \tusing RPiController::HdrAlgorithm;\n \n \t/* Clear the return metadata buffer. */\n@@ -1200,9 +1210,32 @@ void IpaBase::applyControls(const ControlList &controls)\n \t\t\t\tbreak;\n \t\t\t}\n \n-\t\t\tif (hdr->setMode(mode->second) == 0)\n+\t\t\tif (hdr->setMode(mode->second) == 0) {\n \t\t\t\tagc->setActiveChannels(hdr->getChannels());\n-\t\t\telse\n+\n+\t\t\t\t/* We also disable adpative contrast enhancement if HDR is running. */\n+\t\t\t\tContrastAlgorithm *contrast =\n+\t\t\t\t\tdynamic_cast<ContrastAlgorithm *>(controller_.getAlgorithm(\"contrast\"));\n+\t\t\t\tif (contrast) {\n+\t\t\t\t\tif (mode->second == \"Off\")\n+\t\t\t\t\t\tcontrast->restoreCe();\n+\t\t\t\t\telse\n+\t\t\t\t\t\tcontrast->enableCe(false);\n+\t\t\t\t}\n+\n+\t\t\t\tDenoiseAlgorithm *denoise =\n+\t\t\t\t\tdynamic_cast<DenoiseAlgorithm *>(controller_.getAlgorithm(\"denoise\"));\n+\t\t\t\tif (denoise) {\n+\t\t\t\t\t/* \\todo - make the HDR mode say what denoise it wants? */\n+\t\t\t\t\tif (mode->second == \"Night\")\n+\t\t\t\t\t\tdenoise->setConfig(\"night\");\n+\t\t\t\t\telse if (mode->second == \"SingleExposure\")\n+\t\t\t\t\t\tdenoise->setConfig(\"hdr\");\n+\t\t\t\t\t/* MultiExposure doesn't need extra extra denoise. */\n+\t\t\t\t\telse\n+\t\t\t\t\t\tdenoise->setConfig(\"normal\");\n+\t\t\t\t}\n+\t\t\t} else\n \t\t\t\tLOG(IPARPI, Warning)\n \t\t\t\t\t<< \"HDR mode \" << mode->second << \" not supported\";\n \n@@ -1360,12 +1393,31 @@ void IpaBase::reportMetadata(unsigned int ipaContext)\n \t\tlibcameraMetadata_.set(controls::AfPauseState, p);\n \t}\n \n-\tconst HdrStatus *hdrStatus = rpiMetadata.getLocked<HdrStatus>(\"hdr.status\");\n-\tif (hdrStatus) {\n-\t\tif (hdrStatus->channel == \"short\")\n+\t/*\n+\t * THe HDR algorithm sets the HDR channel into the agc.status at the time that those\n+\t * AGC parameters were calculated several frames ago, so it comes back to us now in\n+\t * the delayed_status. If this frame is too soon after a mode switch for the\n+\t * delayed_status to be available, we use the HDR status that came out of the\n+\t * switchMode call.\n+\t */\n+\tconst AgcStatus *agcStatus = rpiMetadata.getLocked<AgcStatus>(\"agc.delayed_status\");\n+\tconst HdrStatus &hdrStatus = agcStatus ? agcStatus->hdr : hdrStatus_;\n+\tif (!hdrStatus.mode.empty() && hdrStatus.mode != \"Off\") {\n+\t\tint32_t hdrMode = controls::HdrModeOff;\n+\t\tfor (auto const &[mode, name] : HdrModeTable) {\n+\t\t\tif (hdrStatus.mode == name) {\n+\t\t\t\thdrMode = mode;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t\tlibcameraMetadata_.set(controls::HdrMode, hdrMode);\n+\n+\t\tif (hdrStatus.channel == \"short\")\n \t\t\tlibcameraMetadata_.set(controls::HdrChannel, controls::HdrChannelShort);\n-\t\telse if (hdrStatus->channel == \"long\")\n+\t\telse if (hdrStatus.channel == \"long\")\n \t\t\tlibcameraMetadata_.set(controls::HdrChannel, controls::HdrChannelLong);\n+\t\telse if (hdrStatus.channel == \"medium\")\n+\t\t\tlibcameraMetadata_.set(controls::HdrChannel, controls::HdrChannelMedium);\n \t\telse\n \t\t\tlibcameraMetadata_.set(controls::HdrChannel, controls::HdrChannelNone);\n \t}\ndiff --git a/src/ipa/rpi/common/ipa_base.h b/src/ipa/rpi/common/ipa_base.h\nindex b7637ab1d8ab..074b304e9fd8 100644\n--- a/src/ipa/rpi/common/ipa_base.h\n+++ b/src/ipa/rpi/common/ipa_base.h\n@@ -22,6 +22,7 @@\n #include \"controller/agc_status.h\"\n #include \"controller/camera_mode.h\"\n #include \"controller/controller.h\"\n+#include \"controller/hdr_status.h\"\n #include \"controller/metadata.h\"\n \n namespace libcamera {\n@@ -64,6 +65,12 @@ protected:\n \tControlList libcameraMetadata_;\n \tbool statsMetadataOutput_;\n \n+\t/* Remember the HDR status after a mode switch. */\n+\tHdrStatus hdrStatus_;\n+\n+\t/* Whether the stitch block (if available) needs to swap buffers. */\n+\tbool stitchSwapBuffers_;\n+\n private:\n \t/* Number of metadata objects available in the context list. */\n \tstatic constexpr unsigned int numMetadataContexts = 16;\ndiff --git a/src/ipa/rpi/controller/rpi/hdr.cpp b/src/ipa/rpi/controller/rpi/hdr.cpp\nindex 0019d5084df7..34cf360e9552 100644\n--- a/src/ipa/rpi/controller/rpi/hdr.cpp\n+++ b/src/ipa/rpi/controller/rpi/hdr.cpp\n@@ -7,6 +7,8 @@\n \n #include \"hdr.h\"\n \n+#include <cmath>\n+\n #include <libcamera/base/log.h>\n \n #include \"../agc_status.h\"\n@@ -39,25 +41,52 @@ void HdrConfig::read(const libcamera::YamlObject &params, const std::string &mod\n \t\tchannelMap[v.get<unsigned int>().value()] = k;\n \n \t/* Lens shading related parameters. */\n-\tif (params.contains(\"spatial_gain\")) {\n-\t\tspatialGain.read(params[\"spatial_gain\"]);\n-\t\tdiffusion = params[\"diffusion\"].get<unsigned int>(3);\n-\t\t/* Clip to an arbitrary limit just to stop typos from killing the system! */\n-\t\tconst unsigned int MAX_DIFFUSION = 15;\n-\t\tif (diffusion > MAX_DIFFUSION) {\n-\t\t\tdiffusion = MAX_DIFFUSION;\n-\t\t\tLOG(RPiHdr, Warning) << \"Diffusion value clipped to \" << MAX_DIFFUSION;\n-\t\t}\n+\tif (params.contains(\"spatial_gain_curve\")) {\n+\t\tspatialGainCurve.read(params[\"spatial_gain_curve\"]);\n+\t} else if (params.contains(\"spatial_gain\")) {\n+\t\tdouble spatialGain = params[\"spatial_gain\"].get<double>(2.0);\n+\t\tspatialGainCurve.append(0.0, spatialGain);\n+\t\tspatialGainCurve.append(0.01, spatialGain);\n+\t\tspatialGainCurve.append(0.06, 1.0); /* maybe make this programmable? */\n+\t\tspatialGainCurve.append(1.0, 1.0);\n+\t}\n+\n+\tdiffusion = params[\"diffusion\"].get<unsigned int>(3);\n+\t/* Clip to an arbitrary limit just to stop typos from killing the system! */\n+\tconst unsigned int MAX_DIFFUSION = 15;\n+\tif (diffusion > MAX_DIFFUSION) {\n+\t\tdiffusion = MAX_DIFFUSION;\n+\t\tLOG(RPiHdr, Warning) << \"Diffusion value clipped to \" << MAX_DIFFUSION;\n \t}\n \n \t/* Read any tonemap parameters. */\n \ttonemapEnable = params[\"tonemap_enable\"].get<int>(0);\n-\tdetailConstant = params[\"detail_constant\"].get<uint16_t>(50);\n-\tdetailSlope = params[\"detail_slope\"].get<double>(8.0);\n+\tdetailConstant = params[\"detail_constant\"].get<uint16_t>(0);\n+\tdetailSlope = params[\"detail_slope\"].get<double>(0.0);\n \tiirStrength = params[\"iir_strength\"].get<double>(8.0);\n \tstrength = params[\"strength\"].get<double>(1.5);\n \tif (tonemapEnable)\n \t\ttonemap.read(params[\"tonemap\"]);\n+\tspeed = params[\"speed\"].get<double>(1.0);\n+\tif (params.contains(\"hi_quantile_targets\")) {\n+\t\thiQuantileTargets = params[\"hi_quantile_targets\"].getList<double>().value();\n+\t\tif (hiQuantileTargets.empty() || hiQuantileTargets.size() % 2)\n+\t\t\tLOG(RPiHdr, Fatal) << \"hi_quantile_targets much be even and non-empty\";\n+\t} else\n+\t\thiQuantileTargets = { 0.95, 0.65, 0.5, 0.28, 0.3, 0.25 };\n+\thiQuantileMaxGain = params[\"hi_quantile_max_gain\"].get<double>(1.6);\n+\tif (params.contains(\"quantile_targets\")) {\n+\t\tquantileTargets = params[\"quantile_targets\"].getList<double>().value();\n+\t\tif (quantileTargets.empty() || quantileTargets.size() % 2)\n+\t\t\tLOG(RPiHdr, Fatal) << \"quantile_targets much be even and non-empty\";\n+\t} else\n+\t\tquantileTargets = { 0.2, 0.03, 1.0, 0.15 };\n+\tpowerMin = params[\"power_min\"].get<double>(0.65);\n+\tpowerMax = params[\"power_max\"].get<double>(1.0);\n+\tif (params.contains(\"contrast_adjustments\")) {\n+\t\tcontrastAdjustments = params[\"contrast_adjustments\"].getList<double>().value();\n+\t} else\n+\t\tcontrastAdjustments = { 0.5, 0.75 };\n \n \t/* Read any stitch parameters. */\n \tstitchEnable = params[\"stitch_enable\"].get<int>(0);\n@@ -159,7 +188,7 @@ void Hdr::prepare(Metadata *imageMetadata)\n \t}\n \n \tHdrConfig &config = it->second;\n-\tif (config.spatialGain.empty())\n+\tif (config.spatialGainCurve.empty())\n \t\treturn;\n \n \tAlscStatus alscStatus{}; /* some compilers seem to require the braces */\n@@ -205,10 +234,61 @@ bool Hdr::updateTonemap([[maybe_unused]] StatisticsPtr &stats, HdrConfig &config\n \t\treturn true;\n \n \t/*\n-\t * If we wanted to build or adjust tonemaps dynamically, this would be the place\n-\t * to do it. But for now we seem to be getting by without.\n+\t * Create a tonemap dynamically. We have three ingredients.\n+\t *\n+\t * 1. We have a list of \"hi quantiles\" and \"targets\". We use these to judge if\n+\t * the image does seem to be reasonably saturated. If it isn't, we calculate\n+\t * a gain that we will feed as a linear factor into the tonemap generation.\n+\t * This prevents unsaturated images from beoming quite so \"flat\".\n+\t *\n+\t * 2. We have a list of quantile/target pairs for the bottom of the histogram.\n+\t * We use these to calculate how much gain we must apply to the bottom of the\n+\t * tonemap. We apply this gain as a power curve so as not to blow out the top\n+\t * end.\n+\t *\n+\t * 3. Finally, when we generate the tonemap, we have some contrast adjustments\n+\t * for the bottom because we know that power curves can start quite steeply and\n+\t * cause a washed-out look.\n \t */\n \n+\t/* Compute the linear gain from the headroom for saturation at the top. */\n+\tdouble gain = 10; /* arbitrary, but hiQuantileMaxGain will clamp it later */\n+\tfor (unsigned int i = 0; i < config.hiQuantileTargets.size(); i += 2) {\n+\t\tdouble quantile = config.hiQuantileTargets[i];\n+\t\tdouble target = config.hiQuantileTargets[i + 1];\n+\t\tdouble value = stats->yHist.interQuantileMean(quantile, 1.0) / 1024.0;\n+\t\tdouble newGain = target / (value + 0.01);\n+\t\tgain = std::min(gain, newGain);\n+\t}\n+\tgain = std::clamp(gain, 1.0, config.hiQuantileMaxGain);\n+\n+\t/* Compute the power curve from the amount of gain needed at the bottom. */\n+\tdouble min_power = 2; /* arbitrary, but config.powerMax will clamp it later */\n+\tfor (unsigned int i = 0; i < config.quantileTargets.size(); i += 2) {\n+\t\tdouble quantile = config.quantileTargets[i];\n+\t\tdouble target = config.quantileTargets[i + 1];\n+\t\tdouble value = stats->yHist.interQuantileMean(0, quantile) / 1024.0;\n+\t\tvalue = std::min(value * gain, 1.0);\n+\t\tdouble power = log(target + 1e-6) / log(value + 1e-6);\n+\t\tmin_power = std::min(min_power, power);\n+\t}\n+\tdouble power = std::clamp(min_power, config.powerMin, config.powerMax);\n+\n+\t/* Generate the tonemap, including the contrast adjustment factors. */\n+\tPwl tonemap;\n+\ttonemap.append(0, 0);\n+\tfor (unsigned int i = 0; i <= 6; i++) {\n+\t\tdouble x = 1 << (i + 9); /* x loops from 512 to 32768 inclusive */\n+\t\tdouble y = pow(std::min(x * gain, 65535.0) / 65536.0, power) * 65536;\n+\t\tif (i < config.contrastAdjustments.size())\n+\t\t\ty *= config.contrastAdjustments[i];\n+\t\tif (!tonemap_.empty())\n+\t\t\ty = y * config.speed + tonemap_.eval(x) * (1 - config.speed);\n+\t\ttonemap.append(x, y);\n+\t}\n+\ttonemap.append(65535, 65535);\n+\ttonemap_ = tonemap;\n+\n \treturn true;\n }\n \n@@ -255,7 +335,7 @@ static void averageGains(std::vector<double> &src, std::vector<double> &dst, con\n \n void Hdr::updateGains(StatisticsPtr &stats, HdrConfig &config)\n {\n-\tif (config.spatialGain.empty())\n+\tif (config.spatialGainCurve.empty())\n \t\treturn;\n \n \t/* When alternating exposures, only compute these gains for the short frame. */\n@@ -270,7 +350,7 @@ void Hdr::updateGains(StatisticsPtr &stats, HdrConfig &config)\n \t\tdouble g = region.val.gSum / counted;\n \t\tdouble b = region.val.bSum / counted;\n \t\tdouble brightness = std::max({ r, g, b }) / 65535;\n-\t\tgains_[0][i] = config.spatialGain.eval(brightness);\n+\t\tgains_[0][i] = config.spatialGainCurve.eval(brightness);\n \t}\n \n \t/* Ping-pong between the two gains_ buffers. */\ndiff --git a/src/ipa/rpi/controller/rpi/hdr.h b/src/ipa/rpi/controller/rpi/hdr.h\nindex 44272cb80d93..9b7327f8bb98 100644\n--- a/src/ipa/rpi/controller/rpi/hdr.h\n+++ b/src/ipa/rpi/controller/rpi/hdr.h\n@@ -26,7 +26,7 @@ struct HdrConfig {\n \tstd::map<unsigned int, std::string> channelMap;\n \n \t/* Lens shading related parameters. */\n-\tPwl spatialGain; /* Brightness to gain curve for different image regions. */\n+\tPwl spatialGainCurve; /* Brightness to gain curve for different image regions. */\n \tunsigned int diffusion; /* How much to diffuse the gain spatially. */\n \n \t/* Tonemap related parameters. */\n@@ -36,6 +36,14 @@ struct HdrConfig {\n \tdouble iirStrength;\n \tdouble strength;\n \tPwl tonemap;\n+\t/* These relate to adaptive tonemap calculation. */\n+\tdouble speed;\n+\tstd::vector<double> hiQuantileTargets; /* quantiles to check for unsaturated images */\n+\tdouble hiQuantileMaxGain; /* the max gain we'll apply when unsaturated */\n+\tstd::vector<double> quantileTargets; /* target values for histogram quantiles */\n+\tdouble powerMin; /* minimum tonemap power */\n+\tdouble powerMax; /* maximum tonemap power */\n+\tstd::vector<double> contrastAdjustments; /* any contrast adjustment factors */\n \n \t/* Stitch related parameters. */\n \tbool stitchEnable;\ndiff --git a/src/ipa/rpi/vc4/data/imx219.json b/src/ipa/rpi/vc4/data/imx219.json\nindex 54defc0b8ab8..a020b12f553f 100644\n--- a/src/ipa/rpi/vc4/data/imx219.json\n+++ b/src/ipa/rpi/vc4/data/imx219.json\n@@ -131,282 +131,308 @@\n         {\n             \"rpi.agc\":\n             {\n-\t\t\"channels\":\n-\t\t[\n-\t\t    {\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 0.125,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 1.5,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    }\n-\t\t]\n-\t    }\n+                \"channels\": [\n+                    {\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    },\n+                    {\n+                        \"base_ev\": 0.125,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    },\n+                    {\n+                        \"base_ev\": 1.5,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    }\n+                ]\n+            }\n         },\n         {\n             \"rpi.alsc\":\n@@ -651,20 +677,19 @@\n         {\n             \"rpi.sharpen\": { }\n         },\n-\t{\n-\t    \"rpi.hdr\":\n-\t    {\n-\t\t\"MultiExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1, 2 ],\n-\t\t    \"channel_map\": { \"short\": 1, \"long\": 2 }\n-\t\t},\n-\t\t\"SingleExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1 ],\n-\t\t    \"channel_map\": { \"short\": 1 }\n-\t\t}\n-\t    }\n-\t}\n+        {\n+            \"rpi.hdr\":\n+            {\n+                \"MultiExposureUnmerged\":\n+                {\n+                    \"cadence\": [ 1, 2 ],\n+                    \"channel_map\":\n+                    {\n+                        \"short\": 1,\n+                        \"long\": 2\n+                    }\n+                }\n+            }\n+        }\n     ]\n }\ndiff --git a/src/ipa/rpi/vc4/data/imx219_noir.json b/src/ipa/rpi/vc4/data/imx219_noir.json\nindex e823a90dffa8..d8bc963962a4 100644\n--- a/src/ipa/rpi/vc4/data/imx219_noir.json\n+++ b/src/ipa/rpi/vc4/data/imx219_noir.json\n@@ -47,282 +47,308 @@\n         {\n             \"rpi.agc\":\n             {\n-\t\t\"channels\":\n-\t\t[\n-\t\t    {\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 0.125,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 1.5,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    }\n-\t\t]\n-\t    }\n+                \"channels\": [\n+                    {\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    },\n+                    {\n+                        \"base_ev\": 0.125,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    },\n+                    {\n+                        \"base_ev\": 1.5,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    }\n+                ]\n+            }\n         },\n         {\n             \"rpi.alsc\":\n@@ -585,20 +611,19 @@\n         {\n             \"rpi.sharpen\": { }\n         },\n-\t{\n-\t    \"rpi.hdr\":\n-\t    {\n-\t\t\"MultiExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1, 2 ],\n-\t\t    \"channel_map\": { \"short\": 1, \"long\": 2 }\n-\t\t},\n-\t\t\"SingleExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1 ],\n-\t\t    \"channel_map\": { \"short\": 1 }\n-\t\t}\n-\t    }\n-\t}\n+        {\n+            \"rpi.hdr\":\n+            {\n+                \"MultiExposureUnmerged\":\n+                {\n+                    \"cadence\": [ 1, 2 ],\n+                    \"channel_map\":\n+                    {\n+                        \"short\": 1,\n+                        \"long\": 2\n+                    }\n+                }\n+            }\n+        }\n     ]\n }\ndiff --git a/src/ipa/rpi/vc4/data/imx290.json b/src/ipa/rpi/vc4/data/imx290.json\nindex 8a7cadba38a2..8f41bf519644 100644\n--- a/src/ipa/rpi/vc4/data/imx290.json\n+++ b/src/ipa/rpi/vc4/data/imx290.json\n@@ -52,15 +52,24 @@\n                 {\n                     \"matrix\":\n                     {\n-                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n+                        \"weights\":\n+                        [\n+                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                        ]\n                     },\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"spot\":\n                     {\n-                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\ndiff --git a/src/ipa/rpi/vc4/data/imx296.json b/src/ipa/rpi/vc4/data/imx296.json\nindex 7621f759fc3f..8f24ce5b819a 100644\n--- a/src/ipa/rpi/vc4/data/imx296.json\n+++ b/src/ipa/rpi/vc4/data/imx296.json\n@@ -135,15 +135,24 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"spot\":\n                     {\n-                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"matrix\":\n                     {\n-                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n+                        \"weights\":\n+                        [\n+                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\n@@ -431,4 +440,4 @@\n             }\n         }\n     ]\n-}\n+}\n\\ No newline at end of file\ndiff --git a/src/ipa/rpi/vc4/data/imx296_mono.json b/src/ipa/rpi/vc4/data/imx296_mono.json\nindex d4140c81bf0d..fe331569938e 100644\n--- a/src/ipa/rpi/vc4/data/imx296_mono.json\n+++ b/src/ipa/rpi/vc4/data/imx296_mono.json\n@@ -38,15 +38,24 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"spot\":\n                     {\n-                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"matrix\":\n                     {\n-                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n+                        \"weights\":\n+                        [\n+                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\n@@ -228,4 +237,4 @@\n             }\n         }\n     ]\n-}\n+}\n\\ No newline at end of file\ndiff --git a/src/ipa/rpi/vc4/data/imx378.json b/src/ipa/rpi/vc4/data/imx378.json\nindex f7b68011b634..363b47e19888 100644\n--- a/src/ipa/rpi/vc4/data/imx378.json\n+++ b/src/ipa/rpi/vc4/data/imx378.json\n@@ -133,15 +133,24 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"spot\":\n                     {\n-                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"matrix\":\n                     {\n-                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n+                        \"weights\":\n+                        [\n+                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\ndiff --git a/src/ipa/rpi/vc4/data/imx477.json b/src/ipa/rpi/vc4/data/imx477.json\nindex 853bfa67a9b7..fa25ee86004e 100644\n--- a/src/ipa/rpi/vc4/data/imx477.json\n+++ b/src/ipa/rpi/vc4/data/imx477.json\n@@ -115,16 +115,16 @@\n                 \"ct_curve\":\n                 [\n                     2360.0, 0.6009, 0.3093,\n-                    2848.0, 0.5071, 0.4000,\n+                    2848.0, 0.5071, 0.4,\n                     2903.0, 0.4905, 0.4392,\n                     3628.0, 0.4261, 0.5564,\n                     3643.0, 0.4228, 0.5623,\n-                    4660.0, 0.3529, 0.6800,\n-                    5579.0, 0.3227, 0.7000,\n-                    6125.0, 0.3129, 0.7100,\n-                    6671.0, 0.3065, 0.7200,\n-                    7217.0, 0.3014, 0.7300,\n-                    7763.0, 0.2950, 0.7400,\n+                    4660.0, 0.3529, 0.68,\n+                    5579.0, 0.3227, 0.7,\n+                    6125.0, 0.3129, 0.71,\n+                    6671.0, 0.3065, 0.72,\n+                    7217.0, 0.3014, 0.73,\n+                    7763.0, 0.295, 0.74,\n                     9505.0, 0.2524, 0.7856\n                 ],\n                 \"sensitivity_r\": 1.05,\n@@ -136,282 +136,308 @@\n         {\n             \"rpi.agc\":\n             {\n-\t\t\"channels\":\n-\t\t[\n+                \"channels\": [\n                     {\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    },\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    },\n                     {\n-\t\t\t\"base_ev\": 0.125,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    },\n+                        \"base_ev\": 0.125,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    },\n                     {\n-\t\t\t\"base_ev\": 1.5,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    }\n-\t\t]\n-\t    }\n+                        \"base_ev\": 1.5,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    }\n+                ]\n+            }\n         },\n         {\n             \"rpi.alsc\":\n@@ -656,20 +682,19 @@\n         {\n             \"rpi.sharpen\": { }\n         },\n-\t{\n-\t    \"rpi.hdr\":\n-\t    {\n-\t\t\"MultiExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1, 2 ],\n-\t\t    \"channel_map\": { \"short\": 1, \"long\": 2 }\n-\t\t},\n-\t\t\"SingleExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1 ],\n-\t\t    \"channel_map\": { \"short\": 1 }\n-\t\t}\n-\t    }\n-\t}\n+        {\n+            \"rpi.hdr\":\n+            {\n+                \"MultiExposureUnmerged\":\n+                {\n+                    \"cadence\": [ 1, 2 ],\n+                    \"channel_map\":\n+                    {\n+                        \"short\": 1,\n+                        \"long\": 2\n+                    }\n+                }\n+            }\n+        }\n     ]\n }\n\\ No newline at end of file\ndiff --git a/src/ipa/rpi/vc4/data/imx477_noir.json b/src/ipa/rpi/vc4/data/imx477_noir.json\nindex 143e20bd92d8..472f33fe1556 100644\n--- a/src/ipa/rpi/vc4/data/imx477_noir.json\n+++ b/src/ipa/rpi/vc4/data/imx477_noir.json\n@@ -47,282 +47,308 @@\n         {\n             \"rpi.agc\":\n             {\n-\t\t\"channels\":\n-\t\t[\n-\t\t    {\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 0.125,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 1.5,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.3,\n-\t\t\t\t\t1000, 0.3\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t]\n-\t\t    }\n-\t\t]\n-\t    }\n+                \"channels\": [\n+                    {\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    },\n+                    {\n+                        \"base_ev\": 0.125,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    },\n+                    {\n+                        \"base_ev\": 1.5,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.3,\n+                                        1000, 0.3\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    }\n+                ]\n+            }\n         },\n         {\n             \"rpi.alsc\":\n@@ -612,20 +638,19 @@\n         {\n             \"rpi.sharpen\": { }\n         },\n-\t{\n-\t    \"rpi.hdr\":\n-\t    {\n-\t\t\"MultiExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1, 2 ],\n-\t\t    \"channel_map\": { \"short\": 1, \"long\": 2 }\n-\t\t},\n-\t\t\"SingleExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1 ],\n-\t\t    \"channel_map\": { \"short\": 1 }\n-\t\t}\n-\t    }\n-\t}\n+        {\n+            \"rpi.hdr\":\n+            {\n+                \"MultiExposureUnmerged\":\n+                {\n+                    \"cadence\": [ 1, 2 ],\n+                    \"channel_map\":\n+                    {\n+                        \"short\": 1,\n+                        \"long\": 2\n+                    }\n+                }\n+            }\n+        }\n     ]\n }\ndiff --git a/src/ipa/rpi/vc4/data/imx477_scientific.json b/src/ipa/rpi/vc4/data/imx477_scientific.json\nindex 26c692fdbab9..9dc32eb1525c 100644\n--- a/src/ipa/rpi/vc4/data/imx477_scientific.json\n+++ b/src/ipa/rpi/vc4/data/imx477_scientific.json\n@@ -148,15 +148,24 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"spot\":\n                     {\n-                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"matrix\":\n                     {\n-                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n+                        \"weights\":\n+                        [\n+                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\ndiff --git a/src/ipa/rpi/vc4/data/imx477_v1.json b/src/ipa/rpi/vc4/data/imx477_v1.json\nindex d64020091efa..55e4adc1961d 100644\n--- a/src/ipa/rpi/vc4/data/imx477_v1.json\n+++ b/src/ipa/rpi/vc4/data/imx477_v1.json\n@@ -138,15 +138,24 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"spot\":\n                     {\n-                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"matrix\":\n                     {\n-                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n+                        \"weights\":\n+                        [\n+                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\ndiff --git a/src/ipa/rpi/vc4/data/imx519.json b/src/ipa/rpi/vc4/data/imx519.json\nindex 1b0a77476aab..ce19425683a6 100644\n--- a/src/ipa/rpi/vc4/data/imx519.json\n+++ b/src/ipa/rpi/vc4/data/imx519.json\n@@ -133,15 +133,24 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"spot\":\n                     {\n-                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"matrix\":\n                     {\n-                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n+                        \"weights\":\n+                        [\n+                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\ndiff --git a/src/ipa/rpi/vc4/data/imx708.json b/src/ipa/rpi/vc4/data/imx708.json\nindex 26aafc95c584..4de6f0796fd0 100644\n--- a/src/ipa/rpi/vc4/data/imx708.json\n+++ b/src/ipa/rpi/vc4/data/imx708.json\n@@ -139,255 +139,281 @@\n         {\n             \"rpi.agc\":\n             {\n-\t\t\"channels\":\n-\t\t[\n-\t\t    {\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 0.125,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 1.5,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    }\n-\t\t]\n-\t    }\n+                \"channels\": [\n+                    {\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    },\n+                    {\n+                        \"base_ev\": 0.125,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    },\n+                    {\n+                        \"base_ev\": 1.5,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    }\n+                ]\n+            }\n         },\n         {\n             \"rpi.alsc\":\n@@ -627,20 +653,19 @@\n                 \"map\": [ 0.0, 445, 15.0, 925 ]\n             }\n         },\n-\t{\n-\t    \"rpi.hdr\":\n-\t    {\n-\t\t\"MultiExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1, 2 ],\n-\t\t    \"channel_map\": { \"short\": 1, \"long\": 2 }\n-\t\t},\n-\t\t\"SingleExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1 ],\n-\t\t    \"channel_map\": { \"short\": 1 }\n-\t\t}\n-\t    }\n-\t}\n+        {\n+            \"rpi.hdr\":\n+            {\n+                \"MultiExposureUnmerged\":\n+                {\n+                    \"cadence\": [ 1, 2 ],\n+                    \"channel_map\":\n+                    {\n+                        \"short\": 1,\n+                        \"long\": 2\n+                    }\n+                }\n+            }\n+        }\n     ]\n-}\n+}\n\\ No newline at end of file\ndiff --git a/src/ipa/rpi/vc4/data/imx708_noir.json b/src/ipa/rpi/vc4/data/imx708_noir.json\nindex 8259ca4d0411..7b7ee874f66a 100644\n--- a/src/ipa/rpi/vc4/data/imx708_noir.json\n+++ b/src/ipa/rpi/vc4/data/imx708_noir.json\n@@ -139,255 +139,281 @@\n         {\n             \"rpi.agc\":\n             {\n-\t\t\"channels\":\n-\t\t[\n-\t\t    {\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 0.125,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 1.5,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    }\n-\t\t]\n-\t    }\n+                \"channels\": [\n+                    {\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    },\n+                    {\n+                        \"base_ev\": 0.125,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    },\n+                    {\n+                        \"base_ev\": 1.5,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    }\n+                ]\n+            }\n         },\n         {\n             \"rpi.alsc\":\n@@ -726,20 +752,19 @@\n                 \"map\": [ 0.0, 445, 15.0, 925 ]\n             }\n         },\n-\t{\n-\t    \"rpi.hdr\":\n-\t    {\n-\t\t\"MultiExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1, 2 ],\n-\t\t    \"channel_map\": { \"short\": 1, \"long\": 2 }\n-\t\t},\n-\t\t\"SingleExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1 ],\n-\t\t    \"channel_map\": { \"short\": 1 }\n-\t\t}\n-\t    }\n-\t}\n+        {\n+            \"rpi.hdr\":\n+            {\n+                \"MultiExposureUnmerged\":\n+                {\n+                    \"cadence\": [ 1, 2 ],\n+                    \"channel_map\":\n+                    {\n+                        \"short\": 1,\n+                        \"long\": 2\n+                    }\n+                }\n+            }\n+        }\n     ]\n-}\n+}\n\\ No newline at end of file\ndiff --git a/src/ipa/rpi/vc4/data/imx708_wide.json b/src/ipa/rpi/vc4/data/imx708_wide.json\nindex 0f846ea29393..6f45aafc0997 100644\n--- a/src/ipa/rpi/vc4/data/imx708_wide.json\n+++ b/src/ipa/rpi/vc4/data/imx708_wide.json\n@@ -129,255 +129,281 @@\n         {\n             \"rpi.agc\":\n             {\n-\t\t\"channels\":\n-\t\t[\n-\t\t    {\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 0.125,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 1.5,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    }\n-\t\t]\n-\t    }\n+                \"channels\": [\n+                    {\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    },\n+                    {\n+                        \"base_ev\": 0.125,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    },\n+                    {\n+                        \"base_ev\": 1.5,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    }\n+                ]\n+            }\n         },\n         {\n             \"rpi.alsc\":\n@@ -638,20 +664,19 @@\n                 \"map\": [ 0.0, 420, 35.0, 920 ]\n             }\n         },\n-\t{\n-\t    \"rpi.hdr\":\n-\t    {\n-\t\t\"MultiExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1, 2 ],\n-\t\t    \"channel_map\": { \"short\": 1, \"long\": 2 }\n-\t\t},\n-\t\t\"SingleExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1 ],\n-\t\t    \"channel_map\": { \"short\": 1 }\n-\t\t}\n-\t    }\n-\t}\n+        {\n+            \"rpi.hdr\":\n+            {\n+                \"MultiExposureUnmerged\":\n+                {\n+                    \"cadence\": [ 1, 2 ],\n+                    \"channel_map\":\n+                    {\n+                        \"short\": 1,\n+                        \"long\": 2\n+                    }\n+                }\n+            }\n+        }\n     ]\n-}\n+}\n\\ No newline at end of file\ndiff --git a/src/ipa/rpi/vc4/data/imx708_wide_noir.json b/src/ipa/rpi/vc4/data/imx708_wide_noir.json\nindex f12ddbb61fcd..b9a5227e1acc 100644\n--- a/src/ipa/rpi/vc4/data/imx708_wide_noir.json\n+++ b/src/ipa/rpi/vc4/data/imx708_wide_noir.json\n@@ -129,255 +129,281 @@\n         {\n             \"rpi.agc\":\n             {\n-\t\t\"channels\":\n-\t\t[\n-\t\t    {\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 0.125,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 1.5,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.2,\n-\t\t\t\t\t1000, 0.2\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"startup_frames\": 5,\n-\t\t\t\"convergence_frames\": 6,\n-\t\t\t\"speed\": 0.15\n-\t\t    }\n-\t\t]\n-\t    }\n+                \"channels\": [\n+                    {\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    },\n+                    {\n+                        \"base_ev\": 0.125,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    },\n+                    {\n+                        \"base_ev\": 1.5,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 15000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 1.0, 2.0, 4.0, 6.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 6.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 1000, 30000, 60000, 90000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.2,\n+                                        1000, 0.2\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"startup_frames\": 5,\n+                        \"convergence_frames\": 6,\n+                        \"speed\": 0.15\n+                    }\n+                ]\n+            }\n         },\n         {\n             \"rpi.alsc\":\n@@ -629,20 +655,19 @@\n                 \"map\": [ 0.0, 420, 35.0, 920 ]\n             }\n         },\n-\t{\n-\t    \"rpi.hdr\":\n-\t    {\n-\t\t\"MultiExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1, 2 ],\n-\t\t    \"channel_map\": { \"short\": 1, \"long\": 2 }\n-\t\t},\n-\t\t\"SingleExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1 ],\n-\t\t    \"channel_map\": { \"short\": 1 }\n-\t\t}\n-\t    }\n-\t}\n+        {\n+            \"rpi.hdr\":\n+            {\n+                \"MultiExposureUnmerged\":\n+                {\n+                    \"cadence\": [ 1, 2 ],\n+                    \"channel_map\":\n+                    {\n+                        \"short\": 1,\n+                        \"long\": 2\n+                    }\n+                }\n+            }\n+        }\n     ]\n-}\n+}\n\\ No newline at end of file\ndiff --git a/src/ipa/rpi/vc4/data/ov5647.json b/src/ipa/rpi/vc4/data/ov5647.json\nindex 4def9ffc2dcb..40c6059c862b 100644\n--- a/src/ipa/rpi/vc4/data/ov5647.json\n+++ b/src/ipa/rpi/vc4/data/ov5647.json\n@@ -131,285 +131,309 @@\n         {\n             \"rpi.agc\":\n             {\n-\t\t\"channels\":\n-\t\t[\n-\t\t    {\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"base_ev\": 1.25\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 0.125,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"base_ev\": 1.25\n-\t\t    },\n-\t\t    {\n-\t\t\t\"base_ev\": 1.5,\n-\t\t\t\"metering_modes\":\n-\t\t\t{\n-\t\t\t    \"centre-weighted\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"spot\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n-\t\t\t    },\n-\t\t\t    \"matrix\":\n-\t\t\t    {\n-\t\t\t\t\"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"exposure_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"short\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n-\t\t\t    },\n-\t\t\t    \"long\":\n-\t\t\t    {\n-\t\t\t\t\"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n-\t\t\t\t\"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n-\t\t\t    }\n-\t\t\t},\n-\t\t\t\"constraint_modes\":\n-\t\t\t{\n-\t\t\t    \"normal\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"highlight\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.5,\n-\t\t\t\t\t1000, 0.5\n-\t\t\t\t    ]\n-\t\t\t\t},\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"UPPER\",\n-\t\t\t\t    \"q_lo\": 0.98,\n-\t\t\t\t    \"q_hi\": 1.0,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.8,\n-\t\t\t\t\t1000, 0.8\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ],\n-\t\t\t    \"shadows\": [\n-\t\t\t\t{\n-\t\t\t\t    \"bound\": \"LOWER\",\n-\t\t\t\t    \"q_lo\": 0.0,\n-\t\t\t\t    \"q_hi\": 0.5,\n-\t\t\t\t    \"y_target\":\n-\t\t\t\t    [\n-\t\t\t\t\t0, 0.17,\n-\t\t\t\t\t1000, 0.17\n-\t\t\t\t    ]\n-\t\t\t\t}\n-\t\t\t    ]\n-\t\t\t},\n-\t\t\t\"y_target\":\n-\t\t\t[\n-\t\t\t    0, 0.16,\n-\t\t\t    1000, 0.165,\n-\t\t\t    10000, 0.17\n-\t\t\t],\n-\t\t\t\"base_ev\": 1.25\n-\t\t    }\n-\t\t]\n-\t    }\n+                \"channels\": [\n+                    {\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ],\n+                        \"base_ev\": 1.25\n+                    },\n+                    {\n+                        \"base_ev\": 1.25,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    },\n+                    {\n+                        \"base_ev\": 1.25,\n+                        \"metering_modes\":\n+                        {\n+                            \"centre-weighted\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"spot\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                                ]\n+                            },\n+                            \"matrix\":\n+                            {\n+                                \"weights\":\n+                                [\n+                                    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                                ]\n+                            }\n+                        },\n+                        \"exposure_modes\":\n+                        {\n+                            \"normal\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 66666 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"short\":\n+                            {\n+                                \"shutter\": [ 100, 5000, 10000, 20000, 33333 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 8.0 ]\n+                            },\n+                            \"long\":\n+                            {\n+                                \"shutter\": [ 100, 10000, 30000, 60000, 120000 ],\n+                                \"gain\": [ 1.0, 2.0, 4.0, 6.0, 12.0 ]\n+                            }\n+                        },\n+                        \"constraint_modes\":\n+                        {\n+                            \"normal\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                }\n+                            ],\n+                            \"highlight\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.5,\n+                                        1000, 0.5\n+                                    ]\n+                                },\n+                                {\n+                                    \"bound\": \"UPPER\",\n+                                    \"q_lo\": 0.98,\n+                                    \"q_hi\": 1.0,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.8,\n+                                        1000, 0.8\n+                                    ]\n+                                }\n+                            ],\n+                            \"shadows\": [\n+                                {\n+                                    \"bound\": \"LOWER\",\n+                                    \"q_lo\": 0.0,\n+                                    \"q_hi\": 0.5,\n+                                    \"y_target\":\n+                                    [\n+                                        0, 0.17,\n+                                        1000, 0.17\n+                                    ]\n+                                }\n+                            ]\n+                        },\n+                        \"y_target\":\n+                        [\n+                            0, 0.16,\n+                            1000, 0.165,\n+                            10000, 0.17\n+                        ]\n+                    }\n+                ]\n+            }\n         },\n         {\n             \"rpi.alsc\":\n@@ -654,20 +678,19 @@\n         {\n             \"rpi.sharpen\": { }\n         },\n-\t{\n-\t    \"rpi.hdr\":\n-\t    {\n-\t\t\"MultiExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1, 2 ],\n-\t\t    \"channel_map\": { \"short\": 1, \"long\": 2 }\n-\t\t},\n-\t\t\"SingleExposure\":\n-\t\t{\n-\t\t    \"cadence\": [ 1 ],\n-\t\t    \"channel_map\": { \"short\": 1 }\n-\t\t}\n-\t    }\n-\t}\n+        {\n+            \"rpi.hdr\":\n+            {\n+                \"MultiExposureUnmerged\":\n+                {\n+                    \"cadence\": [ 1, 2 ],\n+                    \"channel_map\":\n+                    {\n+                        \"short\": 1,\n+                        \"long\": 2\n+                    }\n+                }\n+            }\n+        }\n     ]\n }\ndiff --git a/src/ipa/rpi/vc4/data/ov5647_noir.json b/src/ipa/rpi/vc4/data/ov5647_noir.json\nindex a6c6722f12a6..488b7119b17c 100644\n--- a/src/ipa/rpi/vc4/data/ov5647_noir.json\n+++ b/src/ipa/rpi/vc4/data/ov5647_noir.json\n@@ -51,15 +51,24 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"spot\":\n                     {\n-                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"matrix\":\n                     {\n-                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n+                        \"weights\":\n+                        [\n+                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\ndiff --git a/src/ipa/rpi/vc4/data/ov9281_mono.json b/src/ipa/rpi/vc4/data/ov9281_mono.json\nindex 2b7292ec7e20..a9d05a01b53f 100644\n--- a/src/ipa/rpi/vc4/data/ov9281_mono.json\n+++ b/src/ipa/rpi/vc4/data/ov9281_mono.json\n@@ -35,7 +35,10 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 4, 4, 4, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            4, 4, 4, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\ndiff --git a/src/ipa/rpi/vc4/data/se327m12.json b/src/ipa/rpi/vc4/data/se327m12.json\nindex 8552ed92bce6..948169db2419 100644\n--- a/src/ipa/rpi/vc4/data/se327m12.json\n+++ b/src/ipa/rpi/vc4/data/se327m12.json\n@@ -133,15 +133,24 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"spot\":\n                     {\n-                        \"weights\": [ 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\n+                        ]\n                     },\n                     \"matrix\":\n                     {\n-                        \"weights\": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]\n+                        \"weights\":\n+                        [\n+                            1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\ndiff --git a/src/ipa/rpi/vc4/data/uncalibrated.json b/src/ipa/rpi/vc4/data/uncalibrated.json\nindex 7654defa6dfe..cdc56b323c2e 100644\n--- a/src/ipa/rpi/vc4/data/uncalibrated.json\n+++ b/src/ipa/rpi/vc4/data/uncalibrated.json\n@@ -22,7 +22,10 @@\n                 {\n                     \"centre-weighted\":\n                     {\n-                        \"weights\": [ 4, 4, 4, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0 ]\n+                        \"weights\":\n+                        [\n+                            4, 4, 4, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0\n+                        ]\n                     }\n                 },\n                 \"exposure_modes\":\n",
    "prefixes": [
        "v3",
        "6/7"
    ]
}