Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ #define FIX_1010_OPT_GIVENS_INV /* FhG: SVD complexity optimizations (non-be) */ #define FIX_1010_OPT_NORM_NOSAT /* FhG: SVD complexity optimizations (non-be) */ #define FIX_1010_OPT_SEC_SINGLE_RESCALE /* FhG: SVD complexity optimizations (non-be) */ #define FIX_ISSUE_1230 /* Ittiam: Fix for issue 1230: Basop Enc audible differences and distortion @16kbps */ #define NONBE_1211_DTX_BR_SWITCHING /* VA: port float issue 1211: fix crash in MASA DTX bitrate switching */ #define FIX_1189_GSC_IVAS_OMASA /* VA: Fix for issue 1189: Bitstream desynchornization due to reading/writing of the GSC_IVAS_mode parameter */ #define FIX_ISSUE_1237 /* VA: replacement of Copy_Scale_sig_16_32_DEPREC() that are doing 16 bits left shift by Copy_Scale_sig_16_32_no_sat() */ Loading lib_dec/FEC_HQ_phase_ecu_fx.c +4 −4 Original line number Diff line number Diff line Loading @@ -1591,7 +1591,7 @@ static void ivas_spec_ana_fx( IF( n > 0 && *pPlocs == 0 ) /* Very 1st peak position possible to have a peak at 0/DC index position. */ { #ifdef FIX_ISSUE_1237 Copy_Scale_sig_16_32_no_sat( &xfp[*pPlocs], xfp_32, 3, Q16 ); // Q + 16 Copy_Scale_sig_16_32_no_sat( &xfp[*pPlocs], xfp_32, 3, Q15 ); // Q + 16 #else Copy_Scale_sig_16_32_DEPREC( &xfp[*pPlocs], xfp_32, 3, Q16 ); // Q + 16 #endif Loading @@ -1606,7 +1606,7 @@ static void ivas_spec_ana_fx( IF( n > 0 && EQ_16( *pPlocs, 1 ) ) /* Also 2nd peak position uses DC which makes jacobsen unsuitable. */ { #ifdef FIX_ISSUE_1237 Copy_Scale_sig_16_32_no_sat( &xfp[*pPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 Copy_Scale_sig_16_32_no_sat( &xfp[*pPlocs - 1], xfp_32, 3, Q15 ); // Q + 16 #else Copy_Scale_sig_16_32_DEPREC( &xfp[*pPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 #endif Loading Loading @@ -1656,7 +1656,7 @@ static void ivas_spec_ana_fx( IF( EQ_16( currPlocs, ( sub( Lprot2_1, DELTA_CORR_F0_INT ) ) ) ) /* Also 2nd last peak position uses fs/2 which makes jacobsen less suitable. */ { #ifdef FIX_ISSUE_1237 Copy_Scale_sig_16_32_no_sat( &xfp[currPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 Copy_Scale_sig_16_32_no_sat( &xfp[currPlocs - 1], xfp_32, 3, Q15 ); // Q + 16 #else Copy_Scale_sig_16_32_DEPREC( &xfp[currPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 #endif Loading @@ -1674,7 +1674,7 @@ static void ivas_spec_ana_fx( IF( n > 0 ) /* fs/2 which makes special case . */ { #ifdef FIX_ISSUE_1237 Copy_Scale_sig_16_32_no_sat( &xfp[currPlocs - 2], xfp_32, 3, Q16 ); // Q + 16 Copy_Scale_sig_16_32_no_sat( &xfp[currPlocs - 2], xfp_32, 3, Q15 ); // Q + 16 #else Copy_Scale_sig_16_32_DEPREC( &xfp[currPlocs - 2], xfp_32, 3, Q16 ); // Q + 16 #endif Loading lib_enc/core_switching_enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,10 @@ void core_switching_pre_enc_ivas_fx( tmp = sub( L_LOOK_16k + L_SUBFR16k, Sample_Delay_HP ); Copy( &hBWE_TD->old_speech_shb_fx[tmp], hBWE_FD->new_input_hp_fx, Sample_Delay_HP ); #ifdef FIX_ISSUE_1230 hBWE_FD->Q_new_input_hp = 0; move16(); #endif IF( NE_16( st_fx->last_extl, WB_BWE ) ) { Loading lib_enc/stat_enc.h +8 −5 Original line number Diff line number Diff line Loading @@ -1008,7 +1008,10 @@ typedef struct td_bwe_enc_structure typedef struct fd_bwe_enc_structure { Word16 new_input_hp_fx[NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS )]; // q0 Word16 new_input_hp_fx[NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS )]; // Q_new_input_hp #ifdef FIX_ISSUE_1230 Word16 Q_new_input_hp; #endif Word16 old_input_fx[NS2SA( 48000, DELAY_FD_BWE_ENC_NS + DELAY_FIR_RESAMPL_NS )]; // q0 Word16 old_input_wb_fx[NS2SA( 16000, DELAY_FD_BWE_ENC_NS )]; /* Q(-1) */ Word16 old_input_lp_fx[NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_NS )]; // st->hBWE_FD->prev_Q_input_lp Loading lib_enc/swb_bwe_enc_fx.c +28 −0 Original line number Diff line number Diff line Loading @@ -325,6 +325,9 @@ void swb_bwe_enc_ivas_fx( move32(); #endif Word16 fb_band_begin; #ifdef FIX_ISSUE_1230 Word16 q_new_input_hp; #endif FD_BWE_ENC_HANDLE hBWE_FD = st_fx->hBWE_FD; TD_BWE_ENC_HANDLE hBWE_TD = st_fx->hBWE_TD; Loading Loading @@ -400,8 +403,25 @@ void swb_bwe_enc_ivas_fx( Copy( old_input_16k_fx + L_INP_MEM + L_FRAME16k - Sample_Delay_LP, hBWE_FD->old_input_lp_fx, Sample_Delay_LP ); } #ifdef FIX_ISSUE_1230 q_new_input_hp = s_min( Q_shb_speech, hBWE_FD->Q_new_input_hp ); IF( LT_16( Q_shb_speech, hBWE_FD->Q_new_input_hp ) ) { Copy_Scale_sig( hBWE_FD->new_input_hp_fx, new_input_hp_fx, Sample_Delay_HP, sub( Q_shb_speech, hBWE_FD->Q_new_input_hp ) ); // Q_shb_speech Copy( shb_speech_fx, &new_input_hp_fx[Sample_Delay_HP], L_FRAME16k - Sample_Delay_HP ); // Q_shb_speech } ELSE { Copy( hBWE_FD->new_input_hp_fx, new_input_hp_fx, Sample_Delay_HP ); // hBWE_FD->Q_new_input_hp Copy_Scale_sig( shb_speech_fx, &new_input_hp_fx[Sample_Delay_HP], L_FRAME16k - Sample_Delay_HP, sub( hBWE_FD->Q_new_input_hp, Q_shb_speech ) ); // hBWE_FD->Q_new_input_hp } hBWE_FD->Q_new_input_hp = Q_shb_speech; move16(); #else Copy( hBWE_FD->new_input_hp_fx, new_input_hp_fx, Sample_Delay_HP ); Copy( shb_speech_fx, &new_input_hp_fx[Sample_Delay_HP], L_FRAME16k - Sample_Delay_HP ); #endif Copy( shb_speech_fx + L_FRAME16k - Sample_Delay_HP, hBWE_FD->new_input_hp_fx, Sample_Delay_HP ); new_input_fx = old_input_fx + Sample_Delay_SWB_BWE; Copy( hBWE_FD->old_input_fx, old_input_fx, Sample_Delay_SWB_BWE ); Loading Loading @@ -511,7 +531,11 @@ void swb_bwe_enc_ivas_fx( { Q_shb = sub( Q_synth_hf, 4 ); } #ifdef FIX_ISSUE_1230 Copy_Scale_sig( new_input_hp_fx, new_input_hp_fx, L_FRAME16k, sub( Q_shb, q_new_input_hp ) ); #else Copy_Scale_sig( new_input_hp_fx, new_input_hp_fx, L_FRAME16k, sub( Q_shb, Q_shb_speech ) ); #endif /* FB BWE encoding */ IF( EQ_16( st_fx->extl, FB_BWE ) ) Loading Loading @@ -4123,6 +4147,10 @@ void fd_bwe_enc_init_fx( ) { set16_fx( hBWE_FD->new_input_hp_fx, 0, NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS ) ); #ifdef FIX_ISSUE_1230 hBWE_FD->Q_new_input_hp = 0; move16(); #endif set16_fx( hBWE_FD->old_input_fx, 0, NS2SA( 48000, DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS ) ); set16_fx( hBWE_FD->old_input_wb_fx, 0, NS2SA( 16000, DELAY_FD_BWE_ENC_12k8_NS ) ); #ifndef MSAN_FIX Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ #define FIX_1010_OPT_GIVENS_INV /* FhG: SVD complexity optimizations (non-be) */ #define FIX_1010_OPT_NORM_NOSAT /* FhG: SVD complexity optimizations (non-be) */ #define FIX_1010_OPT_SEC_SINGLE_RESCALE /* FhG: SVD complexity optimizations (non-be) */ #define FIX_ISSUE_1230 /* Ittiam: Fix for issue 1230: Basop Enc audible differences and distortion @16kbps */ #define NONBE_1211_DTX_BR_SWITCHING /* VA: port float issue 1211: fix crash in MASA DTX bitrate switching */ #define FIX_1189_GSC_IVAS_OMASA /* VA: Fix for issue 1189: Bitstream desynchornization due to reading/writing of the GSC_IVAS_mode parameter */ #define FIX_ISSUE_1237 /* VA: replacement of Copy_Scale_sig_16_32_DEPREC() that are doing 16 bits left shift by Copy_Scale_sig_16_32_no_sat() */ Loading
lib_dec/FEC_HQ_phase_ecu_fx.c +4 −4 Original line number Diff line number Diff line Loading @@ -1591,7 +1591,7 @@ static void ivas_spec_ana_fx( IF( n > 0 && *pPlocs == 0 ) /* Very 1st peak position possible to have a peak at 0/DC index position. */ { #ifdef FIX_ISSUE_1237 Copy_Scale_sig_16_32_no_sat( &xfp[*pPlocs], xfp_32, 3, Q16 ); // Q + 16 Copy_Scale_sig_16_32_no_sat( &xfp[*pPlocs], xfp_32, 3, Q15 ); // Q + 16 #else Copy_Scale_sig_16_32_DEPREC( &xfp[*pPlocs], xfp_32, 3, Q16 ); // Q + 16 #endif Loading @@ -1606,7 +1606,7 @@ static void ivas_spec_ana_fx( IF( n > 0 && EQ_16( *pPlocs, 1 ) ) /* Also 2nd peak position uses DC which makes jacobsen unsuitable. */ { #ifdef FIX_ISSUE_1237 Copy_Scale_sig_16_32_no_sat( &xfp[*pPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 Copy_Scale_sig_16_32_no_sat( &xfp[*pPlocs - 1], xfp_32, 3, Q15 ); // Q + 16 #else Copy_Scale_sig_16_32_DEPREC( &xfp[*pPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 #endif Loading Loading @@ -1656,7 +1656,7 @@ static void ivas_spec_ana_fx( IF( EQ_16( currPlocs, ( sub( Lprot2_1, DELTA_CORR_F0_INT ) ) ) ) /* Also 2nd last peak position uses fs/2 which makes jacobsen less suitable. */ { #ifdef FIX_ISSUE_1237 Copy_Scale_sig_16_32_no_sat( &xfp[currPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 Copy_Scale_sig_16_32_no_sat( &xfp[currPlocs - 1], xfp_32, 3, Q15 ); // Q + 16 #else Copy_Scale_sig_16_32_DEPREC( &xfp[currPlocs - 1], xfp_32, 3, Q16 ); // Q + 16 #endif Loading @@ -1674,7 +1674,7 @@ static void ivas_spec_ana_fx( IF( n > 0 ) /* fs/2 which makes special case . */ { #ifdef FIX_ISSUE_1237 Copy_Scale_sig_16_32_no_sat( &xfp[currPlocs - 2], xfp_32, 3, Q16 ); // Q + 16 Copy_Scale_sig_16_32_no_sat( &xfp[currPlocs - 2], xfp_32, 3, Q15 ); // Q + 16 #else Copy_Scale_sig_16_32_DEPREC( &xfp[currPlocs - 2], xfp_32, 3, Q16 ); // Q + 16 #endif Loading
lib_enc/core_switching_enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,10 @@ void core_switching_pre_enc_ivas_fx( tmp = sub( L_LOOK_16k + L_SUBFR16k, Sample_Delay_HP ); Copy( &hBWE_TD->old_speech_shb_fx[tmp], hBWE_FD->new_input_hp_fx, Sample_Delay_HP ); #ifdef FIX_ISSUE_1230 hBWE_FD->Q_new_input_hp = 0; move16(); #endif IF( NE_16( st_fx->last_extl, WB_BWE ) ) { Loading
lib_enc/stat_enc.h +8 −5 Original line number Diff line number Diff line Loading @@ -1008,7 +1008,10 @@ typedef struct td_bwe_enc_structure typedef struct fd_bwe_enc_structure { Word16 new_input_hp_fx[NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS )]; // q0 Word16 new_input_hp_fx[NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS )]; // Q_new_input_hp #ifdef FIX_ISSUE_1230 Word16 Q_new_input_hp; #endif Word16 old_input_fx[NS2SA( 48000, DELAY_FD_BWE_ENC_NS + DELAY_FIR_RESAMPL_NS )]; // q0 Word16 old_input_wb_fx[NS2SA( 16000, DELAY_FD_BWE_ENC_NS )]; /* Q(-1) */ Word16 old_input_lp_fx[NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_NS )]; // st->hBWE_FD->prev_Q_input_lp Loading
lib_enc/swb_bwe_enc_fx.c +28 −0 Original line number Diff line number Diff line Loading @@ -325,6 +325,9 @@ void swb_bwe_enc_ivas_fx( move32(); #endif Word16 fb_band_begin; #ifdef FIX_ISSUE_1230 Word16 q_new_input_hp; #endif FD_BWE_ENC_HANDLE hBWE_FD = st_fx->hBWE_FD; TD_BWE_ENC_HANDLE hBWE_TD = st_fx->hBWE_TD; Loading Loading @@ -400,8 +403,25 @@ void swb_bwe_enc_ivas_fx( Copy( old_input_16k_fx + L_INP_MEM + L_FRAME16k - Sample_Delay_LP, hBWE_FD->old_input_lp_fx, Sample_Delay_LP ); } #ifdef FIX_ISSUE_1230 q_new_input_hp = s_min( Q_shb_speech, hBWE_FD->Q_new_input_hp ); IF( LT_16( Q_shb_speech, hBWE_FD->Q_new_input_hp ) ) { Copy_Scale_sig( hBWE_FD->new_input_hp_fx, new_input_hp_fx, Sample_Delay_HP, sub( Q_shb_speech, hBWE_FD->Q_new_input_hp ) ); // Q_shb_speech Copy( shb_speech_fx, &new_input_hp_fx[Sample_Delay_HP], L_FRAME16k - Sample_Delay_HP ); // Q_shb_speech } ELSE { Copy( hBWE_FD->new_input_hp_fx, new_input_hp_fx, Sample_Delay_HP ); // hBWE_FD->Q_new_input_hp Copy_Scale_sig( shb_speech_fx, &new_input_hp_fx[Sample_Delay_HP], L_FRAME16k - Sample_Delay_HP, sub( hBWE_FD->Q_new_input_hp, Q_shb_speech ) ); // hBWE_FD->Q_new_input_hp } hBWE_FD->Q_new_input_hp = Q_shb_speech; move16(); #else Copy( hBWE_FD->new_input_hp_fx, new_input_hp_fx, Sample_Delay_HP ); Copy( shb_speech_fx, &new_input_hp_fx[Sample_Delay_HP], L_FRAME16k - Sample_Delay_HP ); #endif Copy( shb_speech_fx + L_FRAME16k - Sample_Delay_HP, hBWE_FD->new_input_hp_fx, Sample_Delay_HP ); new_input_fx = old_input_fx + Sample_Delay_SWB_BWE; Copy( hBWE_FD->old_input_fx, old_input_fx, Sample_Delay_SWB_BWE ); Loading Loading @@ -511,7 +531,11 @@ void swb_bwe_enc_ivas_fx( { Q_shb = sub( Q_synth_hf, 4 ); } #ifdef FIX_ISSUE_1230 Copy_Scale_sig( new_input_hp_fx, new_input_hp_fx, L_FRAME16k, sub( Q_shb, q_new_input_hp ) ); #else Copy_Scale_sig( new_input_hp_fx, new_input_hp_fx, L_FRAME16k, sub( Q_shb, Q_shb_speech ) ); #endif /* FB BWE encoding */ IF( EQ_16( st_fx->extl, FB_BWE ) ) Loading Loading @@ -4123,6 +4147,10 @@ void fd_bwe_enc_init_fx( ) { set16_fx( hBWE_FD->new_input_hp_fx, 0, NS2SA( 16000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS - DELAY_CLDFB_NS ) ); #ifdef FIX_ISSUE_1230 hBWE_FD->Q_new_input_hp = 0; move16(); #endif set16_fx( hBWE_FD->old_input_fx, 0, NS2SA( 48000, DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS ) ); set16_fx( hBWE_FD->old_input_wb_fx, 0, NS2SA( 16000, DELAY_FD_BWE_ENC_12k8_NS ) ); #ifndef MSAN_FIX Loading