Patch Detail
Show a patch.
GET /api/1.1/patches/2139/?format=api
{ "id": 2139, "url": "https://patchwork.libcamera.org/api/1.1/patches/2139/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2139/", "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": "<20191008004534.1585142-2-niklas.soderlund@ragnatech.se>", "date": "2019-10-08T00:45:25", "name": "[libcamera-devel,v5,01/10] libcamera: pipeline: Move IPA from pipeline to camera data", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "ff6dc6f2e02aa9363224d54005fcfccbf8d57dcc", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/1.1/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2139/mbox/", "series": [ { "id": 527, "url": "https://patchwork.libcamera.org/api/1.1/series/527/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=527", "date": "2019-10-08T00:45:24", "name": "libcamera: ipa: Add basic IPA support", "version": 5, "mbox": "https://patchwork.libcamera.org/series/527/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2139/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2139/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7253161966\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 8 Oct 2019 02:46:41 +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 f35c9035-e964-11e9-837a-0050569116f7;\n\tTue, 08 Oct 2019 02:45:40 +0200 (CEST)" ], "X-Halon-ID": "f35c9035-e964-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": "Tue, 8 Oct 2019 02:45:25 +0200", "Message-Id": "<20191008004534.1585142-2-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.23.0", "In-Reply-To": "<20191008004534.1585142-1-niklas.soderlund@ragnatech.se>", "References": "<20191008004534.1585142-1-niklas.soderlund@ragnatech.se>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v5 01/10] 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": "Tue, 08 Oct 2019 00:46:41 -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>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\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..cb4337e50eb6c268 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 IPA exists for the camera, this field is 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", "v5", "01/10" ] }