@@ -458,8 +458,7 @@ void AgcMeanLuminance::setLimits(utils::Duration minExposureTime,
*/
double AgcMeanLuminance::estimateInitialGain() const
{
- double yTarget = std::min(relativeLuminanceTarget_ * exposureCompensation_,
- kMaxRelativeLuminanceTarget);
+ double yTarget = effectiveYTarget();
double yGain = 1.0;
/*
@@ -521,6 +520,19 @@ double AgcMeanLuminance::constraintClampGain(uint32_t constraintModeIndex,
return gain;
}
+/**
+ * \brief Get the currently effective y target
+ *
+ * This function return the current y target including exposure compensation.
+ *
+ * \return The y target value
+ */
+double AgcMeanLuminance::effectiveYTarget() const
+{
+ return std::min(relativeLuminanceTarget_ * exposureCompensation_,
+ kMaxRelativeLuminanceTarget);
+}
+
/**
* \brief Apply a filter on the exposure value to limit the speed of changes
* \param[in] exposureValue The target exposure from the AGC algorithm
@@ -72,6 +72,8 @@ public:
calculateNewEv(uint32_t constraintModeIndex, uint32_t exposureModeIndex,
const Histogram &yHist, utils::Duration effectiveExposureValue);
+ double effectiveYTarget() const;
+
void resetFrameCount()
{
frameCount_ = 0;
The upcoming WDR algorithm needs to know the effective y target (Which includes the current ExposureValue). Add a accessor for that. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- Changes in v3: - Added this patch --- src/ipa/libipa/agc_mean_luminance.cpp | 16 ++++++++++++++-- src/ipa/libipa/agc_mean_luminance.h | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-)