Loading lib_com/options.h +1 −3 Original line number Diff line number Diff line Loading @@ -157,11 +157,9 @@ #ifdef FIX_I109_ORIENTATION_TRACKING #define OTR_REFERENCE_VECTOR_TRACKING /* FhG: enables the reference position orientation tracking mode */ #endif //#define DISABLE_BWD_MCT /* FhG: Disable bandwidth detection for MCT*/ #define FIX_MDCT_STEREO_BWD_TCX10 /* FhG: enables bw detection also for TCX10 frames */ #define BWD_COUNT_FIX /* FhG/Dolby: fix for issue of reacting to sudden transiensts in SBA/MCT modes */ #define FIX_380_BFI_PARAMISM /* VA: issue 380 - fix metadata recovery in ParamISM BFI */ #define FIX_MDCT_BASED_BWD /* FhG: fixes for BWD for issues with reaction to transients for MDCT-stereo and MCT */ /* ################## End DEVELOPMENT switches ######################### */ Loading lib_com/prot.h +1 −1 Original line number Diff line number Diff line Loading @@ -3827,7 +3827,7 @@ void bw_detect( const float signal_in[], /* i : input signal */ float *spectrum, /* i : MDCT spectrum */ const float *enerBuffer /* i : energy buffer */ #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD , const int16_t mct_on /* i : flag MCT mode */ #endif Loading lib_enc/amr_wb_enc.c +1 −1 Original line number Diff line number Diff line Loading @@ -343,7 +343,7 @@ void amr_wb_enc( *----------------------------------------------------------------*/ bw_detect( st, st->input, NULL, NULL #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD , 0 #endif Loading lib_enc/bw_detect.c +20 −17 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ #define BWD_COUNT_MAX 100 #define BWD_COUNT_WIDER_BW 10 #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD #define BWD_COUNT_WIDER_BW_MDCT 0 #endif Loading @@ -74,7 +74,7 @@ void bw_detect( const float signal_in[], /* i : input signal */ float *spectrum, /* i : MDCT spectrum */ const float *enerBuffer /* i : energy buffer */ #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD , const int16_t mct_on /* i : flag MCT mode */ #endif Loading @@ -87,8 +87,8 @@ void bw_detect( const float *pt, *pt1; float max_NB, max_WB, max_SWB, max_FB, mean_NB, mean_WB, mean_SWB, mean_FB; int16_t cldfb_bin_width = 4; #ifdef BWD_COUNT_FIX int16_t bwd_count_wider_bw; #ifdef FIX_MDCT_BASED_BWD int16_t bwd_count_wider_bw, l_frame; bwd_count_wider_bw = BWD_COUNT_WIDER_BW; if ( st->element_mode == IVAS_CPE_MDCT && ( st->element_brate > IVAS_64k || mct_on ) ) Loading Loading @@ -189,13 +189,18 @@ void bw_detect( } else { #ifndef FIX_MDCT_STEREO_BWD_TCX10 #ifndef FIX_MDCT_BASED_BWD bin_width *= (int16_t) ( ( st->input_Fs / FRAMES_PER_SEC ) / BWD_TOTAL_WIDTH ); mvr2r( spectrum, spect, (int16_t) ( st->input_Fs / FRAMES_PER_SEC ) ); #else assert( st->core != ACELP_CORE ); bin_width *= (int16_t) ( ( st->input_Fs / ( FRAMES_PER_SEC * st->core ) ) / BWD_TOTAL_WIDTH ); mvr2r( spectrum, spect, (int16_t) ( st->input_Fs / ( FRAMES_PER_SEC * st->core ) ) ); l_frame = (int16_t) ( st->input_Fs / FRAMES_PER_SEC ); if ( st->core == TCX_10_CORE ) { l_frame /= 2; } bin_width *= ( l_frame / BWD_TOTAL_WIDTH ); mvr2r( spectrum, spect, l_frame ); #endif } /*---------------------------------------------------------------------* Loading Loading @@ -414,7 +419,7 @@ void bw_detect( /* switching to a higher BW */ if ( st->last_input_bwidth == NB ) { #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_WB > bwd_count_wider_bw ) #else if ( st->count_WB > BWD_COUNT_WIDER_BW ) Loading @@ -423,7 +428,7 @@ void bw_detect( st->input_bwidth = WB; st->count_WB = BWD_COUNT_MAX; #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_SWB > bwd_count_wider_bw ) #else if ( st->count_SWB > BWD_COUNT_WIDER_BW ) Loading @@ -432,7 +437,7 @@ void bw_detect( st->input_bwidth = SWB; st->count_SWB = BWD_COUNT_MAX; #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_FB > bwd_count_wider_bw ) #else if ( st->count_FB > BWD_COUNT_WIDER_BW ) Loading @@ -447,7 +452,7 @@ void bw_detect( if ( st->last_input_bwidth == WB && st->input_Fs > 16000 ) { #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_SWB > bwd_count_wider_bw ) #else if ( st->count_SWB > BWD_COUNT_WIDER_BW ) Loading @@ -456,7 +461,7 @@ void bw_detect( st->input_bwidth = SWB; st->count_SWB = BWD_COUNT_MAX; #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_FB > bwd_count_wider_bw ) #else if ( st->count_FB > BWD_COUNT_WIDER_BW ) Loading @@ -470,7 +475,7 @@ void bw_detect( if ( st->last_input_bwidth == SWB && st->input_Fs > 32000 ) { #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_FB > bwd_count_wider_bw ) #else if ( st->count_FB > BWD_COUNT_WIDER_BW ) Loading @@ -481,7 +486,6 @@ void bw_detect( } } /* switching to a lower BW */ if ( st->last_input_bwidth == FB ) { Loading Loading @@ -694,7 +698,7 @@ void set_bw_stereo( return; } #ifndef DISABLE_BWD_MCT /*-------------------------------------------------------------------* * set_bw_mct() * Loading Loading @@ -745,4 +749,3 @@ int16_t set_bw_mct( return bw_changed; } #endif lib_enc/ivas_core_pre_proc_front.c +1 −1 Original line number Diff line number Diff line Loading @@ -487,7 +487,7 @@ ivas_error pre_proc_front_ivas( if ( st->idchan == 0 && element_mode != IVAS_CPE_MDCT ) { bw_detect( st, st->input, NULL, enerBuffer #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD , 0 #endif Loading Loading
lib_com/options.h +1 −3 Original line number Diff line number Diff line Loading @@ -157,11 +157,9 @@ #ifdef FIX_I109_ORIENTATION_TRACKING #define OTR_REFERENCE_VECTOR_TRACKING /* FhG: enables the reference position orientation tracking mode */ #endif //#define DISABLE_BWD_MCT /* FhG: Disable bandwidth detection for MCT*/ #define FIX_MDCT_STEREO_BWD_TCX10 /* FhG: enables bw detection also for TCX10 frames */ #define BWD_COUNT_FIX /* FhG/Dolby: fix for issue of reacting to sudden transiensts in SBA/MCT modes */ #define FIX_380_BFI_PARAMISM /* VA: issue 380 - fix metadata recovery in ParamISM BFI */ #define FIX_MDCT_BASED_BWD /* FhG: fixes for BWD for issues with reaction to transients for MDCT-stereo and MCT */ /* ################## End DEVELOPMENT switches ######################### */ Loading
lib_com/prot.h +1 −1 Original line number Diff line number Diff line Loading @@ -3827,7 +3827,7 @@ void bw_detect( const float signal_in[], /* i : input signal */ float *spectrum, /* i : MDCT spectrum */ const float *enerBuffer /* i : energy buffer */ #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD , const int16_t mct_on /* i : flag MCT mode */ #endif Loading
lib_enc/amr_wb_enc.c +1 −1 Original line number Diff line number Diff line Loading @@ -343,7 +343,7 @@ void amr_wb_enc( *----------------------------------------------------------------*/ bw_detect( st, st->input, NULL, NULL #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD , 0 #endif Loading
lib_enc/bw_detect.c +20 −17 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ #define BWD_COUNT_MAX 100 #define BWD_COUNT_WIDER_BW 10 #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD #define BWD_COUNT_WIDER_BW_MDCT 0 #endif Loading @@ -74,7 +74,7 @@ void bw_detect( const float signal_in[], /* i : input signal */ float *spectrum, /* i : MDCT spectrum */ const float *enerBuffer /* i : energy buffer */ #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD , const int16_t mct_on /* i : flag MCT mode */ #endif Loading @@ -87,8 +87,8 @@ void bw_detect( const float *pt, *pt1; float max_NB, max_WB, max_SWB, max_FB, mean_NB, mean_WB, mean_SWB, mean_FB; int16_t cldfb_bin_width = 4; #ifdef BWD_COUNT_FIX int16_t bwd_count_wider_bw; #ifdef FIX_MDCT_BASED_BWD int16_t bwd_count_wider_bw, l_frame; bwd_count_wider_bw = BWD_COUNT_WIDER_BW; if ( st->element_mode == IVAS_CPE_MDCT && ( st->element_brate > IVAS_64k || mct_on ) ) Loading Loading @@ -189,13 +189,18 @@ void bw_detect( } else { #ifndef FIX_MDCT_STEREO_BWD_TCX10 #ifndef FIX_MDCT_BASED_BWD bin_width *= (int16_t) ( ( st->input_Fs / FRAMES_PER_SEC ) / BWD_TOTAL_WIDTH ); mvr2r( spectrum, spect, (int16_t) ( st->input_Fs / FRAMES_PER_SEC ) ); #else assert( st->core != ACELP_CORE ); bin_width *= (int16_t) ( ( st->input_Fs / ( FRAMES_PER_SEC * st->core ) ) / BWD_TOTAL_WIDTH ); mvr2r( spectrum, spect, (int16_t) ( st->input_Fs / ( FRAMES_PER_SEC * st->core ) ) ); l_frame = (int16_t) ( st->input_Fs / FRAMES_PER_SEC ); if ( st->core == TCX_10_CORE ) { l_frame /= 2; } bin_width *= ( l_frame / BWD_TOTAL_WIDTH ); mvr2r( spectrum, spect, l_frame ); #endif } /*---------------------------------------------------------------------* Loading Loading @@ -414,7 +419,7 @@ void bw_detect( /* switching to a higher BW */ if ( st->last_input_bwidth == NB ) { #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_WB > bwd_count_wider_bw ) #else if ( st->count_WB > BWD_COUNT_WIDER_BW ) Loading @@ -423,7 +428,7 @@ void bw_detect( st->input_bwidth = WB; st->count_WB = BWD_COUNT_MAX; #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_SWB > bwd_count_wider_bw ) #else if ( st->count_SWB > BWD_COUNT_WIDER_BW ) Loading @@ -432,7 +437,7 @@ void bw_detect( st->input_bwidth = SWB; st->count_SWB = BWD_COUNT_MAX; #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_FB > bwd_count_wider_bw ) #else if ( st->count_FB > BWD_COUNT_WIDER_BW ) Loading @@ -447,7 +452,7 @@ void bw_detect( if ( st->last_input_bwidth == WB && st->input_Fs > 16000 ) { #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_SWB > bwd_count_wider_bw ) #else if ( st->count_SWB > BWD_COUNT_WIDER_BW ) Loading @@ -456,7 +461,7 @@ void bw_detect( st->input_bwidth = SWB; st->count_SWB = BWD_COUNT_MAX; #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_FB > bwd_count_wider_bw ) #else if ( st->count_FB > BWD_COUNT_WIDER_BW ) Loading @@ -470,7 +475,7 @@ void bw_detect( if ( st->last_input_bwidth == SWB && st->input_Fs > 32000 ) { #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD if ( st->count_FB > bwd_count_wider_bw ) #else if ( st->count_FB > BWD_COUNT_WIDER_BW ) Loading @@ -481,7 +486,6 @@ void bw_detect( } } /* switching to a lower BW */ if ( st->last_input_bwidth == FB ) { Loading Loading @@ -694,7 +698,7 @@ void set_bw_stereo( return; } #ifndef DISABLE_BWD_MCT /*-------------------------------------------------------------------* * set_bw_mct() * Loading Loading @@ -745,4 +749,3 @@ int16_t set_bw_mct( return bw_changed; } #endif
lib_enc/ivas_core_pre_proc_front.c +1 −1 Original line number Diff line number Diff line Loading @@ -487,7 +487,7 @@ ivas_error pre_proc_front_ivas( if ( st->idchan == 0 && element_mode != IVAS_CPE_MDCT ) { bw_detect( st, st->input, NULL, enerBuffer #ifdef BWD_COUNT_FIX #ifdef FIX_MDCT_BASED_BWD , 0 #endif Loading