[libcamera-devel,08/11] ipa: ipu3: agc: Remove unused variable count
diff mbox series

Message ID 20210913145810.66515-9-jeanmichel.hautbois@ideasonboard.com
State Changes Requested
Headers show
Series
  • Document all the IPU3 IPA classes
Related show

Commit Message

Jean-Michel Hautbois Sept. 13, 2021, 2:58 p.m. UTC
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@ideasonboard.com>
---
 src/ipa/ipu3/algorithms/agc.cpp | 2 --
 1 file changed, 2 deletions(-)

Comments

Laurent Pinchart Sept. 14, 2021, 3:40 a.m. UTC | #1
Hi Jean-Michel,

Thank you for the patch.

On Mon, Sep 13, 2021 at 04:58:07PM +0200, Jean-Michel Hautbois wrote:
> 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@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@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++;
>  			}
>  		}
>  	}

Patch
diff mbox series

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++;
 			}
 		}
 	}