[libcamera-devel] [PATCH 08/11] ipa: ipu3: agc: Remove unused variable count

Jean-Michel Hautbois jeanmichel.hautbois at ideasonboard.com
Mon Sep 13 16:58:07 CEST 2021


When processing brightness, a local variable is incremented at each
loop. There is no need for it, so remove it.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>
---
 src/ipa/ipu3/algorithms/agc.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
index e085599a..2ef998b7 100644
--- a/src/ipa/ipu3/algorithms/agc.cpp
+++ b/src/ipa/ipu3/algorithms/agc.cpp
@@ -84,7 +84,6 @@ void Agc::processBrightness(const ipu3_uapi_stats_3a *stats,
 	uint32_t startY = topleftY * grid.width << grid.block_width_log2;
 	uint32_t endX = (startX + (aeRegion.size().width >> grid.block_width_log2)) << grid.block_width_log2;
 	uint32_t i, j;
-	uint32_t count = 0;
 
 	uint32_t hist[knumHistogramBins] = { 0 };
 	for (j = topleftY;
@@ -101,7 +100,6 @@ void Agc::processBrightness(const ipu3_uapi_stats_3a *stats,
 				uint8_t Gr = currentCell->Gr_avg;
 				uint8_t Gb = currentCell->Gb_avg;
 				hist[(Gr + Gb) / 2]++;
-				count++;
 			}
 		}
 	}
-- 
2.30.2



More information about the libcamera-devel mailing list