Skip to content

Commit

Permalink
libcamera: software_isp: Let IPASoftSimple inherit Module
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Umang Jain <[email protected]>
Reviewed-by: Daniel Scally <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Signed-off-by: Kieran Bingham <[email protected]>
  • Loading branch information
mz-pdm authored and kbingham committed Sep 27, 2024
1 parent cca55c8 commit 0cc74c4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ipa/simple/soft_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "libipa/camera_sensor_helper.h"

#include "black_level.h"
#include "module.h"

namespace libcamera {
LOG_DEFINE_CATEGORY(IPASoft)
Expand All @@ -54,7 +55,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()
Expand All @@ -76,6 +77,9 @@ class IPASoftSimple : public ipa::soft::IPASoftInterface

void processStats(const ControlList &sensorControls) override;

protected:
std::string logPrefix() const override;

private:
void updateExposure(double exposureMSV);

Expand Down Expand Up @@ -421,6 +425,11 @@ void IPASoftSimple::updateExposure(double exposureMSV)
again_ = std::clamp(again_, againMin_, againMax_);
}

std::string IPASoftSimple::logPrefix() const
{
return "IPASoft";
}

} /* namespace ipa::soft */

/*
Expand Down

0 comments on commit 0cc74c4

Please sign in to comment.