[libcamera-devel] [PATCH v2 3/4] ipa: ipu3: Replace Accumulator::uncounted to Accumulator::total

Jean-Michel Hautbois jeanmichel.hautbois at ideasonboard.com
Thu Sep 2 15:43:52 CEST 2021


Replace uncounted by total as it is clearer on what it contains. It is
always possible to know how many pixels are not relevant for the
algorithm by calculating total-counted. The uncounted field was only
declared and not used.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>
---
 src/ipa/ipu3/algorithms/awb.cpp | 6 +++---
 src/ipa/ipu3/algorithms/awb.h   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/ipa/ipu3/algorithms/awb.cpp b/src/ipa/ipu3/algorithms/awb.cpp
index c5c04a32..061b3610 100644
--- a/src/ipa/ipu3/algorithms/awb.cpp
+++ b/src/ipa/ipu3/algorithms/awb.cpp
@@ -42,8 +42,8 @@ static constexpr uint32_t kMinGreenLevelInZone = 32;
  * \var Accumulator::counted
  * \brief Number of relevant regions used to calculate the sums
  *
- * \var Accumulator::uncounted
- * \brief Remaining number of regions in the zone
+ * \var Accumulator::total
+ * \brief Total number of regions in the zone
  *
  * \var Accumulator::rSum
  * \brief Sum of the red values in the zone
@@ -227,7 +227,7 @@ void Awb::clearAwbStats()
 		awbStats_[i].rSum = 0;
 		awbStats_[i].gSum = 0;
 		awbStats_[i].counted = 0;
-		awbStats_[i].uncounted = 0;
+		awbStats_[i].total = 0;
 	}
 }
 
diff --git a/src/ipa/ipu3/algorithms/awb.h b/src/ipa/ipu3/algorithms/awb.h
index 6ae934fc..13490b07 100644
--- a/src/ipa/ipu3/algorithms/awb.h
+++ b/src/ipa/ipu3/algorithms/awb.h
@@ -35,7 +35,7 @@ struct Ipu3AwbCell {
 
 struct Accumulator {
 	unsigned int counted;
-	unsigned int uncounted;
+	unsigned int total;
 	unsigned long long rSum;
 	unsigned long long gSum;
 	unsigned long long bSum;
-- 
2.30.2



More information about the libcamera-devel mailing list