[{"id":19988,"web_url":"https://patchwork.libcamera.org/comment/19988/","msgid":"<YVRRfVoGa5z5HeV4@pendragon.ideasonboard.com>","date":"2021-09-29T11:43:57","subject":"Re: [libcamera-devel] [PATCH 05/12] ipa: ipu3: Change the limits of\n\tthe AWB stats","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jean-Michel,\n\nThank you for the patch.\n\nOn Thu, Sep 23, 2021 at 10:16:18AM +0200, Jean-Michel Hautbois wrote:\n> Until now, the limits used to calculate the grid based on the Bayer Down\n> Scaler configuration where taken from the kernel documentation [0].\n> While testing and understanding the format of the ImgU statistics, it\n> appears that the ones defined in CrOs [1] are the correct ones. Use\n\ns/CrOs/CrOS/\n\n> those.\n> \n> [0] https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-meta-intel-ipu3.html?highlight=v4l2_meta_fmt_ipu3_params#intel-ipu3-imgu-uapi-data-types\n> [1] https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/refs/heads/master/hal/intel/include/ia_imaging/awb_public.h\n> \n> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/ipa/ipu3/ipu3.cpp | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index 30d2a539..b97aff80 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -136,8 +136,8 @@\n>   * <linux/intel-ipu3.h> struct ipu3_uapi_gamma_corr_lut for further details.\n>   */\n>  \n> -static constexpr uint32_t kMaxCellWidthPerSet = 160;\n> -static constexpr uint32_t kMaxCellHeightPerSet = 56;\n> +static constexpr uint32_t kMaxCellWidthPerSet = 80;\n> +static constexpr uint32_t kMaxCellHeightPerSet = 60;\n>  \n>  namespace libcamera {\n>  \n> @@ -300,11 +300,11 @@ void IPAIPU3::calculateBdsGrid(const Size &bdsOutputSize)\n>  \t/* Set the BDS output size in the IPAConfiguration structure */\n>  \tcontext_.configuration.grid.bdsOutputSize = bdsOutputSize;\n>  \n> -\tfor (uint32_t widthShift = 3; widthShift <= 7; ++widthShift) {\n> +\tfor (uint32_t widthShift = 3; widthShift <= 6; ++widthShift) {\n>  \t\tuint32_t width = std::min(kMaxCellWidthPerSet,\n>  \t\t\t\t\t  bdsOutputSize.width >> widthShift);\n>  \t\twidth = width << widthShift;\n> -\t\tfor (uint32_t heightShift = 3; heightShift <= 7; ++heightShift) {\n> +\t\tfor (uint32_t heightShift = 3; heightShift <= 6; ++heightShift) {\n>  \t\t\tint32_t height = std::min(kMaxCellHeightPerSet,\n>  \t\t\t\t\t\t  bdsOutputSize.height >> heightShift);\n>  \t\t\theight = height << heightShift;","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 2EDA2BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 Sep 2021 11:44:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 887FA691AA;\n\tWed, 29 Sep 2021 13:44: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 262E569185\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 Sep 2021 13:43:59 +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 AC1D93F0;\n\tWed, 29 Sep 2021 13:43:58 +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=\"tj3G2PW5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1632915838;\n\tbh=AS2AA6wxLfKskYk+oDj+L9+l7SEWZbhNjrdYCOeMolU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tj3G2PW5HQLytig3gmH2kYBhDOqswrRmbvXjU2B/nFrtwYzqfwGMVBmQhwZzI7mi7\n\tc5LTIQ+F/XxQe2ACx7tujnj6pasUIk16EEwuqdOGGDs7idASRQ9BnXJYoELCrwfjv0\n\toKRaCZR65Zom3CrJbm7YK0vSvj4QgrePfYHw2DSI=","Date":"Wed, 29 Sep 2021 14:43:57 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<YVRRfVoGa5z5HeV4@pendragon.ideasonboard.com>","References":"<20210923081625.60276-1-jeanmichel.hautbois@ideasonboard.com>\n\t<20210923081625.60276-6-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210923081625.60276-6-jeanmichel.hautbois@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 05/12] ipa: ipu3: Change the limits of\n\tthe AWB stats","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>"}}]