[{"id":17829,"web_url":"https://patchwork.libcamera.org/comment/17829/","msgid":"<YNkhBmeYPZ4QumHE@pendragon.ideasonboard.com>","date":"2021-06-28T01:08:22","subject":"Re: [libcamera-devel] [RFC PATCH 05/14] controls: Replace AwbLocked\n\twith AwbState, and add AwbLock","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Paul,\n\nThank you for the patch.\n\nOn Fri, Jun 18, 2021 at 07:33:42PM +0900, Paul Elder wrote:\n> AwbLocked alone isn't sufficient for reporting the Awb state, so replace\n\ns/Awb state/AWB state/\n\n> it with AwbState. Add an AwbLock control for instructing the camera to\n> lock the AWB values.\n\nThe discussion of patch 03/14 applies to these controls too, so I'll\nskip the review for now.\n\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  src/libcamera/control_ids.yaml | 82 ++++++++++++++++++++--------------\n>  1 file changed, 49 insertions(+), 33 deletions(-)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index 2e62f61b..3a4f07cf 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -161,6 +161,55 @@ controls:\n>            value: 3\n>            description: Custom exposure mode.\n>  \n> +  - AwbLock:\n> +      type: bool\n> +      description: |\n> +        Control to lock the AWB values.\n> +        When set to true, the AWB algorithm is locked to its latest parameters,\n> +        and will not change exposure settings until set to false.\n> +        \\sa AwbState\n> +\n> +  - AwbState:\n> +      type: int32_t\n> +      description: |\n> +        Control to report the current AWB algorithm state. Switching between or\n> +        enabling AWB modes (AwbMode) always resets the AwbState to\n> +        AwbStateInactive. The camera device can do several state transitions\n> +        between two results, if it is allowed by the state transition table.\n> +        For example, AwbStateInactive may never actually be seen in a result.\n> +\n> +        The state in the result is the state for this image (in sync with this\n> +        image). If AWB state becomes AwbStateConverged, then the image data\n> +        associated with the result should be good to use.\n> +\n> +        The state transitions mentioned below assume that AwbMode is auto.\n> +\n> +        \\sa AwbLock\n> +      enum:\n> +        - name: AwbStateInactive\n> +          value: 0\n> +          description: |\n> +            The AWB algorithm is inactive.\n> +            If the camera initiates an AWB scan, the state shall go to Searching.\n> +            If AwbLock is on, the state shall go to Locked.\n> +        - name: AwbStateSearching\n> +          value: 1\n> +          description: |\n> +            The AWB algorithm has not converged yet.\n> +            If the camera finishes an AWB scan, the state shall go to Converged.\n> +            If AwbLock is on, the state shall go to Locked.\n> +        - name: AwbStateConverged\n> +          value: 2\n> +          description: |\n> +            The AWB algorithm has converged.\n> +            If the camera initiates an AWB scan, the state shall go to Searching.\n> +            If AwbLock is on, the state shall go to Locked.\n> +        - name: AwbStateLocked\n> +          value: 3\n> +          description: |\n> +            The AWB algorithm is locked.\n> +            If AwbLock is off, the state shall go to Searching.\n> +\n>    - ExposureValue:\n>        type: float\n>        description: |\n> @@ -272,17 +321,6 @@ controls:\n>            value: 10\n>            description: Custom AWB mode.\n>  \n> -  - AwbLocked:\n> -      type: bool\n> -      description: |\n> -        Report the lock status of a running AWB algorithm.\n> -\n> -        If the AWB algorithm is locked the value shall be set to true, if it's\n> -        converging it shall be set to false. If the AWB algorithm is not\n> -        running the control shall not be present in the metadata control list.\n> -\n> -        \\sa AwbEnable\n> -\n>    - ColourGains:\n>        type: float\n>        description: |\n> @@ -572,28 +610,6 @@ controls:\n>            description: |\n>              AF has completed a passive scan without finding focus.\n>  \n> -  - AwbState:\n> -      type: int32_t\n> -      draft: true\n> -      description: |\n> -       Control to report the current AWB algorithm state. Currently identical\n> -       to ANDROID_CONTROL_AWB_STATE.\n> -\n> -        Current state of the AWB algorithm.\n> -      enum:\n> -        - name: AwbStateInactive\n> -          value: 0\n> -          description: The AWB algorithm is inactive.\n> -        - name: AwbStateSearching\n> -          value: 1\n> -          description: The AWB algorithm has not converged yet.\n> -        - name: AwbConverged\n> -          value: 2\n> -          description: The AWB algorithm has converged.\n> -        - name: AwbLocked\n> -          value: 3\n> -          description: The AWB algorithm is locked.\n> -\n>    - SensorRollingShutterSkew:\n>        type: int64_t\n>        draft: true","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 9E741C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jun 2021 01:08:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D968E684D5;\n\tMon, 28 Jun 2021 03:08:24 +0200 (CEST)","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 A1A646028C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jun 2021 03:08:23 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1FC8E57E;\n\tMon, 28 Jun 2021 03:08:23 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"i0NAo3S8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624842503;\n\tbh=JSZs7Rmc0Uz0MS8kXeOTpO85Pn171Zqp85mahNhQUOQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=i0NAo3S8zf2tZlmugt1zTN9GmdmA3d2HA1vB2B/FycBxPKy2iU8Nw505LYJFjuyX8\n\tFpoXp6b5OlJwPKL8TcgqC4OrihOiUhrAzMpq21o+F7byKmJMMOt3xc8exXzcigIsEm\n\thjwUcJUNGLXOgglYe8SWALFBx04mXNG0eWp7a0j8=","Date":"Mon, 28 Jun 2021 04:08:22 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<YNkhBmeYPZ4QumHE@pendragon.ideasonboard.com>","References":"<20210618103351.1642060-1-paul.elder@ideasonboard.com>\n\t<20210618103351.1642060-6-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210618103351.1642060-6-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [RFC PATCH 05/14] controls: Replace AwbLocked\n\twith AwbState, and add AwbLock","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]