Show a patch.

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

{
    "id": 19185,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/19185/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19185/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20231026111131.93825-2-david.plowman@raspberrypi.com>",
    "date": "2023-10-26T11:11:31",
    "name": "[libcamera-devel,v5,1/1] libcamera: controls: Add controls for HDR",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "000317afc38c8cf34246508b6436ea0682f622b5",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19185/mbox/",
    "series": [
        {
            "id": 4062,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4062/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4062",
            "date": "2023-10-26T11:11:30",
            "name": "HDR controls",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/4062/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19185/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19185/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 30507C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Oct 2023 11:11:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B299F62994;\n\tThu, 26 Oct 2023 13:11:38 +0200 (CEST)",
            "from mail-lf1-x135.google.com (mail-lf1-x135.google.com\n\t[IPv6:2a00:1450:4864:20::135])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BC7861DCC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Oct 2023 13:11:37 +0200 (CEST)",
            "by mail-lf1-x135.google.com with SMTP id\n\t2adb3069b0e04-507d1cc0538so996065e87.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Oct 2023 04:11:37 -0700 (PDT)",
            "from pi5-davidp.pitowers.org\n\t([2a00:1098:3142:14:183e:6cc8:a436:a27c])\n\tby smtp.gmail.com with ESMTPSA id\n\td17-20020a5d6451000000b0032da022855fsm13960075wrw.111.2023.10.26.04.11.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 Oct 2023 04:11:35 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1698318698;\n\tbh=CVWFBjMLgDkXXVbU8ybiTaHlgWfcIHV0SuNTDhnAp6I=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=WL8DsOAlEHasM7Sqk8xtqNggDu6zoeN3hXW8cOxdkRy0bJNGnzMfZGhrU0NMaJJZN\n\t6pQq2TUuhbBCaNlfPIuMz/5hqTrG0+dFHSJyx0BtAZJnmT2Fh7dwGGUBnKXbNvNPE0\n\t9jH0NVwdYNWHYwBePqUoBVBcjwXmAmqQbkJpaFDOHnty+WSZnLdUzuRV+t5YDBNDYf\n\tAJnbgA9e5OAL6706SyKIgOts41nNghZfzV4KCR0BXzSkmMOubM3fs6lRZZTpmVrCiT\n\tejJtQQyjk8beco1YspMftrqQ1qvdrIWNuauhCM9qKfhhdSNcRNqYK75NDvmVqcg1f+\n\tLpnzBDqahWYQg==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1698318696; x=1698923496;\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=gxOskV8UzvecY8xY1yQW50AQO4/lzeWW1qDI24zjCvM=;\n\tb=Lipy3ToL8FECMbgyQ27vwzPshBE6sBVmJBlSO76d4sw7K8OE9dGIt1quKsoOB38t/J\n\tr8YCnTUvP2XPTsXcjt66HMLclxMRRFmY0rMQaQxxQuY8Kpl7XAWzHKd+EEHZo6GOhJIS\n\tvHxRCfHouqhIfV8fmoVueTnHiv0Rn+b2Mn+2jH/4aZ9pR9R8BxzLZ1733tM2EPWbY8J5\n\tYdNDMqICyCLyDUSzh1JXCnYRHmgkKreKW6vAin34v+4WkYs0gETBBpZWjScDsz96gjKC\n\tF28M0HTw4kPnnse8hd6ol0a+TtQV2oIdxWxbhhTKhieZToRIKTsFLvlm6A4LGbA1jmbO\n\tm5Ow=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Lipy3ToL\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1698318696; x=1698923496;\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=gxOskV8UzvecY8xY1yQW50AQO4/lzeWW1qDI24zjCvM=;\n\tb=E8hI9jnFn/NBmR0FgzTyb9MwJdUiLWj31QOIISGXGX16lTiSJX55zJ6gB+JRhd6CvN\n\tgC71zCEWECqpeBTL82hx4Dz6SvLfYDPXwPMR2TZuTXSJZqoi8btrSaJMi8hJ5SFlaKLP\n\tbPW/rbVxqtPP/x9Y2Oj0rl34M7ruiJ4Vg947ssvhntXc1pKgWIfzUsx70Mca/Gnolh13\n\tCi7o78eKjTfuxuYEcZDM2zWcQi3Qk4Y07rSjbPv8jfoGlCE0YjIEaSywgvKcQ6l3Cvbt\n\tf9c5lMDpKrGF2HNnpVR7ILb/Belgum2R1kCtcd6slwbkTJbtsoIn3ovkSLoycUflfyHr\n\tQ7Pg==",
        "X-Gm-Message-State": "AOJu0Yxop6hW2xiMsYOKdBQeHIovxFXJyBTCLTW+pXnK9NKY/6QT0BTs\n\t/RyjueIODdzcJjV+DSU3uQKiLqfIftMRPfwI2ZY=",
        "X-Google-Smtp-Source": "AGHT+IFxf7HVGf472czesENOij+iChnsSJt825RFXbwvFZwHsJ/YUOxTstys+TjPRhK7J3dYcze7tg==",
        "X-Received": "by 2002:a05:6512:314e:b0:507:9702:c11d with SMTP id\n\ts14-20020a056512314e00b005079702c11dmr11361433lfi.64.1698318695980; \n\tThu, 26 Oct 2023 04:11:35 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 26 Oct 2023 12:11:31 +0100",
        "Message-Id": "<20231026111131.93825-2-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20231026111131.93825-1-david.plowman@raspberrypi.com>",
        "References": "<20231026111131.93825-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 1/1] libcamera: controls: Add controls\n\tfor HDR",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "From": "David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "David Plowman <david.plowman@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "We add an HdrMode control (to enable and disable HDR processing)\nand an HdrChannel, which indicates what kind of HDR frame (short, long\nor medium) has just arrived.\n\nCurrently the HdrMode supports the following values:\n\n* Off - no HDR processing at all.\n* MultiExposureUnmerged - frames at multiple different exposures are\n  produced, but not merged together. They are returned \"as is\".\n* MultiExposure - frames at multiple different exposures are merged\n  to create HDR images.\n* SingleExposure - multiple frames all at the same exposure are\n  merged to create HDR images.\n* Night - multiple frames will be combined to create \"night mode\"\n  images.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/libcamera/control_ids.yaml | 87 ++++++++++++++++++++++++++++++++++\n 1 file changed, 87 insertions(+)",
    "diff": "diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex f2e542f4..06a9128c 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -774,6 +774,93 @@ controls:\n             Continuous AF is paused. No further state changes or lens movements\n             will occur until the AfPauseResume control is sent.\n \n+  - HdrMode:\n+      type: int32_t\n+      description: |\n+        Control to set the mode to be used for High Dynamic Range (HDR)\n+        imaging. HDR techniques typically include multiple exposure, image\n+        fusion and tone mapping techniques to improve the dynamic range of the\n+        resulting images.\n+\n+        When using an HDR mode, images are tagged to indicate which HDR channel\n+        (long, medium or short) they come from.\n+\n+        \\sa HdrChannel\n+\n+      enum:\n+        - name: HdrModeOff\n+          value: 0\n+          description: |\n+            HDR is disabled. Metadata for this frame will not include the\n+            HdrChannel control.\n+        - name: HdrModeMultiExposureUnmerged\n+          value: 1\n+          description: |\n+            Multiple exposures will be generated in an alternating fashion.\n+            However, they will not be merged together and will be returned to\n+            the application as they are. Each image will be tagged with the\n+            correct HDR channel, indicating what kind of exposure it is. The\n+            tag should be the same as in the HdrModeMultiExposure case.\n+\n+            The expectation is that an application using this mode would merge\n+            the frames to create HDR images for itself if it requires them.\n+        - name: HdrModeMultiExposure\n+          value: 2\n+          description: |\n+            Multiple exposures will be generated and merged to create HDR\n+            images. Each image will be tagged with the HDR channel (long, medium\n+            or short) that arrived and which caused this image to be output.\n+\n+            Systems that use two channels for HDR will return images tagged\n+            alternately as the short and long channel. Systems that use three\n+            channels for HDR will cycle through the short, medium and long\n+            channel before repeating.\n+        - name: HdrModeSingleExposure\n+          value: 3\n+          description: |\n+            Multiple frames all at a single exposure will be used to create HDR\n+            images. These images should be reported as all corresponding to the\n+            HDR short channel.\n+        - name: HdrModeNight\n+          value: 4\n+          description: |\n+            Multiple frames will be combined to produce \"night mode\" images. It\n+            is up to the implementation exactly which HDR channels it uses, and\n+            the images will all be tagged accordingly with the correct HDR\n+            channel information.\n+\n+  - HdrChannel:\n+      type: int32_t\n+      description: |\n+        This value is reported back to the application so that it can discover\n+        whether this capture corresponds to the short or long exposure image (or\n+        any other image used by the HDR procedure). An application can monitor\n+        the HDR channel to discover when the differently exposed images have\n+        arrived.\n+\n+        This metadata is only available when an HDR mode has been enabled.\n+\n+        \\sa HdrMode\n+\n+      enum:\n+        - name: HdrChannelNone\n+          value: 0\n+          description: |\n+            This image does not correspond to any of the captures used to create\n+            an HDR image.\n+        - name: HdrChannelShort\n+          value: 1\n+          description: |\n+            This is a short exposure image.\n+        - name: HdrChannelMedium\n+          value: 2\n+          description: |\n+            This is a medium exposure image.\n+        - name: HdrChannelLong\n+          value: 3\n+          description: |\n+            This is a long exposure image.\n+\n   # ----------------------------------------------------------------------------\n   # Draft controls section\n \n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "1/1"
    ]
}