Show a patch.

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

{
    "id": 1903,
    "url": "https://patchwork.libcamera.org/api/patches/1903/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1903/",
    "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": "<20190831210220.29819-2-niklas.soderlund@ragnatech.se>",
    "date": "2019-08-31T21:02:15",
    "name": "[libcamera-devel,1/6] libcamera: request: Add IPAMetaData",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e5110f90d270d127bc66f8846f386a818e4a943e",
    "submitter": {
        "id": 5,
        "url": "https://patchwork.libcamera.org/api/people/5/?format=api",
        "name": "Niklas Söderlund",
        "email": "niklas.soderlund@ragnatech.se"
    },
    "delegate": {
        "id": 16,
        "url": "https://patchwork.libcamera.org/api/users/16/?format=api",
        "username": "neg",
        "first_name": "Niklas",
        "last_name": "Söderlund",
        "email": "niklas.soderlund@ragnatech.se"
    },
    "mbox": "https://patchwork.libcamera.org/patch/1903/mbox/",
    "series": [
        {
            "id": 476,
            "url": "https://patchwork.libcamera.org/api/series/476/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=476",
            "date": "2019-08-31T21:02:14",
            "name": "libcamera: ipa: Add IPA meta data",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/476/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1903/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1903/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 9E30460C18\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 31 Aug 2019 23:02:59 +0200 (CEST)",
            "from bismarck.berto.se (unknown [84.172.84.18])\n\tby bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA\n\tid b4de6b9b-cc32-11e9-903a-005056917f90;\n\tSat, 31 Aug 2019 23:02:57 +0200 (CEST)"
        ],
        "X-Halon-ID": "b4de6b9b-cc32-11e9-903a-005056917f90",
        "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": "Sat, 31 Aug 2019 23:02:15 +0200",
        "Message-Id": "<20190831210220.29819-2-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.22.1",
        "In-Reply-To": "<20190831210220.29819-1-niklas.soderlund@ragnatech.se>",
        "References": "<20190831210220.29819-1-niklas.soderlund@ragnatech.se>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/6] libcamera: request: Add IPAMetaData",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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": "Sat, 31 Aug 2019 21:03:00 -0000"
    },
    "content": "Add a new structure to hold meta data coming out of the IPA. The\nstructure will grow over time but for now only add information about the\nauto exposure state as it can be directly used by the rkisp1 IPA, which\nis capable of controlling exposure.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n include/libcamera/request.h | 13 +++++++++++\n src/libcamera/request.cpp   | 44 +++++++++++++++++++++++++++++++++++--\n 2 files changed, 55 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/include/libcamera/request.h b/include/libcamera/request.h\nindex f5de5257bba3f2bb..6f75a59fb69a43d7 100644\n--- a/include/libcamera/request.h\n+++ b/include/libcamera/request.h\n@@ -21,6 +21,17 @@ class Buffer;\n class Camera;\n class Stream;\n \n+enum AeState {\n+\tInactive,\n+\tSearching,\n+\tConverged,\n+};\n+\n+struct IPAMetaData {\n+\tAeState aeState;\n+\tbool ready;\n+};\n+\n class RequestData\n {\n };\n@@ -44,6 +55,7 @@ public:\n \tconst std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; }\n \tint addBuffer(std::unique_ptr<Buffer> buffer);\n \tBuffer *findBuffer(Stream *stream) const;\n+\tconst IPAMetaData &metaData() const { return metaData_; };\n \n \tuint64_t cookie() const { return cookie_; }\n \tStatus status() const { return status_; }\n@@ -65,6 +77,7 @@ private:\n \tControlList controls_;\n \tstd::map<Stream *, Buffer *> bufferMap_;\n \tstd::unordered_set<Buffer *> pending_;\n+\tIPAMetaData metaData_;\n \n \tconst uint64_t cookie_;\n \tStatus status_;\ndiff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\nindex bdb4f908fb664ccf..f40cf5cac1f029a9 100644\n--- a/src/libcamera/request.cpp\n+++ b/src/libcamera/request.cpp\n@@ -24,6 +24,40 @@ namespace libcamera {\n \n LOG_DEFINE_CATEGORY(Request)\n \n+/**\n+ * \\enum AeState\n+ * State of Auto Exposure algorithm\n+ * \\var AeState::Inactive\n+ * AE not running\n+ * \\var AeState::Searching\n+ * AE is not converged to a good value and is adjusting exposure parameters.\n+ * \\var AeState::Converged\n+ * AE has found good exposure values for the current scene.\n+ */\n+\n+/**\n+ * \\struct IPAMetaData\n+ * \\brief Meta data describing the state of the IPA\n+ *\n+ * Container for IPA meta data. The intended creator of this object is an IPA\n+ * and the intended consumer is applications. Applications access the object\n+ * thru the Request object that corresponds to the specific capture event\n+ * that generated the meta data.\n+ */\n+\n+/**\n+ * \\var IPAMetaData::aeState\n+ * \\brief Holds the state of the Auto Exposure algorithm\n+ */\n+\n+/**\n+ * \\var IPAMetaData::ready\n+ * \\brief Flag to indicate the pipeline have validated the meta data\n+ *\n+ * The meta data should not be returned to the application by the specific\n+ * pipeline handler implementation before this flag is set to true.\n+ */\n+\n /**\n  * \\enum Request::Status\n  * Request completion status\n@@ -55,8 +89,8 @@ LOG_DEFINE_CATEGORY(Request)\n  *\n  */\n Request::Request(Camera *camera, uint64_t cookie)\n-\t: data(nullptr), camera_(camera), controls_(camera), cookie_(cookie),\n-\t  status_(RequestPending), cancelled_(false)\n+\t: data(nullptr), camera_(camera), controls_(camera), metaData_({}),\n+\t  cookie_(cookie), status_(RequestPending), cancelled_(false)\n {\n }\n \n@@ -156,6 +190,12 @@ Buffer *Request::findBuffer(Stream *stream) const\n \treturn it->second;\n }\n \n+/**\n+ * \\fn Request::metaData()\n+ * \\brief Retrieve the request's meta data\n+ * \\return The meta data associated with the request\n+ */\n+\n /**\n  * \\fn Request::cookie()\n  * \\brief Retrieve the cookie set when the request was created\n",
    "prefixes": [
        "libcamera-devel",
        "1/6"
    ]
}