[{"id":24356,"web_url":"https://patchwork.libcamera.org/comment/24356/","msgid":"<20220803145211.GN311202@pyrite.rasen.tech>","date":"2022-08-03T14:52:11","subject":"Re: [libcamera-devel] [PATCH 9/9] fixup: Align AnalogueGainMode to\n\tExposureTimeMode","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"On Fri, Jul 01, 2022 at 05:47:01PM +0200, Jacopo Mondi wrote:\n> Align the description of the two controls.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nAcked-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/libcamera/control_ids.yaml | 59 +++++++++++-----------------------\n>  1 file changed, 19 insertions(+), 40 deletions(-)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index 1f22b9b35036..51713a5d148d 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -289,7 +289,7 @@ controls:\n>          When reported in metadata, this control indicates what analogue gain\n>          was used for the current request, regardless of AnalogueGainMode.\n>          AnalogueGainMode will indicate the source of the analogue gain value,\n> -        whether it came from the AE algorithm or not.\n> +        whether it came from the AEGC algorithm or not.\n>  \n>          \\sa ExposureTime\n>          \\sa AnalogueGainMode\n> @@ -298,69 +298,48 @@ controls:\n>        type: int32_t\n>        description: |\n>          Controls the source of the analogue gain that is applied to the image\n> -        sensor. When set to Auto, the AE algorithm computes the analogue gain\n> +        sensor. When set to Auto, the AEGC algorithm computes the analogue gain\n>          and configures the image sensor accordingly. When set to Manual,\n> -        analogue gain specified in AnalogueGain is applied to the image sensor.\n> -        If AnalogueGain is not set, then the value last computed by the AE\n> -        algorithm when the mode was Auto will be used.\n> +        the value of the AnalogueGain control is used.\n>  \n> -        If AnalogueGain is not set and the mode is AnalogueGainModeManual and\n> -        AE was never Auto (either because the camera started in Manual mode,\n> +        When transitioning from Auto to Manual mode and no AnalogueGain control\n> +        is provided by the application, the last value computed by the AEGC\n> +        algorithm when the mode was Auto will be used. If the AnalogueGainMode\n> +        was never set to Auto (either because the camera started in Manual mode,\n>          or Auto is not supported by the camera), the camera should use a\n>          best-effort default value.\n>  \n> -        When AnalogueGainMode is set Auto, the value set in AnalogueGain is\n> -        ignored and is not retained. This means that if AnalogueGainMode is set\n> -        to Manual and AnalogueGain is not also set, the analogue gain that\n> -        was last computed by the AE algorithm while the mode was Auto will be\n> -        applied to the sensor.\n> -\n>          If AnalogueGainModeManual is supported, the AnalogueGain control must\n>          also be supported.\n>  \n>          The set of AnalogueGainMode modes that are supported by the camera must\n>          have an intersection with the supported set of ExposureTimeMode modes.\n>  \n> -        As it takes a few frames to apply the analogue gain, there is a period of\n> -        time between submitting a request with AnalogueGainMode set to Manual\n> -        and the analogue gain component of the AE actually being disabled,\n> -        during which the AE algorithm can still update the analogue gain. If an\n> -        application is switching from automatic and manual control and wishes\n> -        to eliminate any flicker during the switch, the following procedure is\n> -        recommended.\n> -\n> -        1. Start with AnalogueGainMode set to Auto\n> -\n> -        2. Set AnalogueGainMode to Manual\n> -\n> -        3. Wait for the first request to be output that has AnalogueGainMode\n> -        set to Manual\n> -\n> -        4. Copy the value reported in AnalogueGain into a new request, and\n> -        submit it\n> -\n> -        5. Proceed to run manual analogue gain\n> +        The same procedure described for performing flickerless transitions in\n> +        the ExposureTimeMode control documentation should be applied to\n> +        analogue gain.\n>  \n> +        \\sa ExposureTimeMode\n>          \\sa AnalogueGain\n>        enum:\n>          - name: AnalogueGainModeAuto\n>            value: 0\n>            description: |\n>              The analogue gain will be calculated automatically and set by the\n> -            AE algorithm. If AnalogueGain is set while this mode is active, it\n> -            will be ignored, and it will also not be retained.\n> +            AEGC algorithm.\n> +\n> +            If AnalogueGain is set while this mode is active, it will be\n> +            ignored, and it will also not be retained.\n>          - name: AnalogueGainModeManual\n>            value: 1\n>            description: |\n> -            The analogue gain will not be updated by the AE algorithm. It will\n> -            come from the last calculated value when the mode was Auto, or from\n> -            the value specified in AnalogueGain.\n> +            The analogue gain will not be updated by the AEGC algorithm.\n>  \n> -            When transitioning from Auto to Manual mode the last computed\n> +            When transitioning from Auto to Manual mode, the last computed\n>              gain value is used until a new value is specified through the\n>              AnalogueGain control. If an AnalogueGain value is specified in the\n> -            same request where the AnalogueGainMode is set to Manual, the\n> -            provided AnalogueGain is applied.\n> +            same request where the AnalogueGainMode is changed from Auto to\n> +            Manual, the provided AnalogueGain is applied immediately.\n>  \n>    - Brightness:\n>        type: float\n> -- \n> 2.36.1\n>","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 08B6FBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  3 Aug 2022 14:52:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6D26A61FAE;\n\tWed,  3 Aug 2022 16:52:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B8BC0603E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  3 Aug 2022 16:52:17 +0200 (CEST)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5875C8B;\n\tWed,  3 Aug 2022 16:52:16 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659538339;\n\tbh=0FoncJydTe3oKRX+X+nSGYkAyCE8550JCIj/gZe/OEM=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=IMXorqcwzrgftKwjae+oEatzK7uw1hR5EI7mEllxIhLp2PxHY9Duj6iYeQHTV+KQt\n\tytLK3gduZCDuxm1zRzeIEUnGIJiJkhpsUNDSfN6ih2keJ+i6Vue2I5+wNjchHFi2qV\n\tjN08ESjmGEo4h7MB1eqMVqZBElFrPt2Z2ajeuS5OemNWPlYdm9MkctejIIFbjCForY\n\tfwGM3BXo7EzNdAVxLa9QUOo5nSNAkBTrvscbUHSb20aZqBGxFWjwSG3EOlryzZe+p8\n\ti7TunhmdHnyzdMEZUkkUdooEZOwXAyAw1otMiyZizAzzCl1Qux9NvkX4mtd6H8R8sQ\n\tjpZ7jcV8xpWbw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1659538337;\n\tbh=0FoncJydTe3oKRX+X+nSGYkAyCE8550JCIj/gZe/OEM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QNPr0OukPa5Zs2f5x0ifz3pQayWKyYRkz2jf3jc6H9CHLvKSJeweLAokoKjtOWlm+\n\tF6vfaduIxA9l5+UOmSUGzmWOjQGYHHQTSuIbnxqu0StJH3QbYHW7pSh2Gi9n8ANBGM\n\t//M7MT1yn0Gg8bdOfh+xcpawJDrBCCWHkTys5lCQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"QNPr0Ouk\"; dkim-atps=neutral","Date":"Wed, 3 Aug 2022 23:52:11 +0900","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20220803145211.GN311202@pyrite.rasen.tech>","References":"<20220518134728.777709-2-paul.elder@ideasonboard.com>\n\t<20220701154701.354052-1-jacopo@jmondi.org>\n\t<20220701154701.354052-9-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220701154701.354052-9-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH 9/9] fixup: Align AnalogueGainMode to\n\tExposureTimeMode","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"paul.elder@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]