Resolve "USAN: Division by zero in swb_tbe_com.c"
- Related issues: #1000 (closed)
- Requested reviewers: @kiene
Reason why this change is needed
Avoid division by zero in SWB TBE in the TD stereo reported by CLANG3.
Description of the change
The gains g1
and g2
may be both positive and negative (exceptionally). When g1 + g2
is zero a small epsion is added to avoid the division by zero. Similarly, a small offset is added to den
when it is zero.
Affected operating points
This is a non-BE fix potentially affecting operating points involving the ACELP core with SWB TBE at low bitrates in the TD stereo. The fix is minimalistic and affects only corner-case signals. EVS code is not affected.
Edited by vaclav