From 0111feb04b4e2442519d3dbdcd572b573e750316 Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Wed, 13 Apr 2022 15:43:53 +0800 Subject: ipa: ipu3: af: A not initialized frame ignore counter fixing A not initialized frame ignore counter (ignoreCounter_) makes the AF function not work since the ignore counter may start from a random negative number. The counter was set to kIgnoreFrame when AF is in prepare stage. Signed-off-by: Kate Hsuan Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain Signed-off-by: Kieran Bingham --- src/ipa/ipu3/algorithms/af.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp index addf98af..f700b01f 100644 --- a/src/ipa/ipu3/algorithms/af.cpp +++ b/src/ipa/ipu3/algorithms/af.cpp @@ -181,6 +181,9 @@ int Af::configure(IPAContext &context, const IPAConfigInfo &configInfo) /* Initial max focus step */ maxStep_ = kMaxFocusSteps; + /* Initial frame ignore counter */ + afIgnoreFrameReset(); + /* Initial focus value */ context.frameContext.af.focus = 0; /* Maximum variance of the AF statistics */ -- cgit v1.2.1