[{"id":4500,"web_url":"https://patchwork.libcamera.org/comment/4500/","msgid":"<20200424110015.GE5954@pendragon.ideasonboard.com>","date":"2020-04-24T11:00:15","subject":"Re: [libcamera-devel] [PATCH v4 5/5] libcamera: controls: Add AWB\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:47:00AM +0100, Naushir Patuck wrote:\n> AwbMode is a new enum type to specify operating mode of the AWB\n> algorithm. All modes may not be supported by all platforms.\n> \n> ColourGains is a new float array type used to specify manual red\n> and blue (in that order) colour channel gains when AWB is disabled.\n> \n> ColourTemperature is a new control to return the current estimate of the\n> colour temperature.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/libcamera/control_ids.yaml | 55 ++++++++++++++++++++++++++++++++++\n>  1 file changed, 55 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index f66b851b..d922b039 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -169,6 +169,61 @@ controls:\n>        description: |\n>          Enable or disable the AWB.\n>  \n> +        \\sa ColourGains\n> +\n> +  # AwbMode needs further attention:\n> +  # - Auto-generate max enum value.\n> +  # - Better handling of custom types.\n> +  - AwbMode:\n> +      type: int32_t\n> +      description: |\n> +        Specify the range of illuminants to use for the AWB algorithm. The modes\n> +        supported are platform specific, and not all modes may be supported.\n> +      enum:\n> +        - name: AwbAuto\n> +          value: 0\n> +          description: Search over the whole colour temperature range.\n> +        - name: AwbIncandescent\n> +          value: 1\n> +          description: Incandescent AWB lamp mode.\n> +        - name: AwbTungsten\n> +          value: 2\n> +          description: Tungsten AWB lamp mode.\n> +        - name: AwbFluorescent\n> +          value: 3\n> +          description: Fluorescent AWB lamp mode.\n> +        - name: AwbIndoor\n> +          value: 4\n> +          description: Indoor AWB lighting mode.\n> +        - name: AwbDaylight\n> +          value: 5\n> +          description: Daylight AWB lighting mode.\n> +        - name: AwbCloudy\n> +          value: 6\n> +          description: Cloudy AWB lighting mode.\n> +        - name: AwbCustom\n> +          value: 7\n> +          description: Custom AWB mode.\n> +        - name: AwbModeMax\n> +          value: 7\n> +          description: Maximum allowed value (place any new values above here).\n> +\n> +  - ColourGains:\n> +      type: float\n> +      description: |\n> +        Pair of gain values for the Red and Blue colour channels, in that\n> +        order. ColourGains can only be applied in a Request when the AWB is\n> +        disabled.\n> +\n> +        \\sa AwbEnable\n> +      size: [2]\n> +\n> +  - ColourTemperature:\n> +      type: float\n\nI forgot to mention previously, does this need to be a float, or can it\nbe an integer ? I would be surprised if we needed more precision than\n1K, but feel free to tell me I'm wrong. If a integer is fine I'll change\nit when applying, no need to resend.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +      description: Report the current estimate of the colour temperature, in\n> +        kelvin, for this frame. The ColourTemperature control can only be\n> +        returned in metadata.\n> +\n>    - Saturation:\n>        type: float\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 22E2E603FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Apr 2020 13:00:30 +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 8E8C74F7;\n\tFri, 24 Apr 2020 13:00:29 +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=\"e1R8g67z\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1587726029;\n\tbh=DoXYDxgStN7R1LQSsmLRr3N08Q+jcKLaOAaCqHZ8yDk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=e1R8g67zC1pmJdOMzVOgpsrehOQuJgt+5ca2rkHUxNWG56wPCMOZWxaF6bThqy9BE\n\t6gtZtHOixS5fj45g6RwgA5Lqrm5f6sb+TjFHRgMifAWaSA37bC7NwWZ523quAvtNMz\n\tpXTL+tvbOPZv0IS5R3B4/Z/NvUWtZfcVw0sazQ+Y=","Date":"Fri, 24 Apr 2020 14:00:15 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200424110015.GE5954@pendragon.ideasonboard.com>","References":"<20200424104700.26819-1-naush@raspberrypi.com>\n\t<20200424104700.26819-6-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200424104700.26819-6-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v4 5/5] libcamera: controls: Add AWB\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 11:00:30 -0000"}},{"id":4501,"web_url":"https://patchwork.libcamera.org/comment/4501/","msgid":"<CAEmqJPrnQK3RCSE7upKYfwzpR=pHF2qeASqb6G6CgaL8CXrpmQ@mail.gmail.com>","date":"2020-04-24T11:27:04","subject":"Re: [libcamera-devel] [PATCH v4 5/5] libcamera: controls: Add AWB\n\trelated controls","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nOn Fri, 24 Apr 2020 at 12:00, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Naush,\n>\n> Thank you for the patch.\n>\n> On Fri, Apr 24, 2020 at 11:47:00AM +0100, Naushir Patuck wrote:\n> > AwbMode is a new enum type to specify operating mode of the AWB\n> > algorithm. All modes may not be supported by all platforms.\n> >\n> > ColourGains is a new float array type used to specify manual red\n> > and blue (in that order) colour channel gains when AWB is disabled.\n> >\n> > ColourTemperature is a new control to return the current estimate of the\n> > colour temperature.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  src/libcamera/control_ids.yaml | 55 ++++++++++++++++++++++++++++++++++\n> >  1 file changed, 55 insertions(+)\n> >\n> > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > index f66b851b..d922b039 100644\n> > --- a/src/libcamera/control_ids.yaml\n> > +++ b/src/libcamera/control_ids.yaml\n> > @@ -169,6 +169,61 @@ controls:\n> >        description: |\n> >          Enable or disable the AWB.\n> >\n> > +        \\sa ColourGains\n> > +\n> > +  # AwbMode needs further attention:\n> > +  # - Auto-generate max enum value.\n> > +  # - Better handling of custom types.\n> > +  - AwbMode:\n> > +      type: int32_t\n> > +      description: |\n> > +        Specify the range of illuminants to use for the AWB algorithm. The modes\n> > +        supported are platform specific, and not all modes may be supported.\n> > +      enum:\n> > +        - name: AwbAuto\n> > +          value: 0\n> > +          description: Search over the whole colour temperature range.\n> > +        - name: AwbIncandescent\n> > +          value: 1\n> > +          description: Incandescent AWB lamp mode.\n> > +        - name: AwbTungsten\n> > +          value: 2\n> > +          description: Tungsten AWB lamp mode.\n> > +        - name: AwbFluorescent\n> > +          value: 3\n> > +          description: Fluorescent AWB lamp mode.\n> > +        - name: AwbIndoor\n> > +          value: 4\n> > +          description: Indoor AWB lighting mode.\n> > +        - name: AwbDaylight\n> > +          value: 5\n> > +          description: Daylight AWB lighting mode.\n> > +        - name: AwbCloudy\n> > +          value: 6\n> > +          description: Cloudy AWB lighting mode.\n> > +        - name: AwbCustom\n> > +          value: 7\n> > +          description: Custom AWB mode.\n> > +        - name: AwbModeMax\n> > +          value: 7\n> > +          description: Maximum allowed value (place any new values above here).\n> > +\n> > +  - ColourGains:\n> > +      type: float\n> > +      description: |\n> > +        Pair of gain values for the Red and Blue colour channels, in that\n> > +        order. ColourGains can only be applied in a Request when the AWB is\n> > +        disabled.\n> > +\n> > +        \\sa AwbEnable\n> > +      size: [2]\n> > +\n> > +  - ColourTemperature:\n> > +      type: float\n>\n> I forgot to mention previously, does this need to be a float, or can it\n> be an integer ? I would be surprised if we needed more precision than\n> 1K, but feel free to tell me I'm wrong. If a integer is fine I'll change\n> it when applying, no need to resend.\n>\n\nYes that is fine, we don't need much precision here.  Please convert\nto int32_t before submitting.\n\nRegards,\nNaush\n\n\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> > +      description: Report the current estimate of the colour temperature, in\n> > +        kelvin, for this frame. The ColourTemperature control can only be\n> > +        returned in metadata.\n> > +\n> >    - Saturation:\n> >        type: float\n> >        description:  |\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<naush@raspberrypi.com>","Received":["from mail-lj1-x241.google.com (mail-lj1-x241.google.com\n\t[IPv6:2a00:1450:4864:20::241])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A7C0E603FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Apr 2020 13:27:20 +0200 (CEST)","by mail-lj1-x241.google.com with SMTP id u15so9577661ljd.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Apr 2020 04:27:20 -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=\"rYFpiTki\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=94ubUPP2iI3v72bkl1eQfsAWDqL3qW9tCj5jLB4OQTM=;\n\tb=rYFpiTkicGGHQSObd6Hx+BX2F8Cz4yAiAdSuttxKJWYOiIbQvvKKNauNA9YqFFjlOc\n\t4Fl1Y1QRHFRCOoCyQQCexYI69LCGWUeW3v1Zmvb/5GFx3IiQJExWX8QxK976ge86uZj9\n\t3jtQbiynz6c5pSHBuyqN/I0UG46I8kwEfnmbd37gSOckA3L4CVdVcgC1Q4PaePxFDa6M\n\tO5tTLfsFfp4zDgwbP6i8xitcjKVU8PuyLQo8iOtoJRtldWSq7dSqwbfCqPNWiAaAmfiH\n\tWZphBjnkuK0jRJEO1zp0dbORoM8E0AwtYCR+NW8xHLzKM4pV+BBbwHWAoQfAjMxrqbPm\n\t1ywg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=94ubUPP2iI3v72bkl1eQfsAWDqL3qW9tCj5jLB4OQTM=;\n\tb=pyKP10J4Uf2zNCT7naeVqaZaoDVbJPfvwISIJFRZZoR0GA1vmEyxLzDfaB3Ncxl+GN\n\trOk7SOAySUK7J46OMD7e8RRZP3gyMjJU2VqbYsM/D944Y8n56rLbboRP7n64Z9JZBmhg\n\t9VrnCHGOx0bNkc8piThJ7v7HIPjiIRdk31iNqrC7Soed9pLTq/iq8JYfzKkS4KIZ+lYI\n\tNQqq/motfiDeZ+gOz5lqQFgrXx6WomWs3MCk0DjY3FxxPUPt2K4hoNmjSqgSxfj7TzgM\n\tol2G38oMepR4GqfW/WQlDJwtLIs2KduHXk0tQbYWZfVUjuVMrhCcECrv2zQdXt2dgz9m\n\t/IlA==","X-Gm-Message-State":"AGi0PuYIW+vCOStq5+iDA8aWVaf43IwKBPqn6zSCvopGAkdvEiapici8\n\tHuNpzx26X+FzGW/ZSfd75/5UTwTzgUS8YCnH0eyKUiPfAjg=","X-Google-Smtp-Source":"APiQypIRUuV+xZGJYxTdIQqGF84e/JlXt2uzYM6me0f5vcN7VMyacxz1spp4cB0XjyNNXoKG8onz74sfs0NLn0IeW78=","X-Received":"by 2002:a2e:9d83:: with SMTP id c3mr4897090ljj.90.1587727639959; \n\tFri, 24 Apr 2020 04:27:19 -0700 (PDT)","MIME-Version":"1.0","References":"<20200424104700.26819-1-naush@raspberrypi.com>\n\t<20200424104700.26819-6-naush@raspberrypi.com>\n\t<20200424110015.GE5954@pendragon.ideasonboard.com>","In-Reply-To":"<20200424110015.GE5954@pendragon.ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Fri, 24 Apr 2020 12:27:04 +0100","Message-ID":"<CAEmqJPrnQK3RCSE7upKYfwzpR=pHF2qeASqb6G6CgaL8CXrpmQ@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v4 5/5] libcamera: controls: Add AWB\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 11:27:21 -0000"}}]