Skip to content

Missing scaling in NB post-filter

In ACELP decoder, the pitch values should be scaled before they enter the NB post-filter at https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/blob/main/lib_dec/acelp_core_dec_ivas_fx.c#L1433:

#ifdef FIX
            Copy_Scale_sig( pitch_buf_fx, pitch_buf_tmp, st->nb_subfr, -Q6 );
#else
            Copy( pitch_buf_fx, pitch_buf_tmp, st->nb_subfr );
#endif

In addition, the scaling of pitch values is used at two other places in acelp_core_dec_ivas_fx(). The scaling should be called using the parameter st->nb_subfr instead of macro NB_SUBFR16k (in NB, 4 subframes are generally used).