diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2023-09-15 16:58:42 +0100 |
---|---|---|
committer | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-09-16 17:33:44 +0200 |
commit | beab3a229fa18379e65274aecab69a5d0c8b60a5 (patch) | |
tree | 57d36eacb4461271fc856600e5fbdcf5cd896205 /src/ipa/rpi/controller/rpi/agc.h | |
parent | b2cb498a1ac32ed7a659645e529f29e51e566d3f (diff) |
ipa: rpi: agc: Implementation of multi-channel AGC
The switchMode, prepare and process methods are updated to implement
multi-channel AGC correctly:
* switchMode now invokes switchMode on all the channels (whether
active or not).
* prepare must find what channel the current frame is, and run on
behalf of that channel.
* process updates the most recent DeviceStatus and statistics for the
channel of the frame that has just arrived, but generates updated
values working through the active channels in round-robin fashion.
One minor detail in process is that we don't want to change the
DeviceStatus metadata of the current frame, so we now pass this to the
AgcChannel's process method, rather than letting it find the
DeviceStatus in the metadata.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src/ipa/rpi/controller/rpi/agc.h')
-rw-r--r-- | src/ipa/rpi/controller/rpi/agc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ipa/rpi/controller/rpi/agc.h b/src/ipa/rpi/controller/rpi/agc.h index a476ea70..ee85c693 100644 --- a/src/ipa/rpi/controller/rpi/agc.h +++ b/src/ipa/rpi/controller/rpi/agc.h @@ -6,6 +6,7 @@ */ #pragma once +#include <optional> #include <string> #include <vector> @@ -17,6 +18,8 @@ namespace RPiController { struct AgcChannelData { AgcChannel channel; + std::optional<DeviceStatus> deviceStatus; + StatisticsPtr statistics; }; class Agc : public AgcAlgorithm @@ -51,6 +54,7 @@ private: int checkChannel(unsigned int channel) const; std::vector<AgcChannelData> channelData_; std::vector<unsigned int> activeChannels_; + unsigned int index_; /* index into the activeChannels_ */ }; } /* namespace RPiController */ |