Skip to content

Assert error in float decoder for OMASA stream encoded using BASOP encoder

Basic info

Bug description

An assert error in floating point decoder was occurring in [ltv-OMASA 1Dir1TC 3ISM at 64 kbps, 32kHz in, 32kHz out, BINAURAL out] case while using BASOP encoder for encoding. The assert error was occurring in decoder at frame 3283 because BER_detect flag was getting set.

On backtracking the difference in values for bit stream, at one point bit stream was getting written based on comparison operation of masa_to_total_energy_ratio buffer with MASA2TOTAL_THR_Q30 (MASA2TOTAL_THR = 0.98 in floating point). For frame 3283, when the function enters into differential_coding_first_subframe_ivas_fx function with stack provided below, the value in float code at 9th index is 0.98 whereas in BASOP code the value is 1052266688 in Q30 ( 0.979999721 equivalent float value ). Due to this difference, the decision logic is getting affected, and metadata is differing in float vs fixed output leading to assert error.

On forcing this decision logic at that particular index, the crash is not observed.

Can some changes be done to the threshold to accommodate some precision losses?

Call stack:

image.png