From patchwork Mon Nov 16 17:49:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 28917 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 49DE1C3304 for ; Mon, 16 Nov 2026 17:49:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EAC786A869; Mon, 16 Nov 2026 18:49:31 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="pK44LhF3"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 56AEE6A855 for ; Mon, 16 Nov 2026 18:49:26 +0100 (CET) Received: from pb-laptop.local (185.221.140.49.nat.pool.zt.hu [185.221.140.49]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 33C7663C; Mon, 16 Nov 2026 18:46:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1794851219; bh=uLeQNlNUnjL2g17dXuAePQH3nVvLgyPBp5J1AXGG8Og=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pK44LhF3xo+cMbAgVk7LMFnfWGmLcYn87YpaU6SgkJpXSmYipFuhFQ2nH3t0F/C+y UupEKDszyBPgoGk/6w+/UBGjbTOCOg8MhHxeE9dJsGe+FVM1HUpXB8mB+D55Z1xMxf hJJoKRubmj2+XW1lHyi5wy6+FOiXY8Ys/WsJYpDQ= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham Subject: [PATCH v5 06/22] ipa: libipa: gamma: Static assert lookup node count Date: Mon, 16 Nov 2026 18:49:02 +0100 Message-ID: <20261116174919.1056403-7-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261116174919.1056403-1-barnabas.pocze@ideasonboard.com> References: <20261116174919.1056403-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Require at least 2, which is the minimum necessary for the algorithm to function at all. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/ipa/libipa/gamma.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ipa/libipa/gamma.h b/src/ipa/libipa/gamma.h index 9954f94ba2..e5ac3f96f5 100644 --- a/src/ipa/libipa/gamma.h +++ b/src/ipa/libipa/gamma.h @@ -63,6 +63,8 @@ protected: template class GammaAlgorithm : public GammaAlgorithmBase { + static_assert(NLutNodes >= 2); + public: GammaAlgorithm() : GammaAlgorithmBase(NLutNodes)