Draft: Resolve "OMASA crash in inactive static separated object"
- Related issues: #797 (closed)
- Requested reviewers:
Reason why this change is needed
- The OMASA encoding crashes when the separated object is inactive (in ISM_MASA_MODE_MASA_ONE_OBJ) and the metadata MASA bits are less than 32 bits/frame.
Description of the change
- In order to change the core coder as little as possible, the MASA metadata bits are padded with zeros if they are less than 32.
- The change affect the decision at this level in the code (acelp_core_enc.c, line 566)
else if ( st->coder_type == AUDIO || ( st->coder_type == INACTIVE && st->total_brate <= MAX_GSC_INACTIVE_BRATE ) ) { /* AUDIO and INACTIVE frames (coded by GSC technology) */ encod_audio( st, inp, Aw, Aq, res, syn, exc, pitch_buf, voice_factors, bwe_exc, attack_flag, lsf_new, &tmp_noise, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf ); } else { /* GENERIC, VOICED and INACTIVE frames (coded by AVQ technology) */ encod_gen_voic( st, inp, Aw, Aq, Es_pred, res, syn, exc, exc2, pitch_buf, voice_factors, bwe_exc, unbits, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf ); }
Affected operating points
- NonBE and nonBC for OMASA 3 and 4 objects at 32k and 48k. The encoded bitstreams are different and the decoding with non-updated code potentially crashes.
Related to #797 (closed)
Edited by vaclav