[libcamera-devel] [PATCH 1/4] ipa: ipu3: af: Introduce AWB and AE lock when AF scanning

Kate Hsuan hpa at redhat.com
Tue Mar 22 03:41:52 CET 2022


The floating AWB and AE results significantly impact the AF performance since the
focus value is determined by the image contrast. This lock is used to suspend
the AWB and AE during AF scanning.

Signed-off-by: Kate Hsuan <hpa at redhat.com>
---
 src/ipa/ipu3/algorithms/af.cpp | 3 +++
 src/ipa/ipu3/ipa_context.h     | 1 +
 2 files changed, 4 insertions(+)

diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp
index 0170a372..40a8ddae 100644
--- a/src/ipa/ipu3/algorithms/af.cpp
+++ b/src/ipa/ipu3/algorithms/af.cpp
@@ -170,6 +170,9 @@ int Af::configure(IPAContext &context, const IPAConfigInfo &configInfo)
 	grid.block_height_log2 = kAfMinGridBlockHeight;
 	grid.height_per_slice = kAfDefaultHeightPerSlice;
 
+	/* Initial AE and AWB lock */
+	context.configuration.af.requireAeAwbLock = false;
+
 	/* x_start and y start are default to BDS center */
 	grid.x_start = (configInfo.bdsOutputSize.width / 2) -
 		       (((grid.width << grid.block_width_log2) / 2));
diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h
index 6b7a512e..8cc64c3e 100644
--- a/src/ipa/ipu3/ipa_context.h
+++ b/src/ipa/ipu3/ipa_context.h
@@ -27,6 +27,7 @@ struct IPASessionConfiguration {
 
 	struct {
 		ipu3_uapi_grid_config afGrid;
+		bool requireAeAwbLock;
 	} af;
 
 	struct {
-- 
2.33.1



More information about the libcamera-devel mailing list