Commit 7daf30ae authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Handle uninitialized st->Q_syn_factor cases in ACELP mode.

parent 38244a54
Loading
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -298,7 +298,14 @@ ivas_error acelp_core_dec_fx(
    tmp_noise_fx = 0;
    move16();
#ifdef FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE
    if ( NE_32( st->last_core, TCX_10_CORE ) || NE_32( st->last_core, TCX_20_CORE ) ) // st->Q_syn_factor is set in TCX mode; otherwise, it may be uninitialized
    {
        Copy( st->old_exc_fx, old_exc_fx, L_EXC_MEM_DEC ); /*Q_exc*/
    }
    else
    {
        Copy_Scale_sig( st->old_exc_fx, old_exc_fx, L_EXC_MEM_DEC, negate( st->Q_syn_factor ) ); /*Q_exc*/
    }
    st->Q_syn_factor = 0;
    move16();
#else