From f6cc78b446de8dc03251aa5aab094852bca77285 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Mon, 27 Mar 2023 13:20:22 +0100 Subject: ipa: raspberrypi: Add hardware configuration to the controller Add a new Controller::HardwareConfig structure that captures the hardware statistics grid/histogram sizes and pipeline widths. This ensures there is a single centralised places for these parameters. Add a getHardwareConfig() helper function to retrieve these values for a given hardware target. Update the statistics populating routine in the IPA to use the values from this structure instead of the hardcoded numbers. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/ipa/raspberrypi/controller/controller.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ipa/raspberrypi/controller/controller.h') diff --git a/src/ipa/raspberrypi/controller/controller.h b/src/ipa/raspberrypi/controller/controller.h index 24e02903..c6af5cd6 100644 --- a/src/ipa/raspberrypi/controller/controller.h +++ b/src/ipa/raspberrypi/controller/controller.h @@ -37,6 +37,16 @@ typedef std::unique_ptr AlgorithmPtr; class Controller { public: + struct HardwareConfig { + libcamera::Size agcRegions; + libcamera::Size agcZoneWeights; + libcamera::Size awbRegions; + libcamera::Size focusRegions; + unsigned int numHistogramBins; + unsigned int numGammaPoints; + unsigned int pipelineWidth; + }; + Controller(); ~Controller(); int read(char const *filename); @@ -47,6 +57,7 @@ public: Metadata &getGlobalMetadata(); Algorithm *getAlgorithm(std::string const &name) const; const std::string &getTarget() const; + const HardwareConfig &getHardwareConfig() const; protected: int createAlgorithm(const std::string &name, const libcamera::YamlObject ¶ms); -- cgit v1.2.1