Message ID | 20211022151218.111966-10-jeanmichel.hautbois@ideasonboard.com |
---|---|
State | Changes Requested |
Headers | show |
Series |
|
Related | show |
Hi Jean-Michel, Thank you for the patch. On Fri, Oct 22, 2021 at 05:12:08PM +0200, Jean-Michel Hautbois wrote: > Let the algorithm perform its initial configuration. Implement > configure() to set a default gamma value and let process do the updates > needed. > > Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> > --- > src/ipa/ipu3/algorithms/tone_mapping.cpp | 16 ++++++++++++++++ > src/ipa/ipu3/algorithms/tone_mapping.h | 1 + > 2 files changed, 17 insertions(+) > > diff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp > index 40337f9d..8fa8c7e9 100644 > --- a/src/ipa/ipu3/algorithms/tone_mapping.cpp > +++ b/src/ipa/ipu3/algorithms/tone_mapping.cpp > @@ -19,6 +19,22 @@ ToneMapping::ToneMapping() > { > } > > +/** > + * \brief Configure the tone mapping given a configInfo > + * \param[in] context The shared IPA context > + * \param[in] configInfo The IPA configuration data > + * > + * \return 0 > + */ > +int ToneMapping::configure(IPAContext &context, > + [[maybe_unused]] const IPAConfigInfo &configInfo) > +{ > + /* Initialise tone mapping gamma value */ s/value/value./ Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > + context.frameContext.toneMapping.gamma = 0.0; > + > + return 0; > +} > + > void ToneMapping::prepare([[maybe_unused]] IPAContext &context, > ipu3_uapi_params *params) > { > diff --git a/src/ipa/ipu3/algorithms/tone_mapping.h b/src/ipa/ipu3/algorithms/tone_mapping.h > index 1dae4f9a..46dd6171 100644 > --- a/src/ipa/ipu3/algorithms/tone_mapping.h > +++ b/src/ipa/ipu3/algorithms/tone_mapping.h > @@ -18,6 +18,7 @@ class ToneMapping : public Algorithm > public: > ToneMapping(); > > + int configure(IPAContext &context, const IPAConfigInfo &configInfo) override; > void prepare(IPAContext &context, ipu3_uapi_params *params) override; > void process(IPAContext &context, const ipu3_uapi_stats_3a *stats) override; >
Quoting Jean-Michel Hautbois (2021-10-22 16:12:08) > Let the algorithm perform its initial configuration. Implement > configure() to set a default gamma value and let process do the updates > needed. > > Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > src/ipa/ipu3/algorithms/tone_mapping.cpp | 16 ++++++++++++++++ > src/ipa/ipu3/algorithms/tone_mapping.h | 1 + > 2 files changed, 17 insertions(+) > > diff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp > index 40337f9d..8fa8c7e9 100644 > --- a/src/ipa/ipu3/algorithms/tone_mapping.cpp > +++ b/src/ipa/ipu3/algorithms/tone_mapping.cpp > @@ -19,6 +19,22 @@ ToneMapping::ToneMapping() > { > } > > +/** > + * \brief Configure the tone mapping given a configInfo > + * \param[in] context The shared IPA context > + * \param[in] configInfo The IPA configuration data > + * > + * \return 0 > + */ > +int ToneMapping::configure(IPAContext &context, > + [[maybe_unused]] const IPAConfigInfo &configInfo) > +{ > + /* Initialise tone mapping gamma value */ > + context.frameContext.toneMapping.gamma = 0.0; > + > + return 0; > +} > + > void ToneMapping::prepare([[maybe_unused]] IPAContext &context, > ipu3_uapi_params *params) > { > diff --git a/src/ipa/ipu3/algorithms/tone_mapping.h b/src/ipa/ipu3/algorithms/tone_mapping.h > index 1dae4f9a..46dd6171 100644 > --- a/src/ipa/ipu3/algorithms/tone_mapping.h > +++ b/src/ipa/ipu3/algorithms/tone_mapping.h > @@ -18,6 +18,7 @@ class ToneMapping : public Algorithm > public: > ToneMapping(); > > + int configure(IPAContext &context, const IPAConfigInfo &configInfo) override; > void prepare(IPAContext &context, ipu3_uapi_params *params) override; > void process(IPAContext &context, const ipu3_uapi_stats_3a *stats) override; > > -- > 2.32.0 >
diff --git a/src/ipa/ipu3/algorithms/tone_mapping.cpp b/src/ipa/ipu3/algorithms/tone_mapping.cpp index 40337f9d..8fa8c7e9 100644 --- a/src/ipa/ipu3/algorithms/tone_mapping.cpp +++ b/src/ipa/ipu3/algorithms/tone_mapping.cpp @@ -19,6 +19,22 @@ ToneMapping::ToneMapping() { } +/** + * \brief Configure the tone mapping given a configInfo + * \param[in] context The shared IPA context + * \param[in] configInfo The IPA configuration data + * + * \return 0 + */ +int ToneMapping::configure(IPAContext &context, + [[maybe_unused]] const IPAConfigInfo &configInfo) +{ + /* Initialise tone mapping gamma value */ + context.frameContext.toneMapping.gamma = 0.0; + + return 0; +} + void ToneMapping::prepare([[maybe_unused]] IPAContext &context, ipu3_uapi_params *params) { diff --git a/src/ipa/ipu3/algorithms/tone_mapping.h b/src/ipa/ipu3/algorithms/tone_mapping.h index 1dae4f9a..46dd6171 100644 --- a/src/ipa/ipu3/algorithms/tone_mapping.h +++ b/src/ipa/ipu3/algorithms/tone_mapping.h @@ -18,6 +18,7 @@ class ToneMapping : public Algorithm public: ToneMapping(); + int configure(IPAContext &context, const IPAConfigInfo &configInfo) override; void prepare(IPAContext &context, ipu3_uapi_params *params) override; void process(IPAContext &context, const ipu3_uapi_stats_3a *stats) override;
Let the algorithm perform its initial configuration. Implement configure() to set a default gamma value and let process do the updates needed. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> --- src/ipa/ipu3/algorithms/tone_mapping.cpp | 16 ++++++++++++++++ src/ipa/ipu3/algorithms/tone_mapping.h | 1 + 2 files changed, 17 insertions(+)