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

Do not scale mem_decim_fx_q_inp to Q-1, but st->q_inp instead.

parent 821d4ea1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -568,17 +568,21 @@ ivas_error pre_proc_front_ivas_fx(
    }

#ifdef NONBE_FIX_ISSUE_2206
    Copy_Scale_sig( st->mem_decim_fx_q_inp, st->mem_decim_fx, 2 * L_FILT_MAX, sub( Q_inp_const, st->q_inp ) ); /* Q(-1) */
    Copy_Scale_sig( st->mem_decim_fx_q_inp, st->mem_decim_fx, 2 * L_FILT_MAX, sub( st->q_inp, st->q_inp ) ); /* st->q_inp */

    Scale_sig( st->buf_speech_enc, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k, sub( st->q_inp, sub( Q15, st->exp_buf_speech_enc ) ) ); /* Q(-1) */
    st->exp_buf_speech_enc = sub( Q15, st->q_inp );
    move16();
#else
    IF( NE_16( Q_inp_const, st->q_inp ) )
    {
        Copy_Scale_sig( st->mem_decim_fx_q_inp, st->mem_decim_fx, 2 * L_FILT_MAX, sub( Q_inp_const, st->q_inp ) ); /* Q(-1) */
    }
#endif

    Scale_sig( st->buf_speech_enc, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k, sub( -1, sub( 15, st->exp_buf_speech_enc ) ) ); /* Q(-1) */
    st->exp_buf_speech_enc = 16;
    move16();
#endif

    /* save input resampled at 12.8kHz, non-preemhasised */
    test();