diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2023-02-03 09:17:32 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-02-09 11:33:52 +0000 |
commit | e8dd0fdc8321dce4c15b55b895e9efb5181ddb4c (patch) | |
tree | 5b2db9e9d85a19cd6ee6497cccb0b67e82b72cad | |
parent | f0c0468b3b4c8938fa817c3df8a20c8d4610ced6 (diff) |
ipa: raspberrypi: awb: Delay release of the statistics buffer
Release the statistics buffer after running the through the AWB calculations.
Only the "counted" statistics are copied out to a local structure, so keeping
the statistics buffer allows the algorithm to see the "uncounted" statistics as
well.
This is currently handled by hard-coding the total number of statistics regions
regions based on the structure definition in the bcm2835_isp_stats structure.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/awb.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp index 4f6af4ba..04d1c878 100644 --- a/src/ipa/raspberrypi/controller/rpi/awb.cpp +++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp @@ -428,11 +428,6 @@ void Awb::prepareStats() generateStats(zones_, statistics_->awb_stats, config_.minPixels, config_.minG); /* - * we're done with these; we may as well relinquish our hold on the - * pointer. - */ - statistics_.reset(); - /* * apply sensitivities, so values appear to come from our "canonical" * sensor. */ @@ -728,6 +723,11 @@ void Awb::doAwb() << " with gains r " << asyncResults_.gainR << " and b " << asyncResults_.gainB; } + /* + * we're done with these; we may as well relinquish our hold on the + * pointer. + */ + statistics_.reset(); } /* Register algorithm with the system. */ |