From 380b08754f10d6e03e96d13cac5be5e84e12835e Mon Sep 17 00:00:00 2001 From: Jean-Michel Hautbois Date: Wed, 22 Sep 2021 17:44:01 +0200 Subject: ipa: ipu3: awb: Use the line stride for the stats The statistics buffer 'ipu3_uapi_awb_raw_buffer' stores the ImgU calculation results in a buffer aligned horizontally to a multiple of 4 cells. The AWB loop should take care of it to add the proper offset between lines and avoid any staircase effect. It is no longer required to pass the grid configuration context to the private functions called from process() which simplifies the code flow. Signed-off-by: Jean-Michel Hautbois Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/ipu3/algorithms/awb.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/ipa/ipu3/algorithms/awb.h') diff --git a/src/ipa/ipu3/algorithms/awb.h b/src/ipa/ipu3/algorithms/awb.h index 681d8c2b..b3e0ad82 100644 --- a/src/ipa/ipu3/algorithms/awb.h +++ b/src/ipa/ipu3/algorithms/awb.h @@ -74,11 +74,9 @@ public: }; private: - void calculateWBGains(const ipu3_uapi_stats_3a *stats, - const ipu3_uapi_grid_config &grid); + void calculateWBGains(const ipu3_uapi_stats_3a *stats); void generateZones(std::vector &zones); - void generateAwbStats(const ipu3_uapi_stats_3a *stats, - const ipu3_uapi_grid_config &grid); + void generateAwbStats(const ipu3_uapi_stats_3a *stats); void clearAwbStats(); void awbGreyWorld(); uint32_t estimateCCT(double red, double green, double blue); @@ -87,6 +85,7 @@ private: Accumulator awbStats_[kAwbStatsSizeX * kAwbStatsSizeY]; AwbStatus asyncResults_; + uint32_t stride_; uint32_t cellsPerZoneX_; uint32_t cellsPerZoneY_; uint32_t cellsPerZoneThreshold_; -- cgit v1.2.1