From patchwork Wed Jan 21 17:37:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 25917 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 D7535C327D for ; Wed, 21 Jan 2026 17:37:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 662A961FCE; Wed, 21 Jan 2026 18:37:57 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="F3L6zyq8"; 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 91B6B61F9F for ; Wed, 21 Jan 2026 18:37:44 +0100 (CET) Received: from Monstersaurus.hippo-penny.ts.net (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8EA5021CD; Wed, 21 Jan 2026 18:37:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1769017032; bh=YPE5gkcA66kXlvLXUDbn/4+TohltFJVoF0d5iMAvZuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F3L6zyq8p8aBCtX3FJhW0chRl7bnLOtKOvMk/YiP/BKQkmTNoeGeh0zHrym2hrAUq LBiojMtbHsXLCI7yYsM7+8uGKdDA+t5V32HGf1/eqY31bkLs/ulXlGDyHsYRqLw88d QXc5GF7psi9XWDHOCWPaaTs8igPJGOa6PP09JFbM= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham , Isaac Scott , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v6 10/16] ipa: rkisp1: ccm: Use Q<4, 7> format directly Date: Wed, 21 Jan 2026 17:37:29 +0000 Message-ID: <20260121173737.376113-11-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260121173737.376113-1-kieran.bingham@ideasonboard.com> References: <20260121173737.376113-1-kieran.bingham@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" 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> Signed-off-by: Kieran Bingham --- 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++)