Commit bd313fff authored by Manuel Jander's avatar Manuel Jander
Browse files

Correct storage into hBWE_TD->old_speech_shb_fx under the condition that delay...

Correct storage into hBWE_TD->old_speech_shb_fx under the condition that delay is larger than the offset (shb_new_speech_fx - shb_old_speech_fx)
parent 592f2eea
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1570,12 +1570,12 @@ void swb_tbe_enc_fx(
    Q_shb2 = s_min( Q_shb, hBWE_TD->old_speech_shb_q );
    Copy_Scale_sig_nosat( hBWE_TD->old_speech_shb_fx, shb_old_speech_fx, delay, sub( Q_shb2, hBWE_TD->old_speech_shb_q ) );
    Copy_Scale_sig_nosat( shb_speech_fx, shb_new_speech_fx, L_FRAME16k, sub( Q_shb2, Q_shb ) );
    // Copy( shb_old_speech_fx + L_FRAME16k, hBWE_TD->old_speech_shb_fx, delay );
    Copy( shb_speech_fx + L_FRAME16k - ( shb_new_speech_fx - shb_old_speech_fx ), hBWE_TD->old_speech_shb_fx, delay );
    hBWE_TD->old_speech_shb_q = Q_shb;
    move16();
    Q_shb = Q_shb2;
    move16();
    Q_shb2 = norm_arr( shb_old_speech_fx + L_FRAME16k, delay );
    Copy_Scale_sig_nosat( shb_old_speech_fx + L_FRAME16k, hBWE_TD->old_speech_shb_fx, delay, Q_shb2 );
    hBWE_TD->old_speech_shb_q = add( Q_shb, Q_shb2 );
    move16();
#else
    Copy( hBWE_TD->old_speech_shb_fx, shb_old_speech_fx, delay );
    Copy( shb_speech_fx, shb_new_speech_fx, L_FRAME16k );