summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/agc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rkisp1/algorithms/agc.h')
-rw-r--r--src/ipa/rkisp1/algorithms/agc.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/ipa/rkisp1/algorithms/agc.h b/src/ipa/rkisp1/algorithms/agc.h
index 22c02779..fb82a33f 100644
--- a/src/ipa/rkisp1/algorithms/agc.h
+++ b/src/ipa/rkisp1/algorithms/agc.h
@@ -9,6 +9,7 @@
#include <linux/rkisp1-config.h>
+#include <libcamera/base/span.h>
#include <libcamera/base/utils.h>
#include <libcamera/geometry.h>
@@ -17,8 +18,6 @@
namespace libcamera {
-struct IPACameraSensorInfo;
-
namespace ipa::rkisp1::algorithms {
class Agc : public Algorithm
@@ -28,21 +27,29 @@ public:
~Agc() = default;
int configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;
- void prepare(IPAContext &context, rkisp1_params_cfg *params) override;
- void process(IPAContext &context, IPAFrameContext *frameContext,
- const rkisp1_stat_buffer *stats) override;
+ void queueRequest(IPAContext &context,
+ const uint32_t frame,
+ IPAFrameContext &frameContext,
+ const ControlList &controls) override;
+ void prepare(IPAContext &context, const uint32_t frame,
+ IPAFrameContext &frameContext,
+ rkisp1_params_cfg *params) override;
+ void process(IPAContext &context, const uint32_t frame,
+ IPAFrameContext &frameContext,
+ const rkisp1_stat_buffer *stats,
+ ControlList &metadata) override;
private:
- void computeExposure(IPAContext &Context, double yGain, double iqMeanGain);
+ void computeExposure(IPAContext &Context, IPAFrameContext &frameContext,
+ double yGain, double iqMeanGain);
utils::Duration filterExposure(utils::Duration exposureValue);
- double estimateLuminance(const rkisp1_cif_isp_ae_stat *ae, double gain);
- double measureBrightness(const rkisp1_cif_isp_hist_stat *hist) const;
+ double estimateLuminance(Span<const uint8_t> expMeans, double gain);
+ double measureBrightness(Span<const uint32_t> hist) const;
+ void fillMetadata(IPAContext &context, IPAFrameContext &frameContext,
+ ControlList &metadata);
uint64_t frameCount_;
- uint32_t numCells_;
- uint32_t numHistBins_;
-
utils::Duration filteredExposure_;
};