@@ -314,6 +314,17 @@ double Agc::estimateLuminance(IPAFrameContext &frameContext,
return ySum / (grid.height * grid.width) / 255;
}
+/**
+ * \brief Test the AF requested lock is exist.
+ */
+bool Agc::isAfRequestedLock(IPAContext context)
+{
+ if (context.configuration.af.requireAeAwbLock)
+ return true;
+ else
+ return false;
+}
+
/**
* \brief Process IPU3 statistics, and run AGC operations
* \param[in] context The shared IPA context
@@ -343,6 +354,9 @@ void Agc::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)
double yGain = 1.0;
double yTarget = kRelativeLuminanceTarget;
+ if (isAfRequestedLock(context))
+ return;
+
for (unsigned int i = 0; i < 8; i++) {
double yValue = estimateLuminance(context.frameContext,
context.configuration.grid.bdsGrid,
@@ -40,6 +40,7 @@ private:
const ipu3_uapi_grid_config &grid,
const ipu3_uapi_stats_3a *stats,
double gain);
+ bool isAfRequestedLock(IPAContext context);
uint64_t frameCount_;
When the AF starts to perform the scan, AWB will be suspended to maintain the AF scene variance and improve the AF performance. Any changes in the exposure value will lead to an incorrect focus value during scanning. Signed-off-by: Kate Hsuan <hpa@redhat.com> --- src/ipa/ipu3/algorithms/agc.cpp | 14 ++++++++++++++ src/ipa/ipu3/algorithms/agc.h | 1 + 2 files changed, 15 insertions(+)