Patch Detail
Show a patch.
GET /api/1.1/patches/25769/?format=api
{ "id": 25769, "url": "https://patchwork.libcamera.org/api/1.1/patches/25769/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25769/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260114113016.25162-5-mzamazal@redhat.com>", "date": "2026-01-14T11:30:06", "name": "[v3,04/14] libcamera: ipa: simple: Rename \"ccm\" identifiers not specific to CCM", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f124f9e89e5682cee71c7956f309d36ad378cdc1", "submitter": { "id": 177, "url": "https://patchwork.libcamera.org/api/1.1/people/177/?format=api", "name": "Milan Zamazal", "email": "mzamazal@redhat.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25769/mbox/", "series": [ { "id": 5706, "url": "https://patchwork.libcamera.org/api/1.1/series/5706/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5706", "date": "2026-01-14T11:30:02", "name": "Simple pipeline IPA cleanup", "version": 3, "mbox": "https://patchwork.libcamera.org/series/5706/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25769/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25769/checks/", "tags": {}, "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 E463FC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 14 Jan 2026 11:30:51 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8906E61FCE;\n\tWed, 14 Jan 2026 12:30:51 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 698F461FC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 14 Jan 2026 12:30:49 +0100 (CET)", "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n\t(ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-495-ywmWCMmOMaOjd2xz25-PmQ-1;\n\tWed, 14 Jan 2026 06:30:45 -0500", "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n\t(mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n\t[10.30.177.93])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS id 0A17518005B2; Wed, 14 Jan 2026 11:30:45 +0000 (UTC)", "from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.44.32.217])\n\tby mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id 11C68180009E; Wed, 14 Jan 2026 11:30:42 +0000 (UTC)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"IL3kGbW6\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1768390248;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=tZOp3CsI562qtIBQ0NQKng4KLDkYMn95J0crTZ2gjew=;\n\tb=IL3kGbW6bhZlfJ/seete3GJ/tRYx4xg3XXS4xhWr8PjrxLO4xssuqmpk5bskIHl9pfil9w\n\t4T/y70tjKu1X2CzBx3HQZvAcrZyhsOIz6inPYCmMeo6g2FFFEgljckN9Akwxzj6SGJVoPh\n\tgcytCS+mshpZOd92Qcvszu53OFPMInU=", "X-MC-Unique": "ywmWCMmOMaOjd2xz25-PmQ-1", "X-Mimecast-MFC-AGG-ID": "ywmWCMmOMaOjd2xz25-PmQ_1768390245", "From": "Milan Zamazal <mzamazal@redhat.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Milan Zamazal <mzamazal@redhat.com>, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>", "Subject": "[PATCH v3 04/14] libcamera: ipa: simple: Rename \"ccm\" identifiers\n\tnot specific to CCM", "Date": "Wed, 14 Jan 2026 12:30:06 +0100", "Message-ID": "<20260114113016.25162-5-mzamazal@redhat.com>", "In-Reply-To": "<20260114113016.25162-1-mzamazal@redhat.com>", "References": "<20260114113016.25162-1-mzamazal@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "in1yl85la2zEYsxSv_rJsXPgDxz-hn-8S4PGfYa7T54_1768390245", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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>" }, "content": "Let's rename the identifiers that are related to general colour\ncorrections applied by matrix operations, rather than directly to the\nsensor colour correction matrix.\n\nSigned-off-by: Milan Zamazal <mzamazal@redhat.com>\n---\n src/ipa/simple/algorithms/lut.cpp | 32 +++++++++++++++----------------\n src/ipa/simple/algorithms/lut.h | 2 +-\n 2 files changed, 17 insertions(+), 17 deletions(-)", "diff": "diff --git a/src/ipa/simple/algorithms/lut.cpp b/src/ipa/simple/algorithms/lut.cpp\nindex c19b34482..5c4683fd8 100644\n--- a/src/ipa/simple/algorithms/lut.cpp\n+++ b/src/ipa/simple/algorithms/lut.cpp\n@@ -1,6 +1,6 @@\n /* SPDX-License-Identifier: LGPL-2.1-or-later */\n /*\n- * Copyright (C) 2024-2025, Red Hat Inc.\n+ * Copyright (C) 2024-2026, Red Hat Inc.\n *\n * Color lookup tables construction\n */\n@@ -89,7 +89,7 @@ void Lut::updateGammaTable(IPAContext &context)\n \tcontext.activeState.gamma.contrastExp = contrastExp;\n }\n \n-int16_t Lut::ccmValue(unsigned int i, float ccm) const\n+int16_t Lut::matrixValue(unsigned int i, float ccm) const\n {\n \treturn std::round(i * ccm);\n }\n@@ -128,25 +128,25 @@ void Lut::prepare(IPAContext &context,\n \t\t\tparams->blue[i] = gammaTable[static_cast<unsigned int>(lutGains.b())];\n \t\t}\n \t} else if (context.activeState.matrixChanged || gammaUpdateNeeded) {\n-\t\tMatrix<float, 3, 3> gainCcm = { { gains.r(), 0, 0,\n-\t\t\t\t\t\t 0, gains.g(), 0,\n-\t\t\t\t\t\t 0, 0, gains.b() } };\n-\t\tauto ccm = context.activeState.ccm * gainCcm;\n+\t\tMatrix<float, 3, 3> gainMatrix = { { gains.r(), 0, 0,\n+\t\t\t\t\t\t 0, gains.g(), 0,\n+\t\t\t\t\t\t 0, 0, gains.b() } };\n+\t\tauto matrix = context.activeState.ccm * gainMatrix;\n \t\tauto &red = params->redCcm;\n \t\tauto &green = params->greenCcm;\n \t\tauto &blue = params->blueCcm;\n-\t\tparams->ccm = ccm;\n+\t\tparams->ccm = matrix;\n \t\tif (!context.gpuIspEnabled) {\n \t\t\tfor (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {\n-\t\t\t\tred[i].r = ccmValue(i, ccm[0][0]);\n-\t\t\t\tred[i].g = ccmValue(i, ccm[1][0]);\n-\t\t\t\tred[i].b = ccmValue(i, ccm[2][0]);\n-\t\t\t\tgreen[i].r = ccmValue(i, ccm[0][1]);\n-\t\t\t\tgreen[i].g = ccmValue(i, ccm[1][1]);\n-\t\t\t\tgreen[i].b = ccmValue(i, ccm[2][1]);\n-\t\t\t\tblue[i].r = ccmValue(i, ccm[0][2]);\n-\t\t\t\tblue[i].g = ccmValue(i, ccm[1][2]);\n-\t\t\t\tblue[i].b = ccmValue(i, ccm[2][2]);\n+\t\t\t\tred[i].r = matrixValue(i, matrix[0][0]);\n+\t\t\t\tred[i].g = matrixValue(i, matrix[1][0]);\n+\t\t\t\tred[i].b = matrixValue(i, matrix[2][0]);\n+\t\t\t\tgreen[i].r = matrixValue(i, matrix[0][1]);\n+\t\t\t\tgreen[i].g = matrixValue(i, matrix[1][1]);\n+\t\t\t\tgreen[i].b = matrixValue(i, matrix[2][1]);\n+\t\t\t\tblue[i].r = matrixValue(i, matrix[0][2]);\n+\t\t\t\tblue[i].g = matrixValue(i, matrix[1][2]);\n+\t\t\t\tblue[i].b = matrixValue(i, matrix[2][2]);\n \t\t\t\tparams->gammaLut[i] = gammaTable[i / div];\n \t\t\t}\n \t\t}\ndiff --git a/src/ipa/simple/algorithms/lut.h b/src/ipa/simple/algorithms/lut.h\nindex ba8b9021b..0eafd0695 100644\n--- a/src/ipa/simple/algorithms/lut.h\n+++ b/src/ipa/simple/algorithms/lut.h\n@@ -38,7 +38,7 @@ public:\n \n private:\n \tvoid updateGammaTable(IPAContext &context);\n-\tint16_t ccmValue(unsigned int i, float ccm) const;\n+\tint16_t matrixValue(unsigned int i, float ccm) const;\n };\n \n } /* namespace ipa::soft::algorithms */\n", "prefixes": [ "v3", "04/14" ] }