diff options
Diffstat (limited to 'src/ipa/raspberrypi/controller/rpi')
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/agc.cpp | 13 | ||||
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/agc.h | 6 | ||||
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/awb.cpp | 11 | ||||
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/awb.h | 6 |
4 files changed, 11 insertions, 25 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp index bd54a639..a30e50c1 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp @@ -270,18 +270,13 @@ int Agc::read(const libcamera::YamlObject ¶ms) return 0; } -bool Agc::isPaused() const -{ - return false; -} - -void Agc::pause() +void Agc::disableAuto() { fixedShutter_ = status_.shutterTime; fixedAnalogueGain_ = status_.analogueGain; } -void Agc::resume() +void Agc::enableAuto() { fixedShutter_ = 0s; fixedAnalogueGain_ = 0; @@ -317,14 +312,14 @@ void Agc::setMaxShutter(Duration maxShutter) void Agc::setFixedShutter(Duration fixedShutter) { fixedShutter_ = fixedShutter; - /* Set this in case someone calls Pause() straight after. */ + /* Set this in case someone calls disableAuto() straight after. */ status_.shutterTime = clipShutter(fixedShutter_); } void Agc::setFixedAnalogueGain(double fixedAnalogueGain) { fixedAnalogueGain_ = fixedAnalogueGain; - /* Set this in case someone calls Pause() straight after. */ + /* Set this in case someone calls disableAuto() straight after. */ status_.analogueGain = fixedAnalogueGain; } diff --git a/src/ipa/raspberrypi/controller/rpi/agc.h b/src/ipa/raspberrypi/controller/rpi/agc.h index 6d6b0e5a..cf04da19 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.h +++ b/src/ipa/raspberrypi/controller/rpi/agc.h @@ -75,10 +75,6 @@ public: Agc(Controller *controller); char const *name() const override; int read(const libcamera::YamlObject ¶ms) override; - /* AGC handles "pausing" for itself. */ - bool isPaused() const override; - void pause() override; - void resume() override; unsigned int getConvergenceFrames() const override; void setEv(double ev) override; void setFlickerPeriod(libcamera::utils::Duration flickerPeriod) override; @@ -88,6 +84,8 @@ public: void setMeteringMode(std::string const &meteringModeName) override; void setExposureMode(std::string const &exposureModeName) override; void setConstraintMode(std::string const &contraintModeName) override; + void enableAuto() override; + void disableAuto() override; void switchMode(CameraMode const &cameraMode, Metadata *metadata) override; void prepare(Metadata *imageMetadata) override; void process(StatisticsPtr &stats, Metadata *imageMetadata) override; diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp index 8d8ddf09..4f6af4ba 100644 --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp @@ -222,21 +222,16 @@ void Awb::initialise() asyncResults_ = syncResults_; } -bool Awb::isPaused() const +void Awb::disableAuto() { - return false; -} - -void Awb::pause() -{ - /* "Pause" by fixing everything to the most recent values. */ + /* Freeze the most recent values, and treat them as manual gains */ manualR_ = syncResults_.gainR = prevSyncResults_.gainR; manualB_ = syncResults_.gainB = prevSyncResults_.gainB; syncResults_.gainG = prevSyncResults_.gainG; syncResults_.temperatureK = prevSyncResults_.temperatureK; } -void Awb::resume() +void Awb::enableAuto() { manualR_ = 0.0; manualB_ = 0.0; diff --git a/src/ipa/raspberrypi/controller/rpi/awb.h b/src/ipa/raspberrypi/controller/rpi/awb.h index 30acd89d..2254c3ed 100644 --- a/src/ipa/raspberrypi/controller/rpi/awb.h +++ b/src/ipa/raspberrypi/controller/rpi/awb.h @@ -93,13 +93,11 @@ public: char const *name() const override; void initialise() override; int read(const libcamera::YamlObject ¶ms) override; - /* AWB handles "pausing" for itself. */ - bool isPaused() const override; - void pause() override; - void resume() override; unsigned int getConvergenceFrames() const override; void setMode(std::string const &name) override; void setManualGains(double manualR, double manualB) override; + void enableAuto() override; + void disableAuto() override; void switchMode(CameraMode const &cameraMode, Metadata *metadata) override; void prepare(Metadata *imageMetadata) override; void process(StatisticsPtr &stats, Metadata *imageMetadata) override; |