diff --git a/lib_dec/FEC_HQ_phase_ecu_fx.c b/lib_dec/FEC_HQ_phase_ecu_fx.c index 9bd55245239ebc6f48e9ecb5831922e42be90433..1bd2387360d6c28b1244848bbb41d82b9674252f 100644 --- a/lib_dec/FEC_HQ_phase_ecu_fx.c +++ b/lib_dec/FEC_HQ_phase_ecu_fx.c @@ -3064,7 +3064,9 @@ static void ivas_rec_wtda_fx( pX_end = X + sub( Lprot, 1 ); FOR( i = 0; i < hamm_len2; i++ ) { - tmp = BASOP_Util_Divide1616_Scale( 1, *w_hamm, &tmp_e ); + tmp_e = 0; + tmp = BASOP_Util_Divide1616_Scale( ONE_IN_Q14, *w_hamm, &tmp_e ); + tmp = shl( tmp, 1 ); tmp = shr( tmp, sub( 4, tmp_e ) ); // Q11 *pX_start = mult_r( *pX_start, tmp ); // Qin - 4 move16(); diff --git a/lib_dec/hq_core_dec_fx.c b/lib_dec/hq_core_dec_fx.c index cd5833bb723418ccc2b3b4337c416542613096cd..9ff88999783a2d5f65e96425ca04f068c5126158 100644 --- a/lib_dec/hq_core_dec_fx.c +++ b/lib_dec/hq_core_dec_fx.c @@ -1026,6 +1026,8 @@ void ivas_hq_core_dec_fx( /* Rough resampling, but reduces energy loss in case of switch to ACELP in first good frame */ L_lerp_fx_q11( t_audio_q, wtda_audio_LB, st_fx->L_frame, inner_frame ); v_multc_fixed_16( t_audio_q, ONE_IN_Q14, wtda_audio_LB, st_fx->L_frame ); + Q_audio = 15; + move16(); } ELSE {