Show a patch.

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

{
    "id": 15526,
    "url": "https://patchwork.libcamera.org/api/patches/15526/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15526/",
    "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": "<20220323160145.90606-2-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2022-03-23T16:01:42",
    "name": "[libcamera-devel,RFC,v2,1/4] ipa: RPi: Move the IPA to the ipa::RPi namespace",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "28d12f16e0cbfb8da32c092ea1f7c26d6a5b5707",
    "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/15526/mbox/",
    "series": [
        {
            "id": 2991,
            "url": "https://patchwork.libcamera.org/api/series/2991/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2991",
            "date": "2022-03-23T16:01:41",
            "name": "RPi: Introduce AF algorithm",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/2991/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15526/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15526/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 DD635C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Mar 2022 16:01:53 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F3794604DA;\n\tWed, 23 Mar 2022 17:01:51 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A4CA1604C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 23 Mar 2022 17:01:49 +0100 (CET)",
            "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:2e05:b10:1542:d51b])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4ECE2FFD;\n\tWed, 23 Mar 2022 17:01:49 +0100 (CET)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648051312;\n\tbh=V6qYh32XQyVl7EGZ3befZTMaSFGAdenVFNcYroDtjFU=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=NwZJJCRrrv2uXZB4w/+hs+V/2V2EQkdY5psPGNibP7CVMUav/awIlnaVql1p9PPQe\n\tfGUVoXWt5kQpEZQcgdvujcqZGkmj9TdMaePBGGkDjLQQniUn7G0nEEMzLPkXhK5zXG\n\txQ71NRtMgofYs0XVickRVbxd8NrD00sFS+xniH7xq9CMHh1v/ClFWmE3yjKCSnrhkv\n\tzFQLZy+hXUdy7w+m8k8qky2jqeby2rskThfCfo+ze2TUPiAMGcYBn4tNAp7rj3VEqU\n\tVF5WUkHikiU424i76o0P2V/Y7OfkT6e+BHg4sLjX9yRxnWQAB3Gcz6hXB/aUwmY7/O\n\tQ+Q+K5CppHOyQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648051309;\n\tbh=V6qYh32XQyVl7EGZ3befZTMaSFGAdenVFNcYroDtjFU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=bjnuxWBeO0ab1cbgU4Cn5VeivGf4E/udCkZadgiLMEfHlCfWs2KL2M3VXIn4XhlsU\n\tk+66aTM1MoGMFLY+wN1LOztPbE5AaT/ucWxTZqS0t4WFmpXt6x17yf69aKZ2jpMImV\n\t6wrEai7vSyc8F7LcOpfooYO03ZoA/P2HfZ63hw/g="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"bjnuxWBe\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 23 Mar 2022 17:01:42 +0100",
        "Message-Id": "<20220323160145.90606-2-jeanmichel.hautbois@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20220323160145.90606-1-jeanmichel.hautbois@ideasonboard.com>",
        "References": "<20220323160145.90606-1-jeanmichel.hautbois@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [RFC PATCH v2 1/4] ipa: RPi: Move the IPA to the\n\tipa::RPi namespace",
        "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>",
        "From": "Jean-Michel Hautbois via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Simplify name-spacing of the RPi components by placing it in the\nipa::RPi namespace directly. It also aligns the RPi IPA with the other\nones (ipa::ipu3 and ipa::rkisp1) which already have this applied.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n---\n src/ipa/raspberrypi/raspberrypi.cpp | 42 ++++++++++++++++-------------\n 1 file changed, 23 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 1bf4e270..cf4e6cab 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -74,7 +74,9 @@ constexpr Duration controllerMinFrameDuration = 1.0s / 30.0;\n \n LOG_DEFINE_CATEGORY(IPARPI)\n \n-class IPARPi : public ipa::RPi::IPARPiInterface\n+namespace ipa::RPi {\n+\n+class IPARPi : public IPARPiInterface\n {\n public:\n \tIPARPi()\n@@ -86,23 +88,23 @@ public:\n \t~IPARPi()\n \t{\n \t\tif (lsTable_)\n-\t\t\tmunmap(lsTable_, ipa::RPi::MaxLsGridSize);\n+\t\t\tmunmap(lsTable_, MaxLsGridSize);\n \t}\n \n-\tint init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConfig) override;\n-\tvoid start(const ControlList &controls, ipa::RPi::StartConfig *startConfig) override;\n+\tint init(const IPASettings &settings, SensorConfig *sensorConfig) override;\n+\tvoid start(const ControlList &controls, StartConfig *startConfig) override;\n \tvoid stop() override {}\n \n \tint configure(const IPACameraSensorInfo &sensorInfo,\n \t\t      const std::map<unsigned int, IPAStream> &streamConfig,\n \t\t      const std::map<unsigned int, ControlInfoMap> &entityControls,\n-\t\t      const ipa::RPi::IPAConfig &data,\n+\t\t      const IPAConfig &data,\n \t\t      ControlList *controls) override;\n \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n \tvoid signalStatReady(const uint32_t bufferId) override;\n \tvoid signalQueueRequest(const ControlList &controls) override;\n-\tvoid signalIspPrepare(const ipa::RPi::ISPConfig &data) override;\n+\tvoid signalIspPrepare(const ISPConfig &data) override;\n \n private:\n \tvoid setMode(const IPACameraSensorInfo &sensorInfo);\n@@ -110,7 +112,7 @@ private:\n \tbool validateIspControls();\n \tvoid queueRequest(const ControlList &controls);\n \tvoid returnEmbeddedBuffer(unsigned int bufferId);\n-\tvoid prepareISP(const ipa::RPi::ISPConfig &data);\n+\tvoid prepareISP(const ISPConfig &data);\n \tvoid reportMetadata();\n \tvoid fillDeviceStatus(const ControlList &sensorControls);\n \tvoid processStats(unsigned int bufferId);\n@@ -178,7 +180,7 @@ private:\n \tuint32_t maxSensorGainCode_;\n };\n \n-int IPARPi::init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConfig)\n+int IPARPi::init(const IPASettings &settings, SensorConfig *sensorConfig)\n {\n \t/*\n \t * Load the \"helper\" for this sensor. This tells us all the device specific stuff\n@@ -212,7 +214,7 @@ int IPARPi::init(const IPASettings &settings, ipa::RPi::SensorConfig *sensorConf\n \treturn 0;\n }\n \n-void IPARPi::start(const ControlList &controls, ipa::RPi::StartConfig *startConfig)\n+void IPARPi::start(const ControlList &controls, StartConfig *startConfig)\n {\n \tRPiController::Metadata metadata;\n \n@@ -339,7 +341,7 @@ void IPARPi::setMode(const IPACameraSensorInfo &sensorInfo)\n int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,\n \t\t      [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n \t\t      const std::map<unsigned int, ControlInfoMap> &entityControls,\n-\t\t      const ipa::RPi::IPAConfig &ipaConfig,\n+\t\t      const IPAConfig &ipaConfig,\n \t\t      ControlList *controls)\n {\n \tif (entityControls.size() != 2) {\n@@ -374,14 +376,14 @@ int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,\n \tif (ipaConfig.lsTableHandle.isValid()) {\n \t\t/* Remove any previous table, if there was one. */\n \t\tif (lsTable_) {\n-\t\t\tmunmap(lsTable_, ipa::RPi::MaxLsGridSize);\n+\t\t\tmunmap(lsTable_, MaxLsGridSize);\n \t\t\tlsTable_ = nullptr;\n \t\t}\n \n \t\t/* Map the LS table buffer into user space. */\n \t\tlsTableHandle_ = std::move(ipaConfig.lsTableHandle);\n \t\tif (lsTableHandle_.isValid()) {\n-\t\t\tlsTable_ = mmap(nullptr, ipa::RPi::MaxLsGridSize, PROT_READ | PROT_WRITE,\n+\t\t\tlsTable_ = mmap(nullptr, MaxLsGridSize, PROT_READ | PROT_WRITE,\n \t\t\t\t\tMAP_SHARED, lsTableHandle_.get(), 0);\n \n \t\t\tif (lsTable_ == MAP_FAILED) {\n@@ -446,7 +448,7 @@ void IPARPi::signalStatReady(uint32_t bufferId)\n \n \treportMetadata();\n \n-\tstatsMetadataComplete.emit(bufferId & ipa::RPi::MaskID, libcameraMetadata_);\n+\tstatsMetadataComplete.emit(bufferId & MaskID, libcameraMetadata_);\n }\n \n void IPARPi::signalQueueRequest(const ControlList &controls)\n@@ -454,7 +456,7 @@ void IPARPi::signalQueueRequest(const ControlList &controls)\n \tqueueRequest(controls);\n }\n \n-void IPARPi::signalIspPrepare(const ipa::RPi::ISPConfig &data)\n+void IPARPi::signalIspPrepare(const ISPConfig &data)\n {\n \t/*\n \t * At start-up, or after a mode-switch, we may want to\n@@ -465,7 +467,7 @@ void IPARPi::signalIspPrepare(const ipa::RPi::ISPConfig &data)\n \tframeCount_++;\n \n \t/* Ready to push the input buffer into the ISP. */\n-\trunIsp.emit(data.bayerBufferId & ipa::RPi::MaskID);\n+\trunIsp.emit(data.bayerBufferId & MaskID);\n }\n \n void IPARPi::reportMetadata()\n@@ -927,10 +929,10 @@ void IPARPi::queueRequest(const ControlList &controls)\n \n void IPARPi::returnEmbeddedBuffer(unsigned int bufferId)\n {\n-\tembeddedComplete.emit(bufferId & ipa::RPi::MaskID);\n+\tembeddedComplete.emit(bufferId & MaskID);\n }\n \n-void IPARPi::prepareISP(const ipa::RPi::ISPConfig &data)\n+void IPARPi::prepareISP(const ISPConfig &data)\n {\n \tint64_t frameTimestamp = data.controls.get(controls::SensorTimestamp);\n \tRPiController::Metadata lastMetadata;\n@@ -1316,7 +1318,7 @@ void IPARPi::applyLS(const struct AlscStatus *lsStatus, ControlList &ctrls)\n \t\t.gain_format = GAIN_FORMAT_U4P10\n \t};\n \n-\tif (!lsTable_ || w * h * 4 * sizeof(uint16_t) > ipa::RPi::MaxLsGridSize) {\n+\tif (!lsTable_ || w * h * 4 * sizeof(uint16_t) > MaxLsGridSize) {\n \t\tLOG(IPARPI, Error) << \"Do not have a correctly allocate lens shading table!\";\n \t\treturn;\n \t}\n@@ -1376,6 +1378,8 @@ void IPARPi::resampleTable(uint16_t dest[], double const src[12][16],\n \t}\n }\n \n+} /* namespace ipa::RPi */\n+\n /*\n  * External IPA module interface\n  */\n@@ -1389,7 +1393,7 @@ const struct IPAModuleInfo ipaModuleInfo = {\n \n IPAInterface *ipaCreate()\n {\n-\treturn new IPARPi();\n+\treturn new ipa::RPi::IPARPi();\n }\n \n } /* extern \"C\" */\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "v2",
        "1/4"
    ]
}