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

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Sep 14 05:40:18 CEST 2021


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 at ideasonboard.com>

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

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list