[{"id":39203,"web_url":"https://patchwork.libcamera.org/comment/39203/","msgid":"<20260621004544.GG3552167@killaraus.ideasonboard.com>","date":"2026-06-21T00:45:44","subject":"Re: [PATCH 2/7] ipa: rkisp1: awb: Utilise clamp function","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, Jun 21, 2026 at 12:00:29AM +0100, Kieran Bingham wrote:\n> Use the newly introduced 'clamp' operation on the RGB vector type to\n> restrict the raw RGB means.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/ipa/rkisp1/algorithms/awb.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index 5ae5b647164329573f0a233ee36d1db7b3683ef9..0eb05c2b6e1ac9e159e050bae3d5c56ec3045299 100644\n> --- a/src/ipa/rkisp1/algorithms/awb.cpp\n> +++ b/src/ipa/rkisp1/algorithms/awb.cpp\n> @@ -332,7 +332,7 @@ void Awb::process(IPAContext &context,\n>  \t * divisions by zero when computing the raw means in subsequent\n>  \t * iterations.\n>  \t */\n> -\tawbResult.gains = awbResult.gains.max(1.0 / 256).min(1023.0 / 256);\n> +\tawbResult.gains = awbResult.gains.clamp(1.0 / 256, 1023.0 / 256);\n>  \n>  \t/* Filter the values to avoid oscillations. */\n>  \tdouble speed = 0.2;","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 6B9FFC3302\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 21 Jun 2026 00:45:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 88A27656EE;\n\tSun, 21 Jun 2026 02:45:46 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 03668656DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 21 Jun 2026 02:45:45 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E49E8268;\n\tSun, 21 Jun 2026 02:45:08 +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=\"Hj60866R\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1782002709;\n\tbh=uizyEr+g7tKcfb3YJpawzvunz14qjwuypEedXAanjEM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Hj60866RnCZRPCxqcoVQH5gLpzyAsh0TaRYpOKlU6AKaZpVl+qElur/OOl5Q0DsAQ\n\to0lUZ7NN1IQUIzJy+WqZNDw6CYEe+D6JX01MUzriePG/nUUI7fYMGqHwHRNnem3p6w\n\t7ed/IEhvlJjEYUkpJByiIO8sVB3XwaS42VIp+0tA=","Date":"Sun, 21 Jun 2026 03:45:44 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 2/7] ipa: rkisp1: awb: Utilise clamp function","Message-ID":"<20260621004544.GG3552167@killaraus.ideasonboard.com>","References":"<20260621-kbingham-awb-saturation-v1-0-b91ea59c6cfb@ideasonboard.com>\n\t<20260621-kbingham-awb-saturation-v1-2-b91ea59c6cfb@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260621-kbingham-awb-saturation-v1-2-b91ea59c6cfb@ideasonboard.com>","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>"}}]