Show a patch.

GET /api/1.1/patches/13593/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 13593,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13593/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13593/",
    "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": "<tencent_B41A28D254A1129C7340D7548F6EC57D7D09@qq.com>",
    "date": "2021-09-01T13:59:08",
    "name": "[libcamera-devel,RFC,v1] libcamera: isp: Add ISP class",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5f1c2c83dfdeb123deaab8246d5c5b659ef42696",
    "submitter": {
        "id": 88,
        "url": "https://patchwork.libcamera.org/api/1.1/people/88/?format=api",
        "name": "Siyuan Fan",
        "email": "siyuan.fan@foxmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/13593/mbox/",
    "series": [
        {
            "id": 2433,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2433/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2433",
            "date": "2021-09-01T13:59:08",
            "name": "[libcamera-devel,RFC,v1] libcamera: isp: Add ISP class",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2433/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13593/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13593/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 AC9FDBD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  1 Sep 2021 13:59:22 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 259026916A;\n\tWed,  1 Sep 2021 15:59:22 +0200 (CEST)",
            "from out203-205-251-60.mail.qq.com (out203-205-251-60.mail.qq.com\n\t[203.205.251.60])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7982460288\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  1 Sep 2021 15:59:17 +0200 (CEST)",
            "from localhost.localdomain ([123.126.82.10])\n\tby newxmesmtplogicsvrsza8.qq.com (NewEsmtp) with SMTP\n\tid ECAA48C4; Wed, 01 Sep 2021 21:59:10 +0800"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=foxmail.com header.i=@foxmail.com\n\theader.b=\"aiddnVEC\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com;\n\ts=s201512; t=1630504752;\n\tbh=mj5ewBc4+qS91HqrsPGdASu1I6Ln4Rz8ZYVmEKgbbeI=;\n\th=From:To:Cc:Subject:Date;\n\tb=aiddnVECo9fr8mcUiltltiooYYscpD7XfVRINfyHdZrNqTbLLKdTZMUMPmo09FRRe\n\tL09M+N83ULGBDKt8NkyGuVSM88X5/28fbhWx+8cgicD1MO2OWWNIClo/d/nV8Kyvi8\n\t7RZotHiOSpKg2tP4AS15ALUDuKACWmgN49SGbMTg=",
        "X-QQ-mid": "xmsmtpt1630504750t980clm8h",
        "Message-ID": "<tencent_B41A28D254A1129C7340D7548F6EC57D7D09@qq.com>",
        "X-QQ-XMAILINFO": "NGqlrl/ejBRsvVJIaBNS34SfZ6SYebpxsAYmjpU3cspAbvj2ml11fJ0wsFRbC9\n\t33sVfma27u94xOXvj0tVD0ycQNdAwhkVcW7gADT3tmp8f35Bw93TC9ynAw/jG7sNt+q1NU81/RbJ\n\tc/lkswRAAe6ky7nY6hoFvzBZkIONOkHGtiBxMdfZfjylHdhOGsq77loHNjwY4YIHPv8mfC9JWZQs\n\tili758OGJbhaEhr2FP+vurBRvfFwaQr3bj9bRMC0t+o6Qk81b0fkY85vbDq8FH8pJdKPNp51snin\n\tR7dA3iJ1V/CXvoT0SulVvdyEJ4kIzOjjWtJoF8eSwCCRvZjk5AJDm/kQ3T21O6/MMOH3wBjQ91wq\n\ttvETlwMVgvAAO6tU+QoR1rqV9QCGyJbW9rWJV5ZFOAdF+UewrBMB1YmavnqjsZvAMW8u1bCt1U2U\n\tad5qs8vyzQfL2iWB9ByFy30WmzryjX9UWEVIu8/kRQBZNVU+pwNCJwIXidBTitz/D1GtFC6NR5H8\n\tf43vaV+D7VlQcJ1wcnQ8NVKN7GoA3DVBQtW9c/G9Q2b1lRROI4pqOGtdP9+sSI528pLce8ZxFg0s\n\tu1HBASXm4g/QzY8iywXnR/5osJ3Aqj7NgzEIQKmjp78OiTaUCLz6+asGFjVQL9WDeuEd1mHvj04L\n\tbAOIg8NKGMXZ0EEHIs2Rs+WdSzhTk8K/gyxvmqwACobVWTDM2Hjei6txgPcS85IzpC+IU2mG2hQb\n\ts4XVNid5HtvKZXR99zlzQ4z2kSJH0EfJVG/89YQH2B4JeBxZ7B4iz4nYSdqMDPMnpkInKnlFige4\n\tEiJC8YE6paqowsml809oorwFd/LAEuezwFq3JlzH/MDTnAqgG/GMNtKU44TkiQjb8=",
        "From": "Siyuan Fan <siyuan.fan@foxmail.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  1 Sep 2021 14:59:08 +0100",
        "X-OQ-MSGID": "<20210901135908.3116-1-siyuan.fan@foxmail.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [RFC PATCH v1] libcamera: isp: Add ISP class",
        "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": "From: Fan Siyuan <siyuan.fan@foxmail.com>\n\nThe ISP class is a abstract base class of software ISP. It includes image\nformat configuration, ISP algorithm parameters parser, pixel processing\nimage export and thread configuration.\n\nThis new class will be used as the basic class for ISPCPU and ISPGPU.\n\nSigned-off-by: Fan Siyuan <siyuan.fan@foxmail.com>\n---\n\nISP Parameters Tuning is a important part, so I've designed a parameters\nparser in order that users can call any algorithm combination by passing\nany number of tuple. Each tuple format is including algorithm name string\nand algorithm param, such as tuple<string, int> for black level correct. \nCurrently this function is only a demo. I'm thus sending it as an RFC.\n\n---\n include/libcamera/internal/isp.h | 67 ++++++++++++++++++++++++++++++++\n 1 file changed, 67 insertions(+)\n create mode 100644 include/libcamera/internal/isp.h",
    "diff": "diff --git a/include/libcamera/internal/isp.h b/include/libcamera/internal/isp.h\nnew file mode 100644\nindex 00000000..caab7050\n--- /dev/null\n+++ b/include/libcamera/internal/isp.h\n@@ -0,0 +1,67 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021, Siyuan Fan <siyuan.fan@foxmail.com>\n+ *\n+ * isp.h - The software ISP abstract base class\n+ */\n+#ifndef __LIBCAMERA_INTERNAL_ISP_H__\n+#define __LIBCAMERA_INTERNAL_ISP_H__\n+\n+#include <vector>\n+#include <memory>\n+#include <tuple>\n+\n+#include <libcamera/formats.h>\n+#include <libcamera/framebuffer.h>\n+#include <libcamera/geometry.h>\n+#include <libcamera/pixel_format.h>\n+\n+#include \"libcamera/base/object.h\"\n+#include \"libcamera/base/signal.h\"\n+\n+namespace libcamera{\n+\n+class ISP : public Object\n+{\n+public:\n+        ISP() {}\n+\n+        virtual ~ISP() {}\n+\n+        template<class F, class...Ts, std::size_t...Is>\n+        void for_each_in_tuple(const std::tuple<Ts...> & tuple, F func, std::index_sequence<Is...>) {\n+   \n+                return (void(func(std::get<Is>(tuple))), ...);\n+        }\n+\n+        template<class F, class...Ts>\n+        void for_each_in_tuple(const std::tuple<Ts...> & tuple, F func) {\n+                for_each_in_tuple(tuple, func, std::make_index_sequence<sizeof...(Ts)>());\n+        }\n+\n+        template<typename T, typename... Args>\n+        void parse(const T &head, const Args &... rest)\n+        {\n+                for_each_in_tuple(head, [&](const auto &x) {\n+                        // parse parameters for diff algorithm\n+                });\n+        }\n+\n+        virtual int configure(PixelFormat inputFormat, PixelFormat outputFormat, Size inputSize, Size outputSize) = 0;\n+\n+        virtual void processing(FrameBuffer *srcBuffer, FrameBuffer *dstBuffer,\n+                                int width, int height) = 0;\n+\n+        virtual int exportBuffers(std::vector<std::unique_ptr<FrameBuffer>> *buffers,\n+                                  unsigned int count, int width, int height) = 0;\n+\n+        virtual void start() = 0;\n+\n+        virtual void stop() = 0;\n+\n+        Signal<FrameBuffer *, FrameBuffer *> ispCompleted;\n+};\n+\n+} /* namespace libcamera */\n+\n+#endif /* __LIBCAMERA_INTERNAL_ISP_H__ */\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "v1"
    ]
}