Commit 7dc50fdd authored by vaclav's avatar vaclav
Browse files

reactivate main switches + few fixes

parent 4f91fd50
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -150,9 +150,9 @@
#define ALIGN_SID_SIZE                                  /* Issue 111: make all DTX modes use one SID frame bitrate (5.2 kbps) */
#define FIX_135_MDCT_STEREO_MODE_UNINITIALIZED          /* Issue 135: fix uninitialized value usage in SBA MDCT-Stereo core with PLC */
#define FIX_CONTROLLABLE_SID_UPDATE_RATE                /* Issue 117: fix controllable SID update rate mechanism */
//#define FIX_DIRAC_CHANNELS                              /* Issue 71: lower number of DirAC analysis channels */
//#define FIX_CREND_CHANNELS                              /* Issue 71: fix number of Crend channels */
//#define HARMONIZE_SBA_NCHAN_TRANSPORT                   /* harmonize setting of number of transport channels in SBA */
#define FIX_DIRAC_CHANNELS                              /* Issue 71: lower number of DirAC analysis channels */
#define FIX_CREND_CHANNELS                              /* Issue 71: fix number of Crend channels */
#define HARMONIZE_SBA_NCHAN_TRANSPORT                   /* harmonize setting of number of transport channels in SBA */



+2 −2
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ ivas_error ivas_dirac_dec_config(
    {
        int16_t tmp1, tmp2, tmp3;
#ifdef HARMONIZE_SBA_NCHAN_TRANSPORT
        ivas_sba_config( st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->sba_analysis_order, -1, &nchan_transport_old, st_ivas->sba_planar, &tmp1, &tmp2, &tmp3 );
        ivas_sba_config( ivas_total_brate, st_ivas->sba_analysis_order, -1, &nchan_transport_old, st_ivas->sba_planar, &tmp1, &tmp2, &tmp3 );
#else
        ivas_sba_config( st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->sba_analysis_order, -1, &nchan_transport_old, st_ivas->sba_planar, &tmp1, &tmp2, &tmp3, SBA_MODE_DIRAC );
#endif
+5 −13
Original line number Diff line number Diff line
@@ -549,7 +549,7 @@ ivas_error ivas_sba_dec_reconfigure(
        st_ivas->hSpar = NULL;

#ifdef HARMONIZE_SBA_NCHAN_TRANSPORT
        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_planar, -1 ) ) != IVAS_ERR_OK )
        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_mode, -1 ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_planar, st_ivas->sba_mode, -1 ) ) != IVAS_ERR_OK )
#endif
@@ -561,10 +561,7 @@ ivas_error ivas_sba_dec_reconfigure(
    }
    else
    {
        int16_t sba_order_internal;

#if 1
        int16_t num_channels_internal;
        int16_t sba_order_internal, num_channels_internal;

        sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER );
        num_channels_internal = ivas_sba_get_nchan_metadata( sba_order_internal );
@@ -576,13 +573,10 @@ ivas_error ivas_sba_dec_reconfigure(
#endif
        {

            //st_ivas->nchan_transport = ivas_get_spar_num_TCs( ivas_total_brate, sba_order_internal );

            // VE: dirty patch -> reconfiguration of SPAR modules should be used instead !!
            IVAS_FB_CFG *fb_cfg;
            int16_t active_w_mixing;

#if 1
            /* MD handle */
            ivas_spar_md_dec_close( &st_ivas->hSpar->hMdDec );

@@ -601,7 +595,7 @@ ivas_error ivas_sba_dec_reconfigure(
            {
                return error;
            }
#endif

            /* FB mixer handle */
            ivas_FB_mixer_close( &st_ivas->hSpar->hFbMixer, hDecoderConfig->output_Fs );

@@ -637,7 +631,7 @@ ivas_error ivas_sba_dec_reconfigure(
            }
            st_ivas->hSpar->i_subframe = 0;
        }
#endif

        if ( st_ivas->hSpar == NULL )
        {
            if ( ( error = ivas_spar_dec_open( st_ivas ) ) != IVAS_ERR_OK )
@@ -651,7 +645,6 @@ ivas_error ivas_sba_dec_reconfigure(
        sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER );
        ivas_spar_config( ivas_total_brate, sba_order_internal, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->hSpar->core_nominal_brate, st_ivas->sid_format );

#if 1
        if ( st_ivas->hDirAC == NULL )
        {
            if ( ( error = ivas_dirac_dec_open( st_ivas ) ) != IVAS_ERR_OK )
@@ -664,10 +657,9 @@ ivas_error ivas_sba_dec_reconfigure(

        mvs2s( st_ivas->hDirAC->dirac_to_spar_md_bands, st_ivas->hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS );
        st_ivas->hSpar->enc_param_start_band = st_ivas->hDirAC->hConfig->enc_param_start_band;
#endif

#ifdef HARMONIZE_SBA_NCHAN_TRANSPORT
        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_planar, IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) != IVAS_ERR_OK )
        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_mode, IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_planar,
                                              st_ivas->sba_mode, IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) != IVAS_ERR_OK )