Show a patch.

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

{
    "id": 17158,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17158/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17158/",
    "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": "<20220818094410.1671-4-jacopo@jmondi.org>",
    "date": "2022-08-18T09:43:56",
    "name": "[libcamera-devel,v3,03/17] ipa: libipa: Provide a common base for FrameContexts",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "d23db6c807a808bfdc9594695d2fd1a65495bc6b",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17158/mbox/",
    "series": [
        {
            "id": 3426,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3426/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3426",
            "date": "2022-08-18T09:43:53",
            "name": "libcamera: Align IPU3 and RKISP1 interfaces",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/3426/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17158/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17158/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 73F40C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Aug 2022 09:44:27 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3631361FA5;\n\tThu, 18 Aug 2022 11:44:27 +0200 (CEST)",
            "from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8930A61FC8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Aug 2022 11:44:23 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 2FC49FF806;\n\tThu, 18 Aug 2022 09:44:21 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660815867;\n\tbh=PphDmEbJAY8MfzVeB9+mblrrL1BIowDEmYsGPsWNkx0=;\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=CnNATFf3nSRVulfHNb45kHKpkpuvHh7Vc247xli3drkP07VM07wh7rs8vzfZqhDhK\n\t3P55ilLQI755dKBOw4TijLX1ZFq4v+W4XHmIHxFcYHsw1TElx2NG2RZy3VwfVXXIV4\n\t3VdKXwZ2EqMX+h/O03UVrWEwVKZ1DR2YaRcm1m7iqPmVE5Wj4H0/D0FyoQB/1a/k2G\n\tmUH6mtuTcEnekYBKLHsCDyqO0po5vdD8fqPNITGWuipxZx/5eicr5QUeBQ/zybJqjX\n\t9Jttr30GrXSQBfExMOgtPJ2c6FxDMT6KxGOGCpspJ0EFWuD6jqMtkeGNI5OZh8ve6D\n\tNovQ6QmyyUM4A==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 18 Aug 2022 11:43:56 +0200",
        "Message-Id": "<20220818094410.1671-4-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.37.2",
        "In-Reply-To": "<20220818094410.1671-1-jacopo@jmondi.org>",
        "References": "<20220818094410.1671-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 03/17] ipa: libipa: Provide a common\n\tbase for FrameContexts",
        "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": "Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jacopo Mondi <jacopo@jmondi.org>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Kieran Bingham via libcamera-devel <libcamera-devel@lists.libcamera.org>\n\nProvide a common IPAFrameContext as a base for IPA modules to inherit\nfrom.\n\nThis will allow having a common set of parameters for every FrameContext\nrequired by the FCQueue implementation.\n\nMake both the RKISP1 and the IPU3 define IPA specific FrameContext\nstructures which inherit from the IPAFrameContext.\n\nWhile adjusting interface to Algorithm::process() the FrameContext is\nconverted from a pointer to a reference.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/ipa/ipu3/algorithms/af.cpp           |  3 ++-\n src/ipa/ipu3/algorithms/af.h             |  2 +-\n src/ipa/ipu3/algorithms/agc.cpp          |  9 ++++----\n src/ipa/ipu3/algorithms/agc.h            |  4 ++--\n src/ipa/ipu3/algorithms/awb.cpp          |  3 ++-\n src/ipa/ipu3/algorithms/awb.h            |  2 +-\n src/ipa/ipu3/algorithms/tone_mapping.cpp |  3 ++-\n src/ipa/ipu3/algorithms/tone_mapping.h   |  2 +-\n src/ipa/ipu3/ipa_context.cpp             | 26 +++++-------------------\n src/ipa/ipu3/ipa_context.h               |  5 ++---\n src/ipa/ipu3/ipu3.cpp                    |  6 +++---\n src/ipa/ipu3/module.h                    |  2 +-\n src/ipa/libipa/algorithm.h               |  2 +-\n src/ipa/libipa/fc_queue.cpp              | 18 ++++++++++++++++\n src/ipa/libipa/fc_queue.h                |  4 ++++\n src/ipa/rkisp1/algorithms/agc.cpp        |  2 +-\n src/ipa/rkisp1/algorithms/agc.h          |  2 +-\n src/ipa/rkisp1/algorithms/awb.cpp        |  2 +-\n src/ipa/rkisp1/algorithms/awb.h          |  2 +-\n src/ipa/rkisp1/ipa_context.h             |  4 +++-\n src/ipa/rkisp1/module.h                  |  2 +-\n src/ipa/rkisp1/rkisp1.cpp                |  5 ++++-\n 22 files changed, 62 insertions(+), 48 deletions(-)",
    "diff": "diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp\nindex 4835a0345931..e7ed37003217 100644\n--- a/src/ipa/ipu3/algorithms/af.cpp\n+++ b/src/ipa/ipu3/algorithms/af.cpp\n@@ -420,7 +420,8 @@ bool Af::afIsOutOfFocus(IPAContext context)\n  *\n  * [1] Hill Climbing Algorithm, https://en.wikipedia.org/wiki/Hill_climbing\n  */\n-void Af::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameContext,\n+void Af::process(IPAContext &context,\n+\t\t [[maybe_unused]] IPU3FrameContext &frameContext,\n \t\t const ipu3_uapi_stats_3a *stats)\n {\n \t/* Evaluate the AF buffer length */\ndiff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h\nindex ccf015f3f8f5..7a5aeb1b6bf4 100644\n--- a/src/ipa/ipu3/algorithms/af.h\n+++ b/src/ipa/ipu3/algorithms/af.h\n@@ -32,7 +32,7 @@ public:\n \n \tvoid prepare(IPAContext &context, ipu3_uapi_params *params) override;\n \tint configure(IPAContext &context, const IPAConfigInfo &configInfo) override;\n-\tvoid process(IPAContext &context, IPAFrameContext *frameContext,\n+\tvoid process(IPAContext &context, IPU3FrameContext &frameContext,\n \t\t     const ipu3_uapi_stats_3a *stats) override;\n \n private:\ndiff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp\nindex ed4809d98007..57bd8a38d22d 100644\n--- a/src/ipa/ipu3/algorithms/agc.cpp\n+++ b/src/ipa/ipu3/algorithms/agc.cpp\n@@ -183,13 +183,13 @@ utils::Duration Agc::filterExposure(utils::Duration exposureValue)\n  * \\param[in] yGain The gain calculated based on the relative luminance target\n  * \\param[in] iqMeanGain The gain calculated based on the relative luminance target\n  */\n-void Agc::computeExposure(IPAContext &context, IPAFrameContext *frameContext,\n+void Agc::computeExposure(IPAContext &context, IPU3FrameContext &frameContext,\n \t\t\t  double yGain, double iqMeanGain)\n {\n \tconst IPASessionConfiguration &configuration = context.configuration;\n \t/* Get the effective exposure and gain applied on the sensor. */\n-\tuint32_t exposure = frameContext->sensor.exposure;\n-\tdouble analogueGain = frameContext->sensor.gain;\n+\tuint32_t exposure = frameContext.sensor.exposure;\n+\tdouble analogueGain = frameContext.sensor.gain;\n \n \t/* Use the highest of the two gain estimates. */\n \tdouble evGain = std::max(yGain, iqMeanGain);\n@@ -323,7 +323,8 @@ double Agc::estimateLuminance(IPAActiveState &activeState,\n  * Identify the current image brightness, and use that to estimate the optimal\n  * new exposure and gain for the scene.\n  */\n-void Agc::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameContext,\n+void Agc::process(IPAContext &context,\n+\t\t  IPU3FrameContext &frameContext,\n \t\t  const ipu3_uapi_stats_3a *stats)\n {\n \t/*\ndiff --git a/src/ipa/ipu3/algorithms/agc.h b/src/ipa/ipu3/algorithms/agc.h\nindex 105ae0f2aac6..96585f48933f 100644\n--- a/src/ipa/ipu3/algorithms/agc.h\n+++ b/src/ipa/ipu3/algorithms/agc.h\n@@ -28,14 +28,14 @@ public:\n \t~Agc() = default;\n \n \tint configure(IPAContext &context, const IPAConfigInfo &configInfo) override;\n-\tvoid process(IPAContext &context, IPAFrameContext *frameContext,\n+\tvoid process(IPAContext &context, IPU3FrameContext &frameContext,\n \t\t     const ipu3_uapi_stats_3a *stats) override;\n \n private:\n \tdouble measureBrightness(const ipu3_uapi_stats_3a *stats,\n \t\t\t\t const ipu3_uapi_grid_config &grid) const;\n \tutils::Duration filterExposure(utils::Duration currentExposure);\n-\tvoid computeExposure(IPAContext &context, IPAFrameContext *frameContext,\n+\tvoid computeExposure(IPAContext &context, IPU3FrameContext &frameContext,\n \t\t\t     double yGain, double iqMeanGain);\n \tdouble estimateLuminance(IPAActiveState &activeState,\n \t\t\t\t const ipu3_uapi_grid_config &grid,\ndiff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\nindex b658ee546b87..35eafd5ec50e 100644\n--- a/src/ipa/ipu3/algorithms/awb.cpp\n+++ b/src/ipa/ipu3/algorithms/awb.cpp\n@@ -387,7 +387,8 @@ void Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)\n /**\n  * \\copydoc libcamera::ipa::Algorithm::process\n  */\n-void Awb::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameContext,\n+void Awb::process(IPAContext &context,\n+\t\t  [[maybe_unused]] IPU3FrameContext &frameContext,\n \t\t  const ipu3_uapi_stats_3a *stats)\n {\n \tcalculateWBGains(stats);\ndiff --git a/src/ipa/ipu3/algorithms/awb.h b/src/ipa/ipu3/algorithms/awb.h\nindex 0acd21480845..28e39620fd59 100644\n--- a/src/ipa/ipu3/algorithms/awb.h\n+++ b/src/ipa/ipu3/algorithms/awb.h\n@@ -40,7 +40,7 @@ public:\n \n \tint configure(IPAContext &context, const IPAConfigInfo &configInfo) override;\n \tvoid prepare(IPAContext &context, ipu3_uapi_params *params) override;\n-\tvoid process(IPAContext &context, IPAFrameContext *frameContext,\n+\tvoid process(IPAContext &context, IPU3FrameContext &frameContext,\n \t\t     const ipu3_uapi_stats_3a *stats) override;\n \n private:\ndiff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp\nindex 49a5558b6faa..72627ea1e658 100644\n--- a/src/ipa/ipu3/algorithms/tone_mapping.cpp\n+++ b/src/ipa/ipu3/algorithms/tone_mapping.cpp\n@@ -78,7 +78,8 @@ void ToneMapping::prepare([[maybe_unused]] IPAContext &context,\n  * The tone mapping look up table is generated as an inverse power curve from\n  * our gamma setting.\n  */\n-void ToneMapping::process(IPAContext &context, [[maybe_unused]] IPAFrameContext *frameContext,\n+void ToneMapping::process(IPAContext &context,\n+\t\t\t  [[maybe_unused]] IPU3FrameContext &frameContext,\n \t\t\t  [[maybe_unused]] const ipu3_uapi_stats_3a *stats)\n {\n \t/*\ndiff --git a/src/ipa/ipu3/algorithms/tone_mapping.h b/src/ipa/ipu3/algorithms/tone_mapping.h\nindex d7d4800628f2..8cce38c742a6 100644\n--- a/src/ipa/ipu3/algorithms/tone_mapping.h\n+++ b/src/ipa/ipu3/algorithms/tone_mapping.h\n@@ -20,7 +20,7 @@ public:\n \n \tint configure(IPAContext &context, const IPAConfigInfo &configInfo) override;\n \tvoid prepare(IPAContext &context, ipu3_uapi_params *params) override;\n-\tvoid process(IPAContext &context, IPAFrameContext *frameContext,\n+\tvoid process(IPAContext &context, IPU3FrameContext &frameContext,\n \t\t     const ipu3_uapi_stats_3a *stats) override;\n \n private:\ndiff --git a/src/ipa/ipu3/ipa_context.cpp b/src/ipa/ipu3/ipa_context.cpp\nindex dd139cb4c868..536d76ecd63b 100644\n--- a/src/ipa/ipu3/ipa_context.cpp\n+++ b/src/ipa/ipu3/ipa_context.cpp\n@@ -35,22 +35,6 @@ namespace libcamera::ipa::ipu3 {\n  * most recently computed by the IPA algorithms.\n  */\n \n-/**\n- * \\struct IPAFrameContext\n- * \\brief Context for a frame\n- *\n- * The frame context stores data specific to a single frame processed by the\n- * IPA. Each frame processed by the IPA has a context associated with it,\n- * accessible through the IPAContext structure.\n- *\n- * Fields in the frame context should reflect values and controls\n- * associated with the specific frame as requested by the application, and\n- * as configured by the hardware. Fields can be read by algorithms to\n- * determine if they should update any specific action for this frame, and\n- * finally to update the metadata control lists when the frame is fully\n- * completed.\n- */\n-\n /**\n  * \\struct IPAContext\n  * \\brief Global IPA context data shared between all algorithms\n@@ -181,16 +165,16 @@ namespace libcamera::ipa::ipu3 {\n  */\n \n /**\n- * \\var IPAFrameContext::frame\n- * \\brief The frame number\n+ * \\struct IPU3FrameContext\n+ * \\copybrief libcamera::ipa::IPAFrameContext\n  *\n- * \\var IPAFrameContext::sensor\n+ * \\var IPU3FrameContext::sensor\n  * \\brief Effective sensor values that were applied for the frame\n  *\n- * \\var IPAFrameContext::sensor.exposure\n+ * \\var IPU3FrameContext::sensor.exposure\n  * \\brief Exposure time expressed as a number of lines\n  *\n- * \\var IPAFrameContext::sensor.gain\n+ * \\var IPU3FrameContext::sensor.gain\n  * \\brief Analogue gain multiplier\n  */\n \ndiff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h\nindex 193fc44a821a..c4aa4c3f4f6a 100644\n--- a/src/ipa/ipu3/ipa_context.h\n+++ b/src/ipa/ipu3/ipa_context.h\n@@ -73,8 +73,7 @@ struct IPAActiveState {\n \t} toneMapping;\n };\n \n-struct IPAFrameContext {\n-\tuint32_t frame;\n+struct IPU3FrameContext : public IPAFrameContext {\n \n \tstruct {\n \t\tuint32_t exposure;\n@@ -86,7 +85,7 @@ struct IPAContext {\n \tIPASessionConfiguration configuration;\n \tIPAActiveState activeState;\n \n-\tFCQueue<IPAFrameContext> frameContexts;\n+\tFCQueue<IPU3FrameContext> frameContexts;\n };\n \n } /* namespace ipa::ipu3 */\ndiff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 5396b0704950..13d7c878a242 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -605,7 +605,7 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,\n \tconst ipu3_uapi_stats_3a *stats =\n \t\treinterpret_cast<ipu3_uapi_stats_3a *>(mem.data());\n \n-\tIPAFrameContext &frameContext = context_.frameContexts.get(frame);\n+\tIPU3FrameContext &frameContext = context_.frameContexts.get(frame);\n \n \tif (frameContext.frame != frame)\n \t\tLOG(IPAIPU3, Warning) << \"Frame \" << frame << \" does not match its frame context\";\n@@ -618,7 +618,7 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,\n \tControlList ctrls(controls::controls);\n \n \tfor (auto const &algo : algorithms())\n-\t\talgo->process(context_, &frameContext, stats);\n+\t\talgo->process(context_, frameContext, stats);\n \n \tsetControls(frame);\n \n@@ -654,7 +654,7 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,\n void IPAIPU3::queueRequest(const uint32_t frame, const ControlList &controls)\n {\n \t/* \\todo Start processing for 'frame' based on 'controls'. */\n-\tIPAFrameContext &frameContext = context_.frameContexts.initialise(frame);\n+\tIPU3FrameContext &frameContext = context_.frameContexts.initialise(frame);\n \n \t/* \\todo Implement queueRequest to each algorithm. */\n \t(void)frameContext;\ndiff --git a/src/ipa/ipu3/module.h b/src/ipa/ipu3/module.h\nindex d94fc4594871..6d0d50f615d8 100644\n--- a/src/ipa/ipu3/module.h\n+++ b/src/ipa/ipu3/module.h\n@@ -19,7 +19,7 @@ namespace libcamera {\n \n namespace ipa::ipu3 {\n \n-using Module = ipa::Module<IPAContext, IPAFrameContext, IPAConfigInfo,\n+using Module = ipa::Module<IPAContext, IPU3FrameContext, IPAConfigInfo,\n \t\t\t   ipu3_uapi_params, ipu3_uapi_stats_3a>;\n \n } /* namespace ipa::ipu3 */\ndiff --git a/src/ipa/libipa/algorithm.h b/src/ipa/libipa/algorithm.h\nindex ccc659a63e3b..0fe3d772963a 100644\n--- a/src/ipa/libipa/algorithm.h\n+++ b/src/ipa/libipa/algorithm.h\n@@ -49,7 +49,7 @@ public:\n \t}\n \n \tvirtual void process([[maybe_unused]] typename Module::Context &context,\n-\t\t\t     [[maybe_unused]] typename Module::FrameContext *frameContext,\n+\t\t\t     [[maybe_unused]] typename Module::FrameContext &frameContext,\n \t\t\t     [[maybe_unused]] const typename Module::Stats *stats)\n \t{\n \t}\ndiff --git a/src/ipa/libipa/fc_queue.cpp b/src/ipa/libipa/fc_queue.cpp\nindex a69579290043..ed058f1cc648 100644\n--- a/src/ipa/libipa/fc_queue.cpp\n+++ b/src/ipa/libipa/fc_queue.cpp\n@@ -66,6 +66,24 @@ namespace ipa {\n  * \\todo Set an error flag for per-frame control errors.\n  */\n \n+/**\n+ * \\struct IPAFrameContext\n+ * \\brief Context for a frame\n+ *\n+ * The frame context stores data specific to a single frame processed by the\n+ * IPA. Each frame processed by the IPA has a context associated with it,\n+ * accessible through the Frame Context Queue.\n+ *\n+ * Fields in the frame context should reflect values and controls associated\n+ * with the specific frame as requested by the application, and as configured by\n+ * the hardware. Fields can be read by algorithms to determine if they should\n+ * update any specific action for this frame, and finally to update the metadata\n+ * control lists when the frame is fully completed.\n+ *\n+ * \\var IPAFrameContext::frame\n+ * \\brief The frame number\n+ */\n+\n /**\n  * \\fn FCQueue::clear()\n  * \\brief Clear the context queue\ndiff --git a/src/ipa/libipa/fc_queue.h b/src/ipa/libipa/fc_queue.h\nindex 5966817ce673..7f0a1f74938d 100644\n--- a/src/ipa/libipa/fc_queue.h\n+++ b/src/ipa/libipa/fc_queue.h\n@@ -24,6 +24,10 @@ namespace ipa {\n  */\n static constexpr uint32_t kMaxFrameContexts = 16;\n \n+struct IPAFrameContext {\n+\tunsigned int frame;\n+};\n+\n template<typename FrameContext>\n class FCQueue : private std::array<FrameContext, kMaxFrameContexts>\n {\ndiff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\nindex 483e941fe427..40d27963ef68 100644\n--- a/src/ipa/rkisp1/algorithms/agc.cpp\n+++ b/src/ipa/rkisp1/algorithms/agc.cpp\n@@ -281,7 +281,7 @@ double Agc::measureBrightness(const rkisp1_cif_isp_hist_stat *hist) const\n  * new exposure and gain for the scene.\n  */\n void Agc::process(IPAContext &context,\n-\t\t  [[maybe_unused]] IPAFrameContext *frameContext,\n+\t\t  [[maybe_unused]] RKISP1FrameContext &frameContext,\n \t\t  const rkisp1_stat_buffer *stats)\n {\n \tconst rkisp1_cif_isp_stat *params = &stats->params;\ndiff --git a/src/ipa/rkisp1/algorithms/agc.h b/src/ipa/rkisp1/algorithms/agc.h\nindex 1c9818b7db2a..af7fe2740908 100644\n--- a/src/ipa/rkisp1/algorithms/agc.h\n+++ b/src/ipa/rkisp1/algorithms/agc.h\n@@ -27,7 +27,7 @@ public:\n \n \tint configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;\n \tvoid prepare(IPAContext &context, rkisp1_params_cfg *params) override;\n-\tvoid process(IPAContext &context, IPAFrameContext *frameContext,\n+\tvoid process(IPAContext &context, RKISP1FrameContext &frameContext,\n \t\t     const rkisp1_stat_buffer *stats) override;\n \n private:\ndiff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\nindex 427aaeb1e955..3beafb73ca33 100644\n--- a/src/ipa/rkisp1/algorithms/awb.cpp\n+++ b/src/ipa/rkisp1/algorithms/awb.cpp\n@@ -120,7 +120,7 @@ void Awb::prepare(IPAContext &context, rkisp1_params_cfg *params)\n  * \\copydoc libcamera::ipa::Algorithm::process\n  */\n void Awb::process([[maybe_unused]] IPAContext &context,\n-\t\t  [[maybe_unused]] IPAFrameContext *frameCtx,\n+\t\t  [[maybe_unused]] RKISP1FrameContext &frameCtx,\n \t\t  const rkisp1_stat_buffer *stats)\n {\n \tconst rkisp1_cif_isp_stat *params = &stats->params;\ndiff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h\nindex 667a8beb7689..5954034b8142 100644\n--- a/src/ipa/rkisp1/algorithms/awb.h\n+++ b/src/ipa/rkisp1/algorithms/awb.h\n@@ -21,7 +21,7 @@ public:\n \n \tint configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;\n \tvoid prepare(IPAContext &context, rkisp1_params_cfg *params) override;\n-\tvoid process(IPAContext &context, IPAFrameContext *frameCtx,\n+\tvoid process(IPAContext &context, RKISP1FrameContext &frameCtx,\n \t\t     const rkisp1_stat_buffer *stats) override;\n \n private:\ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex a8daeca487ae..c42bcd73b314 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -14,6 +14,8 @@\n \n #include <libcamera/geometry.h>\n \n+#include <libipa/fc_queue.h>\n+\n namespace libcamera {\n \n namespace ipa::rkisp1 {\n@@ -78,7 +80,7 @@ struct IPAActiveState {\n \tunsigned int frameCount;\n };\n \n-struct IPAFrameContext {\n+struct RKISP1FrameContext : public IPAFrameContext {\n };\n \n struct IPAContext {\ndiff --git a/src/ipa/rkisp1/module.h b/src/ipa/rkisp1/module.h\nindex 89f83208a75c..2568c624df0f 100644\n--- a/src/ipa/rkisp1/module.h\n+++ b/src/ipa/rkisp1/module.h\n@@ -19,7 +19,7 @@ namespace libcamera {\n \n namespace ipa::rkisp1 {\n \n-using Module = ipa::Module<IPAContext, IPAFrameContext, IPACameraSensorInfo,\n+using Module = ipa::Module<IPAContext, RKISP1FrameContext, IPACameraSensorInfo,\n \t\t\t   rkisp1_params_cfg, rkisp1_stat_buffer>;\n \n } /* namespace ipa::rkisp1 */\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 88e6a2b23eed..c3aa49329693 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -323,8 +323,11 @@ void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId\n \n \tunsigned int aeState = 0;\n \n+\t/* \\todo Obtain the frame context to pass to process from the FCQueue */\n+\tRKISP1FrameContext frameContext;\n+\n \tfor (auto const &algo : algorithms())\n-\t\talgo->process(context_, nullptr, stats);\n+\t\talgo->process(context_, frameContext, stats);\n \n \tsetControls(frame);\n \n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "03/17"
    ]
}