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

Corrected the scaling of st->mem_syn2_fx.

parent d45dfc42
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1338,6 +1338,15 @@ void ivas_mdct_core_reconstruct_fx(
            Scale_sig( synth_bufFB_fx, add( add( st->hTcxDec->old_synth_lenFB, L_FRAME_PLUS ), M ), sub( q_syn, q_winFB ) ); // st->hTcxDec->q_old_synth -> q_syn
            // Scale_sig( st->syn, M + 1, add( st->Q_syn, 2 ) );
            Scale_sig( st->syn, M + 1, sub( st->Q_syn, q_win ) );

            IF( NE_16( st->element_mode, IVAS_CPE_MDCT ) )
            {
                Scale_sig( st->mem_syn2_fx, M, sub( st->Q_syn, st->prev_Q_syn ) ); // st->Q_syn gets a new value, but st->mem_syn2_fx got its value from E_UTIL_f_preemph3 with st->Q_syn = st->prev_Q_syn
            }
            ELSE
            {
                Scale_sig( st->mem_syn2_fx, M, sub( st->Q_syn, add( q_win, 2 ) ) ); // q_win+2 -> st->Q_syn: in this case, E_UTIL_f_preemph2 shifts st->mem_syn2_fx by 2 bits
            }
#else
            test();
            IF( ( bfi == 0 ) && st->hTonalMDCTConc != NULL )