Skip to content

Unclear code in EVS HQ FEC

During the IVAS development, a part of the EVS HQ FEC algorithm was moved from evs_dec() into the new function save_synthesis_hq_fec(). However, a part of the code was introduced during the conversion while its status is unclear - it should be probably removed.

See also conversion at sa4/audio/ivas-basop!1224 (comment 65969).

The code under question is at https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/blob/main/lib_dec/FEC_HQ_core.c#L1507:

set_f( st->hTcxDec->old_synthFB + 2 * output_frame - post_hq_delay, 0.f, post_hq_delay );
if ( output_frame >= L_FRAME16k )
{
    mvr2r( st->prev_synth_buffer, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS ), NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ) );
}
// THE FOLLOWING ELSE PART NEED TO BE CLARIFIED
else
{
    mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) );
}