[{"id":25040,"web_url":"https://patchwork.libcamera.org/comment/25040/","msgid":"<166371671865.18961.14841971582586032249@Monstersaurus>","date":"2022-09-20T23:31:58","subject":"Re: [libcamera-devel] [PATCH v4 27/32] ipa: rkisp1: awb: Add\n\tsupport for RGB means","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2022-09-08 02:41:55)\n> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>\n> \n> RkISP actually supports two modes for color means, RGB and YCbCr. The\n> variables where the means are stored are identically named regardless of\n> the color means mode that's been selected.\n> \n> Since the gains are computed in RGB mode, a conversion needs to be done\n> when the mode is YCbCr, which is unnecessary when RGB mode is selected.\n> \n> This adds support for RGB means mode too, by checking at runtime which\n> mode is selected at a given time. The default is still set to YCbCr mode\n> for now.\n\nInterestingly, this sounds like we could change at runtime (with a\ncapture script?) to change this to see any effect on the image. But such\na control would be quite 'custom' or likely specific to RKISP?\n\n> \n> Cc: Quentin Schulz <foss+libcamera@0leil.net>\n> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n> Changes since v1:\n> \n> - Fix compilation error by storing RGB mode flag in Awb class\n> - Set ISP AWB configuration based on the selected mode\n> ---\n>  src/ipa/rkisp1/algorithms/awb.cpp | 130 +++++++++++++++++++-----------\n>  src/ipa/rkisp1/algorithms/awb.h   |   4 +-\n>  2 files changed, 86 insertions(+), 48 deletions(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index b711e93b73ba..2ff67ed98221 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> @@ -30,6 +30,11 @@ namespace ipa::rkisp1::algorithms {\n>  \n>  LOG_DEFINE_CATEGORY(RkISP1Awb)\n>  \n> +Awb::Awb()\n> +       : rgbMode_(false)\n> +{\n> +}\n> +\n>  /**\n>   * \\copydoc libcamera::ipa::Algorithm::configure\n>   */\n> @@ -98,38 +103,60 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,\n>         /* Update the gains. */\n>         params->module_cfg_update |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;\n>  \n> -       /* If we already have configured the gains and window, return. */\n> +       /* If we already have set the AWB measurement parameters, return. */\n\n\"If we have already set the ...\"\n\n\n>         if (frame > 0)\n>                 return;\n>  \n> -       /* Configure the gains to apply. */\n> +       rkisp1_cif_isp_awb_meas_config &awb_config = params->meas.awb_meas_config;\n> +\n> +       /* Configure the measure window for AWB. */\n> +       awb_config.awb_wnd = context.configuration.awb.measureWindow;\n> +\n> +       /* Number of frames to use to estimate the means (0 means 1 frame). */\n> +       awb_config.frames = 0;\n\nThis sounds like something that could be a tuning file option. (But\nthat isn't required now I expect).\n\nThat said, I think the RGB / YUV mode selection could be a tuning file\noption too?\n\nBut perhaps that's a 'yak for tomorrow'?\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> +\n> +       /* Select RGB or YCbCr means measurement. */\n> +       if (rgbMode_) {\n> +               awb_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_RGB;\n> +\n> +               /*\n> +                * For RGB-based measurements, pixels are selected with maximum\n> +                * red, green and blue thresholds that are set in the\n> +                * awb_ref_cr, awb_min_y and awb_ref_cb respectively. The other\n> +                * values are not used, set them to 0.\n> +                */\n> +               awb_config.awb_ref_cr = 250;\n> +               awb_config.min_y = 250;\n> +               awb_config.awb_ref_cb = 250;\n> +\n> +               awb_config.max_y = 0;\n> +               awb_config.min_c = 0;\n> +               awb_config.max_csum = 0;\n> +       } else {\n> +               awb_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_YCBCR;\n> +\n> +               /* Set the reference Cr and Cb (AWB target) to white. */\n> +               awb_config.awb_ref_cb = 128;\n> +               awb_config.awb_ref_cr = 128;\n> +\n> +               /*\n> +                * Filter out pixels based on luminance and chrominance values.\n> +                * The acceptable luma values are specified as a [16, 250]\n> +                * range, while the acceptable chrome values are specified with\n> +                * a minimum of 16 and a maximum Cb+Cr sum of 250.\n> +                */\n> +               awb_config.min_y = 16;\n> +               awb_config.max_y = 250;\n> +               awb_config.min_c = 16;\n> +               awb_config.max_csum = 250;\n> +       }\n> +\n> +       /* Enable the AWB gains. */\n>         params->module_en_update |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;\n> -       /* Update the ISP to apply the gains configured. */\n>         params->module_ens |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;\n>  \n> -       /* Configure the measure window for AWB. */\n> -       params->meas.awb_meas_config.awb_wnd = context.configuration.awb.measureWindow;\n> -       /*\n> -        * Measure Y, Cr and Cb means.\n> -        * \\todo RGB is not working, the kernel seems to not configure it ?\n> -        */\n> -       params->meas.awb_meas_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_YCBCR;\n> -       /* Reference Cr and Cb. */\n> -       params->meas.awb_meas_config.awb_ref_cb = 128;\n> -       params->meas.awb_meas_config.awb_ref_cr = 128;\n> -       /* Y values to include are between min_y and max_y only. */\n> -       params->meas.awb_meas_config.min_y = 16;\n> -       params->meas.awb_meas_config.max_y = 250;\n> -       /* Maximum Cr+Cb value to take into account for awb. */\n> -       params->meas.awb_meas_config.max_csum = 250;\n> -       /* Minimum Cr and Cb values to take into account. */\n> -       params->meas.awb_meas_config.min_c = 16;\n> -       /* Number of frames to use to estimate the mean (0 means 1 frame). */\n> -       params->meas.awb_meas_config.frames = 0;\n> -\n> -       /* Update AWB measurement unit configuration. */\n> +       /* Update the AWB measurement parameters and enable the AWB module. */\n>         params->module_cfg_update |= RKISP1_CIF_ISP_MODULE_AWB;\n> -       /* Make sure the ISP is measuring the means for the next frame. */\n>         params->module_en_update |= RKISP1_CIF_ISP_MODULE_AWB;\n>         params->module_ens |= RKISP1_CIF_ISP_MODULE_AWB;\n>  }\n> @@ -182,30 +209,39 @@ void Awb::process(IPAContext &context,\n>         const rkisp1_cif_isp_stat *params = &stats->params;\n>         const rkisp1_cif_isp_awb_stat *awb = &params->awb;\n>         IPAActiveState &activeState = context.activeState;\n> +       double greenMean;\n> +       double redMean;\n> +       double blueMean;\n>  \n> -       /* Get the YCbCr mean values */\n> -       double yMean = awb->awb_mean[0].mean_y_or_g;\n> -       double crMean = awb->awb_mean[0].mean_cr_or_r;\n> -       double cbMean = awb->awb_mean[0].mean_cb_or_b;\n> +       if (rgbMode_) {\n> +               greenMean = awb->awb_mean[0].mean_y_or_g;\n> +               redMean = awb->awb_mean[0].mean_cr_or_r;\n> +               blueMean = awb->awb_mean[0].mean_cb_or_b;\n> +       } else {\n> +               /* Get the YCbCr mean values */\n> +               double yMean = awb->awb_mean[0].mean_y_or_g;\n> +               double cbMean = awb->awb_mean[0].mean_cb_or_b;\n> +               double crMean = awb->awb_mean[0].mean_cr_or_r;\n>  \n> -       /*\n> -        * Convert from YCbCr to RGB.\n> -        * The hardware uses the following formulas:\n> -        * Y = 16 + 0.2500 R + 0.5000 G + 0.1094 B\n> -        * Cb = 128 - 0.1406 R - 0.2969 G + 0.4375 B\n> -        * Cr = 128 + 0.4375 R - 0.3750 G - 0.0625 B\n> -        *\n> -        * The inverse matrix is thus:\n> -        * [[1,1636, -0,0623,  1,6008]\n> -        *  [1,1636, -0,4045, -0,7949]\n> -        *  [1,1636,  1,9912, -0,0250]]\n> -        */\n> -       yMean -= 16;\n> -       cbMean -= 128;\n> -       crMean -= 128;\n> -       double redMean = 1.1636 * yMean - 0.0623 * cbMean + 1.6008 * crMean;\n> -       double greenMean = 1.1636 * yMean - 0.4045 * cbMean - 0.7949 * crMean;\n> -       double blueMean = 1.1636 * yMean + 1.9912 * cbMean - 0.0250 * crMean;\n> +               /*\n> +                * Convert from YCbCr to RGB.\n> +                * The hardware uses the following formulas:\n> +                * Y = 16 + 0.2500 R + 0.5000 G + 0.1094 B\n> +                * Cb = 128 - 0.1406 R - 0.2969 G + 0.4375 B\n> +                * Cr = 128 + 0.4375 R - 0.3750 G - 0.0625 B\n> +                *\n> +                * The inverse matrix is thus:\n> +                * [[1,1636, -0,0623,  1,6008]\n> +                *  [1,1636, -0,4045, -0,7949]\n> +                *  [1,1636,  1,9912, -0,0250]]\n> +                */\n> +               yMean -= 16;\n> +               cbMean -= 128;\n> +               crMean -= 128;\n> +               redMean = 1.1636 * yMean - 0.0623 * cbMean + 1.6008 * crMean;\n> +               greenMean = 1.1636 * yMean - 0.4045 * cbMean - 0.7949 * crMean;\n> +               blueMean = 1.1636 * yMean + 1.9912 * cbMean - 0.0250 * crMean;\n> +       }\n>  \n>         /*\n>          * The ISP computes the AWB means after applying the colour gains,\n> diff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h\n> index 9fd156d8aff9..b1b861d930d1 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.h\n> +++ b/src/ipa/rkisp1/algorithms/awb.h\n> @@ -16,7 +16,7 @@ namespace ipa::rkisp1::algorithms {\n>  class Awb : public Algorithm\n>  {\n>  public:\n> -       Awb() = default;\n> +       Awb();\n>         ~Awb() = default;\n>  \n>         int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;\n> @@ -32,6 +32,8 @@ public:\n>  \n>  private:\n>         uint32_t estimateCCT(double red, double green, double blue);\n> +\n> +       bool rgbMode_;\n>  };\n>  \n>  } /* namespace ipa::rkisp1::algorithms */\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 6FDAAC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Sep 2022 23:32:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7B7B3621D5;\n\tWed, 21 Sep 2022 01:32:03 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 155AB61F7D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Sep 2022 01:32:02 +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 57557415;\n\tWed, 21 Sep 2022 01:32:01 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1663716723;\n\tbh=eJhYX66WKg4YLRizLL0gr+HiN/qeP4sVvQEgS/jCqEo=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=tWDElok+aOkamDt6osfJHOqjvqUNbmpuCEgU1W5SMBd20hBT6RpdV6ZdKBNVLdii0\n\t9pw59OLB7GzOw81wBbX2EDoXPkKNnL1CFPWn21H6xpR5GZbGyQNBhckQIzvR9MV9R1\n\tOMa8HAZNms5D6s5vB9CixA45PJS09fdJmkomyusWsZsomscOdZPq6DKR3ASvwE12S9\n\tHO+nYXWy48QantjB+fhSVCFNm1hvRrKvnbkgoVaBY5JhV3plHsJ/jWW4B2EuJX1bQJ\n\tLQX0MJSMP9hWeL5lbCdQgY40vPI7e5mTnbC9feaQDZSFqoPEsMU6w8tmUMCTUzUsI/\n\tVYZQqcwUMsEyw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1663716721;\n\tbh=eJhYX66WKg4YLRizLL0gr+HiN/qeP4sVvQEgS/jCqEo=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=DXlrLqMzT6tp9TlJLi4y1rDEpWrvdHkzs4qz8emn+c8C77R4awTjYSJtFhJqos2Ev\n\tsjOczElKpYX/8XpdSld+i1fYn5SCamx0wWVhviOJajv2J6GsVoJd1BSqsYj3Z7HqYT\n\tT/KvZNbK1nId46t2sGw0nEXQTyTttUUdwz9tzP78="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"DXlrLqMz\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20220908014200.28728-28-laurent.pinchart@ideasonboard.com>","References":"<20220908014200.28728-1-laurent.pinchart@ideasonboard.com>\n\t<20220908014200.28728-28-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 21 Sep 2022 00:31:58 +0100","Message-ID":"<166371671865.18961.14841971582586032249@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v4 27/32] ipa: rkisp1: awb: Add\n\tsupport for RGB means","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Quentin Schulz <foss+libcamera@0leil.net>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25077,"web_url":"https://patchwork.libcamera.org/comment/25077/","msgid":"<20220922103208.6vrbolefgtms2mqo@uno.localdomain>","date":"2022-09-22T10:32:08","subject":"Re: [libcamera-devel] [PATCH v4 27/32] ipa: rkisp1: awb: Add\n\tsupport for RGB means","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Thu, Sep 08, 2022 at 04:41:55AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>\n>\n> RkISP actually supports two modes for color means, RGB and YCbCr. The\n> variables where the means are stored are identically named regardless of\n> the color means mode that's been selected.\n>\n> Since the gains are computed in RGB mode, a conversion needs to be done\n> when the mode is YCbCr, which is unnecessary when RGB mode is selected.\n>\n> This adds support for RGB means mode too, by checking at runtime which\n> mode is selected at a given time. The default is still set to YCbCr mode\n> for now.\n>\n> Cc: Quentin Schulz <foss+libcamera@0leil.net>\n> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n> Changes since v1:\n>\n> - Fix compilation error by storing RGB mode flag in Awb class\n> - Set ISP AWB configuration based on the selected mode\n> ---\n>  src/ipa/rkisp1/algorithms/awb.cpp | 130 +++++++++++++++++++-----------\n>  src/ipa/rkisp1/algorithms/awb.h   |   4 +-\n>  2 files changed, 86 insertions(+), 48 deletions(-)\n>\n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index b711e93b73ba..2ff67ed98221 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> @@ -30,6 +30,11 @@ namespace ipa::rkisp1::algorithms {\n>\n>  LOG_DEFINE_CATEGORY(RkISP1Awb)\n>\n> +Awb::Awb()\n> +\t: rgbMode_(false)\n> +{\n> +}\n> +\n>  /**\n>   * \\copydoc libcamera::ipa::Algorithm::configure\n>   */\n> @@ -98,38 +103,60 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,\n>  \t/* Update the gains. */\n>  \tparams->module_cfg_update |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;\n>\n> -\t/* If we already have configured the gains and window, return. */\n> +\t/* If we already have set the AWB measurement parameters, return. */\n>  \tif (frame > 0)\n>  \t\treturn;\n>\n> -\t/* Configure the gains to apply. */\n> +\trkisp1_cif_isp_awb_meas_config &awb_config = params->meas.awb_meas_config;\n> +\n> +\t/* Configure the measure window for AWB. */\n> +\tawb_config.awb_wnd = context.configuration.awb.measureWindow;\n> +\n> +\t/* Number of frames to use to estimate the means (0 means 1 frame). */\n> +\tawb_config.frames = 0;\n> +\n> +\t/* Select RGB or YCbCr means measurement. */\n> +\tif (rgbMode_) {\n> +\t\tawb_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_RGB;\n> +\n> +\t\t/*\n> +\t\t * For RGB-based measurements, pixels are selected with maximum\n> +\t\t * red, green and blue thresholds that are set in the\n> +\t\t * awb_ref_cr, awb_min_y and awb_ref_cb respectively. The other\n> +\t\t * values are not used, set them to 0.\n> +\t\t */\n> +\t\tawb_config.awb_ref_cr = 250;\n> +\t\tawb_config.min_y = 250;\n> +\t\tawb_config.awb_ref_cb = 250;\n> +\n> +\t\tawb_config.max_y = 0;\n> +\t\tawb_config.min_c = 0;\n> +\t\tawb_config.max_csum = 0;\n> +\t} else {\n> +\t\tawb_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_YCBCR;\n> +\n> +\t\t/* Set the reference Cr and Cb (AWB target) to white. */\n> +\t\tawb_config.awb_ref_cb = 128;\n> +\t\tawb_config.awb_ref_cr = 128;\n> +\n> +\t\t/*\n> +\t\t * Filter out pixels based on luminance and chrominance values.\n> +\t\t * The acceptable luma values are specified as a [16, 250]\n> +\t\t * range, while the acceptable chrome values are specified with\n> +\t\t * a minimum of 16 and a maximum Cb+Cr sum of 250.\n> +\t\t */\n> +\t\tawb_config.min_y = 16;\n> +\t\tawb_config.max_y = 250;\n> +\t\tawb_config.min_c = 16;\n> +\t\tawb_config.max_csum = 250;\n> +\t}\n\nI have no idea how to verify the above computations, but they match\nthe existing code, so...\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n> +\n> +\t/* Enable the AWB gains. */\n>  \tparams->module_en_update |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;\n> -\t/* Update the ISP to apply the gains configured. */\n>  \tparams->module_ens |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;\n>\n> -\t/* Configure the measure window for AWB. */\n> -\tparams->meas.awb_meas_config.awb_wnd = context.configuration.awb.measureWindow;\n> -\t/*\n> -\t * Measure Y, Cr and Cb means.\n> -\t * \\todo RGB is not working, the kernel seems to not configure it ?\n> -\t */\n> -\tparams->meas.awb_meas_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_YCBCR;\n> -\t/* Reference Cr and Cb. */\n> -\tparams->meas.awb_meas_config.awb_ref_cb = 128;\n> -\tparams->meas.awb_meas_config.awb_ref_cr = 128;\n> -\t/* Y values to include are between min_y and max_y only. */\n> -\tparams->meas.awb_meas_config.min_y = 16;\n> -\tparams->meas.awb_meas_config.max_y = 250;\n> -\t/* Maximum Cr+Cb value to take into account for awb. */\n> -\tparams->meas.awb_meas_config.max_csum = 250;\n> -\t/* Minimum Cr and Cb values to take into account. */\n> -\tparams->meas.awb_meas_config.min_c = 16;\n> -\t/* Number of frames to use to estimate the mean (0 means 1 frame). */\n> -\tparams->meas.awb_meas_config.frames = 0;\n> -\n> -\t/* Update AWB measurement unit configuration. */\n> +\t/* Update the AWB measurement parameters and enable the AWB module. */\n>  \tparams->module_cfg_update |= RKISP1_CIF_ISP_MODULE_AWB;\n> -\t/* Make sure the ISP is measuring the means for the next frame. */\n>  \tparams->module_en_update |= RKISP1_CIF_ISP_MODULE_AWB;\n>  \tparams->module_ens |= RKISP1_CIF_ISP_MODULE_AWB;\n>  }\n> @@ -182,30 +209,39 @@ void Awb::process(IPAContext &context,\n>  \tconst rkisp1_cif_isp_stat *params = &stats->params;\n>  \tconst rkisp1_cif_isp_awb_stat *awb = &params->awb;\n>  \tIPAActiveState &activeState = context.activeState;\n> +\tdouble greenMean;\n> +\tdouble redMean;\n> +\tdouble blueMean;\n>\n> -\t/* Get the YCbCr mean values */\n> -\tdouble yMean = awb->awb_mean[0].mean_y_or_g;\n> -\tdouble crMean = awb->awb_mean[0].mean_cr_or_r;\n> -\tdouble cbMean = awb->awb_mean[0].mean_cb_or_b;\n> +\tif (rgbMode_) {\n> +\t\tgreenMean = awb->awb_mean[0].mean_y_or_g;\n> +\t\tredMean = awb->awb_mean[0].mean_cr_or_r;\n> +\t\tblueMean = awb->awb_mean[0].mean_cb_or_b;\n> +\t} else {\n> +\t\t/* Get the YCbCr mean values */\n> +\t\tdouble yMean = awb->awb_mean[0].mean_y_or_g;\n> +\t\tdouble cbMean = awb->awb_mean[0].mean_cb_or_b;\n> +\t\tdouble crMean = awb->awb_mean[0].mean_cr_or_r;\n>\n> -\t/*\n> -\t * Convert from YCbCr to RGB.\n> -\t * The hardware uses the following formulas:\n> -\t * Y = 16 + 0.2500 R + 0.5000 G + 0.1094 B\n> -\t * Cb = 128 - 0.1406 R - 0.2969 G + 0.4375 B\n> -\t * Cr = 128 + 0.4375 R - 0.3750 G - 0.0625 B\n> -\t *\n> -\t * The inverse matrix is thus:\n> -\t * [[1,1636, -0,0623,  1,6008]\n> -\t *  [1,1636, -0,4045, -0,7949]\n> -\t *  [1,1636,  1,9912, -0,0250]]\n> -\t */\n> -\tyMean -= 16;\n> -\tcbMean -= 128;\n> -\tcrMean -= 128;\n> -\tdouble redMean = 1.1636 * yMean - 0.0623 * cbMean + 1.6008 * crMean;\n> -\tdouble greenMean = 1.1636 * yMean - 0.4045 * cbMean - 0.7949 * crMean;\n> -\tdouble blueMean = 1.1636 * yMean + 1.9912 * cbMean - 0.0250 * crMean;\n> +\t\t/*\n> +\t\t * Convert from YCbCr to RGB.\n> +\t\t * The hardware uses the following formulas:\n> +\t\t * Y = 16 + 0.2500 R + 0.5000 G + 0.1094 B\n> +\t\t * Cb = 128 - 0.1406 R - 0.2969 G + 0.4375 B\n> +\t\t * Cr = 128 + 0.4375 R - 0.3750 G - 0.0625 B\n> +\t\t *\n> +\t\t * The inverse matrix is thus:\n> +\t\t * [[1,1636, -0,0623,  1,6008]\n> +\t\t *  [1,1636, -0,4045, -0,7949]\n> +\t\t *  [1,1636,  1,9912, -0,0250]]\n> +\t\t */\n> +\t\tyMean -= 16;\n> +\t\tcbMean -= 128;\n> +\t\tcrMean -= 128;\n> +\t\tredMean = 1.1636 * yMean - 0.0623 * cbMean + 1.6008 * crMean;\n> +\t\tgreenMean = 1.1636 * yMean - 0.4045 * cbMean - 0.7949 * crMean;\n> +\t\tblueMean = 1.1636 * yMean + 1.9912 * cbMean - 0.0250 * crMean;\n> +\t}\n>\n>  \t/*\n>  \t * The ISP computes the AWB means after applying the colour gains,\n> diff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h\n> index 9fd156d8aff9..b1b861d930d1 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.h\n> +++ b/src/ipa/rkisp1/algorithms/awb.h\n> @@ -16,7 +16,7 @@ namespace ipa::rkisp1::algorithms {\n>  class Awb : public Algorithm\n>  {\n>  public:\n> -\tAwb() = default;\n> +\tAwb();\n>  \t~Awb() = default;\n>\n>  \tint configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;\n> @@ -32,6 +32,8 @@ public:\n>\n>  private:\n>  \tuint32_t estimateCCT(double red, double green, double blue);\n> +\n> +\tbool rgbMode_;\n>  };\n>\n>  } /* namespace ipa::rkisp1::algorithms */\n> --\n> Regards,\n>\n> Laurent Pinchart\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 9FE4FC3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Sep 2022 10:32:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EC85762203;\n\tThu, 22 Sep 2022 12:32:11 +0200 (CEST)","from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C333B6219A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Sep 2022 12:32:10 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id ADAEA240008;\n\tThu, 22 Sep 2022 10:32:09 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1663842731;\n\tbh=5dHDz2sDz0fMl0zodbkjqfMQ/2tQhKNbR83wTBt0h/w=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=vjSKDPhzGR4VZyJQdsLMXp51uVgRtNhWKJRZ09HxYUpI6DTyPngDspWON4+LDQhwu\n\ta1CCbtg6hpS5YRb2QXxAvZQUiFm0IM1GA8l0EZWjKiCN3rBlKXxmZy5fPMyFrQmPeH\n\tiQvl10EJ0tnzSOIoA/qZvUHLT7/nUNp1YdlAJdNzqef1hotnEIl9RRK/xikJRnA30D\n\titI+OZ2aY9ms95R71aQj4jvs7D6P5vRo1EM/7EQuYVrK5xqZEZpgVdf56WUub1WR9p\n\tSz37/Nwwh2t7bSxif4Jiw1hiA8ENLco7hxj6EnNVavo5r96iuciROptPpxQp3Gl4pU\n\tecsjtmlLzPXEQ==","Date":"Thu, 22 Sep 2022 12:32:08 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220922103208.6vrbolefgtms2mqo@uno.localdomain>","References":"<20220908014200.28728-1-laurent.pinchart@ideasonboard.com>\n\t<20220908014200.28728-28-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220908014200.28728-28-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v4 27/32] ipa: rkisp1: awb: Add\n\tsupport for RGB means","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org,\n\tQuentin Schulz <foss+libcamera@0leil.net>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":25100,"web_url":"https://patchwork.libcamera.org/comment/25100/","msgid":"<Yyzgh21z095x39KX@pendragon.ideasonboard.com>","date":"2022-09-22T22:24:07","subject":"Re: [libcamera-devel] [PATCH v4 27/32] ipa: rkisp1: awb: Add\n\tsupport for RGB means","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Wed, Sep 21, 2022 at 12:31:58AM +0100, Kieran Bingham wrote:\n> Quoting Laurent Pinchart via libcamera-devel (2022-09-08 02:41:55)\n> > From: Quentin Schulz <quentin.schulz@theobroma-systems.com>\n> > \n> > RkISP actually supports two modes for color means, RGB and YCbCr. The\n> > variables where the means are stored are identically named regardless of\n> > the color means mode that's been selected.\n> > \n> > Since the gains are computed in RGB mode, a conversion needs to be done\n> > when the mode is YCbCr, which is unnecessary when RGB mode is selected.\n> > \n> > This adds support for RGB means mode too, by checking at runtime which\n> > mode is selected at a given time. The default is still set to YCbCr mode\n> > for now.\n> \n> Interestingly, this sounds like we could change at runtime (with a\n> capture script?) to change this to see any effect on the image. But such\n> a control would be quite 'custom' or likely specific to RKISP?\n\nIt would be very custom indeed. I'm not sure what we'll do with this, it\ncould be set at tuning time, although I have a feeling we'll end up\nselecting one mode and sticking with it.\n\n> > Cc: Quentin Schulz <foss+libcamera@0leil.net>\n> > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> > Changes since v1:\n> > \n> > - Fix compilation error by storing RGB mode flag in Awb class\n> > - Set ISP AWB configuration based on the selected mode\n> > ---\n> >  src/ipa/rkisp1/algorithms/awb.cpp | 130 +++++++++++++++++++-----------\n> >  src/ipa/rkisp1/algorithms/awb.h   |   4 +-\n> >  2 files changed, 86 insertions(+), 48 deletions(-)\n> > \n> > diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> > index b711e93b73ba..2ff67ed98221 100644\n> > --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> > +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> > @@ -30,6 +30,11 @@ namespace ipa::rkisp1::algorithms {\n> >  \n> >  LOG_DEFINE_CATEGORY(RkISP1Awb)\n> >  \n> > +Awb::Awb()\n> > +       : rgbMode_(false)\n> > +{\n> > +}\n> > +\n> >  /**\n> >   * \\copydoc libcamera::ipa::Algorithm::configure\n> >   */\n> > @@ -98,38 +103,60 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,\n> >         /* Update the gains. */\n> >         params->module_cfg_update |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;\n> >  \n> > -       /* If we already have configured the gains and window, return. */\n> > +       /* If we already have set the AWB measurement parameters, return. */\n> \n> \"If we have already set the ...\"\n> \n> >         if (frame > 0)\n> >                 return;\n> >  \n> > -       /* Configure the gains to apply. */\n> > +       rkisp1_cif_isp_awb_meas_config &awb_config = params->meas.awb_meas_config;\n> > +\n> > +       /* Configure the measure window for AWB. */\n> > +       awb_config.awb_wnd = context.configuration.awb.measureWindow;\n> > +\n> > +       /* Number of frames to use to estimate the means (0 means 1 frame). */\n> > +       awb_config.frames = 0;\n> \n> This sounds like something that could be a tuning file option. (But\n> that isn't required now I expect).\n> \n> That said, I think the RGB / YUV mode selection could be a tuning file\n> option too?\n> \n> But perhaps that's a 'yak for tomorrow'?\n\nWe'll need to experiment with different algorithms.\n\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > +\n> > +       /* Select RGB or YCbCr means measurement. */\n> > +       if (rgbMode_) {\n> > +               awb_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_RGB;\n> > +\n> > +               /*\n> > +                * For RGB-based measurements, pixels are selected with maximum\n> > +                * red, green and blue thresholds that are set in the\n> > +                * awb_ref_cr, awb_min_y and awb_ref_cb respectively. The other\n> > +                * values are not used, set them to 0.\n> > +                */\n> > +               awb_config.awb_ref_cr = 250;\n> > +               awb_config.min_y = 250;\n> > +               awb_config.awb_ref_cb = 250;\n> > +\n> > +               awb_config.max_y = 0;\n> > +               awb_config.min_c = 0;\n> > +               awb_config.max_csum = 0;\n> > +       } else {\n> > +               awb_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_YCBCR;\n> > +\n> > +               /* Set the reference Cr and Cb (AWB target) to white. */\n> > +               awb_config.awb_ref_cb = 128;\n> > +               awb_config.awb_ref_cr = 128;\n> > +\n> > +               /*\n> > +                * Filter out pixels based on luminance and chrominance values.\n> > +                * The acceptable luma values are specified as a [16, 250]\n> > +                * range, while the acceptable chrome values are specified with\n> > +                * a minimum of 16 and a maximum Cb+Cr sum of 250.\n> > +                */\n> > +               awb_config.min_y = 16;\n> > +               awb_config.max_y = 250;\n> > +               awb_config.min_c = 16;\n> > +               awb_config.max_csum = 250;\n> > +       }\n> > +\n> > +       /* Enable the AWB gains. */\n> >         params->module_en_update |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;\n> > -       /* Update the ISP to apply the gains configured. */\n> >         params->module_ens |= RKISP1_CIF_ISP_MODULE_AWB_GAIN;\n> >  \n> > -       /* Configure the measure window for AWB. */\n> > -       params->meas.awb_meas_config.awb_wnd = context.configuration.awb.measureWindow;\n> > -       /*\n> > -        * Measure Y, Cr and Cb means.\n> > -        * \\todo RGB is not working, the kernel seems to not configure it ?\n> > -        */\n> > -       params->meas.awb_meas_config.awb_mode = RKISP1_CIF_ISP_AWB_MODE_YCBCR;\n> > -       /* Reference Cr and Cb. */\n> > -       params->meas.awb_meas_config.awb_ref_cb = 128;\n> > -       params->meas.awb_meas_config.awb_ref_cr = 128;\n> > -       /* Y values to include are between min_y and max_y only. */\n> > -       params->meas.awb_meas_config.min_y = 16;\n> > -       params->meas.awb_meas_config.max_y = 250;\n> > -       /* Maximum Cr+Cb value to take into account for awb. */\n> > -       params->meas.awb_meas_config.max_csum = 250;\n> > -       /* Minimum Cr and Cb values to take into account. */\n> > -       params->meas.awb_meas_config.min_c = 16;\n> > -       /* Number of frames to use to estimate the mean (0 means 1 frame). */\n> > -       params->meas.awb_meas_config.frames = 0;\n> > -\n> > -       /* Update AWB measurement unit configuration. */\n> > +       /* Update the AWB measurement parameters and enable the AWB module. */\n> >         params->module_cfg_update |= RKISP1_CIF_ISP_MODULE_AWB;\n> > -       /* Make sure the ISP is measuring the means for the next frame. */\n> >         params->module_en_update |= RKISP1_CIF_ISP_MODULE_AWB;\n> >         params->module_ens |= RKISP1_CIF_ISP_MODULE_AWB;\n> >  }\n> > @@ -182,30 +209,39 @@ void Awb::process(IPAContext &context,\n> >         const rkisp1_cif_isp_stat *params = &stats->params;\n> >         const rkisp1_cif_isp_awb_stat *awb = &params->awb;\n> >         IPAActiveState &activeState = context.activeState;\n> > +       double greenMean;\n> > +       double redMean;\n> > +       double blueMean;\n> >  \n> > -       /* Get the YCbCr mean values */\n> > -       double yMean = awb->awb_mean[0].mean_y_or_g;\n> > -       double crMean = awb->awb_mean[0].mean_cr_or_r;\n> > -       double cbMean = awb->awb_mean[0].mean_cb_or_b;\n> > +       if (rgbMode_) {\n> > +               greenMean = awb->awb_mean[0].mean_y_or_g;\n> > +               redMean = awb->awb_mean[0].mean_cr_or_r;\n> > +               blueMean = awb->awb_mean[0].mean_cb_or_b;\n> > +       } else {\n> > +               /* Get the YCbCr mean values */\n> > +               double yMean = awb->awb_mean[0].mean_y_or_g;\n> > +               double cbMean = awb->awb_mean[0].mean_cb_or_b;\n> > +               double crMean = awb->awb_mean[0].mean_cr_or_r;\n> >  \n> > -       /*\n> > -        * Convert from YCbCr to RGB.\n> > -        * The hardware uses the following formulas:\n> > -        * Y = 16 + 0.2500 R + 0.5000 G + 0.1094 B\n> > -        * Cb = 128 - 0.1406 R - 0.2969 G + 0.4375 B\n> > -        * Cr = 128 + 0.4375 R - 0.3750 G - 0.0625 B\n> > -        *\n> > -        * The inverse matrix is thus:\n> > -        * [[1,1636, -0,0623,  1,6008]\n> > -        *  [1,1636, -0,4045, -0,7949]\n> > -        *  [1,1636,  1,9912, -0,0250]]\n> > -        */\n> > -       yMean -= 16;\n> > -       cbMean -= 128;\n> > -       crMean -= 128;\n> > -       double redMean = 1.1636 * yMean - 0.0623 * cbMean + 1.6008 * crMean;\n> > -       double greenMean = 1.1636 * yMean - 0.4045 * cbMean - 0.7949 * crMean;\n> > -       double blueMean = 1.1636 * yMean + 1.9912 * cbMean - 0.0250 * crMean;\n> > +               /*\n> > +                * Convert from YCbCr to RGB.\n> > +                * The hardware uses the following formulas:\n> > +                * Y = 16 + 0.2500 R + 0.5000 G + 0.1094 B\n> > +                * Cb = 128 - 0.1406 R - 0.2969 G + 0.4375 B\n> > +                * Cr = 128 + 0.4375 R - 0.3750 G - 0.0625 B\n> > +                *\n> > +                * The inverse matrix is thus:\n> > +                * [[1,1636, -0,0623,  1,6008]\n> > +                *  [1,1636, -0,4045, -0,7949]\n> > +                *  [1,1636,  1,9912, -0,0250]]\n> > +                */\n> > +               yMean -= 16;\n> > +               cbMean -= 128;\n> > +               crMean -= 128;\n> > +               redMean = 1.1636 * yMean - 0.0623 * cbMean + 1.6008 * crMean;\n> > +               greenMean = 1.1636 * yMean - 0.4045 * cbMean - 0.7949 * crMean;\n> > +               blueMean = 1.1636 * yMean + 1.9912 * cbMean - 0.0250 * crMean;\n> > +       }\n> >  \n> >         /*\n> >          * The ISP computes the AWB means after applying the colour gains,\n> > diff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h\n> > index 9fd156d8aff9..b1b861d930d1 100644\n> > --- a/src/ipa/rkisp1/algorithms/awb.h\n> > +++ b/src/ipa/rkisp1/algorithms/awb.h\n> > @@ -16,7 +16,7 @@ namespace ipa::rkisp1::algorithms {\n> >  class Awb : public Algorithm\n> >  {\n> >  public:\n> > -       Awb() = default;\n> > +       Awb();\n> >         ~Awb() = default;\n> >  \n> >         int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;\n> > @@ -32,6 +32,8 @@ public:\n> >  \n> >  private:\n> >         uint32_t estimateCCT(double red, double green, double blue);\n> > +\n> > +       bool rgbMode_;\n> >  };\n> >  \n> >  } /* namespace ipa::rkisp1::algorithms */","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 759B2C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Sep 2022 22:24:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BAEBB62222;\n\tFri, 23 Sep 2022 00:24:24 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 38E70621F8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Sep 2022 00:24:23 +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 645194F7;\n\tFri, 23 Sep 2022 00:24:22 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1663885464;\n\tbh=7Ib3DlSwbQsGqT3f8LxumB59BlKPr+SC8SThaDsEsAQ=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=uYpExLLxHttJrQHgnSgVbEnUvwB4wN1qPtmmkQZejhlGG44Ve8PzY2qIVqz4I6yOX\n\tGKT/cABycWuw3DHlvm9Jzi20Cn9cMpD6OOZRuAzSCjh2OnUrSceUogDlUbPv7JT0oW\n\texgsjPY+v4h2U8dvoTgQ7YOD3OkbjnqvRNrnP/y32A35lGjFnYmpKb7EPqZelS0Mzg\n\tcnYXaDQLilGDsyRknLa+YyK5iuxz3eGzRhdvGkjxuNOZYznwM9GDNe0AAxpNj0oHv1\n\te+k2fE/usSn29afarda3w7mQpEAKXdb9+VIgTFAZ1ujtWQW+DJO9KtWa+9pnBplGLM\n\trDdHAj02ZbwKw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1663885462;\n\tbh=7Ib3DlSwbQsGqT3f8LxumB59BlKPr+SC8SThaDsEsAQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=dvN4RpoKW1+u3cumb6KJtwQyF2DqWi/T1C8XNAaBxQwDYNHlPd560m1q/NWDzIMG8\n\tjzxIE2yRFIQOb1lpka55Kz3hF2mREHcBQNvyNPYIZbDYcuWJKl+JCB/cpmV427V+Ud\n\tRNFXT9JL3+Facjt4+kLoeCEOqZQ46DXEbdv+2KfE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"dvN4RpoK\"; dkim-atps=neutral","Date":"Fri, 23 Sep 2022 01:24:07 +0300","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<Yyzgh21z095x39KX@pendragon.ideasonboard.com>","References":"<20220908014200.28728-1-laurent.pinchart@ideasonboard.com>\n\t<20220908014200.28728-28-laurent.pinchart@ideasonboard.com>\n\t<166371671865.18961.14841971582586032249@Monstersaurus>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<166371671865.18961.14841971582586032249@Monstersaurus>","Subject":"Re: [libcamera-devel] [PATCH v4 27/32] ipa: rkisp1: awb: Add\n\tsupport for RGB means","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tQuentin Schulz <foss+libcamera@0leil.net>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]