Skip to content

Uninitialized variables used in decod_gen_2sbfr_ivas_fx() + call to enhancer_fx has wrong parameters

the following variables are not initialized before entering decod_gen_2sbfr_ivas_fx()

  • st->gc_threshold_fx
  • st->stab_fac_fx

Both are used within the function enhancer_fx().

the function enhancer_fx() is called twice at the end of decod_gen_2sbfr_ivas_fx(). both calls are currently written as :

enhancer_fx( st->core_brate, 0, GENERIC, i_subfr, L_frame, voice_fac, st->stab_fac_fx, norm_gain_code, gain_inov, &st->gc_threshold_fx, code, exc2, gain_pit, &st->dm_fx, Q_exc );

enhancer_fx( st->core_brate, 0, GENERIC, i_subfr, L_frame, voice_fac, st->stab_fac_fx, norm_gain_code, gain_inov, &st->gc_threshold_fx, code + L_SUBFR, exc2 + L_SUBFR, gain_pit, &st->dm_fx, Q_exc );

but it the i_subfr offset is missing and it should be written as :

enhancer_fx( st->core_brate, 0, GENERIC, i_subfr, L_frame, voice_fac, st->stab_fac_fx, norm_gain_code, gain_inov, &st->gc_threshold_fx, code, exc2 + i_subfr, gain_pit, &st->dm_fx, Q_exc );

enhancer_fx( st->core_brate, 0, GENERIC, i_subfr, L_frame, voice_fac, st->stab_fac_fx, norm_gain_code, gain_inov, &st->gc_threshold_fx, code + L_SUBFR, exc2 + i_subfr + L_SUBFR, gain_pit, &st->dm_fx, Q_exc );