diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp
index 106a7614e2c7..9127c24f1287 100644
--- a/src/ipa/ipu3/algorithms/af.cpp
+++ b/src/ipa/ipu3/algorithms/af.cpp
@@ -383,7 +383,7 @@ double Af::afEstimateVariance(Span<const y_table_item_t> y_items, bool isY1)
  * \return True if the variance threshold is crossed indicating lost focus,
  * false otherwise
  */
-bool Af::afIsOutOfFocus(IPAContext context)
+bool Af::afIsOutOfFocus(IPAContext &context)
 {
 	const uint32_t diff_var = std::abs(currentVariance_ -
 					   context.activeState.af.maxVariance);
diff --git a/src/ipa/ipu3/algorithms/af.h b/src/ipa/ipu3/algorithms/af.h
index ccf015f3f8f5..9b93594898bb 100644
--- a/src/ipa/ipu3/algorithms/af.h
+++ b/src/ipa/ipu3/algorithms/af.h
@@ -44,7 +44,7 @@ private:
 	void afIgnoreFrameReset();
 	double afEstimateVariance(Span<const y_table_item_t> y_items, bool isY1);
 
-	bool afIsOutOfFocus(IPAContext context);
+	bool afIsOutOfFocus(IPAContext &context);
 
 	/* VCM step configuration. It is the current setting of the VCM step. */
 	uint32_t focus_;
