summaryrefslogtreecommitdiff
path: root/src/ipa/rpi/controller/rpi/agc_channel.h
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2023-09-15 16:58:43 +0100
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-09-16 17:33:44 +0200
commit7927c4473529dc5a469cf6c707f1989e86792896 (patch)
tree4ac5bad38ffe01d21071bfa0a7d1e9dded999ea5 /src/ipa/rpi/controller/rpi/agc_channel.h
parentbeab3a229fa18379e65274aecab69a5d0c8b60a5 (diff)
ipa: rpi: agc: Add AgcChannelConstraint class
A channel constraint is somewhat similar to the upper/lower bound constraints that we use elsewhere, but these constraints apply between multiple AGC channels. For example, it lets you say things like "don't let the channel 1 total exposure be more than 8x that of channel 0", and so on. By using both an upper and lower bound constraint, you could fix one AGC channel always to be a fixed ratio of another. Also read a vector of them (if present) when loading the tuning file. 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_channel.h')
-rw-r--r--src/ipa/rpi/controller/rpi/agc_channel.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ipa/rpi/controller/rpi/agc_channel.h b/src/ipa/rpi/controller/rpi/agc_channel.h
index b2f554db..ceaab12f 100644
--- a/src/ipa/rpi/controller/rpi/agc_channel.h
+++ b/src/ipa/rpi/controller/rpi/agc_channel.h
@@ -44,11 +44,21 @@ struct AgcConstraint {
typedef std::vector<AgcConstraint> AgcConstraintMode;
+struct AgcChannelConstraint {
+ enum class Bound { LOWER = 0,
+ UPPER = 1 };
+ Bound bound;
+ unsigned int channel;
+ double factor;
+ int read(const libcamera::YamlObject &params);
+};
+
struct AgcConfig {
int read(const libcamera::YamlObject &params);
std::map<std::string, AgcMeteringMode> meteringModes;
std::map<std::string, AgcExposureMode> exposureModes;
std::map<std::string, AgcConstraintMode> constraintModes;
+ std::vector<AgcChannelConstraint> channelConstraints;
Pwl yTarget;
double speed;
uint16_t startupFrames;