{"id":3540,"url":"https://patchwork.libcamera.org/api/patches/3540/?format=json","web_url":"https://patchwork.libcamera.org/patch/3540/","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":"<20200425004533.26907-7-laurent.pinchart@ideasonboard.com>","date":"2020-04-25T00:45:32","name":"[libcamera-devel,v5,6/7] libcamera: controls: Add AE related controls","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"3ba68de88c09feadc95dc9fc1322a32c1e0a916a","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3540/mbox/","series":[{"id":824,"url":"https://patchwork.libcamera.org/api/series/824/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=824","date":"2020-04-25T00:45:26","name":"Patchset for libcamera controls","version":5,"mbox":"https://patchwork.libcamera.org/series/824/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3540/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3540/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9678262F15\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 25 Apr 2020 02:45:54 +0200 (CEST)","from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 264324F7;\n\tSat, 25 Apr 2020 02:45:54 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"FTty0pT7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1587775554;\n\tbh=YRZFnsiPti/+Mwqbo5vguecZLZ3p2Jphcr1Rcxy7xF8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=FTty0pT7OY0tDc7x+8Mz85yxrTP0sA49cEyVYz07Jd0Wif/WkCLBOfbgJdLQUe/aX\n\tbfAXtcUbm+lAHj8mweFcU337TlQZG399CMXN1lySoYjAgJGEqxek4ajQLB7H2xEgeT\n\tT1Zn3e9B+OxI3PBIkMFARwqzIlfEpObhgPK6QjPk=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 25 Apr 2020 03:45:32 +0300","Message-Id":"<20200425004533.26907-7-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.25.3","In-Reply-To":"<20200425004533.26907-1-laurent.pinchart@ideasonboard.com>","References":"<20200425004533.26907-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v5 6/7] libcamera: controls: Add AE\n\trelated controls","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>","X-List-Received-Date":"Sat, 25 Apr 2020 00:45:56 -0000"},"content":"From: Naushir Patuck <naush@raspberrypi.com>\n\nAeMeteringMode, AeConstraintMode, and AeExposureMode are new enum type\ncontrols used to specify operating modes in the AE algorithm. All modes\nmay not be supported by all platforms.\n\nExposureValue is a new control used to set the log2 exposure adjustment\nfor the AE algorithm.\n\nLux is a new control that returns the current lux estimate.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/control_ids.yaml | 109 +++++++++++++++++++++++++++++++++\n 1 file changed, 109 insertions(+)","diff":"diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex f2ac052b3d3e..0907167fccea 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -25,6 +25,109 @@ controls:\n \n         \\sa AeEnable\n \n+  # AeMeteringMode needs further attention:\n+  # - Auto-generate max enum value.\n+  # - Better handling of custom types.\n+  - AeMeteringMode:\n+      type: int32_t\n+      description: |\n+        Specify a metering mode for the AE algorithm to use. The metering\n+        modes determine which parts of the image are used to determine the\n+        scene brightness. Metering modes may be platform specific and not\n+        all metering modes may be supported.\n+      enum:\n+        - name: MeteringCentreWeighted\n+          value: 0\n+          description: Centre-weighted metering mode.\n+        - name: MeteringSpot\n+          value: 1\n+          description: Spot metering mode.\n+        - name: MeteringMatrix\n+          value: 2\n+          description: Matrix metering mode.\n+        - name: MeteringCustom\n+          value: 3\n+          description: Custom metering mode.\n+        - name: MeteringModeMax\n+          value: 3\n+          description: Maximum allowed value (place any new values above here).\n+\n+  # AeConstraintMode needs further attention:\n+  # - Auto-generate max enum value.\n+  # - Better handling of custom types.\n+  - AeConstraintMode:\n+      type: int32_t\n+      description: |\n+        Specify a constraint mode for the AE algorithm to use. These determine\n+        how the measured scene brightness is adjusted to reach the desired\n+        target exposure. Constraint modes may be platform specific, and not\n+        all constraint modes may be supported.\n+      enum:\n+        - name: ConstraintNormal\n+          value: 0\n+          description: Default constraint mode.\n+            This mode aims to balance the exposure of different parts of the\n+            image so as to reach a reasonable average level. However, highlights\n+            in the image may appear over-exposed and lowlights may appear\n+            under-exposed.\n+        - name: ConstraintHighlight\n+          value: 1\n+          description: Highlight constraint mode.\n+            This mode adjusts the exposure levels in order to try and avoid\n+            over-exposing the brightest parts (highlights) of an image.\n+            Other non-highlight parts of the image may appear under-exposed.\n+        - name: ConstraintShadows\n+          value: 2\n+          description: Shadows constraint mode.\n+            This mode adjusts the exposure levels in order to try and avoid\n+            under-exposing the dark parts (shadows) of an image. Other normally\n+            exposed parts of the image may appear over-exposed.\n+        - name: ConstraintCustom\n+          value: 3\n+          description: Custom constraint mode.\n+        - name: ConstraintModeMax\n+          value: 3\n+          description: Maximum allowed value (place any new values above here).\n+\n+  # AeExposureMode needs further attention:\n+  # - Auto-generate max enum value.\n+  # - Better handling of custom types.\n+  - AeExposureMode:\n+      type: int32_t\n+      description: |\n+        Specify an exposure mode for the AE algorithm to use. These specify\n+        how the desired total exposure is divided between the shutter time\n+        and the sensor's analogue gain. The exposure modes are platform\n+        specific, and not all exposure modes may be supported.\n+      enum:\n+        - name: ExposureNormal\n+          value: 0\n+          description: Default exposure mode.\n+        - name: ExposureShort\n+          value: 1\n+          description: Exposure mode allowing only short exposure times.\n+        - name: ExposureLong\n+          value: 2\n+          description: Exposure mode allowing long exposure times.\n+        - name: ExposureCustom\n+          value: 3\n+          description: Custom exposure mode.\n+        - name: ExposureModeMax\n+          value: 3\n+          description: Maximum allowed value (place any new values above here).\n+\n+  - ExposureValue:\n+      type: float\n+      description: |\n+        Specify an Exposure Value (EV) parameter. The EV parameter will only be\n+        applied if the AE algorithm is currently enabled.\n+\n+        By convention EV adjusts the exposure as log2. For example\n+        EV = [-2, -1, 0.5, 0, 0.5, 1, 2] results in an exposure adjustment\n+        of [1/4x, 1/2x, 1/sqrt(2)x, 1x, sqrt(2)x, 2x, 4x].\n+\n+        \\sa AeEnable\n+\n   - ExposureTime:\n       type: int32_t\n       description: |\n@@ -55,6 +158,12 @@ controls:\n         Specify a fixed contrast parameter. Normal contrast is given by the\n         value 1.0; larger values produce images with more contrast.\n \n+  - Lux:\n+      type: float\n+      description: |\n+        Report an estimate of the current illuminance level in lux. The Lux\n+        control can only be returned in metadata.\n+\n   - AwbEnable:\n       type: bool\n       description: |\n","prefixes":["libcamera-devel","v5","6/7"]}