{"id":18896,"url":"https://patchwork.libcamera.org/api/patches/18896/?format=json","web_url":"https://patchwork.libcamera.org/patch/18896/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230728122758.2411-2-david.plowman@raspberrypi.com>","date":"2023-07-28T12:27:58","name":"[libcamera-devel,1/1] libcamera: controls: Add controls for HDR","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"e4c29a68c1d73227f44a33ef06200392e42fd219","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/?format=json","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18896/mbox/","series":[{"id":3991,"url":"https://patchwork.libcamera.org/api/series/3991/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3991","date":"2023-07-28T12:27:57","name":"HDR controls","version":1,"mbox":"https://patchwork.libcamera.org/series/3991/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18896/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18896/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 72483C324E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Jul 2023 12:28:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F0B7E627EB;\n\tFri, 28 Jul 2023 14:28:07 +0200 (CEST)","from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com\n\t[IPv6:2a00:1450:4864:20::42b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 184FE627E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Jul 2023 14:28:05 +0200 (CEST)","by mail-wr1-x42b.google.com with SMTP id\n\tffacd0b85a97d-3177f520802so1347903f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Jul 2023 05:28:05 -0700 (PDT)","from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:2bce:64d6:1a5c:49a2])\n\tby smtp.gmail.com with ESMTPSA id\n\tn1-20020a5d4c41000000b0031764e85b91sm4692175wrt.68.2023.07.28.05.28.03\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 28 Jul 2023 05:28:03 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690547288;\n\tbh=qCubLdYgBmfT4ZgaE7KkoZL2dvTizKqGsuAq7INKVFI=;\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=eCiPeP1hbWZnyB0Peoan5+hYzhKsH7S+Z7mZLk/etosceabyRwQ59dl2GqgfWTsSE\n\tJZzEwF+CaE9icJmP9bYGyRh4fKMFfvYjWDKgUzUXzGyQucjpL+a6V5+uKyfeQBwcq+\n\tYHpLy71kRz4gGpKkcj6kzZtaZD9q4wUF+Y4oEyhbTmwS2+Czw1sE73Kh82NOkmSiBs\n\tD9ON7WFUfaNBVhkxw/9s16K+gY7OFyzlDXNB5f8+f+5XC9a8UezsifvG26qZV+jzYo\n\tGoYxh7rSJonK/CMHOqiHHJncExUocpbj1Mi6YC7Tnj2Cxu1WBeCat0shh2NZXpu+ul\n\tv3AmCZNt0QJaA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1690547284; x=1691152084;\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=ooxTkVtCXjvWTknjMYGCRaLn0AjbP9/U8hUHTLliQjA=;\n\tb=TTXilzZZkYnV3Nyx7H6W5HaQTuVx3EO96ZStlFhHMAPwhCctP4WhCZvdFqFEMLtwvf\n\tWiP1JzM25mn6hrPN1fIP3iiBWrd490lyoR61FHd0G5q4zR4lTuNMPSEAfrsdTU8lGFRp\n\tFRekHszYlE2yc0qFqgRcxjgtjQUGHdk/2yrwSGKV6v5rP7WMtygTT8IHDjuN4dGTxaSG\n\tkhLgTw0WCvzQ0fJISZUL8FsyvtXoorcTulnYWthTqjGeizmiV8CLz0SM7sBahvSXkfvT\n\tSSNHhPS/3YTxHMjYhQuznRP2XxGMXEuc1Jq/EoFqAS56qskXq+TDk264cNGgA8B4BoKZ\n\tclzw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"TTXilzZZ\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1690547284; x=1691152084;\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=ooxTkVtCXjvWTknjMYGCRaLn0AjbP9/U8hUHTLliQjA=;\n\tb=fpXKNg0p9Fnyit2AqyHdqSDk8/1FCo9JoLhDXFDIKogMLbfHD2hGUteYBCEBiSS8a1\n\tv1Giz0GNtavCoISKbLKsLqwszjeYTCYyWTdlcXIuAOAYOdQ3GcmUXZ6zXASx43/cWVYB\n\t46wQRhJifsjhU6LAzpAAA6KKkiZDUKAUEglj1jJbnsfHavoaNAHXR0AyZLnu9P+xsXDg\n\tS4P+LvZlHVhRCnzTep0evh6q88rvsa9fEzZ2hpQKghEUMmKE5X5AgM4EmXsY1QbCdXeN\n\tFQnWAHR3PJzl1R4ksD+l8wFA1gYsJDVWynfWYssdPy3e8xli++oExXvO1sugo1pACU0Q\n\ta8PA==","X-Gm-Message-State":"ABy/qLabmU8fPvp3h9rSdpXaaSxrt1zIzrVPUiijeSEWt4xSg/47ky26\n\te82+TpFn+26nZZi2OL5PSpsa7ZvqB5rajtMV+y4=","X-Google-Smtp-Source":"APBJJlHddWe8tBao8eDhLFuGMZachfuVx9xrDWEwHhBLvYyplRgsXvdexGlX4zALkvlHYuE9vs6U6g==","X-Received":"by 2002:adf:e692:0:b0:317:36d8:d6e8 with SMTP id\n\tr18-20020adfe692000000b0031736d8d6e8mr4122946wrm.25.1690547284298; \n\tFri, 28 Jul 2023 05:28:04 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 28 Jul 2023 13:27:58 +0100","Message-Id":"<20230728122758.2411-2-david.plowman@raspberrypi.com>","X-Mailer":"git-send-email 2.30.2","In-Reply-To":"<20230728122758.2411-1-david.plowman@raspberrypi.com>","References":"<20230728122758.2411-1-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 1/1] libcamera: controls: Add controls for\n\tHDR","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\nmedium) has just arrived.\n\nCurrently the HdrMode supports three values:\n\n* Off - no HDR processing at all.\n* MultiExposure - frames at multiple different exposures are combined\n  to create HDR images.\n* SingleExposure - multiple frames all at the same exposure are\n  combined to create HDR images.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/control_ids.yaml | 47 ++++++++++++++++++++++++++++++++++\n 1 file changed, 47 insertions(+)","diff":"diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex 056886e6..34df7adb 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -701,6 +701,53 @@ 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.\n+\n+      enum:\n+        - name: HdrModeOff\n+          value: 0\n+          description: |\n+            HDR is not enabled.\n+        - name: HdrModeMultiExposure\n+          value: 1\n+          description: |\n+            Multiple exposures will be used to create HDR images.\n+        - name: HdrModeSingleExposure\n+          value: 2\n+          description: |\n+            Multiple frames all at a single exposure will be used to create HDR\n+            images.\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).\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","1/1"]}