[{"id":4148,"web_url":"https://patchwork.libcamera.org/comment/4148/","msgid":"<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>","date":"2020-03-20T15:11:42","subject":"Re: [libcamera-devel] [PATCH v2 4/6] libcamera: controls: Add AWB\n\trelated controls","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Naush,\n\nOn 09/03/2020 12:33, 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> ManualWbGains is a new float arary type used to specify manual red\n\n/arary/array/\n\n> and blue (in that order) colour channel gains when AWB is disabled.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/libcamera/control_ids.yaml | 47 ++++++++++++++++++++++++++++++++++\n>  1 file changed, 47 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index da1a7b43..9a33094a 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -143,6 +143,53 @@ controls:\n>        description: |\n>          Enable or disable the AWB.\n>  \n> +  - AwbMode:\n> +      type: int32_t\n> +      description: |\n> +        Specify the range of illumants to use for the AWB algorihtm. The modes\n\n/illumants/illuminance/\nor\n/illumants/luminance/ ?\nI'm not quite sure what word you were going for with illumants.\n\ns/algorihtm/algorithm/\n\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 CT 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\nI wonder what sort order we should apply to control values like this?\nI'm sure Laurent would love anything to be alphabetically sorted by a\ndefault if nothing else applies, but would there be an expected order to\nthis list otherwise?\n\n> +        - name: AwbCustom1\n> +          value: 7\n> +          description: Custom AWB mode 1.\n> +        - name: AwbCustom2\n> +          value: 8\n> +          description: Custom AWB mode 2.\n> +        - name: AwbCustom3\n> +          value: 9\n> +          description: Custom AWB mode 3.\n> +        - name: AwbModeMax\n> +          value: 9\n> +          description: Maximum allowed value (place any new values above here).\n\nOnly the same response as the others here,\n\n> +\n> +  - ManualWbGains:\n> +      type: float\n> +      description: |\n> +        Specify a fixed gain parameter for the Red and Blue colour channels,\n> +        in that order.\n> +      size: [2]\n> +\n>    - Brightness:\n>        type: int32_t\n>        description: Specify a fixed brightness parameter\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["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 3F53860416\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Mar 2020 16:11:46 +0100 (CET)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AFDC6504;\n\tFri, 20 Mar 2020 16:11:45 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584717105;\n\tbh=oEdr8rPzKePEYMrD5DYsHE+qsOPNpQtuy5IxJOa6ZKQ=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=K82fffhnujGj/nzRXjSzRpEBkSioH8ilKj1gruuumdCNfQlLzh2Ip9Xjc4UNxOiQo\n\t/vJwnCZKD/Dc3T7TTosw7R62mmArzllR136cYP6WH9CaiaEwRgVpxi9awNiy30r/p7\n\tf28Cgn05gm3IACU3wOfsLVM4/2eKGQYR6rA2acNE=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-5-naush@raspberrypi.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2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Mq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>","Date":"Fri, 20 Mar 2020 15:11:42 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.9.1","MIME-Version":"1.0","In-Reply-To":"<20200309123319.630-5-naush@raspberrypi.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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, 20 Mar 2020 15:11:46 -0000"}},{"id":4151,"web_url":"https://patchwork.libcamera.org/comment/4151/","msgid":"<c768e15a-f447-44d6-b4a4-1f3fc1c483eb@ideasonboard.com>","date":"2020-03-20T15:50:14","subject":"Re: [libcamera-devel] [PATCH v2 4/6] libcamera: controls: Add AWB\n\trelated controls","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 20/03/2020 15:11, Kieran Bingham wrote:\n> Hi Naush,\n> \n> On 09/03/2020 12:33, 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>> ManualWbGains is a new float arary type used to specify manual red\n> \n> /arary/array/\n> \n>> and blue (in that order) colour channel gains when AWB is disabled.\n>>\n>> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n>> ---\n>>  src/libcamera/control_ids.yaml | 47 ++++++++++++++++++++++++++++++++++\n>>  1 file changed, 47 insertions(+)\n>>\n>> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n>> index da1a7b43..9a33094a 100644\n>> --- a/src/libcamera/control_ids.yaml\n>> +++ b/src/libcamera/control_ids.yaml\n>> @@ -143,6 +143,53 @@ controls:\n>>        description: |\n>>          Enable or disable the AWB.\n>>  \n>> +  - AwbMode:\n>> +      type: int32_t\n>> +      description: |\n>> +        Specify the range of illumants to use for the AWB algorihtm. The modes\n> \n> /illumants/illuminance/\n> or\n> /illumants/luminance/ ?\n> I'm not quite sure what word you were going for with illumants.\n\nAha, I think 'illuminants' might be the right spelling (though my spell\nchecker still doesn't like that one either :D)\n\nOh well...\n\n> \n> s/algorihtm/algorithm/\n> \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 CT 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> \n> I wonder what sort order we should apply to control values like this?\n> I'm sure Laurent would love anything to be alphabetically sorted by a\n> default if nothing else applies, but would there be an expected order to\n> this list otherwise?\n> \n>> +        - name: AwbCustom1\n>> +          value: 7\n>> +          description: Custom AWB mode 1.\n>> +        - name: AwbCustom2\n>> +          value: 8\n>> +          description: Custom AWB mode 2.\n>> +        - name: AwbCustom3\n>> +          value: 9\n>> +          description: Custom AWB mode 3.\n>> +        - name: AwbModeMax\n>> +          value: 9\n>> +          description: Maximum allowed value (place any new values above here).\n> \n> Only the same response as the others here,\n> \n>> +\n>> +  - ManualWbGains:\n>> +      type: float\n>> +      description: |\n>> +        Specify a fixed gain parameter for the Red and Blue colour channels,\n>> +        in that order.\n>> +      size: [2]\n>> +\n>>    - Brightness:\n>>        type: int32_t\n>>        description: Specify a fixed brightness parameter\n>>\n>","headers":{"Return-Path":"<kieran.bingham@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 EFB2960416\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Mar 2020 16:50:17 +0100 (CET)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6426E504;\n\tFri, 20 Mar 2020 16:50:17 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1584719417;\n\tbh=9+47njq3ody8JI1IderVidKYuUgYXeQzzDyF1dErvw4=;\n\th=Reply-To:Subject:From:To:References:Date:In-Reply-To:From;\n\tb=LUgZLuMoUAWXytm3GthokWtROTyZWTeaELotDIZhrS1rGPTt9XqAJXTW1DWkKubKz\n\tMzr2UghlAdAR4f+B0hujFG1k1SaiYm7izQKbrfnSow3N8TPcxm2Xf9i5Prov/wLwLi\n\tYKdIpJ8eJBVx1RFRaICZUdYgTAfSCfu0whM3AAns=","Reply-To":"kieran.bingham@ideasonboard.com","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-5-naush@raspberrypi.com>\n\t<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4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S0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<c768e15a-f447-44d6-b4a4-1f3fc1c483eb@ideasonboard.com>","Date":"Fri, 20 Mar 2020 15:50:14 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.9.1","MIME-Version":"1.0","In-Reply-To":"<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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, 20 Mar 2020 15:50:18 -0000"}},{"id":4152,"web_url":"https://patchwork.libcamera.org/comment/4152/","msgid":"<CAHW6GYLCAeKHoAgGMfgf-PCdMa8Hx-zApktOHbVqi5xJue1GoQ@mail.gmail.com>","date":"2020-03-20T16:04:47","subject":"Re: [libcamera-devel] [PATCH v2 4/6] libcamera: controls: Add AWB\n\trelated controls","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Yes, \"illuminants\" is correct. The plural of an \"illuminant\". It\ndoesn't seem to be an everyday sort of a word...\n\nDavid\n\nOn Fri, 20 Mar 2020 at 15:50, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> On 20/03/2020 15:11, Kieran Bingham wrote:\n> > Hi Naush,\n> >\n> > On 09/03/2020 12:33, 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> >> ManualWbGains is a new float arary type used to specify manual red\n> >\n> > /arary/array/\n> >\n> >> and blue (in that order) colour channel gains when AWB is disabled.\n> >>\n> >> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> >> ---\n> >>  src/libcamera/control_ids.yaml | 47 ++++++++++++++++++++++++++++++++++\n> >>  1 file changed, 47 insertions(+)\n> >>\n> >> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> >> index da1a7b43..9a33094a 100644\n> >> --- a/src/libcamera/control_ids.yaml\n> >> +++ b/src/libcamera/control_ids.yaml\n> >> @@ -143,6 +143,53 @@ controls:\n> >>        description: |\n> >>          Enable or disable the AWB.\n> >>\n> >> +  - AwbMode:\n> >> +      type: int32_t\n> >> +      description: |\n> >> +        Specify the range of illumants to use for the AWB algorihtm. The modes\n> >\n> > /illumants/illuminance/\n> > or\n> > /illumants/luminance/ ?\n> > I'm not quite sure what word you were going for with illumants.\n>\n> Aha, I think 'illuminants' might be the right spelling (though my spell\n> checker still doesn't like that one either :D)\n>\n> Oh well...\n>\n> >\n> > s/algorihtm/algorithm/\n> >\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 CT 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> >\n> > I wonder what sort order we should apply to control values like this?\n> > I'm sure Laurent would love anything to be alphabetically sorted by a\n> > default if nothing else applies, but would there be an expected order to\n> > this list otherwise?\n> >\n> >> +        - name: AwbCustom1\n> >> +          value: 7\n> >> +          description: Custom AWB mode 1.\n> >> +        - name: AwbCustom2\n> >> +          value: 8\n> >> +          description: Custom AWB mode 2.\n> >> +        - name: AwbCustom3\n> >> +          value: 9\n> >> +          description: Custom AWB mode 3.\n> >> +        - name: AwbModeMax\n> >> +          value: 9\n> >> +          description: Maximum allowed value (place any new values above here).\n> >\n> > Only the same response as the others here,\n> >\n> >> +\n> >> +  - ManualWbGains:\n> >> +      type: float\n> >> +      description: |\n> >> +        Specify a fixed gain parameter for the Red and Blue colour channels,\n> >> +        in that order.\n> >> +      size: [2]\n> >> +\n> >>    - Brightness:\n> >>        type: int32_t\n> >>        description: Specify a fixed brightness parameter\n> >>\n> >\n>\n> --\n> Regards\n> --\n> Kieran\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<david.plowman@raspberrypi.com>","Received":["from mail-ot1-x341.google.com (mail-ot1-x341.google.com\n\t[IPv6:2607:f8b0:4864:20::341])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E5DC360416\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Mar 2020 17:04:58 +0100 (CET)","by mail-ot1-x341.google.com with SMTP id t28so6466636ott.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Mar 2020 09:04:58 -0700 (PDT)"],"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=/qsfpsE6ep/lwhn2MVDSwekm9GxNnMn2cEYM0hviAxQ=;\n\tb=bjd3xr6bpD2KueiBMxf68fXJNUM7GMZ4A6jOcDMXpnRC3AVc6fD4p2X4JmEfTbgnxw\n\txYxLhAq3MaQfh8AVmXxM6rG8awmoEPAwXcyq/bdyKhRZUiIoL0FHKqZdrEMix1Ih5iUG\n\t8Bp7araHrKmzfwGiIZYoeCQWhnYlm+o3lylWq5fzI08Nxsvz1kr+5R2P3AkHhtGHc8/p\n\tUus7ah8bGwU+/OVKt0j83J13++yk3yrGvbzBngHCjSKURUlPxn/+4F/W875bE2UCYxhU\n\tbyPXHsac5PTYUDm+X9y29FCzWmNR92rGwazzOvO9DEH/VTQndXKbdqMQb3WODO/c09SI\n\tbiyw==","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=/qsfpsE6ep/lwhn2MVDSwekm9GxNnMn2cEYM0hviAxQ=;\n\tb=eJTnu1NEBD3pO2zP3ZJb2xGmnw2hWRfZPR5VoIBi0v/nbNmnv8pFldSCeUPxhsEm8J\n\thJgDjPKEfeCSyp/kPCUTOl/so6//pnKaYzOWsJLE99wn1u8iaWmlH7xqDhfJIvqaBCst\n\tFzc7NCabXRaq6h3mD/wCVewNx3Adpl1jbsa5EQ9wM1Fac3ZpLcrLfEJm9jdYotoQ3Eu/\n\teqyl0t5huxj4euONU36gLgAgg6VIAAILUWi2RnQmjeG5aSzqaX8nvLoNAS0yCxkVkzVn\n\tO57r4vbjROt8lLBEPJMsA0lg0Be6lBtnQpLEsGh+7U8bxGP25kUR4g0VaG5JY9fmOKjW\n\t2HQg==","X-Gm-Message-State":"ANhLgQ0EA/uv24rNZzqXX8PEYWHm0wpQhlW+n1OgH3WclNHUhV9Yidvo\n\tACDpaD+HrgvgW5tWl0wvl5+xsoj4AOAgm8EKiJXZhw==","X-Google-Smtp-Source":"ADFU+vsVKmlJaKb5NNzljyEyq8bLqtoHivHuvIuCehlrpiqYdW2s7Bb1Lhfvju3wAt4Tzu1o+YaL2X0KivDvT/vtPoQ=","X-Received":"by 2002:a05:6830:2014:: with SMTP id\n\te20mr7473606otp.317.1584720297345; \n\tFri, 20 Mar 2020 09:04:57 -0700 (PDT)","MIME-Version":"1.0","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-5-naush@raspberrypi.com>\n\t<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>\n\t<c768e15a-f447-44d6-b4a4-1f3fc1c483eb@ideasonboard.com>","In-Reply-To":"<c768e15a-f447-44d6-b4a4-1f3fc1c483eb@ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Fri, 20 Mar 2020 16:04:47 +0000","Message-ID":"<CAHW6GYLCAeKHoAgGMfgf-PCdMa8Hx-zApktOHbVqi5xJue1GoQ@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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, 20 Mar 2020 16:04:59 -0000"}},{"id":4311,"web_url":"https://patchwork.libcamera.org/comment/4311/","msgid":"<20200326154645.GT20581@pendragon.ideasonboard.com>","date":"2020-03-26T15:46:45","subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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, Mar 20, 2020 at 03:11:42PM +0000, Kieran Bingham wrote:\n> On 09/03/2020 12:33, 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> > ManualWbGains is a new float arary type used to specify manual red\n> \n> /arary/array/\n> \n> > and blue (in that order) colour channel gains when AWB is disabled.\n> > \n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  src/libcamera/control_ids.yaml | 47 ++++++++++++++++++++++++++++++++++\n> >  1 file changed, 47 insertions(+)\n> > \n> > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > index da1a7b43..9a33094a 100644\n> > --- a/src/libcamera/control_ids.yaml\n> > +++ b/src/libcamera/control_ids.yaml\n> > @@ -143,6 +143,53 @@ controls:\n> >        description: |\n> >          Enable or disable the AWB.\n> >  \n> > +  - AwbMode:\n> > +      type: int32_t\n> > +      description: |\n> > +        Specify the range of illumants to use for the AWB algorihtm. The modes\n> \n> /illumants/illuminance/\n> or\n> /illumants/luminance/ ?\n> I'm not quite sure what word you were going for with illumants.\n> \n> s/algorihtm/algorithm/\n> \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 CT 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> \n> I wonder what sort order we should apply to control values like this?\n> I'm sure Laurent would love anything to be alphabetically sorted by a\n> default if nothing else applies, but would there be an expected order to\n> this list otherwise?\n\nI like auto being first, and it fortunately starts with an A ;-) Jokes\naside, this is a pretty standard configuration parameter for cameras,\nwould there be any published standard that we could follow for possible\nvalues ?\n\n> > +        - name: AwbCustom1\n> > +          value: 7\n> > +          description: Custom AWB mode 1.\n> > +        - name: AwbCustom2\n> > +          value: 8\n> > +          description: Custom AWB mode 2.\n> > +        - name: AwbCustom3\n> > +          value: 9\n> > +          description: Custom AWB mode 3.\n> > +        - name: AwbModeMax\n> > +          value: 9\n> > +          description: Maximum allowed value (place any new values above here).\n> \n> Only the same response as the others here,\n> \n> > +\n> > +  - ManualWbGains:\n> > +      type: float\n> > +      description: |\n> > +        Specify a fixed gain parameter for the Red and Blue colour channels,\n> > +        in that order.\n> > +      size: [2]\n\nHow do these controls interact with ManualGain ? I wonder if we\nshouldn't merge them all in a 2x2 matrix of red, 2 x green and blue\ngains.\n\n> > +\n> >    - Brightness:\n> >        type: int32_t\n> >        description: Specify a fixed brightness parameter","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 65CF360414\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Mar 2020 16:46:49 +0100 (CET)","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 D03392DC;\n\tThu, 26 Mar 2020 16:46:48 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"cAIPO7WH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1585237609;\n\tbh=GxMSgpIgNnQqOybRov1+OlGIRx84e3NAaedL3nGVg0s=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cAIPO7WHm0ajr2a2V1P5URxI0YKt2vT/pAxMLAHJGbUoBtcrI6gmNRyYO7vC8aCgT\n\tSQZ0NSHKp79MFiw8Hhi+BREE+hH/emHlfCoVFQPyGtQTlvYRPvoHxecD3ceoeLqt8a\n\tY/Dkbh4ZPcfONaJO9ggIbP6sW0wmHQvn7LiqKLOo=","Date":"Thu, 26 Mar 2020 17:46:45 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20200326154645.GT20581@pendragon.ideasonboard.com>","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-5-naush@raspberrypi.com>\n\t<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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":"Thu, 26 Mar 2020 15:46:49 -0000"}},{"id":4320,"web_url":"https://patchwork.libcamera.org/comment/4320/","msgid":"<CAEmqJPqafgVgZYXa78EtaCsWRy6QXc5veuyJ6bD7SG_msKL7YA@mail.gmail.com>","date":"2020-03-26T19:29:42","subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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 Thu, 26 Mar 2020 at 15:46, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Naush,\n>\n> Thank you for the patch.\n>\n> On Fri, Mar 20, 2020 at 03:11:42PM +0000, Kieran Bingham wrote:\n> > On 09/03/2020 12:33, 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> > > ManualWbGains is a new float arary type used to specify manual red\n> >\n> > /arary/array/\n> >\n> > > and blue (in that order) colour channel gains when AWB is disabled.\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > ---\n> > >  src/libcamera/control_ids.yaml | 47 ++++++++++++++++++++++++++++++++++\n> > >  1 file changed, 47 insertions(+)\n> > >\n> > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > > index da1a7b43..9a33094a 100644\n> > > --- a/src/libcamera/control_ids.yaml\n> > > +++ b/src/libcamera/control_ids.yaml\n> > > @@ -143,6 +143,53 @@ controls:\n> > >        description: |\n> > >          Enable or disable the AWB.\n> > >\n> > > +  - AwbMode:\n> > > +      type: int32_t\n> > > +      description: |\n> > > +        Specify the range of illumants to use for the AWB algorihtm. The modes\n> >\n> > /illumants/illuminance/\n> > or\n> > /illumants/luminance/ ?\n> > I'm not quite sure what word you were going for with illumants.\n> >\n> > s/algorihtm/algorithm/\n> >\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 CT 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> >\n> > I wonder what sort order we should apply to control values like this?\n> > I'm sure Laurent would love anything to be alphabetically sorted by a\n> > default if nothing else applies, but would there be an expected order to\n> > this list otherwise?\n>\n> I like auto being first, and it fortunately starts with an A ;-) Jokes\n> aside, this is a pretty standard configuration parameter for cameras,\n> would there be any published standard that we could follow for possible\n> values ?\n>\n\nThe only one that comes to mind would be the Android Camera HAL 3 values:\nhttps://source.android.com/devices/camera/camera3_3Amodes\n\nWe have already diverged slightly from that list :)\n\n> > > +        - name: AwbCustom1\n> > > +          value: 7\n> > > +          description: Custom AWB mode 1.\n> > > +        - name: AwbCustom2\n> > > +          value: 8\n> > > +          description: Custom AWB mode 2.\n> > > +        - name: AwbCustom3\n> > > +          value: 9\n> > > +          description: Custom AWB mode 3.\n> > > +        - name: AwbModeMax\n> > > +          value: 9\n> > > +          description: Maximum allowed value (place any new values above here).\n> >\n> > Only the same response as the others here,\n> >\n> > > +\n> > > +  - ManualWbGains:\n> > > +      type: float\n> > > +      description: |\n> > > +        Specify a fixed gain parameter for the Red and Blue colour channels,\n> > > +        in that order.\n> > > +      size: [2]\n>\n> How do these controls interact with ManualGain ? I wonder if we\n> shouldn't merge them all in a 2x2 matrix of red, 2 x green and blue\n> gains.\n\nMy intention was that ManualGain would be the analogue (and possibly\nsome digital) gain applied by the sensor in manual AE modes.  Perhaps\nto be more explicit I should rename  ManualAnalgoueGain...?  In any\ncase, this gain value are applied to all bayer colour channels at the\nsensor level.\n\nManualWbGains is used in Manual AWB mode.  If you do not use one of\nthe presets (AwbIncandescent, AwbTungsten, etc.), you can specify your\nown gain to apply (in the ISP pipeline) to fix the white point.  I\ndon't know if this is a standard thing done by other vendors, but the\nwhite balance is computed as gains applied on the red and blue\nchannels only.  The green channel(s) is fixed at 1x gain for white\nbalance adjustment.  If you did want to add further gain to the signal\n(i.e. digital gain), it would be then applied equally to all RGB\nchannels, but in addition to any white balance gains that were applied\nto the R and B channels.\n\nHowever.... to cause more confusion, there is an ISO control that will\nlikely be added at some point.  I think the convention is that ISO is\na combination of all gains (analogue and digital) applied in the full\nimaging pipeline, but not accounting for the white balance gain\nadjustments to the R/B channels.\n\nSo to finally answer your question, these operations all seem\nindependent to me, so I do not think we would be able to merge the\ncontrols into one 2x2 matrix.\n\n>\n> > > +\n> > >    - Brightness:\n> > >        type: int32_t\n> > >        description: Specify a fixed brightness parameter\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n\nRegards,\nNaush","headers":{"Return-Path":"<naush@raspberrypi.com>","Received":["from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com\n\t[IPv6:2a00:1450:4864:20::12c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1708060412\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Mar 2020 20:30:00 +0100 (CET)","by mail-lf1-x12c.google.com with SMTP id t16so5065580lfl.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Mar 2020 12:30:00 -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=\"mdeoPkgU\"; 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=5stKQNURBncJ+8gaGUl5JtALmrA4GIGgSyqwYCPXa5g=;\n\tb=mdeoPkgUd3zGjkRvQM4EJHKGdiJip+IZaWRt+iw6gvqaUUBN4aV9CpIYBbm2m/sIak\n\tEthl0d5OvryMlB7ye6Vxqp+Wc3sR6lOChs3yi/JAjRdcLYO2LDChjRmsveaerdJyAYgn\n\ts+5LPouqvc3tE0KBL/KIUO3MUvDUjpXMzRpiRcosVYlzW48OnVj27fWZgrbXHPAmvnW3\n\tbKfxCLsqhEpXeiytNkBwi3UQa+EnsfOjk+RfIp2GKLDYCtfBJAGxdvYpcMy2NHX44OqJ\n\t64tVeuY/x6AQzyO/IksN0rm8TBXNa5F7dNjAwHckrj1RElLkHyHxdvYU6G99CrBNWnhD\n\tITSg==","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=5stKQNURBncJ+8gaGUl5JtALmrA4GIGgSyqwYCPXa5g=;\n\tb=jXox0G0OtwSyYcnkHFny36jYYZyfmPZETtUpYN67Xe7yHfT1qiC+gqD0Ml09/nHzmS\n\tjF25nllZYWVk/ReUwyUZP23UkfWLvBt5oYgDFnbx03to6b7FRoZxPuYuydGnhCrOftcw\n\t7e+o2jAWfFmF44hxglXVx8yikz0NQrWA/T/2VzCVCd+MoTSU2lxweZEx5Z0oHwv9oyR8\n\t7Qyy7Lyy79cxoEeYvutpPpf9da+6tChnC8qKIyxbrXgIOMO36jr+b6fHpvof+UWiSfv8\n\tsW0K7cAHbrXnPFV3WBP5KCfnkF2yCGhN4uDJMVJpFfThap3xEswk5RwViw0yRQn1/sKN\n\tRfxQ==","X-Gm-Message-State":"ANhLgQ2DY+b6fXqXQImxNK4dKVrg4gomBZ9bhoz2yDdSEfrqqtemVTWx\n\tEMyu449t968QWmSTfNsrB0vapzMKeQ34/d9UOOfFqbkNxTp6lg==","X-Google-Smtp-Source":"ADFU+vvmtoZlW3dXui0Qj2l6w5cyvRaY7TL8eTjyymQlJQuWsxesI+fihpeF9hLai9eImPq5a7BOcA8ZGtd81guQc9s=","X-Received":"by 2002:a05:6512:3391:: with SMTP id\n\th17mr6651876lfg.181.1585250999019; \n\tThu, 26 Mar 2020 12:29:59 -0700 (PDT)","MIME-Version":"1.0","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-5-naush@raspberrypi.com>\n\t<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>\n\t<20200326154645.GT20581@pendragon.ideasonboard.com>","In-Reply-To":"<20200326154645.GT20581@pendragon.ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Thu, 26 Mar 2020 19:29:42 +0000","Message-ID":"<CAEmqJPqafgVgZYXa78EtaCsWRy6QXc5veuyJ6bD7SG_msKL7YA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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":"Thu, 26 Mar 2020 19:30:00 -0000"}},{"id":4344,"web_url":"https://patchwork.libcamera.org/comment/4344/","msgid":"<20200327140059.GI5040@pendragon.ideasonboard.com>","date":"2020-03-27T14:00:59","subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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\nOn Thu, Mar 26, 2020 at 07:29:42PM +0000, Naushir Patuck wrote:\n> On Thu, 26 Mar 2020 at 15:46, Laurent Pinchart wrote:\n> > On Fri, Mar 20, 2020 at 03:11:42PM +0000, Kieran Bingham wrote:\n> >> On 09/03/2020 12:33, 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> >>> ManualWbGains is a new float arary type used to specify manual red\n> >>\n> >> /arary/array/\n> >>\n> >>> and blue (in that order) colour channel gains when AWB is disabled.\n> >>>\n> >>> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> >>> ---\n> >>>  src/libcamera/control_ids.yaml | 47 ++++++++++++++++++++++++++++++++++\n> >>>  1 file changed, 47 insertions(+)\n> >>>\n> >>> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> >>> index da1a7b43..9a33094a 100644\n> >>> --- a/src/libcamera/control_ids.yaml\n> >>> +++ b/src/libcamera/control_ids.yaml\n> >>> @@ -143,6 +143,53 @@ controls:\n> >>>        description: |\n> >>>          Enable or disable the AWB.\n> >>>\n> >>> +  - AwbMode:\n> >>> +      type: int32_t\n> >>> +      description: |\n> >>> +        Specify the range of illumants to use for the AWB algorihtm. The modes\n> >>\n> >> /illumants/illuminance/\n> >> or\n> >> /illumants/luminance/ ?\n> >> I'm not quite sure what word you were going for with illumants.\n> >>\n> >> s/algorihtm/algorithm/\n> >>\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 CT 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> >>\n> >> I wonder what sort order we should apply to control values like this?\n> >> I'm sure Laurent would love anything to be alphabetically sorted by a\n> >> default if nothing else applies, but would there be an expected order to\n> >> this list otherwise?\n> >\n> > I like auto being first, and it fortunately starts with an A ;-) Jokes\n> > aside, this is a pretty standard configuration parameter for cameras,\n> > would there be any published standard that we could follow for possible\n> > values ?\n> \n> The only one that comes to mind would be the Android Camera HAL 3 values:\n> https://source.android.com/devices/camera/camera3_3Amodes\n> \n> We have already diverged slightly from that list :)\n\n:-) The list is interesting, as it also mentions the corresponding\ntemperatures. I however assume that it probably isn't just a matter of\ntemperature, is it ?\n\nThe other interesting part in that list is that the manual modes are\ndocumented as \"Fixed white balance settings for ...\". I wonder if it's\nreally fixed, or if it restricts the search range of the AWB algorithm.\n\n> >>> +        - name: AwbCustom1\n> >>> +          value: 7\n> >>> +          description: Custom AWB mode 1.\n> >>> +        - name: AwbCustom2\n> >>> +          value: 8\n> >>> +          description: Custom AWB mode 2.\n> >>> +        - name: AwbCustom3\n> >>> +          value: 9\n> >>> +          description: Custom AWB mode 3.\n> >>> +        - name: AwbModeMax\n> >>> +          value: 9\n> >>> +          description: Maximum allowed value (place any new values above here).\n> >>\n> >> Only the same response as the others here,\n> >>\n> >>> +\n> >>> +  - ManualWbGains:\n> >>> +      type: float\n> >>> +      description: |\n> >>> +        Specify a fixed gain parameter for the Red and Blue colour channels,\n> >>> +        in that order.\n> >>> +      size: [2]\n> >\n> > How do these controls interact with ManualGain ? I wonder if we\n> > shouldn't merge them all in a 2x2 matrix of red, 2 x green and blue\n> > gains.\n> \n> My intention was that ManualGain would be the analogue (and possibly\n> some digital) gain applied by the sensor in manual AE modes.  Perhaps\n> to be more explicit I should rename  ManualAnalgoueGain...?  In any\n> case, this gain value are applied to all bayer colour channels at the\n> sensor level.\n\nDo you think there could be a need to apply different gains for\nindividual Bayer components when operating in manual mode, or would that\nbe a sensor feature that would only be used by the IPA for AWB ? I'd\nsuspect the latter (or even no use of separate analog gains at all by\nIPAs in many cases), but that claim is not backed by personal\nexperience.\n\n> ManualWbGains is used in Manual AWB mode.  If you do not use one of\n> the presets (AwbIncandescent, AwbTungsten, etc.), you can specify your\n> own gain to apply (in the ISP pipeline) to fix the white point.\n\n\nThanks for the clarification. Let's then document AnalogGain and\nManualWbGains to make the distinction clear. As we're dropping the\nManual prefix, I wonder what a good name for ManualWbGains would be.\nDigitalGains ? ColourGains ? RGBGains ? DigitalColourGains ?\n\n> I don't know if this is a standard thing done by other vendors, but the\n> white balance is computed as gains applied on the red and blue\n> channels only.  The green channel(s) is fixed at 1x gain for white\n> balance adjustment.  If you did want to add further gain to the signal\n> (i.e. digital gain), it would be then applied equally to all RGB\n> channels, but in addition to any white balance gains that were applied\n> to the R and B channels.\n\nJust to clarify, does this mean that there's no digital gain for the\ngreen channels in the ISP, or that it's not used by the IPA ? As this is\na manual mode control, do you think it would be simpler to expose it as\na set of Bayer gains and transform it into red gain, blue gain and\nglobal gain for the hardware that implement the gain control that way ?\nA red+blue gains control as propose here plus a global digital gain is\nanother model that could also work, but it wouldn't allow specifying\ndifferent gains for the two green channels (when the hardware supports\nthat). I don't know how useful that feature would be in practice. It's\nsupported (but optional) in the Android camera HAL, but maybe it's\nunused :-)\n\n> However.... to cause more confusion, there is an ISO control that will\n> likely be added at some point.  I think the convention is that ISO is\n> a combination of all gains (analogue and digital) applied in the full\n> imaging pipeline, but not accounting for the white balance gain\n> adjustments to the R/B channels.\n\nSuch a lovely mess :-) We already have an analog gain (let's assume we\nwon't split it in per-channel gains), and we could add a global digital\ngain too in addition to the R+B WB gains (or the full 4 channels WB\ngains if we decide to go that way). Adding a global ISO on top of that\nwould mean yet another layer, with interactions between the controls\nthat need to be clearly defined. Should we instead have separate analog\nand digital gains, and let applications decide how to split their ISO\ngain between them ? Maybe with a helper (similarly to what I've proposed\nin another e-mail in this thread for brightness, contrast and\nsaturation) ?\n\n> So to finally answer your question, these operations all seem\n> independent to me, so I do not think we would be able to merge the\n> controls into one 2x2 matrix.\n\nThank you for the information. It's much clearer to me now, and I agree\na single control isn't enough.\n\n> >>> +\n> >>>    - Brightness:\n> >>>        type: int32_t\n> >>>        description: Specify a fixed brightness parameter","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 95C646040E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 15:01:04 +0100 (CET)","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 F1CFD2DC;\n\tFri, 27 Mar 2020 15:01:03 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"pTLfS43/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1585317664;\n\tbh=m64WfbypFoV30fStUV310/V2QLJQObEYZi4mCcDlX/k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=pTLfS43/iYp8aO3ZS2RlzfTXLOTMpi7JH/LFkzhnXqvVRW0DkwAp6tgl+cY3gpSxJ\n\tEhgWeZxt5qDCxnw4jTAtTV+Ums88+KVzQnWLqJ4kAxkSPYsIl0WXJNrzJlmMfcY3BG\n\t/1kOPDb5rvbwr9a28uG9+J+Chp1UeGMgL26q09ec=","Date":"Fri, 27 Mar 2020 16:00:59 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Message-ID":"<20200327140059.GI5040@pendragon.ideasonboard.com>","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-5-naush@raspberrypi.com>\n\t<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>\n\t<20200326154645.GT20581@pendragon.ideasonboard.com>\n\t<CAEmqJPqafgVgZYXa78EtaCsWRy6QXc5veuyJ6bD7SG_msKL7YA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPqafgVgZYXa78EtaCsWRy6QXc5veuyJ6bD7SG_msKL7YA@mail.gmail.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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, 27 Mar 2020 14:01:04 -0000"}},{"id":4345,"web_url":"https://patchwork.libcamera.org/comment/4345/","msgid":"<CAEmqJPoFA_ob2PuBGSEo-YxZ42rQ7z0ifrXP+6yvcvRvLCav+Q@mail.gmail.com>","date":"2020-03-27T14:55:26","subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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, 27 Mar 2020 at 14:01, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi Naush,\n>\n> On Thu, Mar 26, 2020 at 07:29:42PM +0000, Naushir Patuck wrote:\n> > On Thu, 26 Mar 2020 at 15:46, Laurent Pinchart wrote:\n> > > On Fri, Mar 20, 2020 at 03:11:42PM +0000, Kieran Bingham wrote:\n> > >> On 09/03/2020 12:33, 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> > >>> ManualWbGains is a new float arary type used to specify manual red\n> > >>\n> > >> /arary/array/\n> > >>\n> > >>> and blue (in that order) colour channel gains when AWB is disabled.\n> > >>>\n> > >>> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > >>> ---\n> > >>>  src/libcamera/control_ids.yaml | 47 ++++++++++++++++++++++++++++++++++\n> > >>>  1 file changed, 47 insertions(+)\n> > >>>\n> > >>> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > >>> index da1a7b43..9a33094a 100644\n> > >>> --- a/src/libcamera/control_ids.yaml\n> > >>> +++ b/src/libcamera/control_ids.yaml\n> > >>> @@ -143,6 +143,53 @@ controls:\n> > >>>        description: |\n> > >>>          Enable or disable the AWB.\n> > >>>\n> > >>> +  - AwbMode:\n> > >>> +      type: int32_t\n> > >>> +      description: |\n> > >>> +        Specify the range of illumants to use for the AWB algorihtm. The modes\n> > >>\n> > >> /illumants/illuminance/\n> > >> or\n> > >> /illumants/luminance/ ?\n> > >> I'm not quite sure what word you were going for with illumants.\n> > >>\n> > >> s/algorihtm/algorithm/\n> > >>\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 CT 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> > >>\n> > >> I wonder what sort order we should apply to control values like this?\n> > >> I'm sure Laurent would love anything to be alphabetically sorted by a\n> > >> default if nothing else applies, but would there be an expected order to\n> > >> this list otherwise?\n> > >\n> > > I like auto being first, and it fortunately starts with an A ;-) Jokes\n> > > aside, this is a pretty standard configuration parameter for cameras,\n> > > would there be any published standard that we could follow for possible\n> > > values ?\n> >\n> > The only one that comes to mind would be the Android Camera HAL 3 values:\n> > https://source.android.com/devices/camera/camera3_3Amodes\n> >\n> > We have already diverged slightly from that list :)\n>\n> :-) The list is interesting, as it also mentions the corresponding\n> temperatures. I however assume that it probably isn't just a matter of\n> temperature, is it ?\n>\n> The other interesting part in that list is that the manual modes are\n> documented as \"Fixed white balance settings for ...\". I wonder if it's\n> really fixed, or if it restricts the search range of the AWB algorithm.\n>\n\nI suppose both of these are implementation dependent.  For our AWB,\nthe mode restricts the search range for the algorithm, but I suppose\nthere is nothing stopping you from just having fixed gains for each\nmode.\n\n> > >>> +        - name: AwbCustom1\n> > >>> +          value: 7\n> > >>> +          description: Custom AWB mode 1.\n> > >>> +        - name: AwbCustom2\n> > >>> +          value: 8\n> > >>> +          description: Custom AWB mode 2.\n> > >>> +        - name: AwbCustom3\n> > >>> +          value: 9\n> > >>> +          description: Custom AWB mode 3.\n> > >>> +        - name: AwbModeMax\n> > >>> +          value: 9\n> > >>> +          description: Maximum allowed value (place any new values above here).\n> > >>\n> > >> Only the same response as the others here,\n> > >>\n> > >>> +\n> > >>> +  - ManualWbGains:\n> > >>> +      type: float\n> > >>> +      description: |\n> > >>> +        Specify a fixed gain parameter for the Red and Blue colour channels,\n> > >>> +        in that order.\n> > >>> +      size: [2]\n> > >\n> > > How do these controls interact with ManualGain ? I wonder if we\n> > > shouldn't merge them all in a 2x2 matrix of red, 2 x green and blue\n> > > gains.\n> >\n> > My intention was that ManualGain would be the analogue (and possibly\n> > some digital) gain applied by the sensor in manual AE modes.  Perhaps\n> > to be more explicit I should rename  ManualAnalgoueGain...?  In any\n> > case, this gain value are applied to all bayer colour channels at the\n> > sensor level.\n>\n> Do you think there could be a need to apply different gains for\n> individual Bayer components when operating in manual mode, or would that\n> be a sensor feature that would only be used by the IPA for AWB ? I'd\n> suspect the latter (or even no use of separate analog gains at all by\n> IPAs in many cases), but that claim is not backed by personal\n> experience.\n\nSensor Analogue gain can only be applied globally to all colour\nchannels.  If there is a need to apply different R/G/B gains (for\nmanual WB correction), you would have to use digital gain, either in\nthe sensor if it supports it, or the ISP pipeline.  Can't think of any\nother reason to use different R/B/G gains apart for WB correction.\n\n>\n> > ManualWbGains is used in Manual AWB mode.  If you do not use one of\n> > the presets (AwbIncandescent, AwbTungsten, etc.), you can specify your\n> > own gain to apply (in the ISP pipeline) to fix the white point.\n>\n>\n> Thanks for the clarification. Let's then document AnalogGain and\n> ManualWbGains to make the distinction clear. As we're dropping the\n> Manual prefix, I wonder what a good name for ManualWbGains would be.\n> DigitalGains ? ColourGains ? RGBGains ? DigitalColourGains ?\n>\n\nColourGains seems like a sensible one to me.\n\n> > I don't know if this is a standard thing done by other vendors, but the\n> > white balance is computed as gains applied on the red and blue\n> > channels only.  The green channel(s) is fixed at 1x gain for white\n> > balance adjustment.  If you did want to add further gain to the signal\n> > (i.e. digital gain), it would be then applied equally to all RGB\n> > channels, but in addition to any white balance gains that were applied\n> > to the R and B channels.\n>\n> Just to clarify, does this mean that there's no digital gain for the\n> green channels in the ISP, or that it's not used by the IPA ?\n\nIn our hardware, there's no digital gain control for the green\nchannels on its own.  Of course, this may be different for different\nvendors, but I do not see a use for adjusting G gain independently\nfrom R/B.\n\n> As this is\n> a manual mode control, do you think it would be simpler to expose it as\n> a set of Bayer gains and transform it into red gain, blue gain and\n> global gain for the hardware that implement the gain control that way ?\n\nIt is possible to combine all these into one control.  However, I did\nwant the separation as the R/B gains are adjusted as part of the AWB\nalgorithm, and the Analog + Digital Gain are adjusted as part of the\nAE algorithm.  So I wanted to keep these operations separate.  In\ntruth though, the most hardware will probably apply R/B + global\ndigital gains as a single stage operation.\n\n> A red+blue gains control as propose here plus a global digital gain is\n> another model that could also work, but it wouldn't allow specifying\n> different gains for the two green channels (when the hardware supports\n> that). I don't know how useful that feature would be in practice. It's\n> supported (but optional) in the Android camera HAL, but maybe it's\n> unused :-)\n>\n\nYou are correct, with this set of controls we do not specify different\ngains for different green channels.  My view on that one is that if it\nis needed, it is for a very specific IQ tuning operation (probably\ngreen equalistion?).  I can't see an application level control being\nof any use here.\n\n> > However.... to cause more confusion, there is an ISO control that will\n> > likely be added at some point.  I think the convention is that ISO is\n> > a combination of all gains (analogue and digital) applied in the full\n> > imaging pipeline, but not accounting for the white balance gain\n> > adjustments to the R/B channels.\n>\n> Such a lovely mess :-) We already have an analog gain (let's assume we\n> won't split it in per-channel gains), and we could add a global digital\n> gain too in addition to the R+B WB gains (or the full 4 channels WB\n> gains if we decide to go that way). Adding a global ISO on top of that\n> would mean yet another layer, with interactions between the controls\n> that need to be clearly defined. Should we instead have separate analog\n> and digital gains, and let applications decide how to split their ISO\n> gain between them ? Maybe with a helper (similarly to what I've proposed\n> in another e-mail in this thread for brightness, contrast and\n> saturation) ?\n\nIt gets worse :) You would hope that ISO would be normalised to\nsomething standard (e.g. total gain of 1.0 == ISO 100), but it's not.\nEach sensor type has its own ISO normalisation that we must follow.  I\nreally don't like ISO!\n\nHaving separate analogue and digital gain controls can be a useful\nthing, our existing library does this.  A helper could be used for\nISO, but it will have to fetch out the sensor ISO normalisation and\nadjust between analogue and digital gain appropriately.  There may be\nother implications for AGC that I have not thought of yet.  Let's\nworry about ISO another day :)\n\n>\n> > So to finally answer your question, these operations all seem\n> > independent to me, so I do not think we would be able to merge the\n> > controls into one 2x2 matrix.\n>\n> Thank you for the information. It's much clearer to me now, and I agree\n> a single control isn't enough.\n>\n> > >>> +\n> > >>>    - Brightness:\n> > >>>        type: int32_t\n> > >>>        description: Specify a fixed brightness parameter\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n\nRegards,\nNaush","headers":{"Return-Path":"<naush@raspberrypi.com>","Received":["from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com\n\t[IPv6:2a00:1450:4864:20::22a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BB60D6040E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 15:55:43 +0100 (CET)","by mail-lj1-x22a.google.com with SMTP id f20so10539401ljm.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 07:55:43 -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=\"YC5UkJRs\"; 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=oJXLsoP3O7I6x6W04VQIwpV97kFmw25swwsvyMA4m+M=;\n\tb=YC5UkJRsvrgtKilFz2NBEbW0HIj9Ck/32yuGnClNt8Veb4aHYU8uZ+ajnxBqGo5SGQ\n\t0YpqI4GjpQDwa8aOqnRVrYyYPdbiM5B3wxI7cWW1M0H1XgiyzHM4eehspfg9VhJFwcwt\n\tBIZZd6lYGbFk9l6j3SUOs4/gNP3yTqkCA46P2LI4g6fvKlk2SydvfIWkRcPwSntzZ3O+\n\t/RgNVSTMP6CJXGUdHB3dzkaT+GGmkiPoZ4aAmo1lhEHWJXdPvEgAzaaoiLKR6fsOr0lW\n\tVUz5sRgD9eZD+CFdHVv/WUFknDFEK+IJZ1Us9IjOBbKqu+SB2jkZtThV7+Len2HBZBWh\n\tE8qA==","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=oJXLsoP3O7I6x6W04VQIwpV97kFmw25swwsvyMA4m+M=;\n\tb=k9xRoycpnS0+xb+38OvXAd9BbI+1hUGIQX5rXNaLMwA2X4BTftsL2xxO/puMmcnZla\n\tZebSB4kQu4McA6mGnjEMAaxAhAQvLCNU3VcUJAO0Wa+i/SRSgW62ZoIdThvMGJj3fFKN\n\tDrq7T2QqBWzcs6jwxU8r3/mPxfhGAUFqE7i0XRdN6lSyG987uFuDYARSooIVl9Khrlt7\n\tVQcGk8ATfVFjQRHbu9u0J+HU25ZtNajcSs6IsTzwyA51hFbip4PFdW0uw7hbBumtR2k6\n\tfDDAIaOJfQi0CIXlObXOLXHGpblNGJ29H/XIbpFUd+hrmMlgmoU3mtk3WA/FAu9u1ILG\n\tazxQ==","X-Gm-Message-State":"ANhLgQ391zeF6lr1jgN/O6ibVszWpUKyE1enrZMlwL91PoBrBHzph0MS\n\tBE+2ixjW6VZnRHN9pAdMuVwt9wDDn4wgVDCF/on9eg==","X-Google-Smtp-Source":"ADFU+vuKx81gK4ZPg9Cj3DdcJatkVfpe9QUebnDO2sn7kdTQEyZaRXwJn8hRDNXeaNOJY06z4+NZOJiasE5R/5g2lPA=","X-Received":"by 2002:a2e:b6c2:: with SMTP id m2mr8642442ljo.72.1585320942601; \n\tFri, 27 Mar 2020 07:55:42 -0700 (PDT)","MIME-Version":"1.0","References":"<20200309123319.630-1-naush@raspberrypi.com>\n\t<20200309123319.630-5-naush@raspberrypi.com>\n\t<48ba3f41-606a-0bab-1551-914e5aee822f@ideasonboard.com>\n\t<20200326154645.GT20581@pendragon.ideasonboard.com>\n\t<CAEmqJPqafgVgZYXa78EtaCsWRy6QXc5veuyJ6bD7SG_msKL7YA@mail.gmail.com>\n\t<20200327140059.GI5040@pendragon.ideasonboard.com>","In-Reply-To":"<20200327140059.GI5040@pendragon.ideasonboard.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Fri, 27 Mar 2020 14:55:26 +0000","Message-ID":"<CAEmqJPoFA_ob2PuBGSEo-YxZ42rQ7z0ifrXP+6yvcvRvLCav+Q@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 4/6] 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, 27 Mar 2020 14:55:44 -0000"}}]