Patch Detail
Show a patch.
GET /api/1.1/patches/27323/?format=api
{ "id": 27323, "url": "https://patchwork.libcamera.org/api/1.1/patches/27323/?format=api", "web_url": "https://patchwork.libcamera.org/patch/27323/", "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": "<20260708-libipa-algorithms-v5-15-0759d0359f52@ideasonboard.com>", "date": "2026-07-08T15:50:57", "name": "[v5,15/36] ipa: libipa: lsc: Move Interpolator<lsc::Components> to lsc_base", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "d179d9f4051e8b314356d21436d6416943aca887", "submitter": { "id": 143, "url": "https://patchwork.libcamera.org/api/1.1/people/143/?format=api", "name": "Jacopo Mondi", "email": "jacopo.mondi@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/27323/mbox/", "series": [ { "id": 6048, "url": "https://patchwork.libcamera.org/api/1.1/series/6048/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6048", "date": "2026-07-08T15:50:42", "name": "ipa: libipa: Introduce libipa algorithms", "version": 5, "mbox": "https://patchwork.libcamera.org/series/6048/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/27323/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/27323/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 C1655C3261\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 8 Jul 2026 15:51:40 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 49B0A660E9;\n\tWed, 8 Jul 2026 17:51:40 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E0C4C66094\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 8 Jul 2026 17:51:16 +0200 (CEST)", "from [192.168.1.182] (93-46-82-201.ip106.fastwebnet.it\n\t[93.46.82.201])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 064303FA5;\n\tWed, 8 Jul 2026 17:50:26 +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=\"NWMWxTtY\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1783525827;\n\tbh=FI6u9HiVyZE3mGOS+nR17xOPN1xl6wtQAM1eP5szdPw=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=NWMWxTtYA9rhYlBwHItlw4Lf2mdty2Jex06SviJQviV83r0dcNQkdB5Nsb82sICnP\n\tjteCDvovNGr7BNOdVthxmgSCJobtqvHJqD+7kL2/X8qZ4TjHBr13CLNBj+7rhiB46Q\n\t4O0mKywQRBW79Y/gCSv6a4aq/jw7elOmX7qLz0Jk=", "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Date": "Wed, 08 Jul 2026 17:50:57 +0200", "Subject": "[PATCH v5 15/36] ipa: libipa: lsc: Move\n\tInterpolator<lsc::Components> to lsc_base", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260708-libipa-algorithms-v5-15-0759d0359f52@ideasonboard.com>", "References": "<20260708-libipa-algorithms-v5-0-0759d0359f52@ideasonboard.com>", "In-Reply-To": "<20260708-libipa-algorithms-v5-0-0759d0359f52@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org, \n\tStefan Klug <stefan.klug@ideasonboard.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tKieran Bingham <kieran.bingham@ideasonboard.com>", "X-Mailer": "b4 0.14.3", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=3329;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=FI6u9HiVyZE3mGOS+nR17xOPN1xl6wtQAM1eP5szdPw=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqTnHlmC/PICoFh418AoklK0rWHV8yG89KsFeIq\n\t0E0GqwZoFSJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCak5x5QAKCRByNAaPFqFW\n\tPPqHEACz9xQBBJZ9CserFVgnC8pEwV5VoZ6tfKTcId9F1IpNOwuSXxoJ98743k9SWDvk+ahlJSk\n\tdI3yAkS6EqOcB8jP83q65JvZW7aATHs/q08Tu5gkifEp1EKZ+/Y10QS/UPdW5I9wJiClk55YuX/\n\tXSKaZYgOv/GvtSHQ56cCKmIrcBaq89vdq5oj88qmgSVQ3uIWiGpH82Hyi8AiTCPJdITXhYbO9Dn\n\tz4/NoxZmRGba7AbutSpF6U/p11pxU1kchWesAmGL6n9XmkZ04kaA7QL934tnEg7IXpWC7Ah3uPE\n\t8+Jkv9mQbaq5eXs5f0U+5Jyyb7QDs924dOdJL4YX4k11zh4dktu+Gzm4H4+FBF4bWJh8keubMDD\n\tHbcQB6wPXtBX1yMuss4I5ywMXT3xoA6zeI7FqGGILQ0ReMZjoRLwoV/NqTFkOUq+R0gWC+lMmBS\n\trwZN/TCtDx3vzjAK4kFWGvBOwBgUm5JGoeqZqydl4Q+5OP14EyRPmwQhTeGYnjQOTy28bTbXTLt\n\tQp9+lC6Ti3CxqEgwX6wiNPrOPEweYb7RwEMFYLrIPmE17mAYhdc9oh+J37aNmpEfpZI9MqBQlnf\n\t5Mz2HJj9/BfLBgelsqZG5mUffgB/V0pi65W7RzAVd5XtE9Wu86FgAe6whX4GylAMaii7uORYQzy\n\t2qCuQh8Ymh37QSg==", "X-Developer-Key": "i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B", "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": "Move the Interpolator<lsc::Components>: specialization from the RkISP1\nIPA to the lsc_base header.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/ipa/libipa/lsc_base.cpp | 15 +++++++++++++++\n src/ipa/libipa/lsc_base.h | 21 +++++++++++++++++++++\n src/ipa/rkisp1/algorithms/lsc.cpp | 27 ---------------------------\n 3 files changed, 36 insertions(+), 27 deletions(-)", "diff": "diff --git a/src/ipa/libipa/lsc_base.cpp b/src/ipa/libipa/lsc_base.cpp\nindex d05075b988d7..945020794b57 100644\n--- a/src/ipa/libipa/lsc_base.cpp\n+++ b/src/ipa/libipa/lsc_base.cpp\n@@ -49,6 +49,21 @@ namespace lsc {\n \n } /* namespace lsc */\n \n+#ifndef __DOXYGEN__\n+template<>\n+void Interpolator<lsc::Components>::\n+\tinterpolate(const lsc::Components &a,\n+\t\t const lsc::Components &b,\n+\t\t lsc::Components &dest,\n+\t\t double lambda)\n+{\n+\tinterpolateVector(a.r, b.r, dest.r, lambda);\n+\tinterpolateVector(a.gr, b.gr, dest.gr, lambda);\n+\tinterpolateVector(a.gb, b.gb, dest.gb, lambda);\n+\tinterpolateVector(a.b, b.b, dest.b, lambda);\n+}\n+#endif\n+\n /**\n * \\class LscImplementation\n * \\brief Pure virtual base class for LSC algorithm implementations\ndiff --git a/src/ipa/libipa/lsc_base.h b/src/ipa/libipa/lsc_base.h\nindex 93f819d3c2af..51cc35888209 100644\n--- a/src/ipa/libipa/lsc_base.h\n+++ b/src/ipa/libipa/lsc_base.h\n@@ -18,6 +18,8 @@\n \n #include \"libcamera/internal/value_node.h\"\n \n+#include \"interpolator.h\"\n+\n namespace libcamera {\n \n namespace ipa {\n@@ -35,6 +37,25 @@ using ComponentsMap = std::map<unsigned int, Components>;\n \n } /* namespace lsc */\n \n+#ifndef __DOXYGEN__\n+template<typename T>\n+void interpolateVector(const std::vector<T> &a, const std::vector<T> &b,\n+\t\t std::vector<T> &dest, double lambda)\n+{\n+\tASSERT(a.size() == b.size());\n+\tdest.resize(a.size());\n+\tfor (size_t i = 0; i < a.size(); i++)\n+\t\tdest[i] = a[i] * (1.0 - lambda) + b[i] * lambda;\n+}\n+\n+template<>\n+void Interpolator<lsc::Components>::\n+\tinterpolate(const lsc::Components &a,\n+\t\t const lsc::Components &b,\n+\t\t lsc::Components &dest,\n+\t\t double lambda);\n+#endif /* __DOXYGEN__ */\n+\n class LscImplementation\n {\n public:\ndiff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp\nindex 84d2b1d3bdac..8d92ee89cdaf 100644\n--- a/src/ipa/rkisp1/algorithms/lsc.cpp\n+++ b/src/ipa/rkisp1/algorithms/lsc.cpp\n@@ -25,33 +25,6 @@\n \n namespace libcamera {\n \n-namespace ipa {\n-\n-template<typename T>\n-void interpolateVector(const std::vector<T> &a, const std::vector<T> &b,\n-\t\t std::vector<T> &dest, double lambda)\n-{\n-\tASSERT(a.size() == b.size());\n-\tdest.resize(a.size());\n-\tfor (size_t i = 0; i < a.size(); i++)\n-\t\tdest[i] = a[i] * (1.0 - lambda) + b[i] * lambda;\n-}\n-\n-template<>\n-void Interpolator<lsc::Components>::\n-\tinterpolate(const lsc::Components &a,\n-\t\t const lsc::Components &b,\n-\t\t lsc::Components &dest,\n-\t\t double lambda)\n-{\n-\tinterpolateVector(a.r, b.r, dest.r, lambda);\n-\tinterpolateVector(a.gr, b.gr, dest.gr, lambda);\n-\tinterpolateVector(a.gb, b.gb, dest.gb, lambda);\n-\tinterpolateVector(a.b, b.b, dest.b, lambda);\n-}\n-\n-} /* namespace ipa */\n-\n namespace ipa::rkisp1::algorithms {\n \n \n", "prefixes": [ "v5", "15/36" ] }