{"id":25593,"url":"https://patchwork.libcamera.org/api/1.1/patches/25593/?format=json","web_url":"https://patchwork.libcamera.org/patch/25593/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20251217100138.82525-21-bryan.odonoghue@linaro.org>","date":"2025-12-17T10:01:32","name":"[v9,20/26] libcamera: software_isp: ccm: Add self-initialising identity CCM to Ccm::init","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"0d73314e3e6815df884bf544882a07b60e83a323","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/1.1/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25593/mbox/","series":[{"id":5669,"url":"https://patchwork.libcamera.org/api/1.1/series/5669/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5669","date":"2025-12-17T10:01:12","name":"Add GLES 2.0 GPUISP to libcamera","version":9,"mbox":"https://patchwork.libcamera.org/series/5669/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25593/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25593/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 19464C32AF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Dec 2025 10:02:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B6B7561F5E;\n\tWed, 17 Dec 2025 11:02:23 +0100 (CET)","from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A109B61F0A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Dec 2025 11:02:07 +0100 (CET)","by mail-wm1-x329.google.com with SMTP id\n\t5b1f17b1804b1-477563e28a3so2283845e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Dec 2025 02:02:07 -0800 (PST)","from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-47bdc1583fbsm32292585e9.0.2025.12.17.02.02.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 17 Dec 2025 02:02:06 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"XKAtvUre\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765965727; x=1766570527;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=zyb9LZ6PT/7D8hWeLG03useXOhMS8JpWGPj51LZZTbo=;\n\tb=XKAtvUre/ReoZY6GlKI6BcVXGYQ7aJukiLLF1+z/LPJiLdoEHjckC5Ww+O1rSlo0qW\n\tnvSpLtcRhA/tU/a4+f+L4P3Qpl4Q8UXppC9ggGFQ9BM+tdp4esTFI0DxwwBptvsG5TfE\n\taFfwT9YuLwTbxlj9ZpMn7U3KiNVUjF7kiZ52OLwG1wsvZ62mWLgitMKkicgsODepz794\n\tKHElSNY34BfuuctQ8OvKa6nJAH8M+3i040WjDld4ms2/w8tWcY6zYG01IJRUT9i+ORwL\n\tbocj/PC6D1o6MvZsLYRNFiqSeYqIsH+aAVtkHNdrI7Y1VqT5Gqy5ls+yM0JJHf28lEUt\n\tVK4w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765965727; x=1766570527;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=zyb9LZ6PT/7D8hWeLG03useXOhMS8JpWGPj51LZZTbo=;\n\tb=fwlOl0ijehAYM66FVtb35kcAl+oVddECJ43IobKHVB6mNlh7gZ/uILNi0BBsVzlwPE\n\tPmkVsq3azC+cOMb/TgclxAI3ClVCKu1aqXo0eOOTgHTi5/2qvAwwUfSHhg5FvqZxKWFF\n\tvCG86pggY/by2S4DSrA+bJIO89LoRtFkxcV/ZbW69jGdVCc+ikOKIywWzqgB8nb18irl\n\txxqQEtmgZMBWct4wSxiJFyp+cEDOvbvFsnRKg3T2Oj7GIjjZCsy2wlNAgF30TksHzFLS\n\tjDAKHKfLSf0KqesqxvClzyubTFFCHs4JDnAsq6q2es8x2P1NqbHHZcbykq3Vz+7bxJUh\n\tFT2Q==","X-Gm-Message-State":"AOJu0Yx9kMWXFUqtc/XTRROsddznILUe/RIAS0M9opa+unxDMBpJGBVT\n\teXyD5uunpOBcwcDhu9UfPc0Dgc416cyp7YOjoPJ5QohdxjjB62BQTEYRDAxzFQCN7sXGjmbYvnT\n\t0l+XX","X-Gm-Gg":"AY/fxX7qbVcJ3vU7Cbn8/GwCza46v8yLcLvnQT/VKYW/GlJBXVy2TdTC0spRU8KG3ob\n\tWLee8EYj/2D75JLyLuxCzkk5p5iARw1MaYSYlTI8DZAVQETj2To377NMGg13ZCmYncP3pievU+q\n\tBpgSSLWtashmIrkTTNzjV5WTgUuAOpM/Qeq2M8Cz7hG+00D8gd8oiLhsmlm0rnafONoypf4kT5P\n\t7iSoTG1ZtJdyo/fk51SOleuv4NtBFn241XohNcIVPDVnL4PJk69K7nHP/QDdz7TERQdAjqQVc8a\n\tDSZtZEhdha36G8KnLEUhRAWul8iDCSHOVqPkLtB/4bR1G8KDDh+OKKYImHxy5yA7tp/ZVmfgIu9\n\tPD65S04c+sxG31lV3pQ86v4BUYHm3WoOL5nRB8ZLZrFHFUnIdyL8DjebSatU9vL7P8i1hbj2Rx3\n\t9zFd3fzGwzLwdp2ypUCvn5qLoON/4hrEDPurHh30v3UFxEdkse3U0AUmYMwLsjz3jH768=","X-Google-Smtp-Source":"AGHT+IF+MhhEdhAhHf6Z9gSyPKht0rm207sOPO9friyguSF2zjMMEN5CzXajgWwS5x4eRnR47aYmUQ==","X-Received":"by 2002:a05:600c:6290:b0:46e:2815:8568 with SMTP id\n\t5b1f17b1804b1-47a8f1c1e65mr199453995e9.10.1765965726650; \n\tWed, 17 Dec 2025 02:02:06 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tMilan Zamazal <mzamazal@redhat.com>","Subject":"[PATCH v9 20/26] libcamera: software_isp: ccm: Add self-initialising\n\tidentity CCM to Ccm::init","Date":"Wed, 17 Dec 2025 10:01:32 +0000","Message-ID":"<20251217100138.82525-21-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20251217100138.82525-1-bryan.odonoghue@linaro.org>","References":"<20251217100138.82525-1-bryan.odonoghue@linaro.org>","MIME-Version":"1.0","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":"We have a need to generate an identity CCM when running the GPUIsp without\na sensor tuning file.\n\nA preivous patch added a selfInitialising bool to the IPAContext structure.\nWhen that bool is true generate an identity CCM at colour temperature\n6500k.\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/ipa/simple/algorithms/ccm.cpp | 22 ++++++++++++++++------\n 1 file changed, 16 insertions(+), 6 deletions(-)","diff":"diff --git a/src/ipa/simple/algorithms/ccm.cpp b/src/ipa/simple/algorithms/ccm.cpp\nindex 0a98406c1..ac1ce1685 100644\n--- a/src/ipa/simple/algorithms/ccm.cpp\n+++ b/src/ipa/simple/algorithms/ccm.cpp\n@@ -27,13 +27,23 @@ namespace ipa::soft::algorithms {\n \n LOG_DEFINE_CATEGORY(IPASoftCcm)\n \n-int Ccm::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData)\n+int Ccm::init([[maybe_unused]] IPAContext &context, [[maybe_unused]] const YamlObject &tuningData)\n {\n-\tint ret = ccm_.readYaml(tuningData[\"ccms\"], \"ct\", \"ccm\");\n-\tif (ret < 0) {\n-\t\tLOG(IPASoftCcm, Error)\n-\t\t\t<< \"Failed to parse 'ccm' parameter from tuning file.\";\n-\t\treturn ret;\n+\tif (!context.selfInitialising) {\n+\t\tint ret = ccm_.readYaml(tuningData[\"ccms\"], \"ct\", \"ccm\");\n+\t\tif (ret < 0) {\n+\t\t\tLOG(IPASoftCcm, Error)\n+\t\t\t\t<< \"Failed to parse 'ccm' parameter from tuning file.\";\n+\t\t\treturn ret;\n+\t\t}\n+\t} else {\n+\t\t/* Initialize with identity CCM at standard D65 color temperature */\n+\t\tMatrix<float, 3, 3> identityMatrix = Matrix<float, 3, 3>::identity();\n+\n+\t\tstd::map<unsigned int, Matrix<float, 3, 3>> ccmData;\n+\t\tccmData[6500] = identityMatrix;\n+\n+\t\tccm_ = Interpolator<Matrix<float, 3, 3>>(std::move(ccmData));\n \t}\n \n \tcontext.ccmEnabled = true;\n","prefixes":["v9","20/26"]}