Patch Detail
Show a patch.
GET /api/patches/27638/?format=api
{ "id": 27638, "url": "https://patchwork.libcamera.org/api/patches/27638/?format=api", "web_url": "https://patchwork.libcamera.org/patch/27638/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20260805-libipa-algorithms-v7-15-7425b5b795d4@ideasonboard.com>", "date": "2026-08-05T16:12:57", "name": "[v7,15/32] 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/people/143/?format=api", "name": "Jacopo Mondi", "email": "jacopo.mondi@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/27638/mbox/", "series": [ { "id": 6110, "url": "https://patchwork.libcamera.org/api/series/6110/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6110", "date": "2026-08-05T16:12:42", "name": "ipa: libipa: Introduce libipa algorithms", "version": 7, "mbox": "https://patchwork.libcamera.org/series/6110/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/27638/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/27638/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 3A945C3341\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 5 Aug 2026 16:13:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A2B7068179;\n\tWed, 5 Aug 2026 18:13:47 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 50CFD68146\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 5 Aug 2026 18:13:34 +0200 (CEST)", "from [192.168.125.177] (mob-109-113-25-35.net.vodafone.it\n\t[109.113.25.35])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7E6D81C76;\n\tWed, 5 Aug 2026 18:12:23 +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=\"h5jI/CFO\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1785946343;\n\tbh=70FZhClw7mS5xy+Y1CktDRCjvCls/+hWNvF/+aVuNwI=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=h5jI/CFOqJM3HJkfxZRUQ5cBIeJKcUALaJfPKUlA5P8XuER1Qw6+G2Mebr6GeXtdr\n\tPEHqWF23Z1Y8N6sdmL7+Rmd7+5O4SrM4YmQiDB44laDuQqWRwAziQ4hh02P7JVExUv\n\trDOQ2bYM+xdUZzDDBgxXQHlb1Q4QMVHkjfjp88lU=", "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Date": "Wed, 05 Aug 2026 18:12:57 +0200", "Subject": "[PATCH v7 15/32] 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": "<20260805-libipa-algorithms-v7-15-7425b5b795d4@ideasonboard.com>", "References": "<20260805-libipa-algorithms-v7-0-7425b5b795d4@ideasonboard.com>", "In-Reply-To": "<20260805-libipa-algorithms-v7-0-7425b5b795d4@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org, \n\tStefan Klug <stefan.klug@ideasonboard.com>, \n\tMilan Zamazal <mzamazal@redhat.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tKieran Bingham <kieran.bingham@ideasonboard.com>", "X-Mailer": "b4 0.16-dev", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=3386;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=70FZhClw7mS5xy+Y1CktDRCjvCls/+hWNvF/+aVuNwI=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqc2EevQmOdSkLdiSNwij4euB2Xkn0hBv3W1PM/\n\thQ+4HrXVFOJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCanNhHgAKCRByNAaPFqFW\n\tPPNKEACuJiug6abIlx2HrSTmGxESmEc84/cx20FcCzYz9L2rvkp1Vw5U32jhjThA+vlcWoYMw/5\n\tRlFbLRYdHh7jFUZ3R3OuN5Ip0aFymkXHs5KhBlQ/3o+KH7Hq0V6avX0naGqa4NoiBhlcoVaBEZR\n\t6jEFySq4/gSREYRBc1JZmmr61g7Z+yNVBObop4NQwvU/84cxza1uud1XLMdjIW9zyr3JyGKzcG1\n\tTL+ZKkMoc/0olOYgLcOtqgU8wKIDYNfOpRqk2o6ecFVp7fPP/og6YqWuxJY3yh2kgSPUmFVGADl\n\tKK7F7eyNMPOzmhjUwtZ8WNiK2Pqi2Ow7963ufyOizQwKBaRulbjNoIgUtm80euZmyLjdNOiK3Xk\n\tO15tVg/lAKcEmhOB15Mw+y2IgL0IoAHI62o7lPSvQGxkwu6+DM61ZtMJSq+LpzSLeCNbrUUDVZq\n\trdqVWr26IjrjWgQVeekApIjkqN7rJYlG6HxGXzuxqxKoCAA//5utd0I1wsa6It/s1eO0As6O+7b\n\tnJwriESG27pxo1vhe3L8hbHd2VxssAHwR11vmeQABdAW78BLQHoUrU2JPVeYjEV7fBQbF/7T+2X\n\tmrsWTl3aLjTuCrusgULQYessN8SFu4SJFmxVgPq+PIGVIo2q8WO0NLov2AGLT1KqNOZdDPIx1ey\n\t3aegkLAF2j1KWdg==", "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>\nReviewed-by: Stefan Klug <stefan.klug@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 26197f4effe5..b50460394925 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 59b831e53fbb..ca7ad6e4051c 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": [ "v7", "15/32" ] }