Commit 3fc6306c authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_126_MDFT_FB_STATIC_MEM

parent 0b8af2ec
Loading
Loading
Loading
Loading
+0 −31
Original line number Diff line number Diff line
@@ -192,21 +192,17 @@ ivas_error ivas_FB_mixer_open(
        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;
@@ -323,30 +319,9 @@ 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;

        for ( i = 0; i < 2; i++ )
        {
            for ( k = 0; k < IVAS_MAX_NUM_BANDS; k++ )
            {
                hFbMixer->pFb->fb_consts.ppFilterbank_FRs[i][k] = NULL;
                hFbMixer->pFb->fb_consts.ppFilterbank_FRs_non48k[i][k] = NULL;
            }
        }

        for ( i = 0; i < IVAS_MAX_NUM_FB_BANDS; i++ )
        {
            hFbMixer->pFb->fb_bin_to_band.pFb_bin_to_band[i] = NULL;
        }
#endif
    }

    hFbMixer->fb_cfg = fb_cfg;
@@ -1074,12 +1049,6 @@ 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;
+0 −1
Original line number Diff line number Diff line
@@ -148,7 +148,6 @@
#define FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS              /* Issue 124: do not allocate unused plc struct in IVAS modes which is only used in EVS mono */
#define SBA_BR_SWITCHING                                /* Issue 114: Changes for sba bit rate switching*/
#define FIX_ITD                                         /* Contribution 16: TD renderer ITD improvement and code cleanup */
#define FIX_126_MDFT_FB_STATIC_MEM                      /* Issue 126: reduce static mem consumption of the MDFT FB for non-SBA formats */
#define FIX_I214_CLIPPING_STANDALONE_REND               /* Issue 214: TD standalone renderer does not handle clipping */
#define FIX_I218_PARAMISM_NOISY_SPEECH                  /* Issue 218: Fix noisy speech buffer in ParamISM */
#define FIX_I217_GSC_FLAG_IN_ISM                        /* Issue 217: fix BER detected in ISM4 due to desynchronized 'GSC_IVAS_mode' parameter */