Loading .gitlab-ci.yml +1 −1 Original line number Diff line number Diff line variables: # note: GitLab cannot reference variables defined by users in the include ref:, we need to use a YAML anchor for this # see https://docs.gitlab.com/ci/yaml/includes/#use-variables-with-include for more information IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF 4eb4c0dfbdc845280a9994b5f7540f69c737537b IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF 44cb5638949b874ce0f5c3bf4359f9db860d88bc include: - local: .gitlab-ci/variables.yml Loading lib_com/cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,9 @@ enum #define ACELP_TCX_TRANS_NS 1250000 /* Duration of the ACELP->TCX overlap - 1.25 ms */ #define L_FRAME_MAX L_FRAME48k /* Max 20ms frame size @48kHz */ #define L_FRAME_PLUS 1200 /* Max frame size (long TCX frame) */ #ifdef FIX_1320_STACK_CPE_DECODER #define L_FRAME_PLUS_INTERNAL 800 /* Max frame size (long TCX frame) at maximum internal sampling rate */ #endif #define L_MDCT_OVLP_MAX NS2SA( 48000, ACELP_LOOK_NS ) /* = Max mdct overlap */ #define N_TCX10_MAX 480 /* Max size of TCX10 MDCT spectrum */ #define BITS_TEC 1 /* number of bits for TEC */ Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_1314_STEREO_TO_EXT /* VA: issue 1314: set RENDERER_DISABLE for stereo to EXT output */ #define FIX_1320_STACK_CPE_DECODER /* VA: issue 1320: Optimize the stack memory consumption in the CPE decoder */ /* #################### End BE switches ################################## */ Loading lib_dec/dec_LPD.c +8 −0 Original line number Diff line number Diff line Loading @@ -71,7 +71,11 @@ void decoder_LPD( { int16_t *prm; int16_t param_lpc[NPRM_LPC_NEW]; #ifdef FIX_1320_STACK_CPE_DECODER float synth_buf[OLD_SYNTH_INTERNAL_DEC + L_FRAME_PLUS_INTERNAL + M]; #else float synth_buf[OLD_SYNTH_SIZE_DEC + L_FRAME_PLUS + M]; #endif float *synth; float synth_bufFB[OLD_SYNTH_SIZE_DEC + L_FRAME_PLUS + M]; float *synthFB; Loading Loading @@ -124,7 +128,11 @@ void decoder_LPD( synthFB = synth_bufFB + st->hTcxDec->old_synth_lenFB; mvr2r( st->hTcxDec->old_synth, synth_buf, st->hTcxDec->old_synth_len ); mvr2r( st->hTcxDec->old_synthFB, synth_bufFB, st->hTcxDec->old_synth_lenFB ); #ifdef FIX_1320_STACK_CPE_DECODER set_zero( synth, L_FRAME_PLUS_INTERNAL + M ); #else set_zero( synth, L_FRAME_PLUS + M ); #endif set_zero( synthFB, L_FRAME_PLUS + M ); Loading lib_dec/ivas_core_dec.c +29 −3 Original line number Diff line number Diff line Loading @@ -75,7 +75,12 @@ ivas_error ivas_core_dec( float synth[CPE_CHANNELS][L_FRAME48k]; float tmp_buffer[L_FRAME48k]; int16_t tmps, incr; #ifdef FIX_1320_STACK_CPE_DECODER float *bwe_exc_extended[CPE_CHANNELS] = { NULL, NULL }; int16_t flag_bwe_bws; #else float bwe_exc_extended[CPE_CHANNELS][L_FRAME32k + NL_BUFF_OFFSET]; #endif float voice_factors[CPE_CHANNELS][NB_SUBFR16k]; int16_t core_switching_flag[CPE_CHANNELS]; float old_syn_12k8_16k[CPE_CHANNELS][L_FRAME16k]; Loading Loading @@ -200,6 +205,9 @@ ivas_error ivas_core_dec( set_f( voice_factors[n], 0.f, NB_SUBFR16k ); set_f( hb_synth[n], 0.0f, L_FRAME48k ); #ifdef FIX_1320_STACK_CPE_DECODER bwe_exc_extended[n] = hb_synth[n]; /* note: reuse the buffer */ #endif /*------------------------------------------------------------------* * Decision matrix (selection of technologies) Loading Loading @@ -510,6 +518,10 @@ ivas_error ivas_core_dec( * SWB(FB) BWE decoding *---------------------------------------------------------------------*/ #ifdef FIX_1320_STACK_CPE_DECODER flag_bwe_bws = ( output_Fs >= 32000 && st->core == ACELP_CORE && st->bwidth > NB && st->bws_cnt > 0 && st->bfi == 0 ); #endif if ( st->extl == SWB_TBE || st->extl == FB_TBE || ( st->coder_type != AUDIO && st->coder_type != INACTIVE && st->core_brate >= SID_2k40 && st->core == ACELP_CORE && !st->con_tcx && output_Fs >= 32000 && st->bwidth > NB && st->bws_cnt > 0 ) ) { /* SWB TBE decoder */ Loading @@ -521,12 +533,23 @@ ivas_error ivas_core_dec( fb_tbe_dec( st, tmp_buffer /*fb_exc*/, hb_synth[n], tmp_buffer /*fb_synth_ref*/, output_frame ); } } #ifdef FIX_1320_STACK_CPE_DECODER else if ( st->extl == SWB_BWE || st->extl == FB_BWE || flag_bwe_bws ) #else else if ( st->extl == SWB_BWE || st->extl == FB_BWE || ( output_Fs >= 32000 && st->core == ACELP_CORE && st->bwidth > NB && st->bws_cnt > 0 && !st->ppp_mode_dec && !( st->nelp_mode_dec == 1 && st->bfi == 1 ) ) ) #endif { /* SWB BWE decoder */ swb_bwe_dec( st, output[n], synth[n], hb_synth[n], use_cldfb_for_dft, output_frame ); } #ifdef FIX_1320_STACK_CPE_DECODER if ( ( st->core == ACELP_CORE && ( st->extl == -1 || st->extl == SWB_CNG ) ) && flag_bwe_bws == 0 ) { set_f( hb_synth[n], 0.0f, L_FRAME48k ); } #endif /*---------------------------------------------------------------------* * FEC - recovery after lost HQ core (smoothing of the BWE component) *---------------------------------------------------------------------*/ Loading Loading @@ -560,6 +583,7 @@ ivas_error ivas_core_dec( stereo_icBWE_dec( hCPE, hb_synth[0], hb_synth[1], tmp_buffer /*fb_synth_ref*/, voice_factors[0], output_frame ); } #ifndef FIX_1320_STACK_CPE_DECODER if ( st->element_mode == EVS_MONO ) { /*----------------------------------------------------------------* Loading @@ -575,7 +599,7 @@ ivas_error ivas_core_dec( st->hPlcInfo->Pitch = 0; } } #endif /*----------------------------------------------------------------* * Transition and synchronization of BWE components *----------------------------------------------------------------*/ Loading @@ -590,6 +614,7 @@ ivas_error ivas_core_dec( } else { #ifndef FIX_1320_STACK_CPE_DECODER if ( st->extl == SWB_BWE_HIGHRATE || st->extl == FB_BWE_HIGHRATE ) { /* HR SWB BWE on top of ACELP@16kHz */ Loading @@ -597,9 +622,12 @@ ivas_error ivas_core_dec( } else { #endif /* TBE on top of ACELP@16kHz */ tmps = NS2SA( output_Fs, MAX_DELAY_TBE_NS - DELAY_SWB_TBE_16k_NS ); #ifndef FIX_1320_STACK_CPE_DECODER } #endif } /* Smooth transitions when switching between different technologies */ Loading Loading @@ -733,11 +761,9 @@ ivas_error ivas_core_dec( } /* n_channels loop */ #ifdef DEBUG_MODE_INFO output_debug_mode_info_dec( sts, n_channels, output_frame, pitch_buf ); #endif pop_wmops(); return error; } Loading Loading
.gitlab-ci.yml +1 −1 Original line number Diff line number Diff line variables: # note: GitLab cannot reference variables defined by users in the include ref:, we need to use a YAML anchor for this # see https://docs.gitlab.com/ci/yaml/includes/#use-variables-with-include for more information IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF 4eb4c0dfbdc845280a9994b5f7540f69c737537b IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF 44cb5638949b874ce0f5c3bf4359f9db860d88bc include: - local: .gitlab-ci/variables.yml Loading
lib_com/cnst.h +3 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,9 @@ enum #define ACELP_TCX_TRANS_NS 1250000 /* Duration of the ACELP->TCX overlap - 1.25 ms */ #define L_FRAME_MAX L_FRAME48k /* Max 20ms frame size @48kHz */ #define L_FRAME_PLUS 1200 /* Max frame size (long TCX frame) */ #ifdef FIX_1320_STACK_CPE_DECODER #define L_FRAME_PLUS_INTERNAL 800 /* Max frame size (long TCX frame) at maximum internal sampling rate */ #endif #define L_MDCT_OVLP_MAX NS2SA( 48000, ACELP_LOOK_NS ) /* = Max mdct overlap */ #define N_TCX10_MAX 480 /* Max size of TCX10 MDCT spectrum */ #define BITS_TEC 1 /* number of bits for TEC */ Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_1314_STEREO_TO_EXT /* VA: issue 1314: set RENDERER_DISABLE for stereo to EXT output */ #define FIX_1320_STACK_CPE_DECODER /* VA: issue 1320: Optimize the stack memory consumption in the CPE decoder */ /* #################### End BE switches ################################## */ Loading
lib_dec/dec_LPD.c +8 −0 Original line number Diff line number Diff line Loading @@ -71,7 +71,11 @@ void decoder_LPD( { int16_t *prm; int16_t param_lpc[NPRM_LPC_NEW]; #ifdef FIX_1320_STACK_CPE_DECODER float synth_buf[OLD_SYNTH_INTERNAL_DEC + L_FRAME_PLUS_INTERNAL + M]; #else float synth_buf[OLD_SYNTH_SIZE_DEC + L_FRAME_PLUS + M]; #endif float *synth; float synth_bufFB[OLD_SYNTH_SIZE_DEC + L_FRAME_PLUS + M]; float *synthFB; Loading Loading @@ -124,7 +128,11 @@ void decoder_LPD( synthFB = synth_bufFB + st->hTcxDec->old_synth_lenFB; mvr2r( st->hTcxDec->old_synth, synth_buf, st->hTcxDec->old_synth_len ); mvr2r( st->hTcxDec->old_synthFB, synth_bufFB, st->hTcxDec->old_synth_lenFB ); #ifdef FIX_1320_STACK_CPE_DECODER set_zero( synth, L_FRAME_PLUS_INTERNAL + M ); #else set_zero( synth, L_FRAME_PLUS + M ); #endif set_zero( synthFB, L_FRAME_PLUS + M ); Loading
lib_dec/ivas_core_dec.c +29 −3 Original line number Diff line number Diff line Loading @@ -75,7 +75,12 @@ ivas_error ivas_core_dec( float synth[CPE_CHANNELS][L_FRAME48k]; float tmp_buffer[L_FRAME48k]; int16_t tmps, incr; #ifdef FIX_1320_STACK_CPE_DECODER float *bwe_exc_extended[CPE_CHANNELS] = { NULL, NULL }; int16_t flag_bwe_bws; #else float bwe_exc_extended[CPE_CHANNELS][L_FRAME32k + NL_BUFF_OFFSET]; #endif float voice_factors[CPE_CHANNELS][NB_SUBFR16k]; int16_t core_switching_flag[CPE_CHANNELS]; float old_syn_12k8_16k[CPE_CHANNELS][L_FRAME16k]; Loading Loading @@ -200,6 +205,9 @@ ivas_error ivas_core_dec( set_f( voice_factors[n], 0.f, NB_SUBFR16k ); set_f( hb_synth[n], 0.0f, L_FRAME48k ); #ifdef FIX_1320_STACK_CPE_DECODER bwe_exc_extended[n] = hb_synth[n]; /* note: reuse the buffer */ #endif /*------------------------------------------------------------------* * Decision matrix (selection of technologies) Loading Loading @@ -510,6 +518,10 @@ ivas_error ivas_core_dec( * SWB(FB) BWE decoding *---------------------------------------------------------------------*/ #ifdef FIX_1320_STACK_CPE_DECODER flag_bwe_bws = ( output_Fs >= 32000 && st->core == ACELP_CORE && st->bwidth > NB && st->bws_cnt > 0 && st->bfi == 0 ); #endif if ( st->extl == SWB_TBE || st->extl == FB_TBE || ( st->coder_type != AUDIO && st->coder_type != INACTIVE && st->core_brate >= SID_2k40 && st->core == ACELP_CORE && !st->con_tcx && output_Fs >= 32000 && st->bwidth > NB && st->bws_cnt > 0 ) ) { /* SWB TBE decoder */ Loading @@ -521,12 +533,23 @@ ivas_error ivas_core_dec( fb_tbe_dec( st, tmp_buffer /*fb_exc*/, hb_synth[n], tmp_buffer /*fb_synth_ref*/, output_frame ); } } #ifdef FIX_1320_STACK_CPE_DECODER else if ( st->extl == SWB_BWE || st->extl == FB_BWE || flag_bwe_bws ) #else else if ( st->extl == SWB_BWE || st->extl == FB_BWE || ( output_Fs >= 32000 && st->core == ACELP_CORE && st->bwidth > NB && st->bws_cnt > 0 && !st->ppp_mode_dec && !( st->nelp_mode_dec == 1 && st->bfi == 1 ) ) ) #endif { /* SWB BWE decoder */ swb_bwe_dec( st, output[n], synth[n], hb_synth[n], use_cldfb_for_dft, output_frame ); } #ifdef FIX_1320_STACK_CPE_DECODER if ( ( st->core == ACELP_CORE && ( st->extl == -1 || st->extl == SWB_CNG ) ) && flag_bwe_bws == 0 ) { set_f( hb_synth[n], 0.0f, L_FRAME48k ); } #endif /*---------------------------------------------------------------------* * FEC - recovery after lost HQ core (smoothing of the BWE component) *---------------------------------------------------------------------*/ Loading Loading @@ -560,6 +583,7 @@ ivas_error ivas_core_dec( stereo_icBWE_dec( hCPE, hb_synth[0], hb_synth[1], tmp_buffer /*fb_synth_ref*/, voice_factors[0], output_frame ); } #ifndef FIX_1320_STACK_CPE_DECODER if ( st->element_mode == EVS_MONO ) { /*----------------------------------------------------------------* Loading @@ -575,7 +599,7 @@ ivas_error ivas_core_dec( st->hPlcInfo->Pitch = 0; } } #endif /*----------------------------------------------------------------* * Transition and synchronization of BWE components *----------------------------------------------------------------*/ Loading @@ -590,6 +614,7 @@ ivas_error ivas_core_dec( } else { #ifndef FIX_1320_STACK_CPE_DECODER if ( st->extl == SWB_BWE_HIGHRATE || st->extl == FB_BWE_HIGHRATE ) { /* HR SWB BWE on top of ACELP@16kHz */ Loading @@ -597,9 +622,12 @@ ivas_error ivas_core_dec( } else { #endif /* TBE on top of ACELP@16kHz */ tmps = NS2SA( output_Fs, MAX_DELAY_TBE_NS - DELAY_SWB_TBE_16k_NS ); #ifndef FIX_1320_STACK_CPE_DECODER } #endif } /* Smooth transitions when switching between different technologies */ Loading Loading @@ -733,11 +761,9 @@ ivas_error ivas_core_dec( } /* n_channels loop */ #ifdef DEBUG_MODE_INFO output_debug_mode_info_dec( sts, n_channels, output_frame, pitch_buf ); #endif pop_wmops(); return error; } Loading