[{"id":24535,"web_url":"https://patchwork.libcamera.org/comment/24535/","msgid":"<5ac63d34-c5c1-9112-014c-eef146e32911@ideasonboard.com>","date":"2022-08-11T06:20:49","subject":"Re: [libcamera-devel] [PATCH v2 06/10] ipa: libipa: Provide a\n\tcommon base for FrameContexts","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch\n\nOn 8/5/22 19:23, Jacopo Mondi via libcamera-devel wrote:\n> From: Kieran Bingham via libcamera-devel <libcamera-devel@lists.libcamera.org>\n>\n> Provide a common IPAFrameContext as a base for IPA modules to inherit\n> from.\n>\n> This will allow having a common set of parameters for every FrameContext\n> required by the FCQueue implementation.\n>\n> Make both the RKISP1 and the IPU3 define IPA specific FrameContext\n> structures which inherit from the IPAFrameContext.\n>\n> While adjusting interface to Algorithm::process() the FrameContext is\n> converted from a pointer to a reference.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\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             | 29 ++++--------------------\n>   src/ipa/ipu3/ipa_context.h               |  8 ++-----\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              | 21 +++++++++++++++++\n>   src/ipa/libipa/fc_queue.h                |  5 ++++\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, 66 insertions(+), 54 deletions(-)\n>\n> diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp\n> index d07521a090ac..fcbf8e557b10 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 */\n> diff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h\n> index 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:\n> diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp\n> index 5bc64ae52214..92ea6249798d 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/*\n> diff --git a/src/ipa/ipu3/algorithms/agc.h b/src/ipa/ipu3/algorithms/agc.h\n> index 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,\n> diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp\n> index 704267222a31..45f8e5f29119 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);\n> diff --git a/src/ipa/ipu3/algorithms/awb.h b/src/ipa/ipu3/algorithms/awb.h\n> index 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:\n> diff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp\n> index f86e79b24a67..977741c5a4d4 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/*\n> diff --git a/src/ipa/ipu3/algorithms/tone_mapping.h b/src/ipa/ipu3/algorithms/tone_mapping.h\n> index 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:\n> diff --git a/src/ipa/ipu3/ipa_context.cpp b/src/ipa/ipu3/ipa_context.cpp\n> index 9605c8a1106d..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,20 +165,17 @@ 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> - * \\var IPAFrameContext::error\n> - * \\brief The error flags for this frame context\n>    */\n>   \n>   } /* namespace libcamera::ipa::ipu3 */\n> diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h\n> index dc5b7c30aaf9..c4aa4c3f4f6a 100644\n> --- a/src/ipa/ipu3/ipa_context.h\n> +++ b/src/ipa/ipu3/ipa_context.h\n> @@ -14,7 +14,6 @@\n>   \n>   #include <libcamera/controls.h>\n>   #include <libcamera/geometry.h>\n> -#include <libcamera/request.h>\n>   \n>   #include <libipa/fc_queue.h>\n>   \n> @@ -74,22 +73,19 @@ 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>   \t\tdouble gain;\n>   \t} sensor;\n> -\n> -\tRequest::Errors error;\n>   };\n>   \n>   struct IPAContext {\n>   \tIPASessionConfiguration configuration;\n>   \tIPAActiveState activeState;\n>   \n> -\tFCQueue<IPAFrameContext> frameContexts;\n> +\tFCQueue<IPU3FrameContext> frameContexts;\n>   };\n>   \n>   } /* namespace ipa::ipu3 */\n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index 209a6b040f8f..24839fd1edee 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -569,7 +569,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> @@ -582,7 +582,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> @@ -618,7 +618,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;\n> diff --git a/src/ipa/ipu3/module.h b/src/ipa/ipu3/module.h\n> index 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 */\n> diff --git a/src/ipa/libipa/algorithm.h b/src/ipa/libipa/algorithm.h\n> index 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}\n> diff --git a/src/ipa/libipa/fc_queue.cpp b/src/ipa/libipa/fc_queue.cpp\n> index 37ffca60b992..f0d0b3c7168d 100644\n> --- a/src/ipa/libipa/fc_queue.cpp\n> +++ b/src/ipa/libipa/fc_queue.cpp\n> @@ -66,6 +66,27 @@ namespace ipa {\n>    * the PFCError flag is automatically raised on the FrameContext.\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> + * \\var IPAFrameContext::error\n> + * \\brief The error flags associated with the frame\n> + */\n> +\n>   /**\n>    * \\fn FCQueue::clear()\n>    * \\brief Clear the context queue\n> diff --git a/src/ipa/libipa/fc_queue.h b/src/ipa/libipa/fc_queue.h\n> index 023b52420fe7..73b7f25f8c20 100644\n> --- a/src/ipa/libipa/fc_queue.h\n> +++ b/src/ipa/libipa/fc_queue.h\n> @@ -26,6 +26,11 @@ namespace ipa {\n>    */\n>   static constexpr uint32_t kMaxFrameContexts = 16;\n>   \n> +struct IPAFrameContext {\n> +\tunsigned int frame;\n> +\tRequest::Errors error;\n> +};\n> +\n>   template<typename FrameContext>\n>   class FCQueue : private std::array<FrameContext, kMaxFrameContexts>\n>   {\n> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\n> index 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;\n> diff --git a/src/ipa/rkisp1/algorithms/agc.h b/src/ipa/rkisp1/algorithms/agc.h\n> index 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:\n> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\n> index 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;\n> diff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h\n> index 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:\n> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\n> index 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 {\n> diff --git a/src/ipa/rkisp1/module.h b/src/ipa/rkisp1/module.h\n> index 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 */\n> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\n> index a64716f588a8..a2483f27cf52 100644\n> --- a/src/ipa/rkisp1/rkisp1.cpp\n> +++ b/src/ipa/rkisp1/rkisp1.cpp\n> @@ -329,8 +329,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>","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 53B88BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Aug 2022 06:20:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C25296332B;\n\tThu, 11 Aug 2022 08:20:56 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A32DB61FA8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Aug 2022 08:20:55 +0200 (CEST)","from [IPV6:2401:4900:1f3f:c7a1:27b3:9637:38a7:6084] (unknown\n\t[IPv6:2401:4900:1f3f:c7a1:27b3:9637:38a7:6084])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 792F43F1;\n\tThu, 11 Aug 2022 08:20:54 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660198856;\n\tbh=WHCDCrp42+9eEMs/JkPin14/DPmWAuZSgK8FgRC9vMQ=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=XvaVESZ40m2IH8brwFZopkTweBzL0h3vsSdzvdu6yLvsp0gCHf4sjRVn/Nj+uxnTK\n\tANS8KWn9Lqjvp2ah1lRGD/fLC/cd99KQPT6PMYK2iDHjpOOTFaZtMiYzp/kEio7EJK\n\tvezNrhcZEseqtc+LwNmVVksCEiux2RlHOIy+s8y4mN896katwikVHtXr7fJKs1XBqZ\n\t1UiOdycEdDn68uUqMqHeXELvX7ygl4qgsRIw4fXgRYrKoTUs0VYDOc1nggupV0EFfy\n\tV4CNecFu2jUJjRiIsf/6s9GDP/Nbr6nxfj3Lbm/d0DOPqOkymV1sTEWyt7Re6cfKVG\n\t9RJFCayoY5ykA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660198855;\n\tbh=WHCDCrp42+9eEMs/JkPin14/DPmWAuZSgK8FgRC9vMQ=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=IxR5xXE9MTQDam/tRlE3VEBwZNG2BqzSf2bu6EHYx/GTilrUMjK602tJsAlYJR2kg\n\tY9oDqzYAN/DSynZHK6ygIDu4Fy+pcSHlTczIccR/Ym4CazNbAN9NHKzcXvwvfVsmJP\n\t1KsC+iA0cFTmWMIXhc2qEtHlAHU/vq6VwhVHo+eQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IxR5xXE9\"; dkim-atps=neutral","Message-ID":"<5ac63d34-c5c1-9112-014c-eef146e32911@ideasonboard.com>","Date":"Thu, 11 Aug 2022 11:50:49 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Jacopo Mondi <jacopo@jmondi.org>, libcamera-devel@lists.libcamera.org","References":"<20220805135312.47497-1-jacopo@jmondi.org>\n\t<20220805135312.47497-7-jacopo@jmondi.org>","In-Reply-To":"<20220805135312.47497-7-jacopo@jmondi.org>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 06/10] ipa: libipa: Provide a\n\tcommon base 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":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]