summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rkisp1')
-rw-r--r--src/ipa/rkisp1/algorithms/agc.cpp27
-rw-r--r--src/ipa/rkisp1/ipa_context.cpp8
-rw-r--r--src/ipa/rkisp1/ipa_context.h4
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp10
4 files changed, 25 insertions, 24 deletions
diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index 301b7ec2..40e5a8f4 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -183,7 +183,7 @@ int Agc::configure(IPAContext &context, const IPACameraSensorInfo &configInfo)
* except it's computed in the IPA and not here so we'd have to
* recompute it.
*/
- context.activeState.agc.maxFrameDuration = context.configuration.sensor.maxShutterSpeed;
+ context.activeState.agc.maxFrameDuration = context.configuration.sensor.maxExposureTime;
/*
* Define the measurement window for AGC as a centered rectangle
@@ -194,8 +194,8 @@ int Agc::configure(IPAContext &context, const IPACameraSensorInfo &configInfo)
context.configuration.agc.measureWindow.h_size = 3 * configInfo.outputSize.width / 4;
context.configuration.agc.measureWindow.v_size = 3 * configInfo.outputSize.height / 4;
- setLimits(context.configuration.sensor.minShutterSpeed,
- context.configuration.sensor.maxShutterSpeed,
+ setLimits(context.configuration.sensor.minExposureTime,
+ context.configuration.sensor.maxExposureTime,
context.configuration.sensor.minAnalogueGain,
context.configuration.sensor.maxAnalogueGain);
@@ -424,12 +424,12 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,
[](uint32_t x) { return x >> 4; });
expMeans_ = { params->ae.exp_mean, context.hw->numAeCells };
- utils::Duration maxShutterSpeed =
+ utils::Duration maxExposureTime =
std::clamp(frameContext.agc.maxFrameDuration,
- context.configuration.sensor.minShutterSpeed,
- context.configuration.sensor.maxShutterSpeed);
- setLimits(context.configuration.sensor.minShutterSpeed,
- maxShutterSpeed,
+ context.configuration.sensor.minExposureTime,
+ context.configuration.sensor.maxExposureTime);
+ setLimits(context.configuration.sensor.minExposureTime,
+ maxExposureTime,
context.configuration.sensor.minAnalogueGain,
context.configuration.sensor.maxAnalogueGain);
@@ -442,20 +442,21 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,
double analogueGain = frameContext.sensor.gain;
utils::Duration effectiveExposureValue = exposureTime * analogueGain;
- utils::Duration shutterTime;
+ utils::Duration newExposureTime;
double aGain, dGain;
- std::tie(shutterTime, aGain, dGain) =
+ std::tie(newExposureTime, aGain, dGain) =
calculateNewEv(frameContext.agc.constraintMode,
frameContext.agc.exposureMode,
hist, effectiveExposureValue);
LOG(RkISP1Agc, Debug)
- << "Divided up shutter, analogue gain and digital gain are "
- << shutterTime << ", " << aGain << " and " << dGain;
+ << "Divided up exposure time, analogue gain and digital gain are "
+ << newExposureTime << ", " << aGain << " and " << dGain;
IPAActiveState &activeState = context.activeState;
/* Update the estimated exposure and gain. */
- activeState.agc.automatic.exposure = shutterTime / context.configuration.sensor.lineDuration;
+ activeState.agc.automatic.exposure = newExposureTime
+ / context.configuration.sensor.lineDuration;
activeState.agc.automatic.gain = aGain;
fillMetadata(context, frameContext, metadata);
diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
index 14d0c02a..833e2cbb 100644
--- a/src/ipa/rkisp1/ipa_context.cpp
+++ b/src/ipa/rkisp1/ipa_context.cpp
@@ -78,11 +78,11 @@ namespace libcamera::ipa::rkisp1 {
* \var IPASessionConfiguration::sensor
* \brief Sensor-specific configuration of the IPA
*
- * \var IPASessionConfiguration::sensor.minShutterSpeed
- * \brief Minimum shutter speed supported with the sensor
+ * \var IPASessionConfiguration::sensor.minExposureTime
+ * \brief Minimum exposure time supported with the sensor
*
- * \var IPASessionConfiguration::sensor.maxShutterSpeed
- * \brief Maximum shutter speed supported with the sensor
+ * \var IPASessionConfiguration::sensor.maxExposureTime
+ * \brief Maximum exposure time supported with the sensor
*
* \var IPASessionConfiguration::sensor.minAnalogueGain
* \brief Minimum analogue gain supported with the sensor
diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
index 7b93a9e9..0a165c13 100644
--- a/src/ipa/rkisp1/ipa_context.h
+++ b/src/ipa/rkisp1/ipa_context.h
@@ -53,8 +53,8 @@ struct IPASessionConfiguration {
} lsc;
struct {
- utils::Duration minShutterSpeed;
- utils::Duration maxShutterSpeed;
+ utils::Duration minExposureTime;
+ utils::Duration maxExposureTime;
double minAnalogueGain;
double maxAnalogueGain;
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index a29dab34..2ffdd99b 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -257,14 +257,14 @@ int IPARkISP1::configure(const IPAConfigInfo &ipaConfig,
/*
* When the AGC computes the new exposure values for a frame, it needs
- * to know the limits for shutter speed and analogue gain.
- * As it depends on the sensor, update it with the controls.
+ * to know the limits for exposure time and analogue gain. As it depends
+ * on the sensor, update it with the controls.
*
- * \todo take VBLANK into account for maximum shutter speed
+ * \todo take VBLANK into account for maximum exposure time
*/
- context_.configuration.sensor.minShutterSpeed =
+ context_.configuration.sensor.minExposureTime =
minExposure * context_.configuration.sensor.lineDuration;
- context_.configuration.sensor.maxShutterSpeed =
+ context_.configuration.sensor.maxExposureTime =
maxExposure * context_.configuration.sensor.lineDuration;
context_.configuration.sensor.minAnalogueGain =
context_.camHelper->gain(minGain);