summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rkisp1')
-rw-r--r--src/ipa/rkisp1/algorithms/awb.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
index bd8430ad..399fb51b 100644
--- a/src/ipa/rkisp1/algorithms/awb.cpp
+++ b/src/ipa/rkisp1/algorithms/awb.cpp
@@ -413,9 +413,9 @@ RGB<double> Awb::calculateRgbMeans(const IPAFrameContext &frameContext, const rk
/*
* The ISP computes the AWB means after applying the colour gains,
* divide by the gains that were used to get the raw means from the
- * sensor.
+ * sensor. Apply a minimum value to avoid divisions by near-zero.
*/
- rgbMeans /= frameContext.awb.gains;
+ rgbMeans /= frameContext.awb.gains.max(0.01);
return rgbMeans;
}