Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ #define FIX_FMSW_DEC /* float issue 1542: fix JBM issue in format switching */ #define FIX_FMSW_DEC_2 /* float issue 1575: fix crash for format switching when bitsream starts with EVS */ #define FIX_BASOP_2561_STEREO_DFT_ENC_COMPUTE_ITD /* BASOP issue 2561: fix diffs in stereo_dft_enc_compute_itd() between float and BASOP */ #define FIX_BASOP_2517_CLICK_IN_OMASA_LTV /* FhG: BASOP #2517: preserve precision by removing one-bit headroom from Q_min and allowing saturation during buffer scaling */ /* ##################### End NON-BE switches ########################### */ Loading lib_enc/acelp_core_enc_fx.c +16 −0 Original line number Diff line number Diff line Loading @@ -666,7 +666,23 @@ ivas_error acelp_core_enc_fx( * Calculation of LP residual (filtering through A[z] filter) *---------------------------------------------------------------*/ #ifdef FIX_BASOP_2517_CLICK_IN_OMASA_LTV Word16 scf = sub( norm_arr( inp - M, add( st->L_frame, M ) ), 2 ); test(); IF( NE_16( st->element_mode, EVS_MONO ) && GT_16( scf, 0 ) ) { Word16 inp_local_acelp[L_FRAME16k + M]; Copy_Scale_sig( inp - M, inp_local_acelp, add( st->L_frame, M ), scf ); calc_residu_fx( st, inp_local_acelp + M, res_fx, Aq ); scale_sig( res_fx, st->L_frame, negate( scf ) ); } ELSE { calc_residu_fx( st, inp, res_fx, Aq ); } #else calc_residu_fx( st, inp, res_fx, Aq ); #endif calculate_hangover_attenuation_gain_fx( st, &att_fx, vad_hover_flag ); Loading lib_enc/ivas_core_pre_proc_front_fx.c +19 −0 Original line number Diff line number Diff line Loading @@ -1153,7 +1153,26 @@ void pre_proc_front_ivas_fx( move16(); } #ifdef FIX_BASOP_2517_CLICK_IN_OMASA_LTV Word16 inp_local[L_INP_12k8]; Word16 Q_local; Word16 offset = (Word16) ( inp_12k8_fx - old_inp_12k8_fx ); Word16 norm_inp = norm_arr( old_inp_12k8_fx, L_INP_12k8 ); test(); IF( EQ_16( element_mode, IVAS_SCE ) && GT_16( norm_inp, 0 ) ) // SCE only: in stereo (CPE), pre-normalization slightly alters A_fx, causing divergence from the floating-point decoder during a mode switch. { Copy_Scale_sig( old_inp_12k8_fx, inp_local, L_INP_12k8, norm_inp ); Q_local = add( *Q_new, norm_inp ); analy_lp_fx( inp_local + offset, L_FRAME, L_look, ener_fx, A_fx, epsP_h, epsP_l, lsp_new_fx, lsp_mid_fx, st->lsp_old1_fx, alw_pitch_lag_12k8, alw_voicing_fx, INT_FS_12k8, element_mode, i, Q_local, Q_r ); } ELSE { analy_lp_fx( inp_12k8_fx, L_FRAME, L_look, ener_fx, A_fx, epsP_h, epsP_l, lsp_new_fx, lsp_mid_fx, st->lsp_old1_fx, alw_pitch_lag_12k8, alw_voicing_fx, INT_FS_12k8, element_mode, i, *Q_new, Q_r ); } #else analy_lp_fx( inp_12k8_fx, L_FRAME, L_look, ener_fx, A_fx, epsP_h, epsP_l, lsp_new_fx, lsp_mid_fx, st->lsp_old1_fx, alw_pitch_lag_12k8, alw_voicing_fx, INT_FS_12k8, element_mode, i, *Q_new, Q_r ); #endif FOR( Word16 idx = 0; idx < M + 1; idx++ ) { Loading lib_enc/ivas_core_pre_proc_fx.c +0 −1 Original line number Diff line number Diff line Loading @@ -936,7 +936,6 @@ void ivas_compute_core_buffers_fx( size_modified = modify_Fs_fx( temp1F_icatdmResampBuf_fx, NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ), input_Fs, new_inp_16k_fx + NS2SA_FX2( sr_core, FRAME_SIZE_NS ), sr_core, mem_decim16k_dummy_fx, 0, &Q_tmp, &mem_decim16k_size ); /* Q0 */ #ifdef NONBE_FIX_ISSUE_2206 scale_sig( new_inp_16k_fx + NS2SA_FX2( sr_core, FRAME_SIZE_NS ), size_modified, negate( Q_tmp ) ); /* scaling back to Q_old_inp_16k */ // Scale_sig( st->mem_decim16k_fx, 2 * L_FILT_MAX, sub( -1, Q_old_inp_16k ) ); /* Q(-1) */ Q_tmp = norm_arr( st->mem_decim16k_fx, mem_decim16k_size ); scale_sig( st->mem_decim16k_fx, mem_decim16k_size, Q_tmp ); Loading Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ #define FIX_FMSW_DEC /* float issue 1542: fix JBM issue in format switching */ #define FIX_FMSW_DEC_2 /* float issue 1575: fix crash for format switching when bitsream starts with EVS */ #define FIX_BASOP_2561_STEREO_DFT_ENC_COMPUTE_ITD /* BASOP issue 2561: fix diffs in stereo_dft_enc_compute_itd() between float and BASOP */ #define FIX_BASOP_2517_CLICK_IN_OMASA_LTV /* FhG: BASOP #2517: preserve precision by removing one-bit headroom from Q_min and allowing saturation during buffer scaling */ /* ##################### End NON-BE switches ########################### */ Loading
lib_enc/acelp_core_enc_fx.c +16 −0 Original line number Diff line number Diff line Loading @@ -666,7 +666,23 @@ ivas_error acelp_core_enc_fx( * Calculation of LP residual (filtering through A[z] filter) *---------------------------------------------------------------*/ #ifdef FIX_BASOP_2517_CLICK_IN_OMASA_LTV Word16 scf = sub( norm_arr( inp - M, add( st->L_frame, M ) ), 2 ); test(); IF( NE_16( st->element_mode, EVS_MONO ) && GT_16( scf, 0 ) ) { Word16 inp_local_acelp[L_FRAME16k + M]; Copy_Scale_sig( inp - M, inp_local_acelp, add( st->L_frame, M ), scf ); calc_residu_fx( st, inp_local_acelp + M, res_fx, Aq ); scale_sig( res_fx, st->L_frame, negate( scf ) ); } ELSE { calc_residu_fx( st, inp, res_fx, Aq ); } #else calc_residu_fx( st, inp, res_fx, Aq ); #endif calculate_hangover_attenuation_gain_fx( st, &att_fx, vad_hover_flag ); Loading
lib_enc/ivas_core_pre_proc_front_fx.c +19 −0 Original line number Diff line number Diff line Loading @@ -1153,7 +1153,26 @@ void pre_proc_front_ivas_fx( move16(); } #ifdef FIX_BASOP_2517_CLICK_IN_OMASA_LTV Word16 inp_local[L_INP_12k8]; Word16 Q_local; Word16 offset = (Word16) ( inp_12k8_fx - old_inp_12k8_fx ); Word16 norm_inp = norm_arr( old_inp_12k8_fx, L_INP_12k8 ); test(); IF( EQ_16( element_mode, IVAS_SCE ) && GT_16( norm_inp, 0 ) ) // SCE only: in stereo (CPE), pre-normalization slightly alters A_fx, causing divergence from the floating-point decoder during a mode switch. { Copy_Scale_sig( old_inp_12k8_fx, inp_local, L_INP_12k8, norm_inp ); Q_local = add( *Q_new, norm_inp ); analy_lp_fx( inp_local + offset, L_FRAME, L_look, ener_fx, A_fx, epsP_h, epsP_l, lsp_new_fx, lsp_mid_fx, st->lsp_old1_fx, alw_pitch_lag_12k8, alw_voicing_fx, INT_FS_12k8, element_mode, i, Q_local, Q_r ); } ELSE { analy_lp_fx( inp_12k8_fx, L_FRAME, L_look, ener_fx, A_fx, epsP_h, epsP_l, lsp_new_fx, lsp_mid_fx, st->lsp_old1_fx, alw_pitch_lag_12k8, alw_voicing_fx, INT_FS_12k8, element_mode, i, *Q_new, Q_r ); } #else analy_lp_fx( inp_12k8_fx, L_FRAME, L_look, ener_fx, A_fx, epsP_h, epsP_l, lsp_new_fx, lsp_mid_fx, st->lsp_old1_fx, alw_pitch_lag_12k8, alw_voicing_fx, INT_FS_12k8, element_mode, i, *Q_new, Q_r ); #endif FOR( Word16 idx = 0; idx < M + 1; idx++ ) { Loading
lib_enc/ivas_core_pre_proc_fx.c +0 −1 Original line number Diff line number Diff line Loading @@ -936,7 +936,6 @@ void ivas_compute_core_buffers_fx( size_modified = modify_Fs_fx( temp1F_icatdmResampBuf_fx, NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ), input_Fs, new_inp_16k_fx + NS2SA_FX2( sr_core, FRAME_SIZE_NS ), sr_core, mem_decim16k_dummy_fx, 0, &Q_tmp, &mem_decim16k_size ); /* Q0 */ #ifdef NONBE_FIX_ISSUE_2206 scale_sig( new_inp_16k_fx + NS2SA_FX2( sr_core, FRAME_SIZE_NS ), size_modified, negate( Q_tmp ) ); /* scaling back to Q_old_inp_16k */ // Scale_sig( st->mem_decim16k_fx, 2 * L_FILT_MAX, sub( -1, Q_old_inp_16k ) ); /* Q(-1) */ Q_tmp = norm_arr( st->mem_decim16k_fx, mem_decim16k_size ); scale_sig( st->mem_decim16k_fx, mem_decim16k_size, Q_tmp ); Loading