ipa: rkisp1: Derive rkisp1::algorithms::Agc from AgcMeanLuminance
Now that we have a AgcMeanLuminance class that centralises our AEGC algorithm, derive the RkISP1's Agc class from it and plumb in the necessary framework to enable it to be used. For simplicities sake this commit switches the algorithm to use the derived class, but does not remove the bespoke functions at this time. Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
9b9a7b3f32
commit
4c5152843a
4 changed files with 91 additions and 7 deletions
|
@ -14,18 +14,22 @@
|
|||
|
||||
#include <libcamera/geometry.h>
|
||||
|
||||
#include "libipa/agc_mean_luminance.h"
|
||||
#include "libipa/histogram.h"
|
||||
|
||||
#include "algorithm.h"
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
namespace ipa::rkisp1::algorithms {
|
||||
|
||||
class Agc : public Algorithm
|
||||
class Agc : public Algorithm, public AgcMeanLuminance
|
||||
{
|
||||
public:
|
||||
Agc();
|
||||
~Agc() = default;
|
||||
|
||||
int init(IPAContext &context, const YamlObject &tuningData) override;
|
||||
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
|
||||
void queueRequest(IPAContext &context,
|
||||
const uint32_t frame,
|
||||
|
@ -47,10 +51,13 @@ private:
|
|||
double measureBrightness(Span<const uint32_t> hist) const;
|
||||
void fillMetadata(IPAContext &context, IPAFrameContext &frameContext,
|
||||
ControlList &metadata);
|
||||
double estimateLuminance(double gain) const override;
|
||||
|
||||
uint64_t frameCount_;
|
||||
|
||||
utils::Duration filteredExposure_;
|
||||
|
||||
Span<const uint8_t> expMeans_;
|
||||
};
|
||||
|
||||
} /* namespace ipa::rkisp1::algorithms */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue