Resolve #694 "OMASA crash for extreme sample"
- Related to #694 (closed) (re-opened problem)
- Related to !928 (merged) (earlier related fix)
Reason why this change is needed
Operating point: OMASA ISM_MASA_MODE_MASA_ONE_OBJ at 48kbps with 4 objects. In an extreme item, the separated object has high importance and the CPE which is in TD mode does not have enough bits for the ACELP. This causes the encoder to crash.
An example item and encoder command line are provided in the issue #694 (closed).
Description of the change
- Added a guard statement to prevent over-indexing the codebook when searching for the appropriate codeword. (File
lib_com/bits_alloc.c) - Adjusted the sanity check for guaranteeing minimum bitrate for secondary channel in time-domain stereo. (File
lib_com/ivas_stereo_td_bit_alloc.c)
Affected operating points
-
OMASA modes other than
ISM_MODE_NONEwhen the stereo is TD and thecoder_typefor the secondary channel is notINACTIVEorUNVOICED. -
OMASA mode
ISM_MODE_NONEwhen he stereo is TD and thecoder_typefor the secondary channel is notUNVOICEDor LRTD stereo mode flag is set. -
Non-OMASA when the
coder_typefor the secondary channel is notUNVOICEDor LRTD stereo mode flag is set. -
Produced bitstream is non-BC (there was a crash at encoder)
-
Output is not BE for the affected operating points: before the fix, the codec crashed.