diff options
author | Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> | 2021-08-18 17:54:02 +0200 |
---|---|---|
committer | Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> | 2021-08-20 12:11:29 +0200 |
commit | b145ae42428b9f21fff01d7353a655e07e818c33 (patch) | |
tree | c88399ecf4cd1d5f2725324f98f849a41ddfc689 /src/ipa/ipu3/ipu3.cpp | |
parent | 16266def40cda947aaa1a50009e89f639c26e7cf (diff) |
ipa: ipu3: Move IPU3 awb into algorithms
Now that the interface is properly used by the AWB class, move it into
ipa::ipu3::algorithms and let the loops do the calls.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3/ipu3.cpp')
-rw-r--r-- | src/ipa/ipu3/ipu3.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 2468e94a..5fc358fa 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -30,9 +30,9 @@ #include "libcamera/internal/mapped_framebuffer.h" #include "algorithms/algorithm.h" +#include "algorithms/awb.h" #include "algorithms/tone_mapping.h" #include "ipu3_agc.h" -#include "ipu3_awb.h" #include "libipa/camera_sensor_helper.h" /** @@ -187,8 +187,6 @@ private: uint32_t minGain_; uint32_t maxGain_; - /* Interface to the AWB algorithm */ - std::unique_ptr<IPU3Awb> awbAlgo_; /* Interface to the AEC/AGC algorithm */ std::unique_ptr<IPU3Agc> agcAlgo_; /* Interface to the Camera Helper */ @@ -270,6 +268,7 @@ int IPAIPU3::init(const IPASettings &settings, *ipaControls = ControlInfoMap(std::move(controls), controls::controls); /* Construct our Algorithms */ + algorithms_.push_back(std::make_unique<algorithms::Awb>()); algorithms_.push_back(std::make_unique<algorithms::ToneMapping>()); return 0; @@ -387,7 +386,6 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo) return ret; } - awbAlgo_ = std::make_unique<IPU3Awb>(); agcAlgo_ = std::make_unique<IPU3Agc>(); agcAlgo_->configure(context_, configInfo); @@ -466,8 +464,6 @@ void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params) for (auto const &algo : algorithms_) algo->prepare(context_, params); - awbAlgo_->prepare(context_, params); - IPU3Action op; op.op = ActionParamFilled; @@ -490,8 +486,6 @@ void IPAIPU3::parseStatistics(unsigned int frame, exposure_ = context_.frameContext.agc.exposure; gain_ = camHelper_->gainCode(context_.frameContext.agc.gain); - awbAlgo_->process(context_, stats); - setControls(frame); /* \todo Use VBlank value calculated from each frame exposure. */ |