Loading lib_enc/ivas_core_pre_proc_front_fx.c +21 −3 Original line number Diff line number Diff line Loading @@ -545,11 +545,17 @@ ivas_error pre_proc_front_ivas_fx( ELSE /* DFT stereo */ { /* update the FIR resampling filter memory, needed for switching to time-domain (FIR) resampling */ #ifdef NONBE_FIX_ISSUE_2206_NO Copy_Scale_sig( signal_in_fx + sub( input_frame, add( NS2SA_FX2( input_Fs, L_MEM_RECALC_NS ), 2 * NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ) ) ), st->mem_decim_fx_q_inp, 2 * NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ), sub( -Q1, st->q_inp ) ); /* st->q_inp */ st->mem_q = -Q1; move16(); #else Copy( signal_in_fx + sub( input_frame, add( NS2SA_FX2( input_Fs, L_MEM_RECALC_NS ), 2 * NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ) ) ), st->mem_decim_fx_q_inp, 2 * NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ) ); /* st->q_inp */ st->mem_q = st->q_inp; move16(); #endif #ifndef NONBE_FIX_ISSUE_2206_NO #ifndef NONBE_FIX_ISSUE_2206 scale_sig( old_inp_12k8_fx, L_INP_MEM - STEREO_DFT_OVL_12k8, sub( Q_inp_const, st->q_inp ) ); scale_sig( st->input_fx - input_frame, input_frame_full, sub( 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) */ Loading Loading @@ -577,11 +583,19 @@ ivas_error pre_proc_front_ivas_fx( } ELSE IF( EQ_16( element_mode, IVAS_CPE_TD ) || EQ_16( element_mode, IVAS_CPE_MDCT ) ) { #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, st->buf_speech_enc + L_FRAME32k - lMemRecalc_12k8 - L_FILT, add( L_FRAME + L_FILT, lMemRecalc_12k8 ), sub( st->q_inp, st->q_inp ) ); /* Q_inp_const */ #else Copy_Scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, st->buf_speech_enc + L_FRAME32k - lMemRecalc_12k8 - L_FILT, add( L_FRAME + L_FILT, lMemRecalc_12k8 ), sub( Q_inp_const, st->q_inp ) ); /* Q_inp_const */ #endif } ELSE { #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig( new_inp_12k8_fx, st->buf_speech_enc + L_FRAME32k, L_FRAME, sub( st->q_inp, st->q_inp ) ); /* Q_inp_const */ #else Copy_Scale_sig( new_inp_12k8_fx, st->buf_speech_enc + L_FRAME32k, L_FRAME, sub( Q_inp_const, st->q_inp ) ); /* Q_inp_const */ #endif } /*------------------------------------------------------------------* Loading Loading @@ -721,7 +735,7 @@ ivas_error pre_proc_front_ivas_fx( *Q_new = add( *Q_new, Q_inp_const ); move16(); #ifndef NONBE_FIX_ISSUE_2206 #ifndef NONBE_FIX_ISSUE_2206_NO Copy_Scale_sig32_16( sig_out, preemp_start_idx, preemp_len, sub( add( *Q_new, 1 ), st->q_inp ) ); /* Q_new */ Scale_sig( old_inp_12k8_fx, (Word16) ( preemp_start_idx - old_inp_12k8_fx ), sub( *Q_new, st->q_inp ) ); /* Q_new */ #else Loading Loading @@ -1667,7 +1681,11 @@ ivas_error pre_proc_front_ivas_fx( move16(); #ifdef NONBE_FIX_ISSUE_2206_NO *Q_new = sub( *Q_new, st->q_inp ); // ivas_core_enc will assume inp signal (12k8 and 16k) in Q_new - st->q_inp #else *Q_new = sub( *Q_new, Q_inp_const ); // ivas_core_enc will assume inp signal (12k8 and 16k) in Q_new - 1 #endif move16(); free( mem_decim_dummy_fx ); Loading lib_enc/ivas_cpe_enc_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -931,7 +931,11 @@ ivas_error ivas_cpe_enc_fx( Copy_Scale_sig_32_16( old_inp_12k8_fx[1] + L_FRAME8k, sts[1]->old_inp_12k8_fx, L_INP_MEM, 0 - 15 ); // Q0 sts[1]->exp_old_inp_12k8 = Q15; move16(); #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig_32_16( old_inp_12k8_fx[1], old_inp_12k8_16fx[1], L_INP_12k8, sub( sts[0]->q_inp, Q15 ) ); // sts[0]->q_inp32 #else Copy_Scale_sig_32_16( old_inp_12k8_fx[1], old_inp_12k8_16fx[1], L_INP_12k8, -Q16 ); // Q-1 #endif } /* no iDFT at input sampling rate for Side channel -> reset the buffer */ Loading Loading
lib_enc/ivas_core_pre_proc_front_fx.c +21 −3 Original line number Diff line number Diff line Loading @@ -545,11 +545,17 @@ ivas_error pre_proc_front_ivas_fx( ELSE /* DFT stereo */ { /* update the FIR resampling filter memory, needed for switching to time-domain (FIR) resampling */ #ifdef NONBE_FIX_ISSUE_2206_NO Copy_Scale_sig( signal_in_fx + sub( input_frame, add( NS2SA_FX2( input_Fs, L_MEM_RECALC_NS ), 2 * NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ) ) ), st->mem_decim_fx_q_inp, 2 * NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ), sub( -Q1, st->q_inp ) ); /* st->q_inp */ st->mem_q = -Q1; move16(); #else Copy( signal_in_fx + sub( input_frame, add( NS2SA_FX2( input_Fs, L_MEM_RECALC_NS ), 2 * NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ) ) ), st->mem_decim_fx_q_inp, 2 * NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ) ); /* st->q_inp */ st->mem_q = st->q_inp; move16(); #endif #ifndef NONBE_FIX_ISSUE_2206_NO #ifndef NONBE_FIX_ISSUE_2206 scale_sig( old_inp_12k8_fx, L_INP_MEM - STEREO_DFT_OVL_12k8, sub( Q_inp_const, st->q_inp ) ); scale_sig( st->input_fx - input_frame, input_frame_full, sub( 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) */ Loading Loading @@ -577,11 +583,19 @@ ivas_error pre_proc_front_ivas_fx( } ELSE IF( EQ_16( element_mode, IVAS_CPE_TD ) || EQ_16( element_mode, IVAS_CPE_MDCT ) ) { #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, st->buf_speech_enc + L_FRAME32k - lMemRecalc_12k8 - L_FILT, add( L_FRAME + L_FILT, lMemRecalc_12k8 ), sub( st->q_inp, st->q_inp ) ); /* Q_inp_const */ #else Copy_Scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, st->buf_speech_enc + L_FRAME32k - lMemRecalc_12k8 - L_FILT, add( L_FRAME + L_FILT, lMemRecalc_12k8 ), sub( Q_inp_const, st->q_inp ) ); /* Q_inp_const */ #endif } ELSE { #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig( new_inp_12k8_fx, st->buf_speech_enc + L_FRAME32k, L_FRAME, sub( st->q_inp, st->q_inp ) ); /* Q_inp_const */ #else Copy_Scale_sig( new_inp_12k8_fx, st->buf_speech_enc + L_FRAME32k, L_FRAME, sub( Q_inp_const, st->q_inp ) ); /* Q_inp_const */ #endif } /*------------------------------------------------------------------* Loading Loading @@ -721,7 +735,7 @@ ivas_error pre_proc_front_ivas_fx( *Q_new = add( *Q_new, Q_inp_const ); move16(); #ifndef NONBE_FIX_ISSUE_2206 #ifndef NONBE_FIX_ISSUE_2206_NO Copy_Scale_sig32_16( sig_out, preemp_start_idx, preemp_len, sub( add( *Q_new, 1 ), st->q_inp ) ); /* Q_new */ Scale_sig( old_inp_12k8_fx, (Word16) ( preemp_start_idx - old_inp_12k8_fx ), sub( *Q_new, st->q_inp ) ); /* Q_new */ #else Loading Loading @@ -1667,7 +1681,11 @@ ivas_error pre_proc_front_ivas_fx( move16(); #ifdef NONBE_FIX_ISSUE_2206_NO *Q_new = sub( *Q_new, st->q_inp ); // ivas_core_enc will assume inp signal (12k8 and 16k) in Q_new - st->q_inp #else *Q_new = sub( *Q_new, Q_inp_const ); // ivas_core_enc will assume inp signal (12k8 and 16k) in Q_new - 1 #endif move16(); free( mem_decim_dummy_fx ); Loading
lib_enc/ivas_cpe_enc_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -931,7 +931,11 @@ ivas_error ivas_cpe_enc_fx( Copy_Scale_sig_32_16( old_inp_12k8_fx[1] + L_FRAME8k, sts[1]->old_inp_12k8_fx, L_INP_MEM, 0 - 15 ); // Q0 sts[1]->exp_old_inp_12k8 = Q15; move16(); #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig_32_16( old_inp_12k8_fx[1], old_inp_12k8_16fx[1], L_INP_12k8, sub( sts[0]->q_inp, Q15 ) ); // sts[0]->q_inp32 #else Copy_Scale_sig_32_16( old_inp_12k8_fx[1], old_inp_12k8_16fx[1], L_INP_12k8, -Q16 ); // Q-1 #endif } /* no iDFT at input sampling rate for Side channel -> reset the buffer */ Loading