Message ID | 20240717085444.289997-10-mzamazal@redhat.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Milan On 17/07/2024 09:54, Milan Zamazal wrote: > The Module class is a base class for all IPA modules. > In addition, implement logPrefix() of the module for the softIPA. > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com> > Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> > --- Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> > src/ipa/simple/soft_simple.cpp | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp > index 3cc873a2..b41b24c6 100644 > --- a/src/ipa/simple/soft_simple.cpp > +++ b/src/ipa/simple/soft_simple.cpp > @@ -29,6 +29,7 @@ > #include "libipa/camera_sensor_helper.h" > > #include "black_level.h" > +#include "module.h" > > namespace libcamera { > LOG_DEFINE_CATEGORY(IPASoft) > @@ -53,7 +54,7 @@ static constexpr float kExposureOptimal = kExposureBinsCount / 2.0; > */ > static constexpr float kExposureSatisfactory = 0.2; > > -class IPASoftSimple : public ipa::soft::IPASoftInterface > +class IPASoftSimple : public ipa::soft::IPASoftInterface, public Module > { > public: > IPASoftSimple() > @@ -75,6 +76,9 @@ public: > > void processStats(const ControlList &sensorControls) override; > > +protected: > + std::string logPrefix() const override; > + > private: > void updateExposure(double exposureMSV); > > @@ -420,6 +424,11 @@ void IPASoftSimple::updateExposure(double exposureMSV) > again_ = std::clamp(again_, againMin_, againMax_); > } > > +std::string IPASoftSimple::logPrefix() const > +{ > + return "IPASoft"; > +} > + > } /* namespace ipa::soft */ > > /*
Hi Milan, Thank you for the patch. On Wed, Jul 17, 2024 at 10:54:30AM +0200, Milan Zamazal wrote: > The Module class is a base class for all IPA modules. > In addition, implement logPrefix() of the module for the softIPA. > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com> > Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/ipa/simple/soft_simple.cpp | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp > index 3cc873a2..b41b24c6 100644 > --- a/src/ipa/simple/soft_simple.cpp > +++ b/src/ipa/simple/soft_simple.cpp > @@ -29,6 +29,7 @@ > #include "libipa/camera_sensor_helper.h" > > #include "black_level.h" > +#include "module.h" > > namespace libcamera { > LOG_DEFINE_CATEGORY(IPASoft) > @@ -53,7 +54,7 @@ static constexpr float kExposureOptimal = kExposureBinsCount / 2.0; > */ > static constexpr float kExposureSatisfactory = 0.2; > > -class IPASoftSimple : public ipa::soft::IPASoftInterface > +class IPASoftSimple : public ipa::soft::IPASoftInterface, public Module > { > public: > IPASoftSimple() > @@ -75,6 +76,9 @@ public: > > void processStats(const ControlList &sensorControls) override; > > +protected: > + std::string logPrefix() const override; > + > private: > void updateExposure(double exposureMSV); > > @@ -420,6 +424,11 @@ void IPASoftSimple::updateExposure(double exposureMSV) > again_ = std::clamp(again_, againMin_, againMax_); > } > > +std::string IPASoftSimple::logPrefix() const > +{ > + return "IPASoft"; > +} > + > } /* namespace ipa::soft */ > > /*
diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp index 3cc873a2..b41b24c6 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -29,6 +29,7 @@ #include "libipa/camera_sensor_helper.h" #include "black_level.h" +#include "module.h" namespace libcamera { LOG_DEFINE_CATEGORY(IPASoft) @@ -53,7 +54,7 @@ static constexpr float kExposureOptimal = kExposureBinsCount / 2.0; */ static constexpr float kExposureSatisfactory = 0.2; -class IPASoftSimple : public ipa::soft::IPASoftInterface +class IPASoftSimple : public ipa::soft::IPASoftInterface, public Module { public: IPASoftSimple() @@ -75,6 +76,9 @@ public: void processStats(const ControlList &sensorControls) override; +protected: + std::string logPrefix() const override; + private: void updateExposure(double exposureMSV); @@ -420,6 +424,11 @@ void IPASoftSimple::updateExposure(double exposureMSV) again_ = std::clamp(again_, againMin_, againMax_); } +std::string IPASoftSimple::logPrefix() const +{ + return "IPASoft"; +} + } /* namespace ipa::soft */ /*