Loading lib_com/ivas_fb_mixer.c +20 −3 Original line number Diff line number Diff line Loading @@ -186,16 +186,27 @@ ivas_error ivas_FB_mixer_open( frame_len = (int16_t) ( sampling_rate / FRAMES_PER_SEC ); if ( ( hFbMixer = (IVAS_FB_MIXER_HANDLE) count_malloc( sizeof( IVAS_FB_MIXER_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } #ifdef FIX_126_MDFT_FB_STATIC_MEM if ( fb_cfg->num_out_chans > 0 ) { #endif if ( ( hFbMixer->pFb = (ivas_filterbank_t *) count_malloc( sizeof( ivas_filterbank_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } #ifdef FIX_126_MDFT_FB_STATIC_MEM } else { hFbMixer->pFb = NULL; } #endif if ( fb_cfg->active_w_mixing == -1 ) { num_chs_alloc = 0; Loading Loading @@ -312,10 +323,13 @@ ivas_error ivas_FB_mixer_open( } else { #ifndef FIX_126_MDFT_FB_STATIC_MEM int16_t k; #endif /* ignore all the deeper filter bank stuff for now */ hFbMixer->num_diff_bands = 0; #ifndef FIX_126_MDFT_FB_STATIC_MEM hFbMixer->pFb->fb_consts.pFilterbank_bins_per_band = NULL; hFbMixer->pFb->fb_consts.pFilterbank_bins_start_offset = NULL; Loading @@ -332,6 +346,7 @@ ivas_error ivas_FB_mixer_open( { hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] = NULL; } #endif } hFbMixer->fb_cfg = fb_cfg; Loading Loading @@ -1059,10 +1074,12 @@ static ivas_error ivas_filterbank_setup( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong FB in ivas_filterbank_setup()!" ); } } #ifndef FIX_126_MDFT_FB_STATIC_MEM else { hFbMixer->pFb->filterbank_num_bands = 0; } #endif hFbMixer->cross_fade_end_offset = pCfg->fade_len + pCfg->pcm_offset; hFbMixer->cross_fade_start_offset = hFbMixer->cross_fade_end_offset - pCfg->fade_len; Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ #define REMOVE_SID_HARM_LEFTOVERS /* Issue 192: remove leftovers from the SID bitrate harmonization */ #define FIX_MCT_UNINIT_MEM /* Issue 166: Reading of uninitialized memory in TCX range coder */ #define FIX_IGF_NOISE_REPETITION /* Issue 182: fix repetition of same noise in IGF */ #define FIX_126_MDFT_FB_STATIC_MEM /* Issue 126: reduce static mem consumption of the MDFT FB for non-SBA formats */ /* ################## End DEVELOPMENT switches ######################### */ Loading Loading
lib_com/ivas_fb_mixer.c +20 −3 Original line number Diff line number Diff line Loading @@ -186,16 +186,27 @@ ivas_error ivas_FB_mixer_open( frame_len = (int16_t) ( sampling_rate / FRAMES_PER_SEC ); if ( ( hFbMixer = (IVAS_FB_MIXER_HANDLE) count_malloc( sizeof( IVAS_FB_MIXER_DATA ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } #ifdef FIX_126_MDFT_FB_STATIC_MEM if ( fb_cfg->num_out_chans > 0 ) { #endif if ( ( hFbMixer->pFb = (ivas_filterbank_t *) count_malloc( sizeof( ivas_filterbank_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } #ifdef FIX_126_MDFT_FB_STATIC_MEM } else { hFbMixer->pFb = NULL; } #endif if ( fb_cfg->active_w_mixing == -1 ) { num_chs_alloc = 0; Loading Loading @@ -312,10 +323,13 @@ ivas_error ivas_FB_mixer_open( } else { #ifndef FIX_126_MDFT_FB_STATIC_MEM int16_t k; #endif /* ignore all the deeper filter bank stuff for now */ hFbMixer->num_diff_bands = 0; #ifndef FIX_126_MDFT_FB_STATIC_MEM hFbMixer->pFb->fb_consts.pFilterbank_bins_per_band = NULL; hFbMixer->pFb->fb_consts.pFilterbank_bins_start_offset = NULL; Loading @@ -332,6 +346,7 @@ ivas_error ivas_FB_mixer_open( { hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] = NULL; } #endif } hFbMixer->fb_cfg = fb_cfg; Loading Loading @@ -1059,10 +1074,12 @@ static ivas_error ivas_filterbank_setup( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong FB in ivas_filterbank_setup()!" ); } } #ifndef FIX_126_MDFT_FB_STATIC_MEM else { hFbMixer->pFb->filterbank_num_bands = 0; } #endif hFbMixer->cross_fade_end_offset = pCfg->fade_len + pCfg->pcm_offset; hFbMixer->cross_fade_start_offset = hFbMixer->cross_fade_end_offset - pCfg->fade_len; Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -155,6 +155,7 @@ #define REMOVE_SID_HARM_LEFTOVERS /* Issue 192: remove leftovers from the SID bitrate harmonization */ #define FIX_MCT_UNINIT_MEM /* Issue 166: Reading of uninitialized memory in TCX range coder */ #define FIX_IGF_NOISE_REPETITION /* Issue 182: fix repetition of same noise in IGF */ #define FIX_126_MDFT_FB_STATIC_MEM /* Issue 126: reduce static mem consumption of the MDFT FB for non-SBA formats */ /* ################## End DEVELOPMENT switches ######################### */ Loading