From patchwork Tue Jun 11 21:20:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20268 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 DC8BCC3293 for ; Tue, 11 Jun 2024 21:21:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9209965467; Tue, 11 Jun 2024 23:21:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LO6I5Jr1"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 814B665446 for ; Tue, 11 Jun 2024 23:21:26 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7623AE0C; Tue, 11 Jun 2024 23:21:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718140873; bh=clXSMilTWHCoCAYcYA/m/lLuDzSJBudUJMZlnhkPkeg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LO6I5Jr1Fl40ZEajQ473h4Zd4VW2MhsEgObMOksfPDyqg2gTXtQdAwD8/m1B7QW1K W378qB23uF0MmIQfRY/XU3vAHywZSHX2H/F0GGdpZr7Ail8iqY3LhOwTNvCO+JPYYi qYEiQsmiASVNT0ua3naMxiCVDcjRqcKDBT27Gtv4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH 4/6] ipa: rkisp1: goc: Mark default gamma table as static constexpr Date: Wed, 12 Jun 2024 00:20:59 +0300 Message-ID: <20240611212101.14313-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240611212101.14313-1-laurent.pinchart@ideasonboard.com> References: <20240611212101.14313-1-laurent.pinchart@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" The values for the default gamma table are stored in an array that is never modified. Mark it as static constexpr to facilitate optimizations. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/rkisp1/algorithms/goc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/rkisp1/algorithms/goc.cpp b/src/ipa/rkisp1/algorithms/goc.cpp index 65460eb45135..e98c9526722f 100644 --- a/src/ipa/rkisp1/algorithms/goc.cpp +++ b/src/ipa/rkisp1/algorithms/goc.cpp @@ -108,7 +108,7 @@ void GammaOutCorrection::prepare(IPAContext &context, * The logarithmic segments as specified in the reference. * Plus an additional 0 to make the loop easier */ - std::array segments = { + static constexpr std::array segments = { 64, 64, 64, 64, 128, 128, 128, 128, 256, 256, 256, 512, 512, 512, 512, 512, 0 };