Patch Detail
Show a patch.
GET /api/patches/12501/?format=api
{ "id": 12501, "url": "https://patchwork.libcamera.org/api/patches/12501/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12501/", "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": "<20210607123533.51198-2-jeanmichel.hautbois@ideasonboard.com>", "date": "2021-06-07T12:35:33", "name": "[libcamera-devel,2/2] ipa: ipu3: Initialize CameraSensorHelper at IPU3 init stage", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "6d57502dbfd764ad2e9c11f5a095de951ee68647", "submitter": { "id": 75, "url": "https://patchwork.libcamera.org/api/people/75/?format=api", "name": "Jean-Michel Hautbois", "email": "jeanmichel.hautbois@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12501/mbox/", "series": [ { "id": 2106, "url": "https://patchwork.libcamera.org/api/series/2106/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2106", "date": "2021-06-07T12:35:32", "name": "[libcamera-devel,1/2] ipa: Create a camera sensor helper class", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2106/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12501/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12501/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 117F8C3206\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 7 Jun 2021 12:35:41 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2748568928;\n\tMon, 7 Jun 2021 14:35: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 A3A0C602A7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 7 Jun 2021 14:35:38 +0200 (CEST)", "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:b035:2cc2:4506:d7d3])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 525BDE04;\n\tMon, 7 Jun 2021 14:35:38 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"YAa+rGa1\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1623069338;\n\tbh=vGypoHQDA7k+uHeBZo5sgiKPxCqMYf0iCN7RUIo1YCE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=YAa+rGa1kb69HjNze578j7tISEOZBq3yd6DwNzR+28oNLilfrk2HZrdufVq6C03eK\n\tYpKlE/mF7HTKjZh69Qro4iTaoStkMTNSwhs6xcu8LN86SBr0SguQKwQ7/3bucuQdqC\n\t/Yq7hFhyJSU444mXtV+P7RpeGIYcghmTJBt0UmyY=", "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 7 Jun 2021 14:35:33 +0200", "Message-Id": "<20210607123533.51198-2-jeanmichel.hautbois@ideasonboard.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20210607123533.51198-1-jeanmichel.hautbois@ideasonboard.com>", "References": "<20210607123533.51198-1-jeanmichel.hautbois@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 2/2] ipa: ipu3: Initialize\n\tCameraSensorHelper at IPU3 init stage", "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": "In order for the CameraSensorHelper to be instantianted, we need to find\nits factory using the camera sensor model name stored in\nIPASettings::sensorModel. As we don't need to do it at each configure\ncall (the sensor is not changing in-between), implement the init call in\nIPAIPU3 to do that.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/ipa/ipu3/ipu3.cpp | 34 ++++++++++++++++++++++++++++++----\n 1 file changed, 30 insertions(+), 4 deletions(-)", "diff": "diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 700a5660..7b0d66ea 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -19,10 +19,12 @@\n #include <libcamera/request.h>\n \n #include \"libcamera/internal/buffer.h\"\n+#include \"libcamera/internal/camera_sensor_properties.h\"\n #include \"libcamera/internal/log.h\"\n \n #include \"ipu3_agc.h\"\n #include \"ipu3_awb.h\"\n+#include \"libipa/camera_sensor_helper.h\"\n \n static constexpr uint32_t kMaxCellWidthPerSet = 160;\n static constexpr uint32_t kMaxCellHeightPerSet = 56;\n@@ -36,10 +38,7 @@ namespace ipa::ipu3 {\n class IPAIPU3 : public IPAIPU3Interface\n {\n public:\n-\tint init([[maybe_unused]] const IPASettings &settings) override\n-\t{\n-\t\treturn 0;\n-\t}\n+\tint init(const IPASettings &settings) override;\n \tint start() override;\n \tvoid stop() override {}\n \n@@ -75,6 +74,8 @@ private:\n \tstd::unique_ptr<IPU3Awb> awbAlgo_;\n \t/* Interface to the AEC/AGC algorithm */\n \tstd::unique_ptr<IPU3Agc> agcAlgo_;\n+\t/* Interface to the Camera Helper */\n+\tstd::unique_ptr<CameraSensorHelper> camHelper_;\n \n \t/* Local parameter storage */\n \tstruct ipu3_uapi_params params_;\n@@ -82,6 +83,31 @@ private:\n \tstruct ipu3_uapi_grid_config bdsGrid_;\n };\n \n+int IPAIPU3::init(const IPASettings &settings)\n+{\n+\tstd::vector<CameraSensorHelperFactory *> &factories =\n+\t\tCameraSensorHelperFactory::factories();\n+\n+\tfor (CameraSensorHelperFactory *factory : factories) {\n+\t\tLOG(IPAIPU3, Debug)\n+\t\t\t<< \"Found registered camera sensor helper '\"\n+\t\t\t<< factory->name() << \"'\";\n+\n+\t\tstd::unique_ptr<CameraSensorHelper> camHelper = factory->create();\n+\n+\t\tif (camHelper->name() != settings.sensorModel)\n+\t\t\tcontinue;\n+\n+\t\tLOG(IPAIPU3, Debug)\n+\t\t\t<< \"Camera sensor helper \\\"\" << factory->name()\n+\t\t\t<< \"\\\" matched\";\n+\n+\t\tcamHelper_ = std::move(camHelper);\n+\t}\n+\n+\treturn 0;\n+}\n+\n int IPAIPU3::start()\n {\n \tsetControls(0);\n", "prefixes": [ "libcamera-devel", "2/2" ] }