Show a patch.

GET /api/1.1/patches/25930/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 25930,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25930/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25930/",
    "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": "<20260122161935.208562-5-mzamazal@redhat.com>",
    "date": "2026-01-22T16:19:24",
    "name": "[v4,04/15] 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/25930/mbox/",
    "series": [
        {
            "id": 5733,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5733/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5733",
            "date": "2026-01-22T16:19:20",
            "name": "Simple pipeline IPA cleanup",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/5733/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25930/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25930/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 3765ABDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Jan 2026 16:20:26 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DE0EE61FD3;\n\tThu, 22 Jan 2026 17:20:25 +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 7264061FC4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Jan 2026 17:20:24 +0100 (CET)",
            "from mx-prod-mc-08.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-39-hkmWUw2nM5aCyNd5xOx_qA-1;\n\tThu, 22 Jan 2026 11:20:17 -0500",
            "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n\t(mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n\t[10.30.177.111])\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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS id B83A0180034F; Thu, 22 Jan 2026 16:20:16 +0000 (UTC)",
            "from mzamazal-thinkpadp1gen7.tpbc.com (unknown [10.45.224.97])\n\tby mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id AEADC1800577; Thu, 22 Jan 2026 16:20:14 +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=\"QpsSxyZ0\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1769098823;\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=UA0HsVOkrg7ZUYEaw/vP8z0T6FwkjQRAWfkDsfQm0tU=;\n\tb=QpsSxyZ0C3f2flZs6SaXeq1FeBYKx73e25gyOpiJX4pUff5dq0l7lNO2Mjd/sawqBdEIga\n\tUpd+CYNVYb8b0cIrorc9i70jfZ9v0XKxkiZWzjIQDuPDsDVjqBv5qUjRxF71tjdiKBBuMG\n\trCMt/XCsxy8cteU3AxWAlT3IcrYkJXA=",
        "X-MC-Unique": "hkmWUw2nM5aCyNd5xOx_qA-1",
        "X-Mimecast-MFC-AGG-ID": "hkmWUw2nM5aCyNd5xOx_qA_1769098816",
        "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 v4 04/15] libcamera: ipa: simple: Rename \"ccm\" identifiers\n\tnot specific to CCM",
        "Date": "Thu, 22 Jan 2026 17:19:24 +0100",
        "Message-ID": "<20260122161935.208562-5-mzamazal@redhat.com>",
        "In-Reply-To": "<20260122161935.208562-1-mzamazal@redhat.com>",
        "References": "<20260122161935.208562-1-mzamazal@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "U6RKnuskLLVNga8EPkcdg90M_hASxbSK-AiBTJqpdyw_1769098816",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\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": [
        "v4",
        "04/15"
    ]
}