Skip to content

Resolve "USAN: Division by zero in swb_tbe_com.c"

malenovsky requested to merge 1000-usan-division-by-zero-in-swb_tbe_com-c into main

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

Merge request reports

Loading