@@ -384,12 +384,18 @@ void Awb::calculateWBGains(const ipu3_uapi_stats_3a *stats)
}
}
+bool Awb::isAfStable(IPAContext context)
+{
+ return context.frameContext.af.stable;
+}
+
/**
* \copydoc libcamera::ipa::Algorithm::process
*/
void Awb::process(IPAContext &context, const ipu3_uapi_stats_3a *stats)
{
- calculateWBGains(stats);
+ if (!isAfStable(context))
+ calculateWBGains(stats);
/*
* Gains are only recalculated if enough zones were detected.
@@ -72,6 +72,7 @@ private:
void awbGreyWorld();
uint32_t estimateCCT(double red, double green, double blue);
static constexpr uint16_t threshold(float value);
+ bool isAfStable(IPAContext context);
std::vector<RGB> zones_;
Accumulator awbStats_[kAwbStatsSizeX * kAwbStatsSizeY];
An unstable AWB results in AF performance degradation. AWB is properly paused during AF scanning to improve the accuracy of focus. Signed-off-by: Kate Hsuan<hpa@redhat.com> --- src/ipa/ipu3/algorithms/awb.cpp | 8 +++++++- src/ipa/ipu3/algorithms/awb.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-)