[{"id":18930,"web_url":"https://patchwork.libcamera.org/comment/18930/","msgid":"<2b07582f-47d4-b57a-e1b0-6e01c68c2ec5@ideasonboard.com>","date":"2021-08-18T21:39:31","subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 18/08/2021 16:54, Jean-Michel Hautbois wrote:\n> When the stats are received, pass it with the context to the existing\n> AWB algorithm. IPAFrameContext now has a new structure to store the\n> gains calculated by the AWB algorithm.\n> \n> When an EventFillParams event is received, call prepare() and set the new\n> gains accordingly in the params structure.\n> There is no more a need for the IPU3Awb::initialise() function, as the\n> params are always set in prepare().\n> \n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/ipa_context.h |   8 +++\n>  src/ipa/ipu3/ipu3.cpp      |   5 +-\n>  src/ipa/ipu3/ipu3_awb.cpp  | 107 ++++++++++++++++++-------------------\n>  src/ipa/ipu3/ipu3_awb.h    |   6 +--\n>  4 files changed, 65 insertions(+), 61 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h\n> index 5964ba6d..beae3ac6 100644\n> --- a/src/ipa/ipu3/ipa_context.h\n> +++ b/src/ipa/ipu3/ipa_context.h\n> @@ -29,6 +29,14 @@ struct IPAFrameContext {\n>  \t\tdouble gain;\n>  \t} agc;\n>  \n> +\tstruct Awb {\n> +\t\tstruct Gains {\n> +\t\t\tdouble red;\n> +\t\t\tdouble green;\n> +\t\t\tdouble blue;\n> +\t\t} gains;\n> +\t} awb;\n> +\n>  \tstruct Contrast {\n>  \t\tstruct ipu3_uapi_gamma_corr_lut gammaCorrection;\n>  \t} contrast;\n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index ee0dd9fe..2b4a4c8c 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -339,7 +339,6 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>  \t}\n>  \n>  \tawbAlgo_ = std::make_unique<IPU3Awb>();\n> -\tawbAlgo_->initialise(params_, context_.configuration.grid.bdsOutputSize, context_.configuration.grid.bdsGrid);\n>  \n>  \tagcAlgo_ = std::make_unique<IPU3Agc>();\n>  \tagcAlgo_->initialise(context_.configuration.grid.bdsGrid, sensorInfo_);\n> @@ -420,7 +419,7 @@ void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)\n>  \t\talgo->prepare(context_, params_);\n>  \n>  \tif (agcAlgo_->updateControls())\n> -\t\tawbAlgo_->updateWbParameters(params_);\n> +\t\tawbAlgo_->prepare(context_, params_);\n>  \n>  \t*params = params_;\n>  \n> @@ -446,7 +445,7 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n>  \texposure_ = context_.frameContext.agc.exposure;\n>  \tgain_ = camHelper_->gainCode(context_.frameContext.agc.gain);\n>  \n> -\tawbAlgo_->calculateWBGains(stats);\n> +\tawbAlgo_->process(context_, stats);\n>  \n>  \tif (agcAlgo_->updateControls())\n>  \t\tsetControls(frame);\n> diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp\n> index c2d9e0c1..f90aa492 100644\n> --- a/src/ipa/ipu3/ipu3_awb.cpp\n> +++ b/src/ipa/ipu3/ipu3_awb.cpp\n> @@ -107,25 +107,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = {\n>  \t.opt_center_sqr = { 419904, 133956 },\n>  };\n>  \n> -/* Default settings for Auto White Balance replicated from the Kernel*/\n> -static const struct ipu3_uapi_awb_config_s imguCssAwbDefaults = {\n> -\t.rgbs_thr_gr = 8191,\n> -\t.rgbs_thr_r = 8191,\n> -\t.rgbs_thr_gb = 8191,\n> -\t.rgbs_thr_b = 8191 | IPU3_UAPI_AWB_RGBS_THR_B_EN | IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT,\n> -\t.grid = {\n> -\t\t.width = 160,\n> -\t\t.height = 36,\n> -\t\t.block_width_log2 = 3,\n> -\t\t.block_height_log2 = 4,\n> -\t\t.height_per_slice = 1, /* Overridden by kernel. */\n> -\t\t.x_start = 0,\n> -\t\t.y_start = 0,\n> -\t\t.x_end = 0,\n> -\t\t.y_end = 0,\n> -\t},\n> -};\n> -\n>  /* Default color correction matrix defined as an identity matrix */\n>  static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = {\n>  \t8191, 0, 0, 0,\n> @@ -140,39 +121,12 @@ IPU3Awb::IPU3Awb()\n>  \tasyncResults_.greenGain = 1.0;\n>  \tasyncResults_.redGain = 1.0;\n>  \tasyncResults_.temperatureK = 4500;\n> -}\n>  \n> -IPU3Awb::~IPU3Awb()\n> -{\n> +\tzones_.reserve(kAwbStatsSizeX * kAwbStatsSizeY);\n>  }\n>  \n> -void IPU3Awb::initialise(ipu3_uapi_params &params, const Size &bdsOutputSize, struct ipu3_uapi_grid_config &bdsGrid)\n> +IPU3Awb::~IPU3Awb()\n>  {\n> -\tparams.use.acc_awb = 1;\n> -\tparams.acc_param.awb.config = imguCssAwbDefaults;\n> -\n> -\tawbGrid_ = bdsGrid;\n> -\tparams.acc_param.awb.config.grid = awbGrid_;\n\nI don't think I see acc_param.awb.config.grid\n\n> -\n> -\tparams.use.acc_bnr = 1;\n> -\tparams.acc_param.bnr = imguCssBnrDefaults;\n> -\t/**\n> -\t * Optical center is column (respectively row) startminus X (respectively Y) center.\n> -\t * For the moment use BDS as a first approximation, but it should\n> -\t * be calculated based on Shading (SHD) parameters.\n> -\t */\n> -\tparams.acc_param.bnr.column_size = bdsOutputSize.width;\n> -\tparams.acc_param.bnr.opt_center.x_reset = awbGrid_.x_start - (bdsOutputSize.width / 2);\n> -\tparams.acc_param.bnr.opt_center.y_reset = awbGrid_.y_start - (bdsOutputSize.height / 2);\n> -\tparams.acc_param.bnr.opt_center_sqr.x_sqr_reset = params.acc_param.bnr.opt_center.x_reset\n> -\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.x_reset;\n> -\tparams.acc_param.bnr.opt_center_sqr.y_sqr_reset = params.acc_param.bnr.opt_center.y_reset\n> -\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.y_reset;\n> -\n> -\tparams.use.acc_ccm = 1;\n> -\tparams.acc_param.ccm = imguCssCcmDefault;\n> -\n> -\tzones_.reserve(kAwbStatsSizeX * kAwbStatsSizeY);\n>  }\n>  \n>  /**\n> @@ -321,22 +275,65 @@ void IPU3Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)\n>  \t}\n>  }\n>  \n> -void IPU3Awb::updateWbParameters(ipu3_uapi_params &params)\n> +void IPU3Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)\n>  {\n> +\tcalculateWBGains(stats);\n> +\n> +\t/*\n> +\t* Gains are only recalculated if enough zones were detected.\n\nCheck the spacing on this comment indents.\n\n> +\t* The results are cached, so if no results were calculated, we set the\n> +\t* cached values from asyncResults_ here.\n> +\t*/\n> +\tcontext.frameContext.awb.gains.blue = asyncResults_.blueGain;\n> +\tcontext.frameContext.awb.gains.green = asyncResults_.greenGain;\n> +\tcontext.frameContext.awb.gains.red = asyncResults_.redGain;\n> +}\n> +\n> +void IPU3Awb::prepare(IPAContext &context, ipu3_uapi_params &params)\n> +{\n> +\tparams.acc_param.awb.config.rgbs_thr_gr = 8191;\n> +\tparams.acc_param.awb.config.rgbs_thr_r = 8191;\n> +\tparams.acc_param.awb.config.rgbs_thr_gb = 8191;\n> +\tparams.acc_param.awb.config.rgbs_thr_b = 8191 | IPU3_UAPI_AWB_RGBS_THR_B_EN | IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT;\n> +> +\tawbGrid_ = context.configuration.grid.bdsGrid;\n\nIt looks like we can drop awbGrid_ now and just take a local reference\nhere if you want to shorten lines?\n\n\n> +\n> +\tparams.acc_param.awb.config.grid = context.configuration.grid.bdsGrid;\n\nSeparate each component (awb/bnr/ccm), so at least a new line here.\n\n\n> +\tparams.acc_param.bnr = imguCssBnrDefaults;\n> +\n> +\t/*\n> +\t * Optical center is column start (respectively row start) of the\n> +\t * region of interest minus its X center (respectively Y center).\n> +\t *\n> +\t * For the moment use BDS as a first approximation, but it should\n> +\t * be calculated based on Shading (SHD) parameters.\n> +\t */\n> +\tSize &bdsOutputSize = context.configuration.grid.bdsOutputSize;\n> +\tparams.acc_param.bnr.column_size = bdsOutputSize.width;\n> +\tparams.acc_param.bnr.opt_center.x_reset = awbGrid_.x_start - (bdsOutputSize.width / 2);\n> +\tparams.acc_param.bnr.opt_center.y_reset = awbGrid_.y_start - (bdsOutputSize.height / 2);\n> +\tparams.acc_param.bnr.opt_center_sqr.x_sqr_reset = params.acc_param.bnr.opt_center.x_reset\n> +\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.x_reset;\n> +\tparams.acc_param.bnr.opt_center_sqr.y_sqr_reset = params.acc_param.bnr.opt_center.y_reset\n> +\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.y_reset;\n> +> +\tparams.acc_param.ccm = imguCssCcmDefault;\n\nCan we avoid mixing CCM in the middle of the BNR?\n\nCan it just be set last? Is the comment that got removed below no longer\nrelevant? or should it be updated as a todo at all?\n\n\n\n> +\n>  \t/*\n>  \t * Green gains should not be touched and considered 1.\n>  \t * Default is 16, so do not change it at all.\n>  \t * 4096 is the value for a gain of 1.0\n>  \t */\n> -\tparams.acc_param.bnr.wb_gains.gr = 16;\n> -\tparams.acc_param.bnr.wb_gains.r = 4096 * asyncResults_.redGain;\n> -\tparams.acc_param.bnr.wb_gains.b = 4096 * asyncResults_.blueGain;\n> -\tparams.acc_param.bnr.wb_gains.gb = 16;\n> +\tparams.acc_param.bnr.wb_gains.gr = 16 * context.frameContext.awb.gains.green;\n> +\tparams.acc_param.bnr.wb_gains.r = 4096 * context.frameContext.awb.gains.red;\n> +\tparams.acc_param.bnr.wb_gains.b = 4096 * context.frameContext.awb.gains.blue;\n> +\tparams.acc_param.bnr.wb_gains.gb = 16 * context.frameContext.awb.gains.green;\n>  \n>  \tLOG(IPU3Awb, Debug) << \"Color temperature estimated: \" << asyncResults_.temperatureK;\n>  \n> -\t/* The CCM matrix may change when color temperature will be used */\n> -\tparams.acc_param.ccm = imguCssCcmDefault;\n> +\tparams.use.acc_awb = 1;\n> +\tparams.use.acc_bnr = 1;\n> +\tparams.use.acc_ccm = 1;\n>  }\n>  \n>  } /* namespace ipa::ipu3 */\n> diff --git a/src/ipa/ipu3/ipu3_awb.h b/src/ipa/ipu3/ipu3_awb.h\n> index eeb2920b..4de3fae2 100644\n> --- a/src/ipa/ipu3/ipu3_awb.h\n> +++ b/src/ipa/ipu3/ipu3_awb.h\n> @@ -29,9 +29,8 @@ public:\n>  \tIPU3Awb();\n>  \t~IPU3Awb();\n>  \n> -\tvoid initialise(ipu3_uapi_params &params, const Size &bdsOutputSize, struct ipu3_uapi_grid_config &bdsGrid);\n> -\tvoid calculateWBGains(const ipu3_uapi_stats_3a *stats);\n> -\tvoid updateWbParameters(ipu3_uapi_params &params);\n> +\tvoid prepare(IPAContext &context, ipu3_uapi_params &params) override;\n> +\tvoid process(IPAContext &context, const ipu3_uapi_stats_3a *stats) override;\n>  \n>  \tstruct Ipu3AwbCell {\n>  \t\tunsigned char greenRedAvg;\n> @@ -72,6 +71,7 @@ public:\n>  \t};\n>  \n>  private:\n> +\tvoid calculateWBGains(const ipu3_uapi_stats_3a *stats);\n>  \tvoid generateZones(std::vector<RGB> &zones);\n>  \tvoid generateAwbStats(const ipu3_uapi_stats_3a *stats);\n>  \tvoid clearAwbStats();\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 CCF4BBD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 Aug 2021 21:39:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 477A768895;\n\tWed, 18 Aug 2021 23:39:35 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 327286888A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Aug 2021 23:39:34 +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 A7698EE;\n\tWed, 18 Aug 2021 23:39:33 +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=\"QLON3yhS\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629322773;\n\tbh=HnJporTjGtKF5aeKUroG62M73lVFokEC5hgWStfRxkA=;\n\th=From:To:References:Subject:Date:In-Reply-To:From;\n\tb=QLON3yhScU57Is7M5Zi8yx6zGunErDsp8qlVkgOLuFF+LMD/R++VNXxa+0Rr+Yym0\n\tW/t9JmkIhLNhYo+1Ccvd4+3qKupzxu1+sWOA58LL0DioRMVrIhgUMpAGyXeL5B5+3D\n\t2wSTQag44+kf1h2SpbwOOXdRKiOdm+RkxNnYTigg=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210818155403.268694-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210818155403.268694-7-jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<2b07582f-47d4-b57a-e1b0-6e01c68c2ec5@ideasonboard.com>","Date":"Wed, 18 Aug 2021 22:39:31 +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":"<20210818155403.268694-7-jeanmichel.hautbois@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","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":18932,"web_url":"https://patchwork.libcamera.org/comment/18932/","msgid":"<b94350f3-4207-aae3-78b7-5ef3467006da@ideasonboard.com>","date":"2021-08-18T21:50:54","subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 18/08/2021 22:39, Kieran Bingham wrote:\n> On 18/08/2021 16:54, Jean-Michel Hautbois wrote:\n>> -void IPU3Awb::initialise(ipu3_uapi_params &params, const Size &bdsOutputSize, struct ipu3_uapi_grid_config &bdsGrid)\n>> +IPU3Awb::~IPU3Awb()\n>>  {\n>> -\tparams.use.acc_awb = 1;\n>> -\tparams.acc_param.awb.config = imguCssAwbDefaults;\n>> -\n>> -\tawbGrid_ = bdsGrid;\n>> -\tparams.acc_param.awb.config.grid = awbGrid_;\n> \n> I don't think I see acc_param.awb.config.grid\n> \nSorry - I forgot to remove this comment after I found it ;-) Please\nignore that line.","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 6C5C3BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 Aug 2021 21:51:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CD626688A3;\n\tWed, 18 Aug 2021 23:51:00 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A631E6888A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Aug 2021 23:50:58 +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 2A760EE;\n\tWed, 18 Aug 2021 23:50:58 +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=\"FR5RKiuF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629323458;\n\tbh=NQqOMgbNCKh2mAHdg8dDO9esWTVCkxaH9kyS3c2TYZM=;\n\th=Subject:From:To:References:Reply-To:Date:In-Reply-To:From;\n\tb=FR5RKiuFsTdrqroRM0IcpXFzODwT0L9ZsAPNKwO8QOx0Ol/BulDZy7TkznnUVM9CN\n\t9dc4XcQJZFGaeM1tdQwmI6esEfCzsOWUPrIhBN2yPvxTn3wjAokpGrLCh5gW7QXRmF\n\tG314IV0CpVDr8vL3RSUWQUTUnVcbbPW79yRpwrvE=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210818155403.268694-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210818155403.268694-7-jeanmichel.hautbois@ideasonboard.com>\n\t<2b07582f-47d4-b57a-e1b0-6e01c68c2ec5@ideasonboard.com>","Organization":"Ideas on Board","Message-ID":"<b94350f3-4207-aae3-78b7-5ef3467006da@ideasonboard.com>","Date":"Wed, 18 Aug 2021 22:50:54 +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":"<2b07582f-47d4-b57a-e1b0-6e01c68c2ec5@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","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":18933,"web_url":"https://patchwork.libcamera.org/comment/18933/","msgid":"<YR2A/YYEB/BwuJOr@pendragon.ideasonboard.com>","date":"2021-08-18T21:51:57","subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","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 Wed, Aug 18, 2021 at 05:54:00PM +0200, Jean-Michel Hautbois wrote:\n> When the stats are received, pass it with the context to the existing\n\ns/it/them/\n\n> AWB algorithm. IPAFrameContext now has a new structure to store the\n> gains calculated by the AWB algorithm.\n> \n> When an EventFillParams event is received, call prepare() and set the new\n> gains accordingly in the params structure.\n> There is no more a need for the IPU3Awb::initialise() function, as the\n> params are always set in prepare().\n> \n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/ipa/ipu3/ipa_context.h |   8 +++\n>  src/ipa/ipu3/ipu3.cpp      |   5 +-\n>  src/ipa/ipu3/ipu3_awb.cpp  | 107 ++++++++++++++++++-------------------\n>  src/ipa/ipu3/ipu3_awb.h    |   6 +--\n>  4 files changed, 65 insertions(+), 61 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h\n> index 5964ba6d..beae3ac6 100644\n> --- a/src/ipa/ipu3/ipa_context.h\n> +++ b/src/ipa/ipu3/ipa_context.h\n> @@ -29,6 +29,14 @@ struct IPAFrameContext {\n>  \t\tdouble gain;\n>  \t} agc;\n>  \n> +\tstruct Awb {\n> +\t\tstruct Gains {\n> +\t\t\tdouble red;\n> +\t\t\tdouble green;\n> +\t\t\tdouble blue;\n> +\t\t} gains;\n> +\t} awb;\n> +\n>  \tstruct Contrast {\n>  \t\tstruct ipu3_uapi_gamma_corr_lut gammaCorrection;\n>  \t} contrast;\n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index ee0dd9fe..2b4a4c8c 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -339,7 +339,6 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>  \t}\n>  \n>  \tawbAlgo_ = std::make_unique<IPU3Awb>();\n> -\tawbAlgo_->initialise(params_, context_.configuration.grid.bdsOutputSize, context_.configuration.grid.bdsGrid);\n>  \n>  \tagcAlgo_ = std::make_unique<IPU3Agc>();\n>  \tagcAlgo_->initialise(context_.configuration.grid.bdsGrid, sensorInfo_);\n> @@ -420,7 +419,7 @@ void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)\n>  \t\talgo->prepare(context_, params_);\n>  \n>  \tif (agcAlgo_->updateControls())\n> -\t\tawbAlgo_->updateWbParameters(params_);\n> +\t\tawbAlgo_->prepare(context_, params_);\n>  \n>  \t*params = params_;\n>  \n> @@ -446,7 +445,7 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n>  \texposure_ = context_.frameContext.agc.exposure;\n>  \tgain_ = camHelper_->gainCode(context_.frameContext.agc.gain);\n>  \n> -\tawbAlgo_->calculateWBGains(stats);\n> +\tawbAlgo_->process(context_, stats);\n>  \n>  \tif (agcAlgo_->updateControls())\n>  \t\tsetControls(frame);\n> diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp\n> index c2d9e0c1..f90aa492 100644\n> --- a/src/ipa/ipu3/ipu3_awb.cpp\n> +++ b/src/ipa/ipu3/ipu3_awb.cpp\n> @@ -107,25 +107,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = {\n>  \t.opt_center_sqr = { 419904, 133956 },\n>  };\n>  \n> -/* Default settings for Auto White Balance replicated from the Kernel*/\n> -static const struct ipu3_uapi_awb_config_s imguCssAwbDefaults = {\n> -\t.rgbs_thr_gr = 8191,\n> -\t.rgbs_thr_r = 8191,\n> -\t.rgbs_thr_gb = 8191,\n> -\t.rgbs_thr_b = 8191 | IPU3_UAPI_AWB_RGBS_THR_B_EN | IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT,\n> -\t.grid = {\n> -\t\t.width = 160,\n> -\t\t.height = 36,\n> -\t\t.block_width_log2 = 3,\n> -\t\t.block_height_log2 = 4,\n> -\t\t.height_per_slice = 1, /* Overridden by kernel. */\n> -\t\t.x_start = 0,\n> -\t\t.y_start = 0,\n> -\t\t.x_end = 0,\n> -\t\t.y_end = 0,\n> -\t},\n> -};\n> -\n>  /* Default color correction matrix defined as an identity matrix */\n>  static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = {\n>  \t8191, 0, 0, 0,\n> @@ -140,39 +121,12 @@ IPU3Awb::IPU3Awb()\n>  \tasyncResults_.greenGain = 1.0;\n>  \tasyncResults_.redGain = 1.0;\n>  \tasyncResults_.temperatureK = 4500;\n> -}\n>  \n> -IPU3Awb::~IPU3Awb()\n> -{\n> +\tzones_.reserve(kAwbStatsSizeX * kAwbStatsSizeY);\n>  }\n>  \n> -void IPU3Awb::initialise(ipu3_uapi_params &params, const Size &bdsOutputSize, struct ipu3_uapi_grid_config &bdsGrid)\n> +IPU3Awb::~IPU3Awb()\n\nAs it's empty, you could write\n\nIPU3Awb::~IPU3Awb() = default;\n\n>  {\n> -\tparams.use.acc_awb = 1;\n> -\tparams.acc_param.awb.config = imguCssAwbDefaults;\n> -\n> -\tawbGrid_ = bdsGrid;\n> -\tparams.acc_param.awb.config.grid = awbGrid_;\n> -\n> -\tparams.use.acc_bnr = 1;\n> -\tparams.acc_param.bnr = imguCssBnrDefaults;\n> -\t/**\n> -\t * Optical center is column (respectively row) startminus X (respectively Y) center.\n> -\t * For the moment use BDS as a first approximation, but it should\n> -\t * be calculated based on Shading (SHD) parameters.\n> -\t */\n> -\tparams.acc_param.bnr.column_size = bdsOutputSize.width;\n> -\tparams.acc_param.bnr.opt_center.x_reset = awbGrid_.x_start - (bdsOutputSize.width / 2);\n> -\tparams.acc_param.bnr.opt_center.y_reset = awbGrid_.y_start - (bdsOutputSize.height / 2);\n> -\tparams.acc_param.bnr.opt_center_sqr.x_sqr_reset = params.acc_param.bnr.opt_center.x_reset\n> -\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.x_reset;\n> -\tparams.acc_param.bnr.opt_center_sqr.y_sqr_reset = params.acc_param.bnr.opt_center.y_reset\n> -\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.y_reset;\n> -\n> -\tparams.use.acc_ccm = 1;\n> -\tparams.acc_param.ccm = imguCssCcmDefault;\n> -\n> -\tzones_.reserve(kAwbStatsSizeX * kAwbStatsSizeY);\n>  }\n>  \n>  /**\n> @@ -321,22 +275,65 @@ void IPU3Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)\n>  \t}\n>  }\n>  \n> -void IPU3Awb::updateWbParameters(ipu3_uapi_params &params)\n> +void IPU3Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)\n>  {\n> +\tcalculateWBGains(stats);\n> +\n> +\t/*\n> +\t* Gains are only recalculated if enough zones were detected.\n> +\t* The results are cached, so if no results were calculated, we set the\n> +\t* cached values from asyncResults_ here.\n> +\t*/\n\nMissing space before *\n\n> +\tcontext.frameContext.awb.gains.blue = asyncResults_.blueGain;\n> +\tcontext.frameContext.awb.gains.green = asyncResults_.greenGain;\n> +\tcontext.frameContext.awb.gains.red = asyncResults_.redGain;\n> +}\n> +\n> +void IPU3Awb::prepare(IPAContext &context, ipu3_uapi_params &params)\n> +{\n> +\tparams.acc_param.awb.config.rgbs_thr_gr = 8191;\n> +\tparams.acc_param.awb.config.rgbs_thr_r = 8191;\n> +\tparams.acc_param.awb.config.rgbs_thr_gb = 8191;\n> +\tparams.acc_param.awb.config.rgbs_thr_b = 8191 | IPU3_UAPI_AWB_RGBS_THR_B_EN | IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT;\n\n\tparams.acc_param.awb.config.rgbs_thr_b = 8191 | IPU3_UAPI_AWB_RGBS_THR_B_EN\n\t\t\t\t\t       | IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT;\n\nI would actually write it as\n\n\tparams.acc_param.awb.config.rgbs_thr_b = IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT\n\t\t\t\t\t       | IPU3_UAPI_AWB_RGBS_THR_B_EN\n\t\t\t\t\t       | 8191;\n\nas I like to sort bits from MSB to LSB, but that's really just me :-)\n\n> +\n> +\tawbGrid_ = context.configuration.grid.bdsGrid;\n> +\n> +\tparams.acc_param.awb.config.grid = context.configuration.grid.bdsGrid;\n> +\tparams.acc_param.bnr = imguCssBnrDefaults;\n> +\n> +\t/*\n> +\t * Optical center is column start (respectively row start) of the\n> +\t * region of interest minus its X center (respectively Y center).\n> +\t *\n> +\t * For the moment use BDS as a first approximation, but it should\n> +\t * be calculated based on Shading (SHD) parameters.\n> +\t */\n> +\tSize &bdsOutputSize = context.configuration.grid.bdsOutputSize;\n> +\tparams.acc_param.bnr.column_size = bdsOutputSize.width;\n> +\tparams.acc_param.bnr.opt_center.x_reset = awbGrid_.x_start - (bdsOutputSize.width / 2);\n> +\tparams.acc_param.bnr.opt_center.y_reset = awbGrid_.y_start - (bdsOutputSize.height / 2);\n> +\tparams.acc_param.bnr.opt_center_sqr.x_sqr_reset = params.acc_param.bnr.opt_center.x_reset\n> +\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.x_reset;\n> +\tparams.acc_param.bnr.opt_center_sqr.y_sqr_reset = params.acc_param.bnr.opt_center.y_reset\n> +\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.y_reset;\n> +\n> +\tparams.acc_param.ccm = imguCssCcmDefault;\n> +\n>  \t/*\n>  \t * Green gains should not be touched and considered 1.\n>  \t * Default is 16, so do not change it at all.\n>  \t * 4096 is the value for a gain of 1.0\n>  \t */\n> -\tparams.acc_param.bnr.wb_gains.gr = 16;\n> -\tparams.acc_param.bnr.wb_gains.r = 4096 * asyncResults_.redGain;\n> -\tparams.acc_param.bnr.wb_gains.b = 4096 * asyncResults_.blueGain;\n> -\tparams.acc_param.bnr.wb_gains.gb = 16;\n> +\tparams.acc_param.bnr.wb_gains.gr = 16 * context.frameContext.awb.gains.green;\n> +\tparams.acc_param.bnr.wb_gains.r = 4096 * context.frameContext.awb.gains.red;\n> +\tparams.acc_param.bnr.wb_gains.b = 4096 * context.frameContext.awb.gains.blue;\n> +\tparams.acc_param.bnr.wb_gains.gb = 16 * context.frameContext.awb.gains.green;\n>  \n>  \tLOG(IPU3Awb, Debug) << \"Color temperature estimated: \" << asyncResults_.temperatureK;\n>  \n> -\t/* The CCM matrix may change when color temperature will be used */\n> -\tparams.acc_param.ccm = imguCssCcmDefault;\n> +\tparams.use.acc_awb = 1;\n> +\tparams.use.acc_bnr = 1;\n> +\tparams.use.acc_ccm = 1;\n>  }\n>  \n>  } /* namespace ipa::ipu3 */\n> diff --git a/src/ipa/ipu3/ipu3_awb.h b/src/ipa/ipu3/ipu3_awb.h\n> index eeb2920b..4de3fae2 100644\n> --- a/src/ipa/ipu3/ipu3_awb.h\n> +++ b/src/ipa/ipu3/ipu3_awb.h\n> @@ -29,9 +29,8 @@ public:\n>  \tIPU3Awb();\n>  \t~IPU3Awb();\n>  \n> -\tvoid initialise(ipu3_uapi_params &params, const Size &bdsOutputSize, struct ipu3_uapi_grid_config &bdsGrid);\n> -\tvoid calculateWBGains(const ipu3_uapi_stats_3a *stats);\n> -\tvoid updateWbParameters(ipu3_uapi_params &params);\n> +\tvoid prepare(IPAContext &context, ipu3_uapi_params &params) override;\n> +\tvoid process(IPAContext &context, const ipu3_uapi_stats_3a *stats) override;\n>  \n>  \tstruct Ipu3AwbCell {\n>  \t\tunsigned char greenRedAvg;\n> @@ -72,6 +71,7 @@ public:\n>  \t};\n>  \n>  private:\n> +\tvoid calculateWBGains(const ipu3_uapi_stats_3a *stats);\n>  \tvoid generateZones(std::vector<RGB> &zones);\n>  \tvoid generateAwbStats(const ipu3_uapi_stats_3a *stats);\n>  \tvoid clearAwbStats();","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 B0561BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 Aug 2021 21:52:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7B67C68895;\n\tWed, 18 Aug 2021 23:52: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 759A76888A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Aug 2021 23:52:05 +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 1475EEE;\n\tWed, 18 Aug 2021 23:52:05 +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=\"Yo6pPXlp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629323525;\n\tbh=F+9Unom5iXXJECWRe+flCUDdB8s6FD9/DjlL12eXB/w=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Yo6pPXlpqAB7Eu4SD8EPEm2WryEkxw8087slJtLzuO63sGpVZjWS3T1JHn71nmv/t\n\tc1rq/rfrkdkW/n/HX0JVgNpJlrTddxUGS+aFG+0LbH+O4ZnDt5TQuJxROhM+HM0VJ+\n\tKmg2DAYm6ud/mnNrc2BUJmurN2CCSDs89uHg/Epk=","Date":"Thu, 19 Aug 2021 00:51:57 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<YR2A/YYEB/BwuJOr@pendragon.ideasonboard.com>","References":"<20210818155403.268694-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210818155403.268694-7-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210818155403.268694-7-jeanmichel.hautbois@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","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":18946,"web_url":"https://patchwork.libcamera.org/comment/18946/","msgid":"<ca988b2a-0046-3176-fa78-da7f10e2a5f8@ideasonboard.com>","date":"2021-08-19T11:43:46","subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"Hi Kieran,\n\nOn 18/08/2021 23:39, Kieran Bingham wrote:\n> On 18/08/2021 16:54, Jean-Michel Hautbois wrote:\n>> When the stats are received, pass it with the context to the existing\n>> AWB algorithm. IPAFrameContext now has a new structure to store the\n>> gains calculated by the AWB algorithm.\n>>\n>> When an EventFillParams event is received, call prepare() and set the new\n>> gains accordingly in the params structure.\n>> There is no more a need for the IPU3Awb::initialise() function, as the\n>> params are always set in prepare().\n>>\n>> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  src/ipa/ipu3/ipa_context.h |   8 +++\n>>  src/ipa/ipu3/ipu3.cpp      |   5 +-\n>>  src/ipa/ipu3/ipu3_awb.cpp  | 107 ++++++++++++++++++-------------------\n>>  src/ipa/ipu3/ipu3_awb.h    |   6 +--\n>>  4 files changed, 65 insertions(+), 61 deletions(-)\n>>\n>> diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h\n>> index 5964ba6d..beae3ac6 100644\n>> --- a/src/ipa/ipu3/ipa_context.h\n>> +++ b/src/ipa/ipu3/ipa_context.h\n>> @@ -29,6 +29,14 @@ struct IPAFrameContext {\n>>  \t\tdouble gain;\n>>  \t} agc;\n>>  \n>> +\tstruct Awb {\n>> +\t\tstruct Gains {\n>> +\t\t\tdouble red;\n>> +\t\t\tdouble green;\n>> +\t\t\tdouble blue;\n>> +\t\t} gains;\n>> +\t} awb;\n>> +\n>>  \tstruct Contrast {\n>>  \t\tstruct ipu3_uapi_gamma_corr_lut gammaCorrection;\n>>  \t} contrast;\n>> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n>> index ee0dd9fe..2b4a4c8c 100644\n>> --- a/src/ipa/ipu3/ipu3.cpp\n>> +++ b/src/ipa/ipu3/ipu3.cpp\n>> @@ -339,7 +339,6 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo)\n>>  \t}\n>>  \n>>  \tawbAlgo_ = std::make_unique<IPU3Awb>();\n>> -\tawbAlgo_->initialise(params_, context_.configuration.grid.bdsOutputSize, context_.configuration.grid.bdsGrid);\n>>  \n>>  \tagcAlgo_ = std::make_unique<IPU3Agc>();\n>>  \tagcAlgo_->initialise(context_.configuration.grid.bdsGrid, sensorInfo_);\n>> @@ -420,7 +419,7 @@ void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)\n>>  \t\talgo->prepare(context_, params_);\n>>  \n>>  \tif (agcAlgo_->updateControls())\n>> -\t\tawbAlgo_->updateWbParameters(params_);\n>> +\t\tawbAlgo_->prepare(context_, params_);\n>>  \n>>  \t*params = params_;\n>>  \n>> @@ -446,7 +445,7 @@ void IPAIPU3::parseStatistics(unsigned int frame,\n>>  \texposure_ = context_.frameContext.agc.exposure;\n>>  \tgain_ = camHelper_->gainCode(context_.frameContext.agc.gain);\n>>  \n>> -\tawbAlgo_->calculateWBGains(stats);\n>> +\tawbAlgo_->process(context_, stats);\n>>  \n>>  \tif (agcAlgo_->updateControls())\n>>  \t\tsetControls(frame);\n>> diff --git a/src/ipa/ipu3/ipu3_awb.cpp b/src/ipa/ipu3/ipu3_awb.cpp\n>> index c2d9e0c1..f90aa492 100644\n>> --- a/src/ipa/ipu3/ipu3_awb.cpp\n>> +++ b/src/ipa/ipu3/ipu3_awb.cpp\n>> @@ -107,25 +107,6 @@ static const struct ipu3_uapi_bnr_static_config imguCssBnrDefaults = {\n>>  \t.opt_center_sqr = { 419904, 133956 },\n>>  };\n>>  \n>> -/* Default settings for Auto White Balance replicated from the Kernel*/\n>> -static const struct ipu3_uapi_awb_config_s imguCssAwbDefaults = {\n>> -\t.rgbs_thr_gr = 8191,\n>> -\t.rgbs_thr_r = 8191,\n>> -\t.rgbs_thr_gb = 8191,\n>> -\t.rgbs_thr_b = 8191 | IPU3_UAPI_AWB_RGBS_THR_B_EN | IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT,\n>> -\t.grid = {\n>> -\t\t.width = 160,\n>> -\t\t.height = 36,\n>> -\t\t.block_width_log2 = 3,\n>> -\t\t.block_height_log2 = 4,\n>> -\t\t.height_per_slice = 1, /* Overridden by kernel. */\n>> -\t\t.x_start = 0,\n>> -\t\t.y_start = 0,\n>> -\t\t.x_end = 0,\n>> -\t\t.y_end = 0,\n>> -\t},\n>> -};\n>> -\n>>  /* Default color correction matrix defined as an identity matrix */\n>>  static const struct ipu3_uapi_ccm_mat_config imguCssCcmDefault = {\n>>  \t8191, 0, 0, 0,\n>> @@ -140,39 +121,12 @@ IPU3Awb::IPU3Awb()\n>>  \tasyncResults_.greenGain = 1.0;\n>>  \tasyncResults_.redGain = 1.0;\n>>  \tasyncResults_.temperatureK = 4500;\n>> -}\n>>  \n>> -IPU3Awb::~IPU3Awb()\n>> -{\n>> +\tzones_.reserve(kAwbStatsSizeX * kAwbStatsSizeY);\n>>  }\n>>  \n>> -void IPU3Awb::initialise(ipu3_uapi_params &params, const Size &bdsOutputSize, struct ipu3_uapi_grid_config &bdsGrid)\n>> +IPU3Awb::~IPU3Awb()\n>>  {\n>> -\tparams.use.acc_awb = 1;\n>> -\tparams.acc_param.awb.config = imguCssAwbDefaults;\n>> -\n>> -\tawbGrid_ = bdsGrid;\n>> -\tparams.acc_param.awb.config.grid = awbGrid_;\n> \n> I don't think I see acc_param.awb.config.grid\n> \n>> -\n>> -\tparams.use.acc_bnr = 1;\n>> -\tparams.acc_param.bnr = imguCssBnrDefaults;\n>> -\t/**\n>> -\t * Optical center is column (respectively row) startminus X (respectively Y) center.\n>> -\t * For the moment use BDS as a first approximation, but it should\n>> -\t * be calculated based on Shading (SHD) parameters.\n>> -\t */\n>> -\tparams.acc_param.bnr.column_size = bdsOutputSize.width;\n>> -\tparams.acc_param.bnr.opt_center.x_reset = awbGrid_.x_start - (bdsOutputSize.width / 2);\n>> -\tparams.acc_param.bnr.opt_center.y_reset = awbGrid_.y_start - (bdsOutputSize.height / 2);\n>> -\tparams.acc_param.bnr.opt_center_sqr.x_sqr_reset = params.acc_param.bnr.opt_center.x_reset\n>> -\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.x_reset;\n>> -\tparams.acc_param.bnr.opt_center_sqr.y_sqr_reset = params.acc_param.bnr.opt_center.y_reset\n>> -\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.y_reset;\n>> -\n>> -\tparams.use.acc_ccm = 1;\n>> -\tparams.acc_param.ccm = imguCssCcmDefault;\n>> -\n>> -\tzones_.reserve(kAwbStatsSizeX * kAwbStatsSizeY);\n>>  }\n>>  \n>>  /**\n>> @@ -321,22 +275,65 @@ void IPU3Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)\n>>  \t}\n>>  }\n>>  \n>> -void IPU3Awb::updateWbParameters(ipu3_uapi_params &params)\n>> +void IPU3Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)\n>>  {\n>> +\tcalculateWBGains(stats);\n>> +\n>> +\t/*\n>> +\t* Gains are only recalculated if enough zones were detected.\n> \n> Check the spacing on this comment indents.\n> \n>> +\t* The results are cached, so if no results were calculated, we set the\n>> +\t* cached values from asyncResults_ here.\n>> +\t*/\n>> +\tcontext.frameContext.awb.gains.blue = asyncResults_.blueGain;\n>> +\tcontext.frameContext.awb.gains.green = asyncResults_.greenGain;\n>> +\tcontext.frameContext.awb.gains.red = asyncResults_.redGain;\n>> +}\n>> +\n>> +void IPU3Awb::prepare(IPAContext &context, ipu3_uapi_params &params)\n>> +{\n>> +\tparams.acc_param.awb.config.rgbs_thr_gr = 8191;\n>> +\tparams.acc_param.awb.config.rgbs_thr_r = 8191;\n>> +\tparams.acc_param.awb.config.rgbs_thr_gb = 8191;\n>> +\tparams.acc_param.awb.config.rgbs_thr_b = 8191 | IPU3_UAPI_AWB_RGBS_THR_B_EN | IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT;\n>> +> +\tawbGrid_ = context.configuration.grid.bdsGrid;\n> \n> It looks like we can drop awbGrid_ now and just take a local reference\n> here if you want to shorten lines?\n> \n\nWell, the grid is used in generateAwbStats() which is called at\nprocess() call. I could pass it a grid using a reference to the context\ntoo...\n\n> \n>> +\n>> +\tparams.acc_param.awb.config.grid = context.configuration.grid.bdsGrid;\n> \n> Separate each component (awb/bnr/ccm), so at least a new line here.\n> \n> \n>> +\tparams.acc_param.bnr = imguCssBnrDefaults;\n>> +\n>> +\t/*\n>> +\t * Optical center is column start (respectively row start) of the\n>> +\t * region of interest minus its X center (respectively Y center).\n>> +\t *\n>> +\t * For the moment use BDS as a first approximation, but it should\n>> +\t * be calculated based on Shading (SHD) parameters.\n>> +\t */\n>> +\tSize &bdsOutputSize = context.configuration.grid.bdsOutputSize;\n>> +\tparams.acc_param.bnr.column_size = bdsOutputSize.width;\n>> +\tparams.acc_param.bnr.opt_center.x_reset = awbGrid_.x_start - (bdsOutputSize.width / 2);\n>> +\tparams.acc_param.bnr.opt_center.y_reset = awbGrid_.y_start - (bdsOutputSize.height / 2);\n>> +\tparams.acc_param.bnr.opt_center_sqr.x_sqr_reset = params.acc_param.bnr.opt_center.x_reset\n>> +\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.x_reset;\n>> +\tparams.acc_param.bnr.opt_center_sqr.y_sqr_reset = params.acc_param.bnr.opt_center.y_reset\n>> +\t\t\t\t\t\t\t* params.acc_param.bnr.opt_center.y_reset;\n>> +> +\tparams.acc_param.ccm = imguCssCcmDefault;\n> \n> Can we avoid mixing CCM in the middle of the BNR?\n> \n> Can it just be set last? Is the comment that got removed below no longer\n> relevant? or should it be updated as a todo at all?\n> \n> \n> \n>> +\n>>  \t/*\n>>  \t * Green gains should not be touched and considered 1.\n>>  \t * Default is 16, so do not change it at all.\n>>  \t * 4096 is the value for a gain of 1.0\n>>  \t */\n>> -\tparams.acc_param.bnr.wb_gains.gr = 16;\n>> -\tparams.acc_param.bnr.wb_gains.r = 4096 * asyncResults_.redGain;\n>> -\tparams.acc_param.bnr.wb_gains.b = 4096 * asyncResults_.blueGain;\n>> -\tparams.acc_param.bnr.wb_gains.gb = 16;\n>> +\tparams.acc_param.bnr.wb_gains.gr = 16 * context.frameContext.awb.gains.green;\n>> +\tparams.acc_param.bnr.wb_gains.r = 4096 * context.frameContext.awb.gains.red;\n>> +\tparams.acc_param.bnr.wb_gains.b = 4096 * context.frameContext.awb.gains.blue;\n>> +\tparams.acc_param.bnr.wb_gains.gb = 16 * context.frameContext.awb.gains.green;\n>>  \n>>  \tLOG(IPU3Awb, Debug) << \"Color temperature estimated: \" << asyncResults_.temperatureK;\n>>  \n>> -\t/* The CCM matrix may change when color temperature will be used */\n>> -\tparams.acc_param.ccm = imguCssCcmDefault;\n>> +\tparams.use.acc_awb = 1;\n>> +\tparams.use.acc_bnr = 1;\n>> +\tparams.use.acc_ccm = 1;\n>>  }\n>>  \n>>  } /* namespace ipa::ipu3 */\n>> diff --git a/src/ipa/ipu3/ipu3_awb.h b/src/ipa/ipu3/ipu3_awb.h\n>> index eeb2920b..4de3fae2 100644\n>> --- a/src/ipa/ipu3/ipu3_awb.h\n>> +++ b/src/ipa/ipu3/ipu3_awb.h\n>> @@ -29,9 +29,8 @@ public:\n>>  \tIPU3Awb();\n>>  \t~IPU3Awb();\n>>  \n>> -\tvoid initialise(ipu3_uapi_params &params, const Size &bdsOutputSize, struct ipu3_uapi_grid_config &bdsGrid);\n>> -\tvoid calculateWBGains(const ipu3_uapi_stats_3a *stats);\n>> -\tvoid updateWbParameters(ipu3_uapi_params &params);\n>> +\tvoid prepare(IPAContext &context, ipu3_uapi_params &params) override;\n>> +\tvoid process(IPAContext &context, const ipu3_uapi_stats_3a *stats) override;\n>>  \n>>  \tstruct Ipu3AwbCell {\n>>  \t\tunsigned char greenRedAvg;\n>> @@ -72,6 +71,7 @@ public:\n>>  \t};\n>>  \n>>  private:\n>> +\tvoid calculateWBGains(const ipu3_uapi_stats_3a *stats);\n>>  \tvoid generateZones(std::vector<RGB> &zones);\n>>  \tvoid generateAwbStats(const ipu3_uapi_stats_3a *stats);\n>>  \tvoid clearAwbStats();\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 11098BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Aug 2021 11:43:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 69C8E68895;\n\tThu, 19 Aug 2021 13:43:50 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D13FD60264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Aug 2021 13:43:48 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:d68d:3cb6:f3c7:c19c])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 77CE7DD;\n\tThu, 19 Aug 2021 13:43:48 +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=\"RlGeX0Fs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629373428;\n\tbh=RwGRj25D+3yyI5QRq/7gyLoervPYVDQeOZsAO60G6i4=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=RlGeX0FsnmA+p/x+11JW60t/IJCvHllXS52yPMQ5BGssvfRWaul8+FnLZSbaR4wwI\n\tyy4TJCVoxSrkGNXrZ81rqnDb2RoFFS+RBItLWM+Zmf5j/gf1RM3Jx9FrFE1FJxaiH3\n\tYWFBlDarHXy2puowXHBRxTCvw/u3iYAVYbiu/b4E=","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210818155403.268694-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210818155403.268694-7-jeanmichel.hautbois@ideasonboard.com>\n\t<2b07582f-47d4-b57a-e1b0-6e01c68c2ec5@ideasonboard.com>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<ca988b2a-0046-3176-fa78-da7f10e2a5f8@ideasonboard.com>","Date":"Thu, 19 Aug 2021 13:43:46 +0200","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":"<2b07582f-47d4-b57a-e1b0-6e01c68c2ec5@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","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":18948,"web_url":"https://patchwork.libcamera.org/comment/18948/","msgid":"<f6b41180-5a56-2d61-5c41-a3db2de27a62@ideasonboard.com>","date":"2021-08-19T15:11:27","subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"On 19/08/2021 12:43, Jean-Michel Hautbois wrote:\n> Hi Kieran,\n>>> +\n>>> +void IPU3Awb::prepare(IPAContext &context, ipu3_uapi_params &params)\n>>> +{\n>>> +\tparams.acc_param.awb.config.rgbs_thr_gr = 8191;\n>>> +\tparams.acc_param.awb.config.rgbs_thr_r = 8191;\n>>> +\tparams.acc_param.awb.config.rgbs_thr_gb = 8191;\n>>> +\tparams.acc_param.awb.config.rgbs_thr_b = 8191 | IPU3_UAPI_AWB_RGBS_THR_B_EN | IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT;\n>>> +> +\tawbGrid_ = context.configuration.grid.bdsGrid;\n>>\n>> It looks like we can drop awbGrid_ now and just take a local reference\n>> here if you want to shorten lines?\n>>\n> \n> Well, the grid is used in generateAwbStats() which is called at\n> process() call. I could pass it a grid using a reference to the context\n> too...\n\nCan those usages get it directly from the IPAContext.configuration?\n\n--\nKieran","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 B8AF6BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Aug 2021 15:11:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1D99B68895;\n\tThu, 19 Aug 2021 17:11:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 55E9860264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Aug 2021 17:11:30 +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 D37CFDD;\n\tThu, 19 Aug 2021 17:11:29 +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=\"SMfb5RMS\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629385890;\n\tbh=cNyNOIP8PJOPhB98kbyk+L3dlmp32MY+59GpeZy5gH4=;\n\th=From:To:References:Subject:Date:In-Reply-To:From;\n\tb=SMfb5RMSMfs/0XqzNhWSOA5QgXhhahKbFm/M8rTHXQkKbt8Elje7sUnojAoYuLgjQ\n\tt41v1aYeihYt+K5vj5Lx1xjr5d3Z/+pSgPDHK+ceoh6yqUK22jvKClIJi7HOidbqj6\n\tcPypYmQaXWFaZCze2sIIx0wIHXp7QTaGu7Nzxd14=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210818155403.268694-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210818155403.268694-7-jeanmichel.hautbois@ideasonboard.com>\n\t<2b07582f-47d4-b57a-e1b0-6e01c68c2ec5@ideasonboard.com>\n\t<ca988b2a-0046-3176-fa78-da7f10e2a5f8@ideasonboard.com>","Message-ID":"<f6b41180-5a56-2d61-5c41-a3db2de27a62@ideasonboard.com>","Date":"Thu, 19 Aug 2021 16:11:27 +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":"<ca988b2a-0046-3176-fa78-da7f10e2a5f8@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","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":18949,"web_url":"https://patchwork.libcamera.org/comment/18949/","msgid":"<2f0d7f1e-a95e-5745-afb8-1542a2c3479b@ideasonboard.com>","date":"2021-08-19T15:12:43","subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"On 19/08/2021 17:11, Kieran Bingham wrote:\n> On 19/08/2021 12:43, Jean-Michel Hautbois wrote:\n>> Hi Kieran,\n>>>> +\n>>>> +void IPU3Awb::prepare(IPAContext &context, ipu3_uapi_params &params)\n>>>> +{\n>>>> +\tparams.acc_param.awb.config.rgbs_thr_gr = 8191;\n>>>> +\tparams.acc_param.awb.config.rgbs_thr_r = 8191;\n>>>> +\tparams.acc_param.awb.config.rgbs_thr_gb = 8191;\n>>>> +\tparams.acc_param.awb.config.rgbs_thr_b = 8191 | IPU3_UAPI_AWB_RGBS_THR_B_EN | IPU3_UAPI_AWB_RGBS_THR_B_INCL_SAT;\n>>>> +> +\tawbGrid_ = context.configuration.grid.bdsGrid;\n>>>\n>>> It looks like we can drop awbGrid_ now and just take a local reference\n>>> here if you want to shorten lines?\n>>>\n>>\n>> Well, the grid is used in generateAwbStats() which is called at\n>> process() call. I could pass it a grid using a reference to the context\n>> too...\n> \n> Can those usages get it directly from the IPAContext.configuration?\n\nIt should be applied on top :-)\n\n> \n> --\n> Kieran\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 1C8D0BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Aug 2021 15:12:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DE32B68895;\n\tThu, 19 Aug 2021 17:12:47 +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 B02AD60264\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Aug 2021 17:12:46 +0200 (CEST)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:d68d:3cb6:f3c7:c19c])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D2E9DD;\n\tThu, 19 Aug 2021 17:12:46 +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=\"UBnUaB+M\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629385966;\n\tbh=FDgTMJFDpsBIDscT/OLFXCSwos6jIV6ppbJiaBYnZps=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=UBnUaB+M3kHmFQ6W32wHDnag5fdd0H/vaDqSHhh3+PyvOnl59s+uDL84AFAsWnk6O\n\twAzCKMnRlCPgVDlCiQKRNUF7b9CKQNL2RWQql3badIB0D2uWejMkuDTHA3NEYbvVtL\n\tt96SMTrdOvphC/BBscBGcdjtCVdxG5tQcHxY9DAQ=","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210818155403.268694-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210818155403.268694-7-jeanmichel.hautbois@ideasonboard.com>\n\t<2b07582f-47d4-b57a-e1b0-6e01c68c2ec5@ideasonboard.com>\n\t<ca988b2a-0046-3176-fa78-da7f10e2a5f8@ideasonboard.com>\n\t<f6b41180-5a56-2d61-5c41-a3db2de27a62@ideasonboard.com>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<2f0d7f1e-a95e-5745-afb8-1542a2c3479b@ideasonboard.com>","Date":"Thu, 19 Aug 2021 17:12:43 +0200","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":"<f6b41180-5a56-2d61-5c41-a3db2de27a62@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v3 6/9] ipa: ipu3: convert AWB to the\n\tnew algorithm interface","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>"}}]