Commit 237696e6 authored by Anika Treffehn's avatar Anika Treffehn
Browse files

merged main branch

parents ffc787d0 42e71295
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -926,6 +926,10 @@ typedef enum
{
    DIRAC_OPEN,                                 /* initialize to default value              */
    DIRAC_RECONFIGURE                           /* HOA3                                     */
#ifdef SBA_BR_SWITCHING_2
    ,
    DIRAC_RECONFIGURE_MODE
#endif
} DIRAC_CONFIG_FLAG;


+13 −2
Original line number Diff line number Diff line
@@ -112,8 +112,19 @@ ivas_error ivas_sba_enc_reinit(
#endif
#ifdef SBA_BR_SWITCHING
int16_t get_sba_reinit_flag(
    int32_t ivas_total_bitrate,                                /* i: current bitrate                  */
    int32_t last_ivas_total_brate                              /* i: previous bitrate                  */
    int32_t ivas_total_bitrate,                                /* i  : Current bitrate  */
    int32_t last_ivas_total_brate                              /* i  : Previous bitrate  */
#ifdef SBA_BR_SWITCHING_2
    , int16_t sba_order
#endif
);
#endif
#ifdef SBA_BR_SWITCHING_2
ivas_error ivas_spar_md_enc_init
(
    ivas_spar_md_enc_state_t *hMdEnc,                         /* o  : MD encoder handle        */
    const ENCODER_CONFIG_HANDLE hEncoderConfig,               /* i  : configuration structure  */
    const int16_t sba_order                                   /* i  : Ambisonic (SBA) order    */
);
#endif
ivas_error ivas_sba_enc_reconfigure( 
+24 −1
Original line number Diff line number Diff line
@@ -82,14 +82,37 @@ SBA_MODE ivas_sba_mode_select(
int16_t get_sba_reinit_flag(
    int32_t ivas_total_bitrate,   /* i  : Current bitrate  */
    int32_t last_ivas_total_brate /* i  : Previous bitrate  */
#ifdef SBA_BR_SWITCHING_2
    ,
    int16_t sba_order
#endif
)
{
    int16_t sba_reinit_flag;

    sba_reinit_flag = 0;
#ifdef SBA_BR_SWITCHING_2
    if ( ivas_total_bitrate != last_ivas_total_brate && ( ivas_total_bitrate > IVAS_SID_5k2 ) )
#else
    if ( ivas_total_bitrate != last_ivas_total_brate && ( last_ivas_total_brate > IVAS_SID_5k2 ) && ( ivas_total_bitrate > IVAS_SID_5k2 ) )
#endif
    {
#ifdef SBA_BR_SWITCHING_2
        int16_t sba_analysis_order, nchan_transport_old, nchan_transport_new;
        SBA_MODE last_sba_mode, current_sba_mode;
        sba_analysis_order = ivas_sba_get_analysis_order( last_ivas_total_brate, sba_order );
        nchan_transport_old = ivas_get_sba_num_TCs( last_ivas_total_brate, min( sba_analysis_order, IVAS_MAX_SBA_ORDER ) );
        last_sba_mode = ivas_sba_mode_select( last_ivas_total_brate );
        current_sba_mode = ivas_sba_mode_select( ivas_total_bitrate );
        sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_bitrate, sba_order );
        nchan_transport_new = ivas_get_sba_num_TCs( ivas_total_bitrate, min( sba_analysis_order, IVAS_MAX_SBA_ORDER ) );
        if ( ( current_sba_mode != last_sba_mode ) || ( nchan_transport_new != nchan_transport_old ) )
        {
#endif
            sba_reinit_flag = 1;
#ifdef SBA_BR_SWITCHING_2
        }
#endif
    }

    return sba_reinit_flag;
+2 −0
Original line number Diff line number Diff line
@@ -146,6 +146,7 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define FIX_I1_113                                      /* under review : MCT bit distribution optimization for SBA high bitrates*/
#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_2                              /* Issue 114: Changes for sba bit rate switching with reconfigurations*/
#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 BRATE_SWITCHING_RENDERING                       /* Bitrate switching changes related to the renderers */
@@ -160,6 +161,7 @@
#define FIX_VBR_COMPLEXITY                              /* Issue 234: fix extremely high complexity numbers for IVAS EVS mode */
#define FIX_ISM_INACTIVE_BITS                           /* Issue 230: fix bitbudget distribution in inactive frames in ISM format */
#define IMPROVE_CMDLINE_ROBUSTNESS                      /* Issue 233: Improve robustness of command-line parameters */
#define FIX_MDCT_AND_MC_MONO_ISSUES                     /* Issue 242: Fix some issues with TCX-LTP and delay alignement for mono output */

#define FIX_ITD_CNG                                     /* Eri: Fix for CNG ITD */
#define FIX_ANGLE_WRAPPING								/* Issue 244: Problems with angle wrapping*/
+13 −0
Original line number Diff line number Diff line
@@ -444,10 +444,12 @@ ivas_error ivas_cpe_dec(
            }
        }
    }
#ifndef FIX_MDCT_AND_MC_MONO_ISSUES
    else if ( hCPE->element_mode == IVAS_CPE_MDCT && hCPE->nchan_out == 1 && ( is_DTXrate( ivas_total_brate ) == 0 || ( is_DTXrate( ivas_total_brate ) == 1 && is_DTXrate( st_ivas->hDecoderConfig->last_ivas_total_brate ) == 0 ) ) )
    {
        applyDmxMdctStereo( hCPE, output, output_frame );
    }
#endif

    /*----------------------------------------------------------------*
     * Update parameters for stereo CNA
@@ -461,6 +463,13 @@ ivas_error ivas_cpe_dec(

    synchro_synthesis( ivas_total_brate, hCPE, output, output_frame, 0 );

#ifdef FIX_MDCT_AND_MC_MONO_ISSUES
    if ( hCPE->element_mode == IVAS_CPE_MDCT && hCPE->nchan_out == 1 && ( is_DTXrate( ivas_total_brate ) == 0 || ( is_DTXrate( ivas_total_brate ) == 1 && is_DTXrate( st_ivas->hDecoderConfig->last_ivas_total_brate ) == 0 ) ) )
    {
        applyDmxMdctStereo( hCPE, output, output_frame );
    }
#endif

#ifndef DEBUG_STEREO_DFT_OUTRESPRED
    /*----------------------------------------------------------------*
     * IC-BWE: output LB and HB mix in ACELP mode
@@ -581,7 +590,11 @@ ivas_error create_cpe_dec(
    hCPE->lt_es_em = 0.0f;

    /* Note: nchan_out is considered to be related to the structure. This is nchan_out for CPE and for MASA_format is always 2. */
#ifdef FIX_MDCT_AND_MC_MONO_ISSUES
    if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MC_FORMAT )
#else
    if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) )
#endif
    {
        hCPE->nchan_out = CPE_CHANNELS;
    }
Loading