[{"id":20197,"web_url":"https://patchwork.libcamera.org/comment/20197/","msgid":"<163420862259.3829429.15048885618545967434@Monstersaurus>","date":"2021-10-14T10:50:22","subject":"Re: [libcamera-devel] [PATCH 04/13] ipa: ipu3: awb: Change minimal\n\tgreen threshold value","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Jean-Michel Hautbois (2021-10-13 16:41:16)\n> When the zones are used for the grey world algorithm, we need a minimal\n> number of zones to make it relevant, and we want the green values to be\n> at least 32 today (with a maximum of 255).\n> \n> This value is a bit high, as we now are correcting the black levels, and\n> a sudden change of colors can be visible for the end user when the gains\n> are applied.\n> \n> Lower the value to 16.\n> \n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/algorithms/awb.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n> index 30693923..b18874a3 100644\n> --- a/src/ipa/ipu3/algorithms/awb.cpp\n> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n> @@ -17,7 +17,7 @@ namespace ipa::ipu3::algorithms {\n>  \n>  LOG_DEFINE_CATEGORY(IPU3Awb)\n>  \n\n\nDo you document the meaning of this constant, and what it is used for /\neffects of changing it in the later documentation series?\n\nIf not, could you add something please?\n\n(Either in this patch, or later)\n\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> -static constexpr uint32_t kMinGreenLevelInZone = 32;\n> +static constexpr uint32_t kMinGreenLevelInZone = 16;\n>  \n>  /**\n>   * \\struct Accumulator\n> -- \n> 2.30.2\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 E9DE8C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Oct 2021 10:50:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6173168541;\n\tThu, 14 Oct 2021 12:50:27 +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 15E1768541\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Oct 2021 12:50:26 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A3E1C2F3;\n\tThu, 14 Oct 2021 12:50:25 +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=\"gkQ/9jPY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634208625;\n\tbh=K6/mmps7Y5r+xsg05hl0m6WaSld/3H4w+qeGkQoms5Q=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=gkQ/9jPYNDSVuWsLcBNM5KPVhwbXcAmwaehX6Z1XDux/u8p04BQoGHoDrDHfGWO8s\n\t9bUc0fJddGxGFhs84QqxyE5XtnjvYqxcG2Et3WGJC0tB011qQQr5RdZnFLxnV237e7\n\t+TvLp80a1lY4Wv8VzJjbnqIvBE33H2D6EnQPPoGA=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211013154125.133419-5-jeanmichel.hautbois@ideasonboard.com>","References":"<20211013154125.133419-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20211013154125.133419-5-jeanmichel.hautbois@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 14 Oct 2021 11:50:22 +0100","Message-ID":"<163420862259.3829429.15048885618545967434@Monstersaurus>","User-Agent":"alot/0.9.1","Subject":"Re: [libcamera-devel] [PATCH 04/13] ipa: ipu3: awb: Change minimal\n\tgreen threshold value","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":20214,"web_url":"https://patchwork.libcamera.org/comment/20214/","msgid":"<YWi1dZ4gJzIdyBVJ@pendragon.ideasonboard.com>","date":"2021-10-14T22:55:49","subject":"Re: [libcamera-devel] [PATCH 04/13] ipa: ipu3: awb: Change minimal\n\tgreen threshold value","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Oct 14, 2021 at 11:50:22AM +0100, Kieran Bingham wrote:\n> Quoting Jean-Michel Hautbois (2021-10-13 16:41:16)\n> > When the zones are used for the grey world algorithm, we need a minimal\n> > number of zones to make it relevant, and we want the green values to be\n> > at least 32 today (with a maximum of 255).\n> > \n> > This value is a bit high, as we now are correcting the black levels, and\n> > a sudden change of colors can be visible for the end user when the gains\n> > are applied.\n> > \n> > Lower the value to 16.\n\nIf I understand the patch correctly, the most relevant part here is the\nminimal green value for a zone to be considered. I would then write the\nabove as\n\nWhen zones are used for the grey world algorithm, they are only\nconsidered if their average green value is at least 32/255 to exclude\nzones that are too dark and don't provide relevant colour information\n(on the opposite side of the spectrum, saturated regions are excluded by\nthe ImgU statistics engine).\n\nThe algorithm requires a minimal number of zones that meet this criteria\nin order to run. Now that we correct the black level, the 32/255 minimal\nvalue is a bit high and prevents the algorithm for running in low-light\nconditions. Lower the value to 16/255 to fix it.\n\n> > Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> > ---\n> >  src/ipa/ipu3/algorithms/awb.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > \n> > diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n> > index 30693923..b18874a3 100644\n> > --- a/src/ipa/ipu3/algorithms/awb.cpp\n> > +++ b/src/ipa/ipu3/algorithms/awb.cpp\n> > @@ -17,7 +17,7 @@ namespace ipa::ipu3::algorithms {\n> >  \n> >  LOG_DEFINE_CATEGORY(IPU3Awb)\n> \n> Do you document the meaning of this constant, and what it is used for /\n> effects of changing it in the later documentation series?\n> \n> If not, could you add something please?\n> \n> (Either in this patch, or later)\n\nAgreed.\n\nIt could also make sense to capture the commit message or parts of it in\nthe documentation.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > -static constexpr uint32_t kMinGreenLevelInZone = 32;\n> > +static constexpr uint32_t kMinGreenLevelInZone = 16;\n> >  \n> >  /**\n> >   * \\struct Accumulator","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 82B25C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 14 Oct 2021 22:56:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EA47068F51;\n\tFri, 15 Oct 2021 00:56:06 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EEB8860501\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Oct 2021 00:56:04 +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 725DDB91;\n\tFri, 15 Oct 2021 00:56:04 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"O5bAhtAb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634252164;\n\tbh=1OAju1U21xo1ZklH+bQ5li1KxRkaaFyGqaJELR8h4LI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=O5bAhtAbBXiWABytookqpIdTfy3AK9NeGxQ+PV29tFNtS8wk83bx9/Gf+lmcRw2Ln\n\t5VCFC+DbvCmC1bz+YqnHV2qXqPg04QVebKkD3lZ7JMggWbvE3ItuKX8fYTv3PpDffO\n\tyh0l0zKyil1vBPjEtLylYFaNobzotYrO+AksXYPc=","Date":"Fri, 15 Oct 2021 01:55:49 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YWi1dZ4gJzIdyBVJ@pendragon.ideasonboard.com>","References":"<20211013154125.133419-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20211013154125.133419-5-jeanmichel.hautbois@ideasonboard.com>\n\t<163420862259.3829429.15048885618545967434@Monstersaurus>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<163420862259.3829429.15048885618545967434@Monstersaurus>","Subject":"Re: [libcamera-devel] [PATCH 04/13] ipa: ipu3: awb: Change minimal\n\tgreen threshold value","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>"}},{"id":20232,"web_url":"https://patchwork.libcamera.org/comment/20232/","msgid":"<67e40689-079f-6f58-d4bb-fd277c2a3320@ideasonboard.com>","date":"2021-10-15T05:44:01","subject":"Re: [libcamera-devel] [PATCH 04/13] ipa: ipu3: awb: Change minimal\n\tgreen threshold value","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"On 15/10/2021 00:55, Laurent Pinchart wrote:\n> On Thu, Oct 14, 2021 at 11:50:22AM +0100, Kieran Bingham wrote:\n>> Quoting Jean-Michel Hautbois (2021-10-13 16:41:16)\n>>> When the zones are used for the grey world algorithm, we need a minimal\n>>> number of zones to make it relevant, and we want the green values to be\n>>> at least 32 today (with a maximum of 255).\n>>>\n>>> This value is a bit high, as we now are correcting the black levels, and\n>>> a sudden change of colors can be visible for the end user when the gains\n>>> are applied.\n>>>\n>>> Lower the value to 16.\n> \n> If I understand the patch correctly, the most relevant part here is the\n> minimal green value for a zone to be considered. I would then write the\n> above as\n> \n> When zones are used for the grey world algorithm, they are only\n> considered if their average green value is at least 32/255 to exclude\n> zones that are too dark and don't provide relevant colour information\n> (on the opposite side of the spectrum, saturated regions are excluded by\n> the ImgU statistics engine).\n> \n> The algorithm requires a minimal number of zones that meet this criteria\n> in order to run. Now that we correct the black level, the 32/255 minimal\n> value is a bit high and prevents the algorithm for running in low-light\n> conditions. Lower the value to 16/255 to fix it.\n> \n\nThanks, it is better wrote (as always ;-)).\n\n>>> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n>>> ---\n>>>  src/ipa/ipu3/algorithms/awb.cpp | 2 +-\n>>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>>\n>>> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n>>> index 30693923..b18874a3 100644\n>>> --- a/src/ipa/ipu3/algorithms/awb.cpp\n>>> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n>>> @@ -17,7 +17,7 @@ namespace ipa::ipu3::algorithms {\n>>>  \n>>>  LOG_DEFINE_CATEGORY(IPU3Awb)\n>>\n>> Do you document the meaning of this constant, and what it is used for /\n>> effects of changing it in the later documentation series?\n>>\n>> If not, could you add something please?\n>>\n>> (Either in this patch, or later)\n> \n> Agreed.\n> \n> It could also make sense to capture the commit message or parts of it in\n> the documentation.\n> \n\nOK, I will add those in the v2 for the \"Document IPAIPU3\" series.\n\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n>> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>\n>>> -static constexpr uint32_t kMinGreenLevelInZone = 32;\n>>> +static constexpr uint32_t kMinGreenLevelInZone = 16;\n>>>  \n>>>  /**\n>>>   * \\struct Accumulator\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 B1D90C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Oct 2021 05:44:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A1B568F50;\n\tFri, 15 Oct 2021 07:44:06 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8876460239\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Oct 2021 07:44:04 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:ae2a:a11b:484b:c825])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2F3CE2E3;\n\tFri, 15 Oct 2021 07:44:04 +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=\"B5z0T+OH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634276644;\n\tbh=joWJBWhh0MDWzXVp2Zj/Uet8f7AQFiyF42o+BOvgWC0=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=B5z0T+OHh5fsJzxKmSMzpwRKQkP/ZzDOpjWILtXnq6z326gxpoQVOWU86+J3cmi70\n\tnA36Nhd1fsdlbOHv+OVbL9qRxCpXXAGvtb6LdZ/HeoT/+JlE7dTy9rc4dDimKFwJzI\n\tzt0QOaJt2J3ImhvGJrMMc0ctjuU13gA1Qwcg36PQ=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","References":"<20211013154125.133419-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20211013154125.133419-5-jeanmichel.hautbois@ideasonboard.com>\n\t<163420862259.3829429.15048885618545967434@Monstersaurus>\n\t<YWi1dZ4gJzIdyBVJ@pendragon.ideasonboard.com>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<67e40689-079f-6f58-d4bb-fd277c2a3320@ideasonboard.com>","Date":"Fri, 15 Oct 2021 07:44:01 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.13.0","MIME-Version":"1.0","In-Reply-To":"<YWi1dZ4gJzIdyBVJ@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 04/13] ipa: ipu3: awb: Change minimal\n\tgreen threshold value","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>"}}]