Show a patch.

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

{
    "id": 2082,
    "url": "https://patchwork.libcamera.org/api/patches/2082/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2082/",
    "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": "<20191003174941.1296988-2-niklas.soderlund@ragnatech.se>",
    "date": "2019-10-03T17:49:31",
    "name": "[libcamera-devel,v4,01/11] libcamera: pipeline: Move IPA from pipeline to camera data",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3f8542165e8f7c02b0e24e4adb23cf4bbc029f27",
    "submitter": {
        "id": 5,
        "url": "https://patchwork.libcamera.org/api/people/5/?format=api",
        "name": "Niklas Söderlund",
        "email": "niklas.soderlund@ragnatech.se"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/2082/mbox/",
    "series": [
        {
            "id": 516,
            "url": "https://patchwork.libcamera.org/api/series/516/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=516",
            "date": "2019-10-03T17:49:31",
            "name": "libcamera: ipa: Add basic IPA support",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/516/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2082/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2082/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<niklas.soderlund@ragnatech.se>",
        "Received": [
            "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A8C36165B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  3 Oct 2019 19:50:37 +0200 (CEST)",
            "from bismarck.berto.se (unknown [84.172.88.101])\n\tby bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid 3138de1e-e606-11e9-837a-0050569116f7;\n\tThu, 03 Oct 2019 19:49:48 +0200 (CEST)"
        ],
        "X-Halon-ID": "3138de1e-e606-11e9-837a-0050569116f7",
        "Authorized-sender": "niklas@soderlund.pp.se",
        "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu,  3 Oct 2019 19:49:31 +0200",
        "Message-Id": "<20191003174941.1296988-2-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20191003174941.1296988-1-niklas.soderlund@ragnatech.se>",
        "References": "<20191003174941.1296988-1-niklas.soderlund@ragnatech.se>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 01/11] libcamera: pipeline: Move IPA\n\tfrom pipeline to camera data",
        "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>",
        "X-List-Received-Date": "Thu, 03 Oct 2019 17:50:37 -0000"
    },
    "content": "The IPA acts on a camera and not on a pipeline which can expose more\nthen one camera. Move the IPA reference to the CameraData.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n src/libcamera/include/pipeline_handler.h |  2 ++\n src/libcamera/pipeline/vimc.cpp          | 12 +++++-------\n src/libcamera/pipeline_handler.cpp       |  8 ++++++++\n 3 files changed, 15 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h\nindex 1fdef9cea40f1f0a..42b90a4bf1a6e414 100644\n--- a/src/libcamera/include/pipeline_handler.h\n+++ b/src/libcamera/include/pipeline_handler.h\n@@ -14,6 +14,7 @@\n #include <string>\n #include <vector>\n \n+#include <ipa/ipa_interface.h>\n #include <libcamera/controls.h>\n #include <libcamera/stream.h>\n \n@@ -43,6 +44,7 @@ public:\n \tPipelineHandler *pipe_;\n \tstd::list<Request *> queuedRequests_;\n \tControlInfoMap controlInfo_;\n+\tstd::unique_ptr<IPAInterface> ipa_;\n \n private:\n \tCameraData(const CameraData &) = delete;\ndiff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\nindex 26477dccbb8fcd5b..f1cfd0ed35cfd9cd 100644\n--- a/src/libcamera/pipeline/vimc.cpp\n+++ b/src/libcamera/pipeline/vimc.cpp\n@@ -101,8 +101,6 @@ private:\n \t\treturn static_cast<VimcCameraData *>(\n \t\t\tPipelineHandler::cameraData(camera));\n \t}\n-\n-\tstd::unique_ptr<IPAInterface> ipa_;\n };\n \n VimcCameraConfiguration::VimcCameraConfiguration()\n@@ -353,13 +351,13 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n \tif (!media)\n \t\treturn false;\n \n-\tipa_ = IPAManager::instance()->createIPA(this, 0, 0);\n-\tif (ipa_ == nullptr)\n+\tstd::unique_ptr<VimcCameraData> data = utils::make_unique<VimcCameraData>(this);\n+\n+\tdata->ipa_ = IPAManager::instance()->createIPA(this, 0, 0);\n+\tif (data->ipa_ == nullptr)\n \t\tLOG(VIMC, Warning) << \"no matching IPA found\";\n \telse\n-\t\tipa_->init();\n-\n-\tstd::unique_ptr<VimcCameraData> data = utils::make_unique<VimcCameraData>(this);\n+\t\tdata->ipa_->init();\n \n \t/* Locate and open the capture video node. */\n \tif (data->init(media))\ndiff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\nindex 3e54aa23d92b9a36..2d69dea843dd0980 100644\n--- a/src/libcamera/pipeline_handler.cpp\n+++ b/src/libcamera/pipeline_handler.cpp\n@@ -96,6 +96,14 @@ LOG_DEFINE_CATEGORY(Pipeline)\n  * creating the camera, and shall not be modified afterwards.\n  */\n \n+/**\n+ * \\var CameraData::ipa_\n+ * \\brief The IPA module used by the camera\n+ *\n+ * Reference to the Image Processing Algorithms (IPA) operating on the camera's\n+ * stream(s). If no IPAs are in operation this should be set to nullptr.\n+ */\n+\n /**\n  * \\class PipelineHandler\n  * \\brief Create and manage cameras based on a set of media devices\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "01/11"
    ]
}