diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-09-04 03:57:08 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-09-28 05:41:15 +0300 |
commit | 7dc60a5a27f9f97fa78beb7d5a752e0cc88dcf29 (patch) | |
tree | ce3613dab03bcb1f837fce0b840cb2c31f56bbf1 /src/qcam/viewfinder_gl.cpp | |
parent | c43c8b1fa0d3dff50b017c33fc8d611a3f1da18e (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/qcam/viewfinder_gl.cpp')
0 files changed, 0 insertions, 0 deletions