Fix issue when computing bwe_exc_extended [non-BE][split-non-be]
- Related issues: #1328 (closed)
- Requested reviewers: @malenovsky
Reason why this change is needed
This has been identified while working on sa4/audio/ivas-basop#1406 (closed).
Basically, in rare occasion bwe_non_lin_prev_scale gets very high during inactive/unvoiced frame having low energy and if the next generic/tc frame has a sharp increase of energy at the beginning of the frame, then the bwe_exc_extended get scaled with a very large energy. The SWB_TBE has no mechanism to scale down the frame energy (minimum tbe "frame gain" is 1.0), thus this energy overshoot is not corrected.
Description of the change
- Propose a gain limitation for coder_type <= UNVOICED
@malenovsky , please have a look as you are probably the one having the best knowledge of the TBE, maybe you have a better idea how to fix it.
Affected operating points
This is a very rare case discovered during fixed point checking, multiple aspects need to be present at the same time, but can happen to all operating points using core at bitrate <= 32 kbps.
The produced bitstream is non-BE but it is fully backwards compatible for decoding. Decoded output may differ.
Max ampl. diff. observed = ±17
Related to #1328 (closed)