Patch Detail
Show a patch.
GET /api/1.1/patches/21252/?format=api
{ "id": 21252, "url": "https://patchwork.libcamera.org/api/1.1/patches/21252/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21252/", "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": "<20240913075750.35115-4-stefan.klug@ideasonboard.com>", "date": "2024-09-13T07:57:21", "name": "[v2,3/9] ipa: rkisp1: Use generic Interpolator class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "607cc6cc80c9e97639e6b78d9347f2089d475f92", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21252/mbox/", "series": [ { "id": 4587, "url": "https://patchwork.libcamera.org/api/1.1/series/4587/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4587", "date": "2024-09-13T07:57:18", "name": "Implement polynomial lsc support", "version": 2, "mbox": "https://patchwork.libcamera.org/series/4587/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21252/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21252/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 7E191C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Sep 2024 07:58:05 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 83E1363504;\n\tFri, 13 Sep 2024 09:58:04 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 916B8634F8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Sep 2024 09:58:02 +0200 (CEST)", "from ideasonboard.com (213-229-8-243.static.upcbusiness.at\n\t[213.229.8.243])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C598A1011;\n\tFri, 13 Sep 2024 09:56:43 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"JS5K1uJx\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1726214203;\n\tbh=dsK4XmVPJVZ60yPUmPAKacXeXOOghrjApbZ3T/ZoJ08=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=JS5K1uJxO/iPNBSz4Z6XnUaAQ4B8lk+kw9m9KxnwF5+nLboLzt/xDeVxozxB8KBXE\n\tbhE8PzYRGvU4f/arUKCVohZ2wCf50b2kboyWnoZq5s5/CGqNOEjlE3lh/SOI95dU+c\n\t3xC3vDsSqlhgvlueA7UgDX9a+7Uw1p4LCyCRin0g=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v2 3/9] ipa: rkisp1: Use generic Interpolator class", "Date": "Fri, 13 Sep 2024 09:57:21 +0200", "Message-ID": "<20240913075750.35115-4-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240913075750.35115-1-stefan.klug@ideasonboard.com>", "References": "<20240913075750.35115-1-stefan.klug@ideasonboard.com>", "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": "Replace all occurrences of the MatrixInterpolator with the generic one.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/ipa/rkisp1/algorithms/ccm.cpp | 18 ++++++------------\n src/ipa/rkisp1/algorithms/ccm.h | 6 +++---\n 2 files changed, 9 insertions(+), 15 deletions(-)", "diff": "diff --git a/src/ipa/rkisp1/algorithms/ccm.cpp b/src/ipa/rkisp1/algorithms/ccm.cpp\nindex 1ca0e73f81ad..6b7d2e2cd5b3 100644\n--- a/src/ipa/rkisp1/algorithms/ccm.cpp\n+++ b/src/ipa/rkisp1/algorithms/ccm.cpp\n@@ -19,7 +19,7 @@\n #include \"libcamera/internal/yaml_parser.h\"\n \n #include \"../utils.h\"\n-#include \"libipa/matrix_interpolator.h\"\n+#include \"libipa/interpolator.h\"\n \n /**\n * \\file ccm.h\n@@ -46,7 +46,7 @@ int Ccm::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData\n \t\tLOG(RkISP1Ccm, Warning)\n \t\t\t<< \"Failed to parse 'ccm' \"\n \t\t\t<< \"parameter from tuning file; falling back to unit matrix\";\n-\t\tccm_.reset();\n+\t\tccm_.setData({ { 0, Matrix<float, 3, 3>::identity() } });\n \t}\n \n \tret = offsets_.readYaml(tuningData[\"ccms\"], \"ct\", \"offsets\");\n@@ -54,14 +54,8 @@ int Ccm::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData\n \t\tLOG(RkISP1Ccm, Warning)\n \t\t\t<< \"Failed to parse 'offsets' \"\n \t\t\t<< \"parameter from tuning file; falling back to zero offsets\";\n-\t\t/*\n-\t\t * MatrixInterpolator::reset() resets to identity matrices\n-\t\t * while here we need zero matrices so we need to construct it\n-\t\t * ourselves.\n-\t\t */\n-\t\tMatrix<int16_t, 3, 1> m({ 0, 0, 0 });\n-\t\tstd::map<unsigned int, Matrix<int16_t, 3, 1>> matrices = { { 0, m } };\n-\t\toffsets_ = MatrixInterpolator<int16_t, 3, 1>(matrices);\n+\n+\t\toffsets_.setData({ { 0, Matrix<int16_t, 3, 1>({ 0, 0, 0 }) } });\n \t}\n \n \treturn 0;\n@@ -106,8 +100,8 @@ void Ccm::prepare(IPAContext &context, const uint32_t frame,\n \t}\n \n \tct_ = ct;\n-\tMatrix<float, 3, 3> ccm = ccm_.get(ct);\n-\tMatrix<int16_t, 3, 1> offsets = offsets_.get(ct);\n+\tMatrix<float, 3, 3> ccm = ccm_.getInterpolated(ct);\n+\tMatrix<int16_t, 3, 1> offsets = offsets_.getInterpolated(ct);\n \n \tcontext.activeState.ccm.ccm = ccm;\n \tframeContext.ccm.ccm = ccm;\ndiff --git a/src/ipa/rkisp1/algorithms/ccm.h b/src/ipa/rkisp1/algorithms/ccm.h\nindex 9daadb6834b1..46a1416e6be5 100644\n--- a/src/ipa/rkisp1/algorithms/ccm.h\n+++ b/src/ipa/rkisp1/algorithms/ccm.h\n@@ -9,8 +9,8 @@\n \n #include <linux/rkisp1-config.h>\n \n+#include \"libipa/interpolator.h\"\n #include \"libipa/matrix.h\"\n-#include \"libipa/matrix_interpolator.h\"\n \n #include \"algorithm.h\"\n \n@@ -40,8 +40,8 @@ private:\n \t\t\t const Matrix<int16_t, 3, 1> &offsets);\n \n \tunsigned int ct_;\n-\tMatrixInterpolator<float, 3, 3> ccm_;\n-\tMatrixInterpolator<int16_t, 3, 1> offsets_;\n+\tInterpolator<Matrix<float, 3, 3>> ccm_;\n+\tInterpolator<Matrix<int16_t, 3, 1>> offsets_;\n };\n \n } /* namespace ipa::rkisp1::algorithms */\n", "prefixes": [ "v2", "3/9" ] }