Message ID | 20210913145810.66515-9-jeanmichel.hautbois@ideasonboard.com |
---|---|
State | Changes Requested |
Headers | show |
Series |
|
Related | show |
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++; > } > } > }
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++; } } }
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(-)