{"id":3374,"url":"https://patchwork.libcamera.org/api/patches/3374/?format=json","web_url":"https://patchwork.libcamera.org/patch/3374/","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":"<20200403145305.10288-5-naush@raspberrypi.com>","date":"2020-04-03T14:53:04","name":"[libcamera-devel,v3,4/5] libcamera: controls: Add AE related controls","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"fcfe99b01365c242271e6fe8e65d1233a9b2a9ec","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/3374/mbox/","series":[{"id":794,"url":"https://patchwork.libcamera.org/api/series/794/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=794","date":"2020-04-03T14:53:00","name":"Patchset for libcamera controls","version":3,"mbox":"https://patchwork.libcamera.org/series/794/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/3374/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/3374/checks/","tags":{},"headers":{"Return-Path":"<naush@raspberrypi.com>","Received":["from mail-wm1-x341.google.com (mail-wm1-x341.google.com\n\t[IPv6:2a00:1450:4864:20::341])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C788562DAF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 Apr 2020 16:53:31 +0200 (CEST)","by mail-wm1-x341.google.com with SMTP id e9so8033574wme.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 03 Apr 2020 07:53:31 -0700 (PDT)","from naushir-VirtualBox.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tu5sm13559469wrp.81.2020.04.03.07.53.30\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 03 Apr 2020 07:53:30 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"nC6cwVEY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=IzcmklKpVXrbMixcRIF+VW0BbWQaOeVX1BldC4PwxjE=;\n\tb=nC6cwVEYBxDkc8J2/vxmBkh/69ASCvGkd8AE1Jjg4A3AdH9NQNUW7gge1zfQGKLAkA\n\to8Kz7LcwqnX6yWAkWo3pqidM0tMSwL1J0oWTNF6hDLgDQ10xTwo1Uz3VOJb/siatBMCT\n\tPwP/As3ho9YPWb00BatJiTRgi0gLqKEe4UqBBXTVwywp9xzGLeX+3PBbPoZ46zjGCxGW\n\tdnTyisN+lFMyaOvRF1ZAA/bE+/augfqpSTc4z3ZhWLvho3WfJmtCEXRD+rwbKi9CaUS8\n\tmVWYHsqURzB5sd7WoDabRA4LbMmWmOKhFfs/LObHs8ppQ0kWBxqeahFWr6c7P2nrCyKd\n\tAheQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=IzcmklKpVXrbMixcRIF+VW0BbWQaOeVX1BldC4PwxjE=;\n\tb=Cv1NnZJSM5Syvm/4pQmAp29SmwXE5fKdUqed2WrGtOG4ZuCbgU6Pb/BorsGQroSXma\n\tf8ipUBY7OSG9HRYfkrYQUONxmyZVIt/Oe2+TNnvRATHgqC+LWTsT+/GxBz1x6hM3hePU\n\tailWjy6bseCWem0oMns1CRsIFKnqTQMOJ9yZ2Q/3qt8agx53VuNCpB2I6+U2ofD/iuF3\n\tKKHtc23B7fqctPpl9bgsaXPIcV2fZa+cth0ZHLEcIgIyqan8IjhMD5zod/m+J3jBqnQr\n\tf4kL6NwiehJpSAHCh/wtbA2ixUjOGPsFX2LpAqeSlfpeKB0nL19pE6DlaXLuj/J0/SNT\n\tAabg==","X-Gm-Message-State":"AGi0Pua9Cm4Udx/bvIWO9xcaPO1X0+rU/gytnS0WyLSbY+9x/ujOKEGw\n\t8dL1tmqrXg+lqQmoeGuhq1nk6+JkNlpxyA==","X-Google-Smtp-Source":"APiQypLXjGQFP2j7w8YPmABGawmGtpokFdgDbI7Ucd3SHJ8C9px+cwH22t+JNzp5v+WC0MjcxiQVsA==","X-Received":"by 2002:a1c:a754:: with SMTP id\n\tq81mr9120530wme.124.1585925611135; \n\tFri, 03 Apr 2020 07:53:31 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri,  3 Apr 2020 15:53:04 +0100","Message-Id":"<20200403145305.10288-5-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.17.1","In-Reply-To":"<20200403145305.10288-1-naush@raspberrypi.com>","References":"<20200403145305.10288-1-naush@raspberrypi.com>","Subject":"[libcamera-devel] [PATCH v3 4/5] 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":"Fri, 03 Apr 2020 14:53:32 -0000"},"content":"AeMeteringMode, 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>\n---\n src/libcamera/control_ids.yaml | 104 +++++++++++++++++++++++++++++++++\n 1 file changed, 104 insertions(+)","diff":"diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\nindex 64e81520..50f9e07b 100644\n--- a/src/libcamera/control_ids.yaml\n+++ b/src/libcamera/control_ids.yaml\n@@ -4,6 +4,8 @@\n #\n %YAML 1.2\n ---\n+# Unless otherwise stated, all controls are bi-directional, i.e. they can be\n+# set through a Request and returned out through Metadata.\n controls:\n   - AeEnable:\n       type: bool\n@@ -23,6 +25,103 @@ 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: ConstraintCustom\n+          value: 2\n+          description: Custom constraint mode.\n+        - name: ConstraintModeMax\n+          value: 2\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 metering 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@@ -53,6 +152,11 @@ 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 can only be returned in Metadata\n+  - Lux:\n+      type: float\n+      description: Report an estimate of the current lux level.\n+\n   - AwbEnable:\n       type: bool\n       description: |\n","prefixes":["libcamera-devel","v3","4/5"]}