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

Do not always scale old_wsp_fx to Q-1 and add missing assignment to...

Do not always scale old_wsp_fx to Q-1 and add missing assignment to exp_buf_wspeech_enc which previously was likely correct only because everything was Q-1.
parent 801942c2
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -660,6 +660,10 @@ ivas_error pre_proc_ivas_fx(
        IF( st->tcxonly == 0 )
        {
            Copy( wsp_fx, st->wspeech_enc, L_FRAME + L_LOOK_12k8 );
#ifdef NONBE_FIX_ISSUE_2206
            st->exp_buf_wspeech_enc = e_old_wsp;
            move16();
#endif
        }
    }

+2 −1
Original line number Diff line number Diff line
@@ -1287,13 +1287,14 @@ ivas_error ivas_cpe_enc_fx(
    /*----------------------------------------------------------------*
     * Core Encoder
     *----------------------------------------------------------------*/

#ifndef NONBE_FIX_ISSUE_2206
    FOR( n = 0; n < n_CoreChannels; n++ )
    {
        Scale_sig( old_wsp_fx[n], L_WSP, sub( e_old_wsp[n], Q16 ) ); /* exp(16) */
        e_old_wsp[n] = 16;
        move16();
    }
#endif
    IF( NE_32( ( error = ivas_core_enc_fx( NULL, hCPE, st_ivas->hMCT, n_CoreChannels, old_inp_12k8_16fx, old_inp_16k_16fx, Q_new, ener_fx, A_fx, Aw_fx, epsP_fx, epsP_fx_q, lsp_new_fx, lsp_mid_fx, vad_hover_flag, attack_flag, realBuffer_fx, imagBuffer_fx, q_re_im_buf, old_wsp_fx, e_old_wsp, loc_harm, cor_map_sum_fx, vad_flag_dtx, enerBuffer_fx, enerBuffer_fx_exp, fft_buff_fx, tdm_SM_or_LRTD_Pri, ivas_format, 0 ) ), IVAS_ERR_OK ) )
    {
        return error;