Commit f3e8dfb5 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Fix st->Q_syn using st->Q_syn_factor in acelp_core_dec_fx.c.

parent 0efb3891
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -305,6 +305,7 @@ ivas_error acelp_core_dec_fx(
    else
    else
    {
    {
        Copy_Scale_sig( st->old_exc_fx, old_exc_fx, L_EXC_MEM_DEC, negate( st->Q_syn_factor ) ); /*Q_exc*/
        Copy_Scale_sig( st->old_exc_fx, old_exc_fx, L_EXC_MEM_DEC, negate( st->Q_syn_factor ) ); /*Q_exc*/
        st->Q_syn = add( st->Q_syn, st->Q_syn_factor );
    }
    }
    st->Q_syn_factor = 0;
    st->Q_syn_factor = 0;
    move16();
    move16();
+2 −2
Original line number Original line Diff line number Diff line
@@ -202,7 +202,7 @@ void con_tcx_fx(
        move16();
        move16();
        Q_exc = E_UTIL_f_preemph3( &( synth[-( ( ( L_frame / 2 ) + hTcxDec->pit_max_TCX ) + 2 * M )] ), st->preemph_fac, add( add( shr( L_frame, 1 ), hTcxDec->pit_max_TCX ), shl( M, 1 ) ), &mem, 1 );
        Q_exc = E_UTIL_f_preemph3( &( synth[-( ( ( L_frame / 2 ) + hTcxDec->pit_max_TCX ) + 2 * M )] ), st->preemph_fac, add( add( shr( L_frame, 1 ), hTcxDec->pit_max_TCX ), shl( M, 1 ) ), &mem, 1 );
#ifdef FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE
#ifdef FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE
        scale_sig( &( synth[-( ( shr( L_frame, 1 ) + hTcxDec->pit_max_TCX ) + 2 * M )] ), add( add( shr( L_frame, 1 ), hTcxDec->pit_max_TCX ), shl( M, 1 ) ), negate( st->Q_syn_factor ) ); /*Q0, Setting back to Q0, as the following calculations are implemented assuming synth is in Q0 */
        Scale_sig( &( synth[-( ( shr( L_frame, 1 ) + hTcxDec->pit_max_TCX ) + 2 * M )] ), add( add( shr( L_frame, 1 ), hTcxDec->pit_max_TCX ), shl( M, 1 ) ), negate( st->Q_syn_factor ) ); /*Q0, Setting back to Q0, as the following calculations are implemented assuming synth is in Q0 */
#endif
#endif
        st->Mode2_lp_gainc = L_deposit_l( 0 );
        st->Mode2_lp_gainc = L_deposit_l( 0 );


@@ -250,7 +250,7 @@ void con_tcx_fx(
        move16();
        move16();
        Q_exc = E_UTIL_f_preemph3( &( synth[-L_frame] ), st->preemph_fac, L_frame, &mem, 1 );
        Q_exc = E_UTIL_f_preemph3( &( synth[-L_frame] ), st->preemph_fac, L_frame, &mem, 1 );
#ifdef FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE
#ifdef FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE
        scale_sig( &synth[-L_frame], L_frame, negate( st->Q_syn_factor ) ); /*Q0, Setting back to Q0, as the following calculations are implemented assuming synth is in Q0 */
        Scale_sig( &synth[-L_frame], L_frame, negate( st->Q_syn_factor ) ); /*Q0, Setting back to Q0, as the following calculations are implemented assuming synth is in Q0 */
#endif
#endif
        Copy( st->old_Aq_12_8_fx, A_local, M + 1 ); /*Q12*/
        Copy( st->old_Aq_12_8_fx, A_local, M + 1 ); /*Q12*/