[libcamera-devel] [PATCH 3/4] ipa: ipu3: awb: AWB lock for AF scan
Kate Hsuan
hpa at redhat.com
Tue Mar 22 03:41:54 CET 2022
When the AF starts to perform the scan, AWB will be suspended to stabilize
the AF scene variance and improve the AF performance.
Signed-off-by: Kate Hsuan <hpa at redhat.com>
---
src/ipa/ipu3/algorithms/awb.cpp | 13 +++++++++++++
src/ipa/ipu3/algorithms/awb.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp
index 87a6cc7a..328bd38d 100644
--- a/src/ipa/ipu3/algorithms/awb.cpp
+++ b/src/ipa/ipu3/algorithms/awb.cpp
@@ -384,11 +384,24 @@ void Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)
}
}
+/**
+ * \brief Test the AF requested lock is exist.
+ */
+bool Awb::isAfRequestedLock(IPAContext context)
+{
+ if (context.configuration.af.requireAeAwbLock)
+ return true;
+ else
+ return false;
+}
+
/**
* \copydoc libcamera::ipa::Algorithm::process
*/
void Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)
{
+ if (isAfRequestedLock(context))
+ return;
calculateWBGains(stats);
/*
diff --git a/src/ipa/ipu3/algorithms/awb.h b/src/ipa/ipu3/algorithms/awb.h
index ab4b0a33..9673592f 100644
--- a/src/ipa/ipu3/algorithms/awb.h
+++ b/src/ipa/ipu3/algorithms/awb.h
@@ -72,6 +72,7 @@ private:
void awbGreyWorld();
uint32_t estimateCCT(double red, double green, double blue);
static constexpr uint16_t threshold(float value);
+ bool isAfRequestedLock(IPAContext context);
std::vector<RGB> zones_;
Accumulator awbStats_[kAwbStatsSizeX * kAwbStatsSizeY];
--
2.33.1
More information about the libcamera-devel
mailing list