Show a patch.

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

{
    "id": 10574,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/10574/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10574/",
    "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": "<20201205103106.242080-12-paul.elder@ideasonboard.com>",
    "date": "2020-12-05T10:30:54",
    "name": "[libcamera-devel,v5,11/23] libcamera: IPAInterface: Replace C API with the new C++-only API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "393ba5c06369a03d7e44c412f25c3ceda8bd3823",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/users/17/?format=api",
        "username": "epaul",
        "first_name": "Paul",
        "last_name": "Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/10574/mbox/",
    "series": [
        {
            "id": 1506,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1506/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1506",
            "date": "2020-12-05T10:30:43",
            "name": "IPA isolation implementation",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/1506/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10574/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10574/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 56E51BDB20\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  5 Dec 2020 10:31:43 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 24630635FE;\n\tSat,  5 Dec 2020 11:31:43 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4BD91635F2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  5 Dec 2020 11:31:41 +0100 (CET)",
            "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 546712A4;\n\tSat,  5 Dec 2020 11:31:38 +0100 (CET)"
        ],
        "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=\"cqYj4k4R\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1607164301;\n\tbh=+qhtveCJo7tYqPRF3N4sKW3prAjAAnSw9Ccl6jB6210=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=cqYj4k4RNeUbBFeoD/ACDXYMVJ35BQeNbwAVluuEZthFT3On/nq4Q/htRBzye6HJw\n\taMZeHN9pnncjGglkXlt5h/ij5q3cHncPqGJzKxsWOnqjZbeUQ3t2b+suZc617Z9XMA\n\tSPexQzMqbmbu5GqtXMfzxLmepi2UIH5SdIO+17YI=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat,  5 Dec 2020 19:30:54 +0900",
        "Message-Id": "<20201205103106.242080-12-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20201205103106.242080-1-paul.elder@ideasonboard.com>",
        "References": "<20201205103106.242080-1-paul.elder@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v5 11/23] libcamera: IPAInterface: Replace\n\tC API with the new C++-only API",
        "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>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Remove everything related to the C API, including ipa_context,\nipa_context_wrapper, and IPAInterfaceWrapper. Also remove relevant\ndocumentation.\n\nipaCreate() provided by IPA implementations, and createInterface()\nprovided by IPAModule (wrapper around IPA implementation) both now\nreturn a C++ object IPAInterface instead of struct ipa_context.\n\nAlthough IPAInterfaceWrapper is the only component of libipa, the\nskeleton and build files for libipa are retained.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\n---\n\nSquashed in v5\n- change some words, remove some outdated points\n- don't remove libipa, only remove IPAInterfaceWrapper\n  - as a result, libipa is now empty\n- update IPAInterface documentation\n  - add todo on how to generate documentation for the new IPAInterface\n    implementations\n\nNo change in v4\n\nNo change in v3\n\nChanges in v2:\n- add documentation for IPAModule::createInterface()\n\n---\n\nThis is a combination of 6 commits:\n\n---\n\nlibcamera: IPAModule: Replace ipa_context with IPAInterface\n\nWith the new IPC infrastructure, we no longer need the C interface as\nprovided by struct ipa_context. Make ipaCreate_() and createInterface()\nreturn IPAInterface.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\n\nlibcamera: ipa_context_wrapper: Remove ipa_context_wrapper\n\nSince ipa_context has been replaced with custom IPAInterfaces, it is not\nlonger needed. Remove it.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\n\nlibcamera: IPAInterface: remove ipa_context and functions from documentation\n\nRemove all the documentation related to ipa_context and the C IPA API,\nas well as the documentation about the functions in the IPAInterface.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\n---\n\nlibcamera: IPAInterface: Remove all functions from IPAInterface\n\nNow that all the functions in the IPA interface are defined in the data\ndefinition file and a specialized IPAInterface is generated per pipeline\nhandler, remove all the functions from the base IPAInterface.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\n\nlibcamera: IPAInterface: make ipaCreate return IPAInterface\n\nWith the new IPC infrastructure, we no longer need the C interface as\nprovided by struct ipa_context. Make ipaCreate return IPAinterface.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\n---\n\nipa: remove IPAInterfaceWrapper\n\nAs every pipeline has its own proxy, IPAInterfaceWrapper is no\nlonger necessary. Remove it.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nAcked-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nUsed to be \"ipa: remove libipa\"\n---\n .../libcamera/internal/ipa_context_wrapper.h  |  52 --\n include/libcamera/internal/ipa_module.h       |   4 +-\n include/libcamera/internal/meson.build        |   1 -\n include/libcamera/ipa/ipa_interface.h         | 126 +----\n src/ipa/libipa/ipa_interface_wrapper.cpp      | 285 ----------\n src/ipa/libipa/ipa_interface_wrapper.h        |  61 --\n src/ipa/libipa/meson.build                    |   2 -\n src/ipa/raspberrypi/raspberrypi.cpp           |   2 -\n src/ipa/rkisp1/rkisp1.cpp                     |   2 -\n src/ipa/vimc/vimc.cpp                         |   2 -\n src/libcamera/ipa_context_wrapper.cpp         | 297 ----------\n src/libcamera/ipa_interface.cpp               | 534 ++----------------\n src/libcamera/ipa_module.cpp                  |  18 +-\n src/libcamera/meson.build                     |   1 -\n 14 files changed, 56 insertions(+), 1331 deletions(-)\n delete mode 100644 include/libcamera/internal/ipa_context_wrapper.h\n delete mode 100644 src/ipa/libipa/ipa_interface_wrapper.cpp\n delete mode 100644 src/ipa/libipa/ipa_interface_wrapper.h\n delete mode 100644 src/libcamera/ipa_context_wrapper.cpp",
    "diff": "diff --git a/include/libcamera/internal/ipa_context_wrapper.h b/include/libcamera/internal/ipa_context_wrapper.h\ndeleted file mode 100644\nindex 8f767e84..00000000\n--- a/include/libcamera/internal/ipa_context_wrapper.h\n+++ /dev/null\n@@ -1,52 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1-or-later */\n-/*\n- * Copyright (C) 2019, Google Inc.\n- *\n- * ipa_context_wrapper.h - Image Processing Algorithm context wrapper\n- */\n-#ifndef __LIBCAMERA_INTERNAL_IPA_CONTEXT_WRAPPER_H__\n-#define __LIBCAMERA_INTERNAL_IPA_CONTEXT_WRAPPER_H__\n-\n-#include <libcamera/ipa/ipa_interface.h>\n-\n-#include \"libcamera/internal/control_serializer.h\"\n-\n-namespace libcamera {\n-\n-class IPAContextWrapper final : public IPAInterface\n-{\n-public:\n-\tIPAContextWrapper(struct ipa_context *context);\n-\t~IPAContextWrapper();\n-\n-\tint init(const IPASettings &settings) override;\n-\tint start() override;\n-\tvoid stop() override;\n-\tvoid configure(const CameraSensorInfo &sensorInfo,\n-\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t       const IPAOperationData &ipaConfig,\n-\t\t       IPAOperationData *result) override;\n-\n-\tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n-\tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n-\n-\tvirtual void processEvent(const IPAOperationData &data) override;\n-\n-private:\n-\tstatic void queue_frame_action(void *ctx, unsigned int frame,\n-\t\t\t\t       struct ipa_operation_data &data);\n-\tstatic const struct ipa_callback_ops callbacks_;\n-\n-\tvoid doQueueFrameAction(unsigned int frame,\n-\t\t\t\tconst IPAOperationData &data);\n-\n-\tstruct ipa_context *ctx_;\n-\tIPAInterface *intf_;\n-\n-\tControlSerializer serializer_;\n-};\n-\n-} /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_IPA_CONTEXT_WRAPPER_H__ */\ndiff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h\nindex c2df2476..19fc5827 100644\n--- a/include/libcamera/internal/ipa_module.h\n+++ b/include/libcamera/internal/ipa_module.h\n@@ -33,7 +33,7 @@ public:\n \n \tbool load();\n \n-\tstruct ipa_context *createContext();\n+\tIPAInterface *createInterface();\n \n \tbool match(PipelineHandler *pipe,\n \t\t   uint32_t minVersion, uint32_t maxVersion) const;\n@@ -52,7 +52,7 @@ private:\n \tbool loaded_;\n \n \tvoid *dlHandle_;\n-\ttypedef struct ipa_context *(*IPAIntfFactory)();\n+\ttypedef IPAInterface *(*IPAIntfFactory)(void);\n \tIPAIntfFactory ipaCreate_;\n };\n \ndiff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\nindex 7cde023f..2c172ab3 100644\n--- a/include/libcamera/internal/meson.build\n+++ b/include/libcamera/internal/meson.build\n@@ -23,7 +23,6 @@ libcamera_internal_headers = files([\n     'event_notifier.h',\n     'file.h',\n     'formats.h',\n-    'ipa_context_wrapper.h',\n     'ipa_manager.h',\n     'ipa_module.h',\n     'ipa_proxy.h',\ndiff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h\nindex 322b7079..f6c40dc6 100644\n--- a/include/libcamera/ipa/ipa_interface.h\n+++ b/include/libcamera/ipa/ipa_interface.h\n@@ -10,111 +10,6 @@\n #include <stddef.h>\n #include <stdint.h>\n \n-#ifdef __cplusplus\n-extern \"C\" {\n-#endif\n-\n-struct ipa_context {\n-\tconst struct ipa_context_ops *ops;\n-};\n-\n-struct ipa_settings {\n-\tconst char *configuration_file;\n-};\n-\n-struct ipa_sensor_info {\n-\tconst char *model;\n-\tuint8_t bits_per_pixel;\n-\tstruct {\n-\t\tuint32_t width;\n-\t\tuint32_t height;\n-\t} active_area;\n-\tstruct {\n-\t\tint32_t left;\n-\t\tint32_t top;\n-\t\tuint32_t width;\n-\t\tuint32_t height;\n-\t} analog_crop;\n-\tstruct {\n-\t\tuint32_t width;\n-\t\tuint32_t height;\n-\t} output_size;\n-\tuint64_t pixel_rate;\n-\tuint32_t line_length;\n-};\n-\n-struct ipa_stream {\n-\tunsigned int id;\n-\tunsigned int pixel_format;\n-\tunsigned int width;\n-\tunsigned int height;\n-};\n-\n-struct ipa_control_info_map {\n-\tunsigned int id;\n-\tconst uint8_t *data;\n-\tsize_t size;\n-};\n-\n-struct ipa_buffer_plane {\n-\tint dmabuf;\n-\tsize_t length;\n-};\n-\n-struct ipa_buffer {\n-\tunsigned int id;\n-\tunsigned int num_planes;\n-\tstruct ipa_buffer_plane planes[3];\n-};\n-\n-struct ipa_control_list {\n-\tconst uint8_t *data;\n-\tunsigned int size;\n-};\n-\n-struct ipa_operation_data {\n-\tunsigned int operation;\n-\tconst uint32_t *data;\n-\tunsigned int num_data;\n-\tconst struct ipa_control_list *lists;\n-\tunsigned int num_lists;\n-};\n-\n-struct ipa_callback_ops {\n-\tvoid (*queue_frame_action)(void *cb_ctx, unsigned int frame,\n-\t\t\t\t   struct ipa_operation_data &data);\n-};\n-\n-struct ipa_context_ops {\n-\tvoid (*destroy)(struct ipa_context *ctx);\n-\tvoid *(*get_interface)(struct ipa_context *ctx);\n-\tvoid (*init)(struct ipa_context *ctx,\n-\t\t     const struct ipa_settings *settings);\n-\tint (*start)(struct ipa_context *ctx);\n-\tvoid (*stop)(struct ipa_context *ctx);\n-\tvoid (*register_callbacks)(struct ipa_context *ctx,\n-\t\t\t\t   const struct ipa_callback_ops *callbacks,\n-\t\t\t\t   void *cb_ctx);\n-\tvoid (*configure)(struct ipa_context *ctx,\n-\t\t\t  const struct ipa_sensor_info *sensor_info,\n-\t\t\t  const struct ipa_stream *streams,\n-\t\t\t  unsigned int num_streams,\n-\t\t\t  const struct ipa_control_info_map *maps,\n-\t\t\t  unsigned int num_maps);\n-\tvoid (*map_buffers)(struct ipa_context *ctx,\n-\t\t\t    const struct ipa_buffer *buffers,\n-\t\t\t    size_t num_buffers);\n-\tvoid (*unmap_buffers)(struct ipa_context *ctx, const unsigned int *ids,\n-\t\t\t      size_t num_buffers);\n-\tvoid (*process_event)(struct ipa_context *ctx,\n-\t\t\t      const struct ipa_operation_data *data);\n-};\n-\n-struct ipa_context *ipaCreate();\n-\n-#ifdef __cplusplus\n-}\n-\n #include <map>\n #include <vector>\n \n@@ -151,25 +46,12 @@ class IPAInterface\n {\n public:\n \tvirtual ~IPAInterface() = default;\n-\n-\tvirtual int init(const IPASettings &settings) = 0;\n-\tvirtual int start() = 0;\n-\tvirtual void stop() = 0;\n-\n-\tvirtual void configure(const CameraSensorInfo &sensorInfo,\n-\t\t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t\t       const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t\t       const IPAOperationData &ipaConfig,\n-\t\t\t       IPAOperationData *result) = 0;\n-\n-\tvirtual void mapBuffers(const std::vector<IPABuffer> &buffers) = 0;\n-\tvirtual void unmapBuffers(const std::vector<unsigned int> &ids) = 0;\n-\n-\tvirtual void processEvent(const IPAOperationData &data) = 0;\n-\tSignal<unsigned int, const IPAOperationData &> queueFrameAction;\n };\n \n } /* namespace libcamera */\n-#endif\n+\n+extern \"C\" {\n+libcamera::IPAInterface *ipaCreate();\n+}\n \n #endif /* __LIBCAMERA_IPA_INTERFACE_H__ */\ndiff --git a/src/ipa/libipa/ipa_interface_wrapper.cpp b/src/ipa/libipa/ipa_interface_wrapper.cpp\ndeleted file mode 100644\nindex cee532e3..00000000\n--- a/src/ipa/libipa/ipa_interface_wrapper.cpp\n+++ /dev/null\n@@ -1,285 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1-or-later */\n-/*\n- * Copyright (C) 2019, Google Inc.\n- *\n- * ipa_interface_wrapper.cpp - Image Processing Algorithm interface wrapper\n- */\n-\n-#include \"ipa_interface_wrapper.h\"\n-\n-#include <map>\n-#include <string.h>\n-#include <unistd.h>\n-#include <vector>\n-\n-#include <libcamera/ipa/ipa_interface.h>\n-\n-#include \"libcamera/internal/byte_stream_buffer.h\"\n-#include \"libcamera/internal/camera_sensor.h\"\n-\n-/**\n- * \\file ipa_interface_wrapper.h\n- * \\brief Image Processing Algorithm interface wrapper\n- */\n-\n-namespace libcamera {\n-\n-/**\n- * \\class IPAInterfaceWrapper\n- * \\brief Wrap an IPAInterface and expose it as an ipa_context\n- *\n- * This class implements the ipa_context API based on a provided IPAInterface.\n- * It helps IPAs that implement the IPAInterface API to provide the external\n- * ipa_context API.\n- *\n- * To use the wrapper, an IPA module simple creates a new instance of its\n- * IPAInterface implementation, and passes it to the constructor of the\n- * IPAInterfaceWrapper. As IPAInterfaceWrapper inherits from ipa_context, the\n- * constructed wrapper can then be directly returned from the IPA module's\n- * ipaCreate() function.\n- *\n- * \\code{.cpp}\n- * class MyIPA : public IPAInterface\n- * {\n- * \t...\n- * };\n- *\n- * struct ipa_context *ipaCreate()\n- * {\n- * \treturn new IPAInterfaceWrapper(std::make_unique<MyIPA>());\n- * }\n- * \\endcode\n- *\n- * The wrapper takes ownership of the IPAInterface and will automatically\n- * delete it when the wrapper is destroyed.\n- */\n-\n-/**\n- * \\brief Construct an IPAInterfaceWrapper wrapping \\a interface\n- * \\param[in] interface The interface to wrap\n- */\n-IPAInterfaceWrapper::IPAInterfaceWrapper(std::unique_ptr<IPAInterface> interface)\n-\t: ipa_(std::move(interface)), callbacks_(nullptr), cb_ctx_(nullptr)\n-{\n-\tops = &operations_;\n-\n-\tipa_->queueFrameAction.connect(this, &IPAInterfaceWrapper::queueFrameAction);\n-}\n-\n-void IPAInterfaceWrapper::destroy(struct ipa_context *_ctx)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\n-\tdelete ctx;\n-}\n-\n-void *IPAInterfaceWrapper::get_interface(struct ipa_context *_ctx)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\n-\treturn ctx->ipa_.get();\n-}\n-\n-void IPAInterfaceWrapper::init(struct ipa_context *_ctx,\n-\t\t\t       const struct ipa_settings *settings)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\n-\tIPASettings ipaSettings{\n-\t\t.configurationFile = settings->configuration_file\n-\t};\n-\tctx->ipa_->init(ipaSettings);\n-}\n-\n-int IPAInterfaceWrapper::start(struct ipa_context *_ctx)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\n-\treturn ctx->ipa_->start();\n-}\n-\n-void IPAInterfaceWrapper::stop(struct ipa_context *_ctx)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\n-\tctx->ipa_->stop();\n-}\n-\n-void IPAInterfaceWrapper::register_callbacks(struct ipa_context *_ctx,\n-\t\t\t\t\t     const struct ipa_callback_ops *callbacks,\n-\t\t\t\t\t     void *cb_ctx)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\n-\tctx->callbacks_ = callbacks;\n-\tctx->cb_ctx_ = cb_ctx;\n-}\n-\n-void IPAInterfaceWrapper::configure(struct ipa_context *_ctx,\n-\t\t\t\t    const struct ipa_sensor_info *sensor_info,\n-\t\t\t\t    const struct ipa_stream *streams,\n-\t\t\t\t    unsigned int num_streams,\n-\t\t\t\t    const struct ipa_control_info_map *maps,\n-\t\t\t\t    unsigned int num_maps)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\n-\tctx->serializer_.reset();\n-\n-\t/* Translate the IPA sensor info. */\n-\tCameraSensorInfo sensorInfo{};\n-\tsensorInfo.model = sensor_info->model;\n-\tsensorInfo.bitsPerPixel = sensor_info->bits_per_pixel;\n-\tsensorInfo.activeAreaSize = { sensor_info->active_area.width,\n-\t\t\t\t      sensor_info->active_area.height };\n-\tsensorInfo.analogCrop = { sensor_info->analog_crop.left,\n-\t\t\t\t  sensor_info->analog_crop.top,\n-\t\t\t\t  sensor_info->analog_crop.width,\n-\t\t\t\t  sensor_info->analog_crop.height };\n-\tsensorInfo.outputSize = { sensor_info->output_size.width,\n-\t\t\t\t  sensor_info->output_size.height };\n-\tsensorInfo.pixelRate = sensor_info->pixel_rate;\n-\tsensorInfo.lineLength = sensor_info->line_length;\n-\n-\t/* Translate the IPA stream configurations map. */\n-\tstd::map<unsigned int, IPAStream> ipaStreams;\n-\n-\tfor (unsigned int i = 0; i < num_streams; ++i) {\n-\t\tconst struct ipa_stream &stream = streams[i];\n-\n-\t\tipaStreams[stream.id] = {\n-\t\t\tstream.pixel_format,\n-\t\t\tSize(stream.width, stream.height),\n-\t\t};\n-\t}\n-\n-\t/* Translate the IPA entity controls map. */\n-\tstd::map<unsigned int, const ControlInfoMap &> entityControls;\n-\tstd::map<unsigned int, ControlInfoMap> infoMaps;\n-\n-\tfor (unsigned int i = 0; i < num_maps; ++i) {\n-\t\tconst struct ipa_control_info_map &ipa_map = maps[i];\n-\t\tByteStreamBuffer byteStream(ipa_map.data, ipa_map.size);\n-\t\tunsigned int id = ipa_map.id;\n-\n-\t\tinfoMaps[id] = ctx->serializer_.deserialize<ControlInfoMap>(byteStream);\n-\t\tentityControls.emplace(id, infoMaps[id]);\n-\t}\n-\n-\t/* \\todo Translate the ipaConfig and result. */\n-\tIPAOperationData ipaConfig;\n-\tctx->ipa_->configure(sensorInfo, ipaStreams, entityControls, ipaConfig,\n-\t\t\t     nullptr);\n-}\n-\n-void IPAInterfaceWrapper::map_buffers(struct ipa_context *_ctx,\n-\t\t\t\t      const struct ipa_buffer *_buffers,\n-\t\t\t\t      size_t num_buffers)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\tstd::vector<IPABuffer> buffers(num_buffers);\n-\n-\tfor (unsigned int i = 0; i < num_buffers; ++i) {\n-\t\tconst struct ipa_buffer &_buffer = _buffers[i];\n-\t\tIPABuffer &buffer = buffers[i];\n-\t\tstd::vector<FrameBuffer::Plane> &planes = buffer.planes;\n-\n-\t\tbuffer.id = _buffer.id;\n-\n-\t\tplanes.resize(_buffer.num_planes);\n-\t\tfor (unsigned int j = 0; j < _buffer.num_planes; ++j) {\n-\t\t\tplanes[j].fd = FileDescriptor(_buffer.planes[j].dmabuf);\n-\t\t\tplanes[j].length = _buffer.planes[j].length;\n-\t\t}\n-\t}\n-\n-\tctx->ipa_->mapBuffers(buffers);\n-}\n-\n-void IPAInterfaceWrapper::unmap_buffers(struct ipa_context *_ctx,\n-\t\t\t\t\tconst unsigned int *_ids,\n-\t\t\t\t\tsize_t num_buffers)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\tstd::vector<unsigned int> ids(_ids, _ids + num_buffers);\n-\tctx->ipa_->unmapBuffers(ids);\n-}\n-\n-void IPAInterfaceWrapper::process_event(struct ipa_context *_ctx,\n-\t\t\t\t\tconst struct ipa_operation_data *data)\n-{\n-\tIPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);\n-\tIPAOperationData opData;\n-\n-\topData.operation = data->operation;\n-\n-\topData.data.resize(data->num_data);\n-\tmemcpy(opData.data.data(), data->data,\n-\t       data->num_data * sizeof(*data->data));\n-\n-\topData.controls.resize(data->num_lists);\n-\tfor (unsigned int i = 0; i < data->num_lists; ++i) {\n-\t\tconst struct ipa_control_list *c_list = &data->lists[i];\n-\t\tByteStreamBuffer byteStream(c_list->data, c_list->size);\n-\t\topData.controls[i] = ctx->serializer_.deserialize<ControlList>(byteStream);\n-\t}\n-\n-\tctx->ipa_->processEvent(opData);\n-}\n-\n-void IPAInterfaceWrapper::queueFrameAction(unsigned int frame,\n-\t\t\t\t\t   const IPAOperationData &data)\n-{\n-\tif (!callbacks_)\n-\t\treturn;\n-\n-\tstruct ipa_operation_data c_data;\n-\tc_data.operation = data.operation;\n-\tc_data.data = data.data.data();\n-\tc_data.num_data = data.data.size();\n-\n-\tstruct ipa_control_list control_lists[data.controls.size()];\n-\tc_data.lists = control_lists;\n-\tc_data.num_lists = data.controls.size();\n-\n-\tstd::size_t listsSize = 0;\n-\tfor (const auto &list : data.controls)\n-\t\tlistsSize += serializer_.binarySize(list);\n-\n-\tstd::vector<uint8_t> binaryData(listsSize);\n-\tByteStreamBuffer byteStreamBuffer(binaryData.data(), listsSize);\n-\n-\tunsigned int i = 0;\n-\tfor (const auto &list : data.controls) {\n-\t\tstruct ipa_control_list &c_list = control_lists[i];\n-\t\tc_list.size = serializer_.binarySize(list);\n-\n-\t\tByteStreamBuffer b = byteStreamBuffer.carveOut(c_list.size);\n-\t\tserializer_.serialize(list, b);\n-\n-\t\tc_list.data = b.base();\n-\t}\n-\n-\tcallbacks_->queue_frame_action(cb_ctx_, frame, c_data);\n-}\n-\n-#ifndef __DOXYGEN__\n-/*\n- * This construct confuses Doygen and makes it believe that all members of the\n- * operations is a member of IPAInterfaceWrapper. It must thus be hidden.\n- */\n-const struct ipa_context_ops IPAInterfaceWrapper::operations_ = {\n-\t.destroy = &IPAInterfaceWrapper::destroy,\n-\t.get_interface = &IPAInterfaceWrapper::get_interface,\n-\t.init = &IPAInterfaceWrapper::init,\n-\t.start = &IPAInterfaceWrapper::start,\n-\t.stop = &IPAInterfaceWrapper::stop,\n-\t.register_callbacks = &IPAInterfaceWrapper::register_callbacks,\n-\t.configure = &IPAInterfaceWrapper::configure,\n-\t.map_buffers = &IPAInterfaceWrapper::map_buffers,\n-\t.unmap_buffers = &IPAInterfaceWrapper::unmap_buffers,\n-\t.process_event = &IPAInterfaceWrapper::process_event,\n-};\n-#endif\n-\n-} /* namespace libcamera */\ndiff --git a/src/ipa/libipa/ipa_interface_wrapper.h b/src/ipa/libipa/ipa_interface_wrapper.h\ndeleted file mode 100644\nindex a1c70159..00000000\n--- a/src/ipa/libipa/ipa_interface_wrapper.h\n+++ /dev/null\n@@ -1,61 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1-or-later */\n-/*\n- * Copyright (C) 2019, Google Inc.\n- *\n- * ipa_interface_wrapper.h - Image Processing Algorithm interface wrapper\n- */\n-#ifndef __LIBCAMERA_IPA_INTERFACE_WRAPPER_H__\n-#define __LIBCAMERA_IPA_INTERFACE_WRAPPER_H__\n-\n-#include <memory>\n-\n-#include <libcamera/ipa/ipa_interface.h>\n-\n-#include \"libcamera/internal/control_serializer.h\"\n-\n-namespace libcamera {\n-\n-class IPAInterfaceWrapper : public ipa_context\n-{\n-public:\n-\tIPAInterfaceWrapper(std::unique_ptr<IPAInterface> interface);\n-\n-private:\n-\tstatic void destroy(struct ipa_context *ctx);\n-\tstatic void *get_interface(struct ipa_context *ctx);\n-\tstatic void init(struct ipa_context *ctx,\n-\t\t\t const struct ipa_settings *settings);\n-\tstatic int start(struct ipa_context *ctx);\n-\tstatic void stop(struct ipa_context *ctx);\n-\tstatic void register_callbacks(struct ipa_context *ctx,\n-\t\t\t\t       const struct ipa_callback_ops *callbacks,\n-\t\t\t\t       void *cb_ctx);\n-\tstatic void configure(struct ipa_context *ctx,\n-\t\t\t      const struct ipa_sensor_info *sensor_info,\n-\t\t\t      const struct ipa_stream *streams,\n-\t\t\t      unsigned int num_streams,\n-\t\t\t      const struct ipa_control_info_map *maps,\n-\t\t\t      unsigned int num_maps);\n-\tstatic void map_buffers(struct ipa_context *ctx,\n-\t\t\t\tconst struct ipa_buffer *c_buffers,\n-\t\t\t\tsize_t num_buffers);\n-\tstatic void unmap_buffers(struct ipa_context *ctx,\n-\t\t\t\t  const unsigned int *ids,\n-\t\t\t\t  size_t num_buffers);\n-\tstatic void process_event(struct ipa_context *ctx,\n-\t\t\t\t  const struct ipa_operation_data *data);\n-\n-\tstatic const struct ipa_context_ops operations_;\n-\n-\tvoid queueFrameAction(unsigned int frame, const IPAOperationData &data);\n-\n-\tstd::unique_ptr<IPAInterface> ipa_;\n-\tconst struct ipa_callback_ops *callbacks_;\n-\tvoid *cb_ctx_;\n-\n-\tControlSerializer serializer_;\n-};\n-\n-} /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_IPA_INTERFACE_WRAPPER_H__ */\ndiff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build\nindex 22626405..b29ef0f4 100644\n--- a/src/ipa/libipa/meson.build\n+++ b/src/ipa/libipa/meson.build\n@@ -1,11 +1,9 @@\n # SPDX-License-Identifier: CC0-1.0\n \n libipa_headers = files([\n-    'ipa_interface_wrapper.h',\n ])\n \n libipa_sources = files([\n-    'ipa_interface_wrapper.cpp',\n ])\n \n libipa_includes = include_directories('..')\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 29d48b1b..4dc02dc8 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -22,8 +22,6 @@\n #include <libcamera/request.h>\n #include <libcamera/span.h>\n \n-#include <libipa/ipa_interface_wrapper.h>\n-\n #include \"libcamera/internal/buffer.h\"\n #include \"libcamera/internal/camera_sensor.h\"\n #include \"libcamera/internal/log.h\"\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 07d7f1b2..10301a19 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -22,8 +22,6 @@\n #include <libcamera/ipa/rkisp1.h>\n #include <libcamera/request.h>\n \n-#include <libipa/ipa_interface_wrapper.h>\n-\n #include \"libcamera/internal/log.h\"\n \n namespace libcamera {\ndiff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\nindex cf841135..483aeadd 100644\n--- a/src/ipa/vimc/vimc.cpp\n+++ b/src/ipa/vimc/vimc.cpp\n@@ -17,8 +17,6 @@\n #include <libcamera/ipa/ipa_interface.h>\n #include <libcamera/ipa/ipa_module_info.h>\n \n-#include <libipa/ipa_interface_wrapper.h>\n-\n #include \"libcamera/internal/file.h\"\n #include \"libcamera/internal/log.h\"\n \ndiff --git a/src/libcamera/ipa_context_wrapper.cpp b/src/libcamera/ipa_context_wrapper.cpp\ndeleted file mode 100644\nindex 231300ce..00000000\n--- a/src/libcamera/ipa_context_wrapper.cpp\n+++ /dev/null\n@@ -1,297 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1-or-later */\n-/*\n- * Copyright (C) 2019, Google Inc.\n- *\n- * ipa_context_wrapper.cpp - Image Processing Algorithm context wrapper\n- */\n-\n-#include \"libcamera/internal/ipa_context_wrapper.h\"\n-\n-#include <vector>\n-\n-#include <libcamera/controls.h>\n-\n-#include \"libcamera/internal/byte_stream_buffer.h\"\n-#include \"libcamera/internal/camera_sensor.h\"\n-#include \"libcamera/internal/utils.h\"\n-\n-/**\n- * \\file ipa_context_wrapper.h\n- * \\brief Image Processing Algorithm context wrapper\n- */\n-\n-namespace libcamera {\n-\n-/**\n- * \\class IPAContextWrapper\n- * \\brief Wrap an ipa_context and expose it as an IPAInterface\n- *\n- * The IPAContextWrapper class wraps an ipa_context, provided by an IPA module, and\n- * exposes an IPAInterface. This mechanism is used for IPAs that are not\n- * isolated in a separate process to allow direct calls from pipeline handler\n- * using the IPAInterface API instead of the lower-level ipa_context API.\n- *\n- * The IPAInterface methods are converted to the ipa_context API by translating\n- * all C++ arguments into plain C structures or byte arrays that contain no\n- * pointer, as required by the ipa_context API.\n- */\n-\n-/**\n- * \\brief Construct an IPAContextWrapper instance that wraps the \\a context\n- * \\param[in] context The IPA module context\n- *\n- * Ownership of the \\a context is passed to the IPAContextWrapper. The context remains\n- * valid for the whole lifetime of the wrapper and is destroyed automatically\n- * with it.\n- */\n-IPAContextWrapper::IPAContextWrapper(struct ipa_context *context)\n-\t: ctx_(context), intf_(nullptr)\n-{\n-\tif (!ctx_)\n-\t\treturn;\n-\n-\tbool forceCApi = !!utils::secure_getenv(\"LIBCAMERA_IPA_FORCE_C_API\");\n-\n-\tif (!forceCApi && ctx_ && ctx_->ops->get_interface) {\n-\t\tintf_ = reinterpret_cast<IPAInterface *>(ctx_->ops->get_interface(ctx_));\n-\t\tintf_->queueFrameAction.connect(this, &IPAContextWrapper::doQueueFrameAction);\n-\t\treturn;\n-\t}\n-\n-\tctx_->ops->register_callbacks(ctx_, &IPAContextWrapper::callbacks_,\n-\t\t\t\t      this);\n-}\n-\n-IPAContextWrapper::~IPAContextWrapper()\n-{\n-\tif (!ctx_)\n-\t\treturn;\n-\n-\tctx_->ops->destroy(ctx_);\n-}\n-\n-int IPAContextWrapper::init(const IPASettings &settings)\n-{\n-\tif (intf_)\n-\t\treturn intf_->init(settings);\n-\n-\tif (!ctx_)\n-\t\treturn 0;\n-\n-\tstruct ipa_settings c_settings;\n-\tc_settings.configuration_file = settings.configurationFile.c_str();\n-\n-\tctx_->ops->init(ctx_, &c_settings);\n-\n-\treturn 0;\n-}\n-\n-int IPAContextWrapper::start()\n-{\n-\tif (intf_)\n-\t\treturn intf_->start();\n-\n-\tif (!ctx_)\n-\t\treturn 0;\n-\n-\treturn ctx_->ops->start(ctx_);\n-}\n-\n-void IPAContextWrapper::stop()\n-{\n-\tif (intf_)\n-\t\treturn intf_->stop();\n-\n-\tif (!ctx_)\n-\t\treturn;\n-\n-\tctx_->ops->stop(ctx_);\n-}\n-\n-void IPAContextWrapper::configure(const CameraSensorInfo &sensorInfo,\n-\t\t\t\t  const std::map<unsigned int, IPAStream> &streamConfig,\n-\t\t\t\t  const std::map<unsigned int, const ControlInfoMap &> &entityControls,\n-\t\t\t\t  const IPAOperationData &ipaConfig,\n-\t\t\t\t  IPAOperationData *result)\n-{\n-\tif (intf_)\n-\t\treturn intf_->configure(sensorInfo, streamConfig,\n-\t\t\t\t\tentityControls, ipaConfig, result);\n-\n-\tif (!ctx_)\n-\t\treturn;\n-\n-\tserializer_.reset();\n-\n-\t/* Translate the camera sensor info. */\n-\tstruct ipa_sensor_info sensor_info = {};\n-\tsensor_info.model = sensorInfo.model.c_str();\n-\tsensor_info.bits_per_pixel = sensorInfo.bitsPerPixel;\n-\tsensor_info.active_area.width = sensorInfo.activeAreaSize.width;\n-\tsensor_info.active_area.height = sensorInfo.activeAreaSize.height;\n-\tsensor_info.analog_crop.left = sensorInfo.analogCrop.x;\n-\tsensor_info.analog_crop.top = sensorInfo.analogCrop.y;\n-\tsensor_info.analog_crop.width = sensorInfo.analogCrop.width;\n-\tsensor_info.analog_crop.height = sensorInfo.analogCrop.height;\n-\tsensor_info.output_size.width = sensorInfo.outputSize.width;\n-\tsensor_info.output_size.height = sensorInfo.outputSize.height;\n-\tsensor_info.pixel_rate = sensorInfo.pixelRate;\n-\tsensor_info.line_length = sensorInfo.lineLength;\n-\n-\t/* Translate the IPA stream configurations map. */\n-\tstruct ipa_stream c_streams[streamConfig.size()];\n-\n-\tunsigned int i = 0;\n-\tfor (const auto &stream : streamConfig) {\n-\t\tstruct ipa_stream *c_stream = &c_streams[i];\n-\t\tunsigned int id = stream.first;\n-\t\tconst IPAStream &ipaStream = stream.second;\n-\n-\t\tc_stream->id = id;\n-\t\tc_stream->pixel_format = ipaStream.pixelFormat;\n-\t\tc_stream->width = ipaStream.size.width;\n-\t\tc_stream->height = ipaStream.size.height;\n-\n-\t\t++i;\n-\t}\n-\n-\t/* Translate the IPA entity controls map. */\n-\tstruct ipa_control_info_map c_info_maps[entityControls.size()];\n-\tstd::vector<std::vector<uint8_t>> data(entityControls.size());\n-\n-\ti = 0;\n-\tfor (const auto &info : entityControls) {\n-\t\tstruct ipa_control_info_map &c_info_map = c_info_maps[i];\n-\t\tunsigned int id = info.first;\n-\t\tconst ControlInfoMap &infoMap = info.second;\n-\n-\t\tsize_t infoMapSize = serializer_.binarySize(infoMap);\n-\t\tdata[i].resize(infoMapSize);\n-\t\tByteStreamBuffer byteStream(data[i].data(), data[i].size());\n-\t\tserializer_.serialize(infoMap, byteStream);\n-\n-\t\tc_info_map.id = id;\n-\t\tc_info_map.data = byteStream.base();\n-\t\tc_info_map.size = byteStream.size();\n-\n-\t\t++i;\n-\t}\n-\n-\t/* \\todo Translate the ipaConfig and reponse */\n-\tctx_->ops->configure(ctx_, &sensor_info, c_streams, streamConfig.size(),\n-\t\t\t     c_info_maps, entityControls.size());\n-}\n-\n-void IPAContextWrapper::mapBuffers(const std::vector<IPABuffer> &buffers)\n-{\n-\tif (intf_)\n-\t\treturn intf_->mapBuffers(buffers);\n-\n-\tif (!ctx_)\n-\t\treturn;\n-\n-\tstruct ipa_buffer c_buffers[buffers.size()];\n-\n-\tfor (unsigned int i = 0; i < buffers.size(); ++i) {\n-\t\tstruct ipa_buffer &c_buffer = c_buffers[i];\n-\t\tconst IPABuffer &buffer = buffers[i];\n-\t\tconst std::vector<FrameBuffer::Plane> &planes = buffer.planes;\n-\n-\t\tc_buffer.id = buffer.id;\n-\t\tc_buffer.num_planes = planes.size();\n-\n-\t\tfor (unsigned int j = 0; j < planes.size(); ++j) {\n-\t\t\tconst FrameBuffer::Plane &plane = planes[j];\n-\t\t\tc_buffer.planes[j].dmabuf = plane.fd.fd();\n-\t\t\tc_buffer.planes[j].length = plane.length;\n-\t\t}\n-\t}\n-\n-\tctx_->ops->map_buffers(ctx_, c_buffers, buffers.size());\n-}\n-\n-void IPAContextWrapper::unmapBuffers(const std::vector<unsigned int> &ids)\n-{\n-\tif (intf_)\n-\t\treturn intf_->unmapBuffers(ids);\n-\n-\tif (!ctx_)\n-\t\treturn;\n-\n-\tctx_->ops->unmap_buffers(ctx_, ids.data(), ids.size());\n-}\n-\n-void IPAContextWrapper::processEvent(const IPAOperationData &data)\n-{\n-\tif (intf_)\n-\t\treturn intf_->processEvent(data);\n-\n-\tif (!ctx_)\n-\t\treturn;\n-\n-\tstruct ipa_operation_data c_data;\n-\tc_data.operation = data.operation;\n-\tc_data.data = data.data.data();\n-\tc_data.num_data = data.data.size();\n-\n-\tstruct ipa_control_list control_lists[data.controls.size()];\n-\tc_data.lists = control_lists;\n-\tc_data.num_lists = data.controls.size();\n-\n-\tstd::size_t listsSize = 0;\n-\tfor (const auto &list : data.controls)\n-\t\tlistsSize += serializer_.binarySize(list);\n-\n-\tstd::vector<uint8_t> binaryData(listsSize);\n-\tByteStreamBuffer byteStreamBuffer(binaryData.data(), listsSize);\n-\n-\tunsigned int i = 0;\n-\tfor (const auto &list : data.controls) {\n-\t\tstruct ipa_control_list &c_list = control_lists[i];\n-\t\tc_list.size = serializer_.binarySize(list);\n-\t\tByteStreamBuffer b = byteStreamBuffer.carveOut(c_list.size);\n-\n-\t\tserializer_.serialize(list, b);\n-\n-\t\tc_list.data = b.base();\n-\t}\n-\n-\tctx_->ops->process_event(ctx_, &c_data);\n-}\n-\n-void IPAContextWrapper::doQueueFrameAction(unsigned int frame,\n-\t\t\t\t\t   const IPAOperationData &data)\n-{\n-\tIPAInterface::queueFrameAction.emit(frame, data);\n-}\n-\n-void IPAContextWrapper::queue_frame_action(void *ctx, unsigned int frame,\n-\t\t\t\t\t   struct ipa_operation_data &data)\n-{\n-\tIPAContextWrapper *_this = static_cast<IPAContextWrapper *>(ctx);\n-\tIPAOperationData opData;\n-\n-\topData.operation = data.operation;\n-\tfor (unsigned int i = 0; i < data.num_data; ++i)\n-\t\topData.data.push_back(data.data[i]);\n-\n-\tfor (unsigned int i = 0; i < data.num_lists; ++i) {\n-\t\tconst struct ipa_control_list &c_list = data.lists[i];\n-\t\tByteStreamBuffer b(c_list.data, c_list.size);\n-\t\topData.controls.push_back(_this->serializer_.deserialize<ControlList>(b));\n-\t}\n-\n-\t_this->doQueueFrameAction(frame, opData);\n-}\n-\n-#ifndef __DOXYGEN__\n-/*\n- * This construct confuses Doxygen and makes it believe that all members of the\n- * operations is a member of IPAContextWrapper. It must thus be hidden.\n- */\n-const struct ipa_callback_ops IPAContextWrapper::callbacks_ = {\n-\t.queue_frame_action = &IPAContextWrapper::queue_frame_action,\n-};\n-#endif\n-\n-} /* namespace libcamera */\ndiff --git a/src/libcamera/ipa_interface.cpp b/src/libcamera/ipa_interface.cpp\nindex 23fc56d7..edbfd979 100644\n--- a/src/libcamera/ipa_interface.cpp\n+++ b/src/libcamera/ipa_interface.cpp\n@@ -15,371 +15,51 @@\n  * an Image Processing Algorithm (IPA) module. An IPA module is developed for a\n  * specific pipeline handler and each pipeline handler may be compatible with\n  * multiple IPA implementations, both open and closed source. To support this,\n- * libcamera communicates with IPA modules through a standard plain C interface.\n+ * libcamera communicates with IPA modules through a per-pipeline C++ interface.\n  *\n- * IPA modules shall expose a public function named ipaCreate() with the\n- * following prototype.\n+ * IPA modules shall provide an ipaCreate() function exported as a public C\n+ * symbol with the following prototype:\n  *\n  * \\code{.c}\n- * struct ipa_context *ipaCreate();\n+ * IPAInterface *ipaCreate();\n  * \\endcode\n  *\n- * The ipaCreate() function creates an instance of an IPA context, which models\n+ * The ipaCreate() function creates an instance of an IPA interface, which models\n  * a context of execution for the IPA. IPA modules shall support creating one\n  * context per camera, as required by their associated pipeline handler.\n  *\n- * The IPA module context operations are defined in the struct ipa_context_ops.\n- * They model a low-level interface to configure the IPA, notify it of events,\n- * and receive IPA actions through callbacks. An IPA module stores a pointer to\n- * the operations corresponding to its context in the ipa_context::ops field.\n- * That pointer is immutable for the lifetime of the context, and may differ\n- * between different contexts created by the same IPA module.\n+ * The IPA module interface operations are defined in the mojom file\n+ * corresponding to the pipeline handler, in\n+ * include/libcamera/ipa/{pipeline_name}.mojom.\n  *\n- * The IPA interface defines base data types and functions to exchange data. On\n- * top of this, each pipeline handler is responsible for defining the set of\n- * events and actions used to communicate with their IPA. These are collectively\n- * referred to as IPA operations and define the pipeline handler-specific IPA\n- * protocol. Each operation defines the data that it carries, and how that data\n- * is encoded in the ipa_context_ops functions arguments.\n+ * The IPA interface is specific to each pipeline handler. The pipeline handlers\n+ * define a set of operations used to communicate with their IPA modules. The\n+ * operations, along with the data structures they use, are collectively\n+ * referred to as the IPA protocol.\n+ *\n+ * The IPA protocol is defined using the\n+ * <a href=\"https://chromium.googlesource.com/chromium/src/+/master/mojo/public/tools/bindings/README.md\">Mojo interface definition language</a>,\n+ * in a Mojo module file stored in include/libcamera/ipa/{pipeline_name}.mojom.\n+ * The Mojo module contains two Mojo interfaces: IPAInterface defines the\n+ * operations exposed by the IPA and called by the pipeline handler, and\n+ * IPAEventInterface defines the events generated by the IPA and received by the\n+ * pipeline handler.\n  *\n  * \\todo Add reference to how pipelines shall document their protocol.\n  *\n  * IPAs can be isolated in a separate process. This implies that arguments to\n- * the IPA interface functions may need to be transferred over IPC. All\n- * arguments use Plain Old Data types and are documented either in the form of C\n- * data types, or as a textual description of byte arrays for types that can't\n- * be expressed using C data types (such as arrays of mixed data types). IPA\n- * modules can thus use the C API without calling into libcamera to access the\n- * data passed to the IPA context operations.\n+ * the IPA interface functions may need to be transferred over IPC. An IPA\n+ * proxy is auto-generated based on the mojom file, which abstracts away the\n+ * (de)serialization from the pipeline handler and the IPA implementation. Thus\n+ * any C++ structure that is defined in the mojom file, or the C++ libcamera\n+ * objects that are listed in core.mojom, can be used directly.\n  *\n  * Due to IPC, synchronous communication between pipeline handlers and IPAs can\n- * be costly. For that reason, the interface operates asynchronously. This\n- * implies that methods don't return a status, and that all methods may copy\n- * their arguments.\n- *\n- * The IPAInterface class is a C++ representation of the ipa_context_ops, using\n- * C++ data classes provided by libcamera. This is the API exposed to pipeline\n- * handlers to communicate with IPA modules. IPA modules may use the\n- * IPAInterface API internally if they want to benefit from the data and helper\n- * classes offered by libcamera.\n- *\n- * When an IPA module is loaded directly into the libcamera process and uses\n- * the IPAInterface API internally, short-circuiting the path to the\n- * ipa_context_ops and back to IPAInterface is desirable. To support this, IPA\n- * modules may implement the ipa_context_ops::get_interface function to return a\n- * pointer to their internal IPAInterface.\n- */\n-\n-/**\n- * \\struct ipa_context\n- * \\brief IPA module context of execution\n- *\n- * This structure models a context of execution for an IPA module. It is\n- * instantiated by the IPA module ipaCreate() function. IPA modules allocate\n- * context instances in an implementation-defined way, contexts shall thus be\n- * destroyed using the ipa_operation::destroy function only.\n- *\n- * The ipa_context structure provides a pointer to the IPA context operations.\n- * It shall otherwise be treated as a constant black-box cookie and passed\n- * unmodified to the functions defined in struct ipa_context_ops.\n- *\n- * IPA modules are expected to extend struct ipa_context by inheriting from it,\n- * either through structure embedding to model inheritance in plain C, or\n- * through C++ class inheritance. A simple example of the latter is available\n- * in the IPAContextWrapper class implementation.\n- *\n- * \\var ipa_context::ops\n- * \\brief The IPA context operations\n- */\n-\n-/**\n- * \\struct ipa_settings\n- * \\brief IPA initialization settings for the IPA context operations\n- * \\sa IPASettings\n- *\n- * \\var ipa_settings::configuration_file\n- * \\brief The name of the IPA configuration file (may be null or point to an\n- * empty string)\n- */\n-\n-/**\n- * \\struct ipa_sensor_info\n- * \\brief Camera sensor information for the IPA context operations\n- * \\sa libcamera::CameraSensorInfo\n- *\n- * \\var ipa_sensor_info::model\n- * \\brief The camera sensor model name\n- * \\todo Remove this field as soon as no IPA depends on it anymore\n- *\n- * \\var ipa_sensor_info::bits_per_pixel\n- * \\brief The camera sensor image format bit depth\n- * \\sa libcamera::CameraSensorInfo::bitsPerPixel\n- *\n- * \\var ipa_sensor_info::active_area.width\n- * \\brief The camera sensor pixel array active area width\n- * \\sa libcamera::CameraSensorInfo::activeAreaSize\n- *\n- * \\var ipa_sensor_info::active_area.height\n- * \\brief The camera sensor pixel array active area height\n- * \\sa libcamera::CameraSensorInfo::activeAreaSize\n- *\n- * \\var ipa_sensor_info::active_area\n- * \\brief The camera sensor pixel array active size\n- * \\sa libcamera::CameraSensorInfo::activeAreaSize\n- *\n- * \\var ipa_sensor_info::analog_crop.left\n- * \\brief The left coordinate of the analog crop rectangle, relative to the\n- * pixel array active area\n- * \\sa libcamera::CameraSensorInfo::analogCrop\n- *\n- * \\var ipa_sensor_info::analog_crop.top\n- * \\brief The top coordinate of the analog crop rectangle, relative to the pixel\n- * array active area\n- * \\sa libcamera::CameraSensorInfo::analogCrop\n- *\n- * \\var ipa_sensor_info::analog_crop.width\n- * \\brief The horizontal size of the analog crop rectangle\n- * \\sa libcamera::CameraSensorInfo::analogCrop\n- *\n- * \\var ipa_sensor_info::analog_crop.height\n- * \\brief The vertical size of the analog crop rectangle\n- * \\sa libcamera::CameraSensorInfo::analogCrop\n- *\n- * \\var ipa_sensor_info::analog_crop\n- * \\brief The analog crop rectangle\n- * \\sa libcamera::CameraSensorInfo::analogCrop\n- *\n- * \\var ipa_sensor_info::output_size.width\n- * \\brief The horizontal size of the output image\n- * \\sa libcamera::CameraSensorInfo::outputSize\n- *\n- * \\var ipa_sensor_info::output_size.height\n- * \\brief The vertical size of the output image\n- * \\sa libcamera::CameraSensorInfo::outputSize\n- *\n- * \\var ipa_sensor_info::output_size\n- * \\brief The size of the output image\n- * \\sa libcamera::CameraSensorInfo::outputSize\n- *\n- * \\var ipa_sensor_info::pixel_rate\n- * \\brief The number of pixel produced in a second\n- * \\sa libcamera::CameraSensorInfo::pixelRate\n- *\n- * \\var ipa_sensor_info::line_length\n- * \\brief The full line length, including blanking, in pixel units\n- * \\sa libcamera::CameraSensorInfo::lineLength\n- */\n-\n-/**\n- * \\struct ipa_stream\n- * \\brief Stream information for the IPA context operations\n- *\n- * \\var ipa_stream::id\n- * \\brief Identifier for the stream, defined by the IPA protocol\n- *\n- * \\var ipa_stream::pixel_format\n- * \\brief The stream pixel format, as defined by the PixelFormat class\n- *\n- * \\var ipa_stream::width\n- * \\brief The stream width in pixels\n- *\n- * \\var ipa_stream::height\n- * \\brief The stream height in pixels\n- */\n-\n-/**\n- * \\struct ipa_control_info_map\n- * \\brief ControlInfoMap description for the IPA context operations\n- *\n- * \\var ipa_control_info_map::id\n- * \\brief Identifier for the ControlInfoMap, defined by the IPA protocol\n- *\n- * \\var ipa_control_info_map::data\n- * \\brief Pointer to a control packet for the ControlInfoMap\n- * \\sa ipa_controls.h\n- *\n- * \\var ipa_control_info_map::size\n- * \\brief The size of the control packet in bytes\n- */\n-\n-/**\n- * \\struct ipa_buffer_plane\n- * \\brief A plane for an ipa_buffer\n- *\n- * \\var ipa_buffer_plane::dmabuf\n- * \\brief The dmabuf file descriptor for the plane (-1 for unused planes)\n- *\n- * \\var ipa_buffer_plane::length\n- * \\brief The plane length in bytes (0 for unused planes)\n- */\n-\n-/**\n- * \\struct ipa_buffer\n- * \\brief Buffer information for the IPA context operations\n- *\n- * \\var ipa_buffer::id\n- * \\brief The buffer unique ID (see \\ref libcamera::IPABuffer::id)\n- *\n- * \\var ipa_buffer::num_planes\n- * \\brief The number of used planes in the ipa_buffer::planes array\n- *\n- * \\var ipa_buffer::planes\n- * \\brief The buffer planes (up to 3)\n- */\n-\n-/**\n- * \\struct ipa_control_list\n- * \\brief ControlList description for the IPA context operations\n- *\n- * \\var ipa_control_list::data\n- * \\brief Pointer to a control packet for the ControlList\n- * \\sa ipa_controls.h\n- *\n- * \\var ipa_control_list::size\n- * \\brief The size of the control packet in bytes\n- */\n-\n-/**\n- * \\struct ipa_operation_data\n- * \\brief IPA operation data for the IPA context operations\n- * \\sa libcamera::IPAOperationData\n- *\n- * \\var ipa_operation_data::operation\n- * \\brief IPA protocol operation\n- *\n- * \\var ipa_operation_data::data\n- * \\brief Pointer to the operation data array\n- *\n- * \\var ipa_operation_data::num_data\n- * \\brief Number of entries in the ipa_operation_data::data array\n- *\n- * \\var ipa_operation_data::lists\n- * \\brief Pointer to an array of ipa_control_list\n- *\n- * \\var ipa_operation_data::num_lists\n- * \\brief Number of entries in the ipa_control_list array\n- */\n-\n-/**\n- * \\struct ipa_callback_ops\n- * \\brief IPA context operations as a set of function pointers\n- */\n-\n-/**\n- * \\var ipa_callback_ops::queue_frame_action\n- * \\brief Queue an action associated with a frame to the pipeline handler\n- * \\param[in] cb_ctx The callback context registered with\n- * ipa_context_ops::register_callbacks\n- * \\param[in] frame The frame number\n- *\n- * \\sa libcamera::IPAInterface::queueFrameAction\n- */\n-\n-/**\n- * \\struct ipa_context_ops\n- * \\brief IPA context operations as a set of function pointers\n- *\n- * To allow for isolation of IPA modules in separate processes, the functions\n- * defined in the ipa_context_ops structure return only data related to the\n- * libcamera side of the operations. In particular, error related to the\n- * libcamera side of the IPC may be returned. Data returned by the IPA,\n- * including status information, shall be provided through callbacks from the\n- * IPA to libcamera.\n- */\n-\n-/**\n- * \\var ipa_context_ops::destroy\n- * \\brief Destroy the IPA context created by the module's ipaCreate() function\n- * \\param[in] ctx The IPA context\n- */\n-\n-/**\n- * \\var ipa_context_ops::get_interface\n- * \\brief Retrieve the IPAInterface implemented by the ipa_context (optional)\n- * \\param[in] ctx The IPA context\n- *\n- * IPA modules may implement this function to expose their internal\n- * IPAInterface, if any. When implemented, libcamera may at its sole discretion\n- * call it and then bypass the ipa_context_ops API by calling the IPAInterface\n- * methods directly. IPA modules shall still implement and support the full\n- * ipa_context_ops API.\n- */\n-\n-/**\n- * \\var ipa_context_ops::init\n- * \\brief Initialise the IPA context\n- * \\param[in] ctx The IPA context\n- * \\param[in] settings The IPA initialization settings\n- *\n- * \\sa libcamera::IPAInterface::init()\n- */\n-\n-/**\n- * \\var ipa_context_ops::start\n- * \\brief Start the IPA context\n- *\n- * \\sa libcamera::IPAInterface::start()\n- */\n-\n-/**\n- * \\var ipa_context_ops::stop\n- * \\brief Stop the IPA context\n- *\n- * \\sa libcamera::IPAInterface::stop()\n- */\n-\n-/**\n- * \\var ipa_context_ops::register_callbacks\n- * \\brief Register callback operation from the IPA to the pipeline handler\n- * \\param[in] ctx The IPA context\n- * \\param[in] callback The IPA callback operations\n- * \\param[in] cb_ctx The callback context, passed to all callback operations\n- */\n-\n-/**\n- * \\var ipa_context_ops::configure\n- * \\brief Configure the IPA stream and sensor settings\n- * \\param[in] ctx The IPA context\n- * \\param[in] sensor_info Camera sensor information\n- * \\param[in] streams Configuration of all active streams\n- * \\param[in] num_streams The number of entries in the \\a streams array\n- * \\param[in] maps Controls provided by the pipeline entities\n- * \\param[in] num_maps The number of entries in the \\a maps array\n- *\n- * \\sa libcamera::IPAInterface::configure()\n- */\n-\n-/**\n- * \\var ipa_context_ops::map_buffers\n- * \\brief Map buffers shared between the pipeline handler and the IPA\n- * \\param[in] ctx The IPA context\n- * \\param[in] buffers The buffers to map\n- * \\param[in] num_buffers The number of entries in the \\a buffers array\n- *\n- * The dmabuf file descriptors provided in \\a buffers are borrowed from the\n- * caller and are only guaranteed to be valid during the map_buffers() call.\n- * Should the callee need to store a copy of the file descriptors, it shall\n- * duplicate them first with ::%dup().\n- *\n- * \\sa libcamera::IPAInterface::mapBuffers()\n- */\n-\n-/**\n- * \\var ipa_context_ops::unmap_buffers\n- * \\brief Unmap buffers shared by the pipeline to the IPA\n- * \\param[in] ctx The IPA context\n- * \\param[in] ids The IDs of the buffers to unmap\n- * \\param[in] num_buffers The number of entries in the \\a ids array\n- *\n- * \\sa libcamera::IPAInterface::unmapBuffers()\n- */\n-\n-/**\n- * \\var ipa_context_ops::process_event\n- * \\brief Process an event from the pipeline handler\n- * \\param[in] ctx The IPA context\n- *\n- * \\sa libcamera::IPAInterface::processEvent()\n+ * be costly. For that reason, functions that cannot afford the high cost\n+ * should be marked as [async] in the mojom file, and they will operate\n+ * asynchronously. This implies that these methods don't return a status, and\n+ * that all methods may copy their arguments. Synchronous functions are still\n+ * allowed, but should be used with caution.\n  */\n \n /**\n@@ -387,9 +67,10 @@\n  * \\brief Entry point to the IPA modules\n  *\n  * This function is the entry point to the IPA modules. It is implemented by\n- * every IPA module, and called by libcamera to create a new IPA context.\n+ * every IPA module, and called by libcamera to create a new IPA interface\n+ * instance.\n  *\n- * \\return A newly created IPA context\n+ * \\return A newly created IPA interface instance\n  */\n \n namespace libcamera {\n@@ -499,16 +180,10 @@ namespace libcamera {\n  * \\class IPAInterface\n  * \\brief C++ Interface for IPA implementation\n  *\n- * This pure virtual class defines a C++ API corresponding to the ipa_context,\n- * ipa_context_ops and ipa_callback_ops API. It is used by pipeline handlers to\n- * interact with IPA modules, and may be used internally in IPA modules if\n- * desired to benefit from the data and helper classes provided by libcamera.\n- *\n- * Functions defined in the ipa_context_ops structure are mapped to IPAInterface\n- * methods, while functions defined in the ipa_callback_ops are mapped to\n- * IPAInterface signals. As with the C API, the IPA C++ interface uses\n- * serializable data types only. It reuses structures defined by the C API, or\n- * defines corresponding classes using C++ containers when required.\n+ * This pure virtual class defines a skeletal C++ API for IPA modules.\n+ * Specializations of this class must be defined in a mojom file in\n+ * include/libcamera/ipa/ (see the IPA Writers Guide for details\n+ * on how to do so).\n  *\n  * Due to process isolation all arguments to the IPAInterface methods and\n  * signals may need to be transferred over IPC. The class thus uses serializable\n@@ -516,140 +191,15 @@ namespace libcamera {\n  * mirror core libcamera structures when the latter are not suitable, such as\n  * IPAStream to carry StreamConfiguration data.\n  *\n- * As for the functions defined in struct ipa_context_ops, the methods defined\n- * by this class shall not return data from the IPA.\n+ * Custom data structures may also be defined in the mojom file, in which case\n+ * the (de)serialization will automatically be generated. If any other libcamera\n+ * structures are to be used as parameters, then a de/serializer for them must\n+ * be implemented in IPADataSerializer.\n  *\n  * The pipeline handler shall use the IPAManager to locate a compatible\n  * IPAInterface. The interface may then be used to interact with the IPA module.\n  */\n \n-/**\n- * \\fn IPAInterface::init()\n- * \\brief Initialise the IPAInterface\n- * \\param[in] settings The IPA initialization settings\n- *\n- * This function initializes the IPA interface. It shall be called before any\n- * other function of the IPAInterface. The \\a settings carry initialization\n- * parameters that are valid for the whole life time of the IPA interface.\n- */\n-\n-/**\n- * \\fn IPAInterface::start()\n- * \\brief Start the IPA\n- *\n- * This method informs the IPA module that the camera is about to be started.\n- * The IPA module shall prepare any resources it needs to operate.\n- *\n- * \\return 0 on success or a negative error code otherwise\n- */\n-\n-/**\n- * \\fn IPAInterface::stop()\n- * \\brief Stop the IPA\n- *\n- * This method informs the IPA module that the camera is stopped. The IPA module\n- * shall release resources prepared in start().\n- */\n-\n-/**\n- * \\fn IPAInterface::configure()\n- * \\brief Configure the IPA stream and sensor settings\n- * \\param[in] sensorInfo Camera sensor information\n- * \\param[in] streamConfig Configuration of all active streams\n- * \\param[in] entityControls Controls provided by the pipeline entities\n- * \\param[in] ipaConfig Pipeline-handler-specific configuration data\n- * \\param[out] result Pipeline-handler-specific configuration result\n- *\n- * This method shall be called when the camera is started to inform the IPA of\n- * the camera's streams and the sensor settings. The meaning of the numerical\n- * keys in the \\a streamConfig and \\a entityControls maps is defined by the IPA\n- * protocol.\n- *\n- * The \\a sensorInfo conveys information about the camera sensor settings that\n- * the pipeline handler has selected for the configuration. The IPA may use\n- * that information to tune its algorithms.\n- *\n- * The \\a ipaConfig and \\a result parameters carry custom data passed by the\n- * pipeline handler to the IPA and back. The pipeline handler may set the \\a\n- * result parameter to null if the IPA protocol doesn't need to pass a result\n- * back through the configure() function.\n- */\n-\n-/**\n- * \\fn IPAInterface::mapBuffers()\n- * \\brief Map buffers shared between the pipeline handler and the IPA\n- * \\param[in] buffers List of buffers to map\n- *\n- * This method informs the IPA module of memory buffers set up by the pipeline\n- * handler that the IPA needs to access. It provides dmabuf file handles for\n- * each buffer, and associates the buffers with unique numerical IDs.\n- *\n- * IPAs shall map the dmabuf file handles to their address space and keep a\n- * cache of the mappings, indexed by the buffer numerical IDs. The IDs are used\n- * in all other IPA interface methods to refer to buffers, including the\n- * unmapBuffers() method.\n- *\n- * All buffers that the pipeline handler wishes to share with an IPA shall be\n- * mapped with this method. Buffers may be mapped all at once with a single\n- * call, or mapped and unmapped dynamically at runtime, depending on the IPA\n- * protocol. Regardless of the protocol, all buffers mapped at a given time\n- * shall have unique numerical IDs.\n- *\n- * The numerical IDs have no meaning defined by the IPA interface, and IPA\n- * protocols shall not give them any specific meaning either. They should be\n- * treated as opaque handles by IPAs, with the only exception that ID zero is\n- * invalid.\n- *\n- * \\sa unmapBuffers()\n- *\n- * \\todo Provide a generic implementation of mapBuffers and unmapBuffers for\n- * IPAs\n- */\n-\n-/**\n- * \\fn IPAInterface::unmapBuffers()\n- * \\brief Unmap buffers shared by the pipeline to the IPA\n- * \\param[in] ids List of buffer IDs to unmap\n- *\n- * This method removes mappings set up with mapBuffers(). Buffers may be\n- * unmapped all at once with a single call, or selectively at runtime, depending\n- * on the IPA protocol. Numerical IDs of unmapped buffers may be reused when\n- * mapping new buffers.\n- *\n- * \\sa mapBuffers()\n- */\n-\n-/**\n- * \\fn IPAInterface::processEvent()\n- * \\brief Process an event from the pipeline handler\n- * \\param[in] data IPA operation data\n- *\n- * This operation is used by pipeline handlers to inform the IPA module of\n- * events that occurred during the on-going capture operation.\n- *\n- * The event notified by the pipeline handler with this method is handled by the\n- * IPA, which interprets the operation parameters according to the separately\n- * documented IPA protocol.\n- */\n-\n-/**\n- * \\var IPAInterface::queueFrameAction\n- * \\brief Queue an action associated with a frame to the pipeline handler\n- * \\param[in] frame The frame number for the action\n- * \\param[in] data IPA operation data\n- *\n- * This signal is emitted when the IPA wishes to queue a FrameAction on the\n- * pipeline. The pipeline is still responsible for the scheduling of the action\n- * on its timeline.\n- *\n- * This signal is emitted by the IPA to queue an action to be executed by the\n- * pipeline handler on a frame. The type of action is identified by the\n- * \\a data.operation field, as defined by the IPA protocol, and the rest of the\n- * \\a data is interpreted accordingly. The pipeline handler shall queue the\n- * action and execute it as appropriate.\n- *\n- * The signal is only emitted when the IPA is running, that is after start() and\n- * before stop() have been called.\n- */\n+/* \\todo Figure out how to generate IPAInterface documentation. */\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\nindex de512a7f..f53e529b 100644\n--- a/src/libcamera/ipa_module.cpp\n+++ b/src/libcamera/ipa_module.cpp\n@@ -391,13 +391,13 @@ const std::string &IPAModule::path() const\n /**\n  * \\brief Load the IPA implementation factory from the shared object\n  *\n- * The IPA module shared object implements an ipa_context object to be used\n+ * The IPA module shared object implements an IPAInterface object to be used\n  * by pipeline handlers. This method loads the factory function from the\n- * shared object. Later, createContext() can be called to instantiate the\n- * ipa_context.\n+ * shared object. Later, createInterface() can be called to instantiate the\n+ * IPAInterface.\n  *\n  * This method only needs to be called successfully once, after which\n- * createContext() can be called as many times as ipa_context instances are\n+ * createInterface() can be called as many times as IPAInterface instances are\n  * needed.\n  *\n  * Calling this function on an invalid module (as returned by isValid()) is\n@@ -439,20 +439,18 @@ bool IPAModule::load()\n }\n \n /**\n- * \\brief Instantiate an IPA context\n+ * \\brief Instantiate an IPA interface\n  *\n  * After loading the IPA module with load(), this method creates an instance of\n- * the IPA module context. Ownership of the context is passed to the caller, and\n- * the context shall be destroyed by calling the \\ref ipa_context_ops::destroy\n- * \"ipa_context::ops::destroy()\" function.\n+ * the IPA module interface.\n  *\n  * Calling this function on a module that has not yet been loaded, or an\n  * invalid module (as returned by load() and isValid(), respectively) is\n  * an error.\n  *\n- * \\return The IPA context on success, or nullptr on error\n+ * \\return The IPA interface on success, or nullptr on error\n  */\n-struct ipa_context *IPAModule::createContext()\n+IPAInterface *IPAModule::createInterface()\n {\n \tif (!valid_ || !loaded_)\n \t\treturn nullptr;\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex f7f3627c..1472a41a 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -23,7 +23,6 @@ libcamera_sources = files([\n     'formats.cpp',\n     'framebuffer_allocator.cpp',\n     'geometry.cpp',\n-    'ipa_context_wrapper.cpp',\n     'ipa_controls.cpp',\n     'ipa_data_serializer.cpp',\n     'ipa_interface.cpp',\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "11/23"
    ]
}