[{"id":19580,"web_url":"https://patchwork.libcamera.org/comment/19580/","msgid":"<b1419723-3cba-1f8b-a04c-ba6851cc5a1e@ideasonboard.com>","date":"2021-09-09T14:19:22","subject":"Re: [libcamera-devel] [PATCH v6 5/5] ipa: ipu3: awb: Make the\n\tnaming consistent","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 09/09/2021 14:54, Jean-Michel Hautbois wrote:\n> The variables mix the terms cell, region and zone. It can confuse the\n> reader, and make the algorithm more difficult to follow.\n> \n> Rename the local variables consistent with their definitions:\n> - Cells are defined in Pixels\n> - Zones are defined in Cells\n> \n> Their is no \"region\" as such, so replace it with the correct term.\n\ns/Their/There/\n\nCan be fixed before merging. No need for a resend only on that.\n\n\n\n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/algorithms/awb.cpp | 22 +++++++++++-----------\n>  1 file changed, 11 insertions(+), 11 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n> index cf97208f..fd68b359 100644\n> --- a/src/ipa/ipu3/algorithms/awb.cpp\n> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n> @@ -222,30 +222,30 @@ void Awb::generateZones(std::vector<RGB> &zones)\n\nLocally I have a comment here:\n\n/* Translate the IPU3 statistics into the default statistics region array */\n\nDoes that need updating? (only because I searched for \"region\".\n\nIt still seems to make sense in that context, so I don't think it needs\nto change unless you think it's now inaccurate.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n>  void Awb::generateAwbStats(const ipu3_uapi_stats_3a *stats,\n>  \t\t\t   const ipu3_uapi_grid_config &grid)\n>  {\n> -\tuint32_t regionWidth = round(grid.width / static_cast<double>(kAwbStatsSizeX));\n> -\tuint32_t regionHeight = round(grid.height / static_cast<double>(kAwbStatsSizeY));\n> +\tuint32_t cellWidth = round(grid.width / static_cast<double>(kAwbStatsSizeX));\n> +\tuint32_t cellHeight = round(grid.height / static_cast<double>(kAwbStatsSizeY));\n>  \n>  \t/*\n>  \t * Generate a (kAwbStatsSizeX x kAwbStatsSizeY) array from the IPU3 grid which is\n>  \t * (grid.width x grid.height).\n>  \t */\n> -\tfor (unsigned int j = 0; j < kAwbStatsSizeY * regionHeight; j++) {\n> -\t\tfor (unsigned int i = 0; i < kAwbStatsSizeX * regionWidth; i++) {\n> +\tfor (unsigned int j = 0; j < kAwbStatsSizeY * cellHeight; j++) {\n> +\t\tfor (unsigned int i = 0; i < kAwbStatsSizeX * cellWidth; i++) {\n>  \t\t\tuint32_t cellPosition = j * grid.width + i;\n> -\t\t\tuint32_t cellX = (cellPosition / regionWidth) % kAwbStatsSizeX;\n> -\t\t\tuint32_t cellY = ((cellPosition / grid.width) / regionHeight) % kAwbStatsSizeY;\n> +\t\t\tuint32_t cellX = (cellPosition / cellWidth) % kAwbStatsSizeX;\n> +\t\t\tuint32_t cellY = ((cellPosition / grid.width) / cellHeight) % kAwbStatsSizeY;\n>  \n> -\t\t\tuint32_t awbRegionPosition = cellY * kAwbStatsSizeX + cellX;\n> +\t\t\tuint32_t awbZonePosition = cellY * kAwbStatsSizeX + cellX;\n>  \n>  \t\t\t/* Cast the initial IPU3 structure to simplify the reading */\n>  \t\t\tconst ipu3_uapi_awb_set_item *currentCell = &stats->awb_raw_buffer.meta_data[cellPosition];\n>  \t\t\tif (currentCell->sat_ratio == 0) {\n>  \t\t\t\t/* The cell is not saturated, use the current cell */\n> -\t\t\t\tawbStats_[awbRegionPosition].counted++;\n> +\t\t\t\tawbStats_[awbZonePosition].counted++;\n>  \t\t\t\tuint32_t greenValue = currentCell->Gr_avg + currentCell->Gb_avg;\n> -\t\t\t\tawbStats_[awbRegionPosition].sum.green += greenValue / 2;\n> -\t\t\t\tawbStats_[awbRegionPosition].sum.red += currentCell->R_avg;\n> -\t\t\t\tawbStats_[awbRegionPosition].sum.blue += currentCell->B_avg;\n> +\t\t\t\tawbStats_[awbZonePosition].sum.green += greenValue / 2;\n> +\t\t\t\tawbStats_[awbZonePosition].sum.red += currentCell->R_avg;\n> +\t\t\t\tawbStats_[awbZonePosition].sum.blue += currentCell->B_avg;\n>  \t\t\t}\n>  \t\t}\n>  \t}\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 7AD16BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Sep 2021 14:19:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A6C296916E;\n\tThu,  9 Sep 2021 16:19:26 +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 4C62B6916B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Sep 2021 16:19:25 +0200 (CEST)","from [192.168.0.20]\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 CA271883;\n\tThu,  9 Sep 2021 16:19:24 +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=\"kry8iLYz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631197165;\n\tbh=jyrEihPMm9u1ez9RjmIeXpZk/zrlGbGvvPnNmNXVbII=;\n\th=To:References:From:Subject:Date:In-Reply-To:From;\n\tb=kry8iLYzhDXD66I4nRgK6yBe5P2NxOaSclGxBZfWB5uao6XHeMcYrFrIOz8F4PFzH\n\t6qDiPnQa0PBlGXfNbJpfLRZb/2+T8bAOllHrmxzWmIjgDeBzeDshM1DfPnxUSzoF3L\n\tMNkGvcrlY/qH65bB3YlWv6BwYJZM5/SUHl55Ur+g=","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210909135449.68017-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210909135449.68017-6-jeanmichel.hautbois@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<b1419723-3cba-1f8b-a04c-ba6851cc5a1e@ideasonboard.com>","Date":"Thu, 9 Sep 2021 15:19:22 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<20210909135449.68017-6-jeanmichel.hautbois@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v6 5/5] ipa: ipu3: awb: Make the\n\tnaming consistent","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":19581,"web_url":"https://patchwork.libcamera.org/comment/19581/","msgid":"<1da674e8-585d-3b8f-6a80-4f008ca1fc99@ideasonboard.com>","date":"2021-09-09T14:33:16","subject":"Re: [libcamera-devel] [PATCH v6 5/5] ipa: ipu3: awb: Make the\n\tnaming consistent","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 09/09/2021 15:19, Kieran Bingham wrote:\n> On 09/09/2021 14:54, Jean-Michel Hautbois wrote:\n>> The variables mix the terms cell, region and zone. It can confuse the\n>> reader, and make the algorithm more difficult to follow.\n>>\n>> Rename the local variables consistent with their definitions:\n>> - Cells are defined in Pixels\n>> - Zones are defined in Cells\n>>\n>> Their is no \"region\" as such, so replace it with the correct term.\n> \n> s/Their/There/\n> \n> Can be fixed before merging. No need for a resend only on that.\n> \n> \n> \n>> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n>> ---\n>>  src/ipa/ipu3/algorithms/awb.cpp | 22 +++++++++++-----------\n>>  1 file changed, 11 insertions(+), 11 deletions(-)\n>>\n>> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n>> index cf97208f..fd68b359 100644\n>> --- a/src/ipa/ipu3/algorithms/awb.cpp\n>> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n>> @@ -222,30 +222,30 @@ void Awb::generateZones(std::vector<RGB> &zones)\n> \n> Locally I have a comment here:\n> \n> /* Translate the IPU3 statistics into the default statistics region array */\n> \n> Does that need updating? (only because I searched for \"region\".\n> \n> It still seems to make sense in that context, so I don't think it needs\n> to change unless you think it's now inaccurate.\n\nNever mind, I now see that's done in this series already.\n\n--\nKieran\n\n\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> \n>>  void Awb::generateAwbStats(const ipu3_uapi_stats_3a *stats,\n>>  \t\t\t   const ipu3_uapi_grid_config &grid)\n>>  {\n>> -\tuint32_t regionWidth = round(grid.width / static_cast<double>(kAwbStatsSizeX));\n>> -\tuint32_t regionHeight = round(grid.height / static_cast<double>(kAwbStatsSizeY));\n>> +\tuint32_t cellWidth = round(grid.width / static_cast<double>(kAwbStatsSizeX));\n>> +\tuint32_t cellHeight = round(grid.height / static_cast<double>(kAwbStatsSizeY));\n>>  \n>>  \t/*\n>>  \t * Generate a (kAwbStatsSizeX x kAwbStatsSizeY) array from the IPU3 grid which is\n>>  \t * (grid.width x grid.height).\n>>  \t */\n>> -\tfor (unsigned int j = 0; j < kAwbStatsSizeY * regionHeight; j++) {\n>> -\t\tfor (unsigned int i = 0; i < kAwbStatsSizeX * regionWidth; i++) {\n>> +\tfor (unsigned int j = 0; j < kAwbStatsSizeY * cellHeight; j++) {\n>> +\t\tfor (unsigned int i = 0; i < kAwbStatsSizeX * cellWidth; i++) {\n>>  \t\t\tuint32_t cellPosition = j * grid.width + i;\n>> -\t\t\tuint32_t cellX = (cellPosition / regionWidth) % kAwbStatsSizeX;\n>> -\t\t\tuint32_t cellY = ((cellPosition / grid.width) / regionHeight) % kAwbStatsSizeY;\n>> +\t\t\tuint32_t cellX = (cellPosition / cellWidth) % kAwbStatsSizeX;\n>> +\t\t\tuint32_t cellY = ((cellPosition / grid.width) / cellHeight) % kAwbStatsSizeY;\n>>  \n>> -\t\t\tuint32_t awbRegionPosition = cellY * kAwbStatsSizeX + cellX;\n>> +\t\t\tuint32_t awbZonePosition = cellY * kAwbStatsSizeX + cellX;\n>>  \n>>  \t\t\t/* Cast the initial IPU3 structure to simplify the reading */\n>>  \t\t\tconst ipu3_uapi_awb_set_item *currentCell = &stats->awb_raw_buffer.meta_data[cellPosition];\n>>  \t\t\tif (currentCell->sat_ratio == 0) {\n>>  \t\t\t\t/* The cell is not saturated, use the current cell */\n>> -\t\t\t\tawbStats_[awbRegionPosition].counted++;\n>> +\t\t\t\tawbStats_[awbZonePosition].counted++;\n>>  \t\t\t\tuint32_t greenValue = currentCell->Gr_avg + currentCell->Gb_avg;\n>> -\t\t\t\tawbStats_[awbRegionPosition].sum.green += greenValue / 2;\n>> -\t\t\t\tawbStats_[awbRegionPosition].sum.red += currentCell->R_avg;\n>> -\t\t\t\tawbStats_[awbRegionPosition].sum.blue += currentCell->B_avg;\n>> +\t\t\t\tawbStats_[awbZonePosition].sum.green += greenValue / 2;\n>> +\t\t\t\tawbStats_[awbZonePosition].sum.red += currentCell->R_avg;\n>> +\t\t\t\tawbStats_[awbZonePosition].sum.blue += currentCell->B_avg;\n>>  \t\t\t}\n>>  \t\t}\n>>  \t}\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 10BA6BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  9 Sep 2021 14:33:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 639236916E;\n\tThu,  9 Sep 2021 16:33:20 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6D3D06916B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  9 Sep 2021 16:33:19 +0200 (CEST)","from [192.168.0.20]\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 D4AD5883;\n\tThu,  9 Sep 2021 16:33:18 +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=\"CArtCopn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631197999;\n\tbh=OiFlwY1U0TK6Js2VVqVvUwXzIWTihs6YCkQuj3qGhaI=;\n\th=Subject:From:To:References:Reply-To:Date:In-Reply-To:From;\n\tb=CArtCopnr2bqcj2jASNr3dJ48BnEAUvjHAhdx5CkETvS++zCQvTVukORcZQ/Di75J\n\t1zV98Ux3jTSpczceGRgVGxTHNnW1oi9d0rZUI7ymm89ZMEab55nQba1VQmMKXLiU2P\n\thtypuITrBntl8na3+wQgWD6aOaNllZqTULo0jGSg=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210909135449.68017-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210909135449.68017-6-jeanmichel.hautbois@ideasonboard.com>\n\t<b1419723-3cba-1f8b-a04c-ba6851cc5a1e@ideasonboard.com>","Organization":"Ideas on Board","Message-ID":"<1da674e8-585d-3b8f-6a80-4f008ca1fc99@ideasonboard.com>","Date":"Thu, 9 Sep 2021 15:33:16 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<b1419723-3cba-1f8b-a04c-ba6851cc5a1e@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v6 5/5] ipa: ipu3: awb: Make the\n\tnaming consistent","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>","Reply-To":"kieran.bingham@ideasonboard.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":19615,"web_url":"https://patchwork.libcamera.org/comment/19615/","msgid":"<YTuF/AG9Z8BmJB1D@pendragon.ideasonboard.com>","date":"2021-09-10T16:21:16","subject":"Re: [libcamera-devel] [PATCH v6 5/5] ipa: ipu3: awb: Make the\n\tnaming consistent","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jean-Michel,\n\nThank you for the patch.\n\nOn Thu, Sep 09, 2021 at 03:54:49PM +0200, Jean-Michel Hautbois wrote:\n> The variables mix the terms cell, region and zone. It can confuse the\n> reader, and make the algorithm more difficult to follow.\n> \n> Rename the local variables consistent with their definitions:\n> - Cells are defined in Pixels\n> - Zones are defined in Cells\n> \n> Their is no \"region\" as such, so replace it with the correct term.\n> \n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/algorithms/awb.cpp | 22 +++++++++++-----------\n>  1 file changed, 11 insertions(+), 11 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n> index cf97208f..fd68b359 100644\n> --- a/src/ipa/ipu3/algorithms/awb.cpp\n> +++ b/src/ipa/ipu3/algorithms/awb.cpp\n> @@ -222,30 +222,30 @@ void Awb::generateZones(std::vector<RGB> &zones)\n>  void Awb::generateAwbStats(const ipu3_uapi_stats_3a *stats,\n>  \t\t\t   const ipu3_uapi_grid_config &grid)\n>  {\n> -\tuint32_t regionWidth = round(grid.width / static_cast<double>(kAwbStatsSizeX));\n> -\tuint32_t regionHeight = round(grid.height / static_cast<double>(kAwbStatsSizeY));\n> +\tuint32_t cellWidth = round(grid.width / static_cast<double>(kAwbStatsSizeX));\n> +\tuint32_t cellHeight = round(grid.height / static_cast<double>(kAwbStatsSizeY));\n\nHere you divide the number of cells in the image by the number of zones\nin the image, so you get a number of cells per zone. I'd call this\neither zoneWidth and zoneHeight, or cellsPerZoneX and cellsPerZoneY.\n\n>  \n>  \t/*\n>  \t * Generate a (kAwbStatsSizeX x kAwbStatsSizeY) array from the IPU3 grid which is\n>  \t * (grid.width x grid.height).\n>  \t */\n> -\tfor (unsigned int j = 0; j < kAwbStatsSizeY * regionHeight; j++) {\n> -\t\tfor (unsigned int i = 0; i < kAwbStatsSizeX * regionWidth; i++) {\n> +\tfor (unsigned int j = 0; j < kAwbStatsSizeY * cellHeight; j++) {\n> +\t\tfor (unsigned int i = 0; i < kAwbStatsSizeX * cellWidth; i++) {\n>  \t\t\tuint32_t cellPosition = j * grid.width + i;\n> -\t\t\tuint32_t cellX = (cellPosition / regionWidth) % kAwbStatsSizeX;\n> -\t\t\tuint32_t cellY = ((cellPosition / grid.width) / regionHeight) % kAwbStatsSizeY;\n> +\t\t\tuint32_t cellX = (cellPosition / cellWidth) % kAwbStatsSizeX;\n> +\t\t\tuint32_t cellY = ((cellPosition / grid.width) / cellHeight) % kAwbStatsSizeY;\n\nHere you compute the zone coordinates, so it should be zoneX\nand zoneY.\n\nWouldn't it also be simpler to compute them as follows ?\n\n\t\t\tuint32_t zoneX = i / cellsPerZoneX;\n\t\t\tuint32_t zoneY = j / cellsPerZoneY;\n\nThat could be done in another patch. I would then also rename i and j to\ncellX and cellY.\n\n>  \n> -\t\t\tuint32_t awbRegionPosition = cellY * kAwbStatsSizeX + cellX;\n> +\t\t\tuint32_t awbZonePosition = cellY * kAwbStatsSizeX + cellX;\n>  \n>  \t\t\t/* Cast the initial IPU3 structure to simplify the reading */\n>  \t\t\tconst ipu3_uapi_awb_set_item *currentCell = &stats->awb_raw_buffer.meta_data[cellPosition];\n>  \t\t\tif (currentCell->sat_ratio == 0) {\n>  \t\t\t\t/* The cell is not saturated, use the current cell */\n> -\t\t\t\tawbStats_[awbRegionPosition].counted++;\n> +\t\t\t\tawbStats_[awbZonePosition].counted++;\n>  \t\t\t\tuint32_t greenValue = currentCell->Gr_avg + currentCell->Gb_avg;\n> -\t\t\t\tawbStats_[awbRegionPosition].sum.green += greenValue / 2;\n> -\t\t\t\tawbStats_[awbRegionPosition].sum.red += currentCell->R_avg;\n> -\t\t\t\tawbStats_[awbRegionPosition].sum.blue += currentCell->B_avg;\n> +\t\t\t\tawbStats_[awbZonePosition].sum.green += greenValue / 2;\n> +\t\t\t\tawbStats_[awbZonePosition].sum.red += currentCell->R_avg;\n> +\t\t\t\tawbStats_[awbZonePosition].sum.blue += currentCell->B_avg;\n>  \t\t\t}\n>  \t\t}\n>  \t}","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 34F70BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Sep 2021 16:21:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 54DB669170;\n\tFri, 10 Sep 2021 18:21:40 +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 3630D69169\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Sep 2021 18:21:39 +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 9C8A6883;\n\tFri, 10 Sep 2021 18:21:38 +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=\"GdNony/P\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631290898;\n\tbh=7rC1Shzob1zbgEwcih8JCfpf9pCq+hrTiY18yzQnN0k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=GdNony/PEvmYMnfXFmyGhukY2Qp6HNkDGjvj+fyYhuR06iTClk1oOrP7BlCLp60jQ\n\tY78FpALhZgE7u9pSNsblR+OIrIriVp5fJGkGJIfn2gsVBh8PDynBZC8mOs2TDycZAU\n\tz3ygzwXVsZLq2hvLS5HTqdA0Db6Hk/qBauqaR0f0=","Date":"Fri, 10 Sep 2021 19:21:16 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<YTuF/AG9Z8BmJB1D@pendragon.ideasonboard.com>","References":"<20210909135449.68017-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210909135449.68017-6-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210909135449.68017-6-jeanmichel.hautbois@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v6 5/5] ipa: ipu3: awb: Make the\n\tnaming consistent","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>"}}]