From 35233938ee5d7a560dd4a93c0a1b08eae4935ae4 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Fri, 1 Mar 2024 22:16:02 +0900 Subject: ipa: rkisp1: agc: Read histogram weights from tuning file Add support to the rkisp1 AGC to read histogram weights from the tuning file. As controls for selecting the metering mode are not yet supported, for now hardcode the matrix metering mode, which is the same as what the AGC previously hardcoded. Signed-off-by: Paul Elder Reviewed-by: Stefan Klug Reviewed-by: Daniel Scally --- src/ipa/rkisp1/algorithms/agc.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ipa/rkisp1/algorithms/agc.h') diff --git a/src/ipa/rkisp1/algorithms/agc.h b/src/ipa/rkisp1/algorithms/agc.h index 04b3247e..996fea71 100644 --- a/src/ipa/rkisp1/algorithms/agc.h +++ b/src/ipa/rkisp1/algorithms/agc.h @@ -44,11 +44,17 @@ public: ControlList &metadata) override; private: + int parseMeteringModes(IPAContext &context, const YamlObject &tuningData); + uint8_t computeHistogramPredivider(Size &size, + enum rkisp1_cif_isp_histogram_mode mode); + void fillMetadata(IPAContext &context, IPAFrameContext &frameContext, ControlList &metadata); double estimateLuminance(double gain) const override; Span expMeans_; + + std::map> meteringModes_; }; } /* namespace ipa::rkisp1::algorithms */ -- cgit v1.2.1