MLD issues observed with SBA-Normal operation
MLD greater than 5 is observed with around 40 SBA-Normal operation test cases.
Example test case: test_sba_plc_system[0-16-PLperc42mblen2-ltvFOA-0-256000], test_sba_plc_system[0-16-PLperc42mblen2-ltvFOA-0-96000]
It is observed that due to a small spike (in float decoder, at that point it's almost silence) that is getting introduced in fixed code, MLD > 5 is occurring.
Reason being, frame where spike is observed, at that point, value of old_out/old_outLB is not in sync with float value. It is observed that, values of these buffers are comparatively larger when compared to float code buffers.
old_out/old_outLB is not correct because value of conceal_eof_gain is being calculated incorrectly in previous frames. And in those frames, using the value of concel_eof_gain, Old_out buffers are computed (Can refer condition under this macro NONBE_MDCT_ST_PLC_DO_NOT_SCALE_OLD_OUT_IF_FIRST_GOOD_IS_SID). concel_eof_gain mostly coming around 10 times larger in case of Fixed code, for previous few frames.
concel_eof_gain is coming greater because for these frames, output of decoder_tcx_imdct in float itself is mostly -1.0 to 1.0, and in fixed, this output is in Q0/Q-2. Later these values stored as SynthFB is getting used to evaluate conce_eof_gain in decoder_tcx_post.