[{"id":4499,"web_url":"https://patchwork.libcamera.org/comment/4499/","msgid":"<20200424105655.GD5954@pendragon.ideasonboard.com>","date":"2020-04-24T10:56:55","subject":"Re: [libcamera-devel] [PATCH v4 4/5] libcamera: controls: Add AE\n\trelated controls","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Fri, Apr 24, 2020 at 11:46:59AM +0100, Naushir Patuck wrote:\n> AeMeteringMode, AeConstraintMode, and AeExposureMode are new enum type\n> controls used to specify operating modes in the AE algorithm. All modes\n> may not be supported by all platforms.\n> \n> ExposureValue is a new control used to set the log2 exposure adjustment\n> for the AE algorithm.\n> \n> Lux is a new control that returns the current lux estimate.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/libcamera/control_ids.yaml | 109 +++++++++++++++++++++++++++++++++\n>  1 file changed, 109 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index f7403081..f66b851b 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: |","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E2BF0603FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Apr 2020 12:57:09 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 54E9D4F7;\n\tFri, 24 Apr 2020 12:57:09 +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=\"WSX+aXs7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1587725829;\n\tbh=ChFov2GkMSfHh57yIXAavgyayMBF4y2wd0gEp+eE6KU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=WSX+aXs7m6V6q7GdlXgiDNhUmVU4tpOo4aU0ebBt+B9yL+kSU4DoWnKp5W/ZFQAec\n\tz+741L4/o7U53Zr5geGbprXcijJHjP19cYgKw0JFvy6me0wU9Uq5rtJLl6dOMeD5Rl\n\ttlPHo7TZbZu0IH2qSorZtOAsYS9jSCsUTYSVHzyA=","Date":"Fri, 24 Apr 2020 13:56:55 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200424105655.GD5954@pendragon.ideasonboard.com>","References":"<20200424104700.26819-1-naush@raspberrypi.com>\n\t<20200424104700.26819-5-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200424104700.26819-5-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v4 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, 24 Apr 2020 10:57:10 -0000"}}]