diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-10-22 01:21:05 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-11-09 23:43:56 +0200 |
commit | 02bc2a8a24baaff82d1c5f8cb5d9ab7d1afab426 (patch) | |
tree | 5ce8ec5c7a16bfc606912319162dc1a4ec7db6ff /src/ipa/libipa | |
parent | bc0d9a6f5d51f5a60fe108778fe1eb1a7a39531f (diff) |
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/ipa/libipa')
-rw-r--r-- | src/ipa/libipa/algorithm.cpp | 34 | ||||
-rw-r--r-- | src/ipa/libipa/algorithm.h | 14 |
2 files changed, 24 insertions, 24 deletions
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 @@ -67,23 +67,6 @@ namespace ipa { */ /** - * \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 * \param[in] context The shared IPA context @@ -101,6 +84,23 @@ namespace ipa { */ /** + * \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 * \param[in] context The shared IPA context 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, |