From patchwork Fri Feb 13 16:57:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 26152 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 4398BC32F5 for ; Fri, 13 Feb 2026 16:58:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D70D86220F; Fri, 13 Feb 2026 17:58:17 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Y8K3mTZY"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 67613621E1 for ; Fri, 13 Feb 2026 17:58:06 +0100 (CET) Received: from ping.linuxembedded.co.uk (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9990526D1; Fri, 13 Feb 2026 17:57:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1771001837; bh=qF1kii5a079EQBiA2z+WOtrbYueZi7DzfYCOdhxKkDM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Y8K3mTZY/j1r8K9EVEa19576RghytG382YrIHgS5hJSdym3xv4k+Lf/XObUmtnaJG NygppnFoQ74D3DqbWhcWusnMLQ9187zWoaiKjl1lA7Ovjfw5E6hs28zKg1AmUR3ZT/ Go1ZMkFj8LbZi3HACDR12lWXXm4ITGiAK4x8YI68= From: Kieran Bingham Date: Fri, 13 Feb 2026 16:57:49 +0000 Subject: [PATCH v7 10/15] ipa: rkisp1: ccm: Use Q<4, 7> format directly MIME-Version: 1.0 Message-Id: <20260213-kbingham-quantizers-v7-10-1626b9aaabf1@ideasonboard.com> References: <20260213-kbingham-quantizers-v7-0-1626b9aaabf1@ideasonboard.com> In-Reply-To: <20260213-kbingham-quantizers-v7-0-1626b9aaabf1@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham , Isaac Scott , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1771001883; l=1079; i=kieran.bingham@ideasonboard.com; s=20260207; h=from:subject:message-id; bh=qF1kii5a079EQBiA2z+WOtrbYueZi7DzfYCOdhxKkDM=; b=v8+BXWUDTTX8jdYisAsjp133bDoKZfGInWBV7q2bRtgHjuNjwrCqe2aGC8zbAlfCe+nrYzk+v e4P4oz/uQXfCXgqiV1uSbpTZbMicrpMdNDBma7y/grxnYhVQtQYqg50 X-Developer-Key: i=kieran.bingham@ideasonboard.com; a=ed25519; pk=FVXKN7YuwHc6UtbRUeTMAmranfsQomA+vnilfglWdaY= 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" Replace the legacy call to floatingToFixedPoint with the new FixedPoint quantizer to explicitly describe the type used by the RKISP1 Colour Correction Matrix. Reviewed-by: Isaac Scott Reviewed-by: Barnabás Pőcze Signed-off-by: Kieran Bingham --- v5: - Use Q<4, 7> --- src/ipa/rkisp1/algorithms/ccm.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/ccm.cpp b/src/ipa/rkisp1/algorithms/ccm.cpp index de2b6fe775aa..466d7a116eea 100644 --- a/src/ipa/rkisp1/algorithms/ccm.cpp +++ b/src/ipa/rkisp1/algorithms/ccm.cpp @@ -117,8 +117,7 @@ void Ccm::setParameters(struct rkisp1_cif_isp_ctk_config &config, */ for (unsigned int i = 0; i < 3; i++) { for (unsigned int j = 0; j < 3; j++) - config.coeff[i][j] = - floatingToFixedPoint<4, 7, uint16_t, double>(matrix[i][j]); + config.coeff[i][j] = Q<4, 7>(matrix[i][j]).quantized(); } for (unsigned int i = 0; i < 3; i++)