{"id":25437,"url":"https://patchwork.libcamera.org/api/patches/25437/?format=json","web_url":"https://patchwork.libcamera.org/patch/25437/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20251210005354.44726-21-bryan.odonoghue@linaro.org>","date":"2025-12-10T00:53:48","name":"[v7,20/26] libcamera: software_isp: ccm: Implement a static init() routine","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"60a681ee424f30697a78c776da3ad468a77513cc","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25437/mbox/","series":[{"id":5645,"url":"https://patchwork.libcamera.org/api/series/5645/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5645","date":"2025-12-10T00:53:28","name":"Add GLES 2.0 GPUISP to libcamera","version":7,"mbox":"https://patchwork.libcamera.org/series/5645/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25437/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25437/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 B3BC9C326B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 00:55:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 559C061487;\n\tWed, 10 Dec 2025 01:55:07 +0100 (CET)","from mail-pf1-x436.google.com (mail-pf1-x436.google.com\n\t[IPv6:2607:f8b0:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BBBCC61487\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 01:55:05 +0100 (CET)","by mail-pf1-x436.google.com with SMTP id\n\td2e1a72fcca58-7b852bb31d9so7562502b3a.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Dec 2025 16:55:05 -0800 (PST)","from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp.\n\t[150.147.107.6]) by smtp.gmail.com with ESMTPSA id\n\t41be03b00d2f7-bf6875cc8eesm16057762a12.16.2025.12.09.16.55.02\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 09 Dec 2025 16:55:03 -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=\"qCxC/SG4\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1765328104; x=1765932904;\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=8xTO1tBEr5dmwj5C2btCnNs2WBrUsqlzweC7y2YC3O8=;\n\tb=qCxC/SG48rEHawUIfzgkkdEQKAV7gNDul33Dr7MtgHDIMbTrwvvKUDXF7SWYoxVuvH\n\tYE77MXysh9QX++LOA4y/OZ9p6ASRUPtjEdiNjI0ff9LPIHqq2FiylcU58z61KHI+oY6M\n\t7pOyBMkEVN1k6hKtdJZWnj1r4gRYAwoxh4GXx1bESof8yLfjvES86kfVEX+5aUgcyvfm\n\tzpgKxlSGOG9IoYGmyiw75f2GU0mbRIIOQcfegTMMF0Z7j59VbU9V/6jVg9Rjr5VcDRub\n\trt5PZfjJXiRtymcvjVABUR0YPq6GJM5y2y2Rh5fow6sGIXS7abzJId+MQXQKjGZstmug\n\t7tSw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765328104; x=1765932904;\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=8xTO1tBEr5dmwj5C2btCnNs2WBrUsqlzweC7y2YC3O8=;\n\tb=iBnB9HHw8/LhIb2vnde76mFcB5QGqfSjF9Rq0/drd2M/Wnah1mH7D1AdbzM0hTIohl\n\twIPkChTFyIQATIJotu5hQC+efr/TJKWC+0Oi/Jj5ZctX8pzTpy4EA+9JRSGHrFCTKqd7\n\tVCiosLLtzLtoRkzzYwj5sbJwgKSLYxbidrN/PENuPHWhQ7lLsp8vXAmk7JjNWd2W5itj\n\tzGJOfyp28zHqVT69PNVBoWZGmcoT38dppZrXxWgGq7TEWf21FFh4JN18yK3gtsODa7Rn\n\tEfd9y3K6tynvoLLQHTWJHrU4ynXbfNgOhGlzTgxJWxI/FZWR1E5k/YxJqC780KC5FQm7\n\t/AVw==","X-Gm-Message-State":"AOJu0YxTLILqJCdpZyT9c54XBWmklinEKJpXcaVKhQVnbqJZsckpmu9d\n\ttryFxusqLHW1PPpBHrqpnRkOpMKEpHj7PEcB+80L4vON84TSn4OkQ2kPzh7vIPIByakqAU65Qy/\n\tz+m9g","X-Gm-Gg":"ASbGncs7RmpcyI0XMeKWCKseUJnuH1/PvCSqdcJlYBRWBmhtGcn9+r6J6lek+4PBM5S\n\tA29C1kDaRXD1iCm+08x4p0s2QRAOznlJpS7IG4buT56zbyA7TtPNlvWGBXStYa0E+dlw7yVPwyI\n\tqwHjiIDx+kEvWyLLipC1Px2T/u60PAHpcmiHIunBapFguYhJcUDURFimcMDzjNqI6tO/XGUNA+z\n\t+hd+KU52NGFIUYAuAWYRld4IEK0SHQkyHIan6D/Gn1s8rMjXMeh6dsHR49ohwjxHNMHwiDUWd0W\n\tjDrar3kSHIXB+l1zMPlGUFQukt4KpEoH4Tn3h270PZUiJ7doMM7sMQMVYiHS22uKOSZBQo/edCq\n\t5tXcHmpX1DIsX3zFsxBXe0LEgML31p8B3CA+65YIi0vZg+1Ta14mn3XWUbrd+3Bs5ElUpsAXLxE\n\t5D3epBdQF6PAtL5KZYrhqN+uSvs12oKsbnA2GvAQWSifhJPLl8KV9pd7y0lBKdfZlB","X-Google-Smtp-Source":"AGHT+IHouw2Sw4C4g25ZKxNbEmHl1Mm3g+AihAkhsbn/UvdN3AT0L170iMyorpKcK0p9uD4VBgckmg==","X-Received":"by 2002:a05:6a20:7f91:b0:35f:aa1b:bc09 with SMTP id\n\tadf61e73a8af0-366e09e2d9dmr539083637.17.1765328104052; \n\tTue, 09 Dec 2025 16:55:04 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>","Subject":"[PATCH v7 20/26] libcamera: software_isp: ccm: Implement a static\n\tinit() routine","Date":"Wed, 10 Dec 2025 00:53:48 +0000","Message-ID":"<20251210005354.44726-21-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20251210005354.44726-1-bryan.odonoghue@linaro.org>","References":"<20251210005354.44726-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":"This is an overloaded init() routine that allows the CCM class to self\nenumerate a default identity CCM at colour temperature 6500k.\n\nThis is required for the case where we are running GPUISP but don't have a\nCCM for the sensor. In this case we want to generate a default CCM and use\nit instead of using the CPUISP's lookup tables.\n\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/ipa/simple/algorithms/ccm.cpp | 25 +++++++++++++++++++------\n 1 file changed, 19 insertions(+), 6 deletions(-)","diff":"diff --git a/src/ipa/simple/algorithms/ccm.cpp b/src/ipa/simple/algorithms/ccm.cpp\nindex 0a98406c1..38c18806e 100644\n--- a/src/ipa/simple/algorithms/ccm.cpp\n+++ b/src/ipa/simple/algorithms/ccm.cpp\n@@ -27,13 +27,26 @@ 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\tfloat identity[] = { 1, 0, 0,\n+\t\t\t\t     0, 1, 0,\n+\t\t\t\t     0, 0, 1 };\n+\t\tMatrix<float, 3, 3> identityMatrix(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":["v7","20/26"]}