From 02bc2a8a24baaff82d1c5f8cb5d9ab7d1afab426 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 22 Oct 2022 01:21:05 +0300 Subject: ipa: Sort algorithm operations based on calling order Reorder functions in the base ipa::Algorithm and its derived classes to match the calling order: queueRequest(), prepare() and process(). This makes the code flow easier to read. No functional change intended. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Jacopo Mondi --- src/ipa/libipa/algorithm.cpp | 34 +++++++++++++++++----------------- src/ipa/libipa/algorithm.h | 14 +++++++------- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src/ipa/libipa') diff --git a/src/ipa/libipa/algorithm.cpp b/src/ipa/libipa/algorithm.cpp index 71f58384..bc1c29a6 100644 --- a/src/ipa/libipa/algorithm.cpp +++ b/src/ipa/libipa/algorithm.cpp @@ -66,23 +66,6 @@ namespace ipa { * \return 0 if successful, an error code otherwise */ -/** - * \fn Algorithm::prepare() - * \brief Fill the \a params buffer with ISP processing parameters for a frame - * \param[in] context The shared IPA context - * \param[in] frame The frame context sequence number - * \param[in] frameContext The FrameContext for this frame - * \param[out] params The ISP specific parameters - * - * This function is called for every frame when the camera is running before it - * is processed by the ISP to prepare the ISP processing parameters for that - * frame. - * - * Algorithms shall fill in the parameter structure fields appropriately to - * configure the ISP processing blocks that they are responsible for. This - * includes setting fields and flags that enable those processing blocks. - */ - /** * \fn Algorithm::queueRequest() * \brief Provide control values to the algorithm @@ -100,6 +83,23 @@ namespace ipa { * use during frame processing. */ +/** + * \fn Algorithm::prepare() + * \brief Fill the \a params buffer with ISP processing parameters for a frame + * \param[in] context The shared IPA context + * \param[in] frame The frame context sequence number + * \param[in] frameContext The FrameContext for this frame + * \param[out] params The ISP specific parameters + * + * This function is called for every frame when the camera is running before it + * is processed by the ISP to prepare the ISP processing parameters for that + * frame. + * + * Algorithms shall fill in the parameter structure fields appropriately to + * configure the ISP processing blocks that they are responsible for. This + * includes setting fields and flags that enable those processing blocks. + */ + /** * \fn Algorithm::process() * \brief Process ISP statistics, and run algorithm operations diff --git a/src/ipa/libipa/algorithm.h b/src/ipa/libipa/algorithm.h index 38b3231c..987e3e4c 100644 --- a/src/ipa/libipa/algorithm.h +++ b/src/ipa/libipa/algorithm.h @@ -38,13 +38,6 @@ public: return 0; } - virtual void prepare([[maybe_unused]] typename Module::Context &context, - [[maybe_unused]] const uint32_t frame, - [[maybe_unused]] typename Module::FrameContext &frameContext, - [[maybe_unused]] typename Module::Params *params) - { - } - virtual void queueRequest([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] const uint32_t frame, [[maybe_unused]] typename Module::FrameContext &frameContext, @@ -52,6 +45,13 @@ public: { } + virtual void prepare([[maybe_unused]] typename Module::Context &context, + [[maybe_unused]] const uint32_t frame, + [[maybe_unused]] typename Module::FrameContext &frameContext, + [[maybe_unused]] typename Module::Params *params) + { + } + virtual void process([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] const uint32_t frame, [[maybe_unused]] typename Module::FrameContext &frameContext, -- cgit v1.2.1