summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/blc.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-04 03:57:08 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-28 05:41:15 +0300
commit7dc60a5a27f9f97fa78beb7d5a752e0cc88dcf29 (patch)
treece3613dab03bcb1f837fce0b840cb2c31f56bbf1 /src/ipa/rkisp1/algorithms/blc.cpp
parentc43c8b1fa0d3dff50b017c33fc8d611a3f1da18e (diff)
ipa: rkisp1: awb: Clamp gains to prevent divisions by zero
The gain values are currently clamped to the range [0.0, 3.996] used by the hardware. A zero value makes little sense, as it would completely remove the contribution of the corresponding color channel from the AWB accumulators, but worse, would lead to divisions by zero when calculating the raw means in subsequent iterations. Prevent this by setting the minimum gain value to 1/256. While at it, clamp the gain values before filtering them, to improve the stability of the control loop. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/ipa/rkisp1/algorithms/blc.cpp')
0 files changed, 0 insertions, 0 deletions