Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,7 @@ #define FIX_940_DEBUGGING_VARIABLE /* Nokia: issue #940: remove debugging variable */ #define NONBE_FIX_931_IGF_STEREO_DEC_NOISE /* FhG: issue #931: fix noise substitution in the stereo IGF decoder */ #define FIX_CRASH_LONG_BRIR /* Orange : Fix crash when long BRIR is set */ #define NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW /* FhG: issue 943: fix crash in BW switchin from WB in MDCT-Stereo core encoder */ /* #################### End BASOP porting switches ############################ */ Loading lib_enc/ivas_cpe_enc.c +18 −0 Original line number Diff line number Diff line Loading @@ -555,6 +555,7 @@ ivas_error ivas_cpe_enc( * Core codec configuration *----------------------------------------------------------------*/ #ifndef NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW /* IGF reconfiguration */ for ( n = 0; n < n_CoreChannels; n++ ) { Loading @@ -569,6 +570,7 @@ ivas_error ivas_cpe_enc( } } #endif if ( hCPE->element_mode == IVAS_CPE_MDCT && st_ivas->hMCT == NULL ) { /* set coded BW for MDCT stereo */ Loading @@ -590,6 +592,22 @@ ivas_error ivas_cpe_enc( } } #ifdef NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW /* IGF reconfiguration */ for ( n = 0; n < n_CoreChannels; n++ ) { if ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->element_mode != hCPE->last_element_mode || ( hCPE->element_mode == IVAS_CPE_TD && sts[0]->bits_frame_nominal != last_bits_frame_nominal ) || sts[n]->last_bwidth != sts[n]->bwidth ) && ( n == 0 || hCPE->element_mode == IVAS_CPE_MDCT ) ) { int16_t igf; igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->rf_mode ); if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK ) { return error; } } } #endif /* set ACELP@12k8 / ACELP@16k flag for flexible ACELP core */ for ( n = 0; n < n_CoreChannels; n++ ) { Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,7 @@ #define FIX_940_DEBUGGING_VARIABLE /* Nokia: issue #940: remove debugging variable */ #define NONBE_FIX_931_IGF_STEREO_DEC_NOISE /* FhG: issue #931: fix noise substitution in the stereo IGF decoder */ #define FIX_CRASH_LONG_BRIR /* Orange : Fix crash when long BRIR is set */ #define NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW /* FhG: issue 943: fix crash in BW switchin from WB in MDCT-Stereo core encoder */ /* #################### End BASOP porting switches ############################ */ Loading
lib_enc/ivas_cpe_enc.c +18 −0 Original line number Diff line number Diff line Loading @@ -555,6 +555,7 @@ ivas_error ivas_cpe_enc( * Core codec configuration *----------------------------------------------------------------*/ #ifndef NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW /* IGF reconfiguration */ for ( n = 0; n < n_CoreChannels; n++ ) { Loading @@ -569,6 +570,7 @@ ivas_error ivas_cpe_enc( } } #endif if ( hCPE->element_mode == IVAS_CPE_MDCT && st_ivas->hMCT == NULL ) { /* set coded BW for MDCT stereo */ Loading @@ -590,6 +592,22 @@ ivas_error ivas_cpe_enc( } } #ifdef NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW /* IGF reconfiguration */ for ( n = 0; n < n_CoreChannels; n++ ) { if ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->element_mode != hCPE->last_element_mode || ( hCPE->element_mode == IVAS_CPE_TD && sts[0]->bits_frame_nominal != last_bits_frame_nominal ) || sts[n]->last_bwidth != sts[n]->bwidth ) && ( n == 0 || hCPE->element_mode == IVAS_CPE_MDCT ) ) { int16_t igf; igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->rf_mode ); if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK ) { return error; } } } #endif /* set ACELP@12k8 / ACELP@16k flag for flexible ACELP core */ for ( n = 0; n < n_CoreChannels; n++ ) { Loading