Commit 9662fece authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into kiene/test-ci

parents c462260a a1482804
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

# Compiler output Unix
IVAS_cod
IVAS_cod_fmtsw
IVAS_dec
IVAS_rend
ISAR_post_rend
@@ -16,6 +17,7 @@ build*/**/*

# Compiler output VS2017
IVAS_cod.exe
IVAS_cod_fmtsw.exe
IVAS_dec.exe
IVAS_rend.exe
ISAR_post_rend.exe
+1 −3
Original line number Diff line number Diff line
@@ -162,17 +162,15 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */

/* #################### End BE switches ################################## */

/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt. TS 26.258 V3.0 */



#define FIX_1435_MOVE_STEREO_PANNING                    /* VA: issue 1435: do the EVS stereo panning in the renderer */
#define FIX_1454_FIX_STEREO_TO_FOA_JBM                  /* VA: issue 1454: fix buggy stereo to FOA in JBM */
#define FIX_1461_CNG_BW_SWITCHING                       /* Eri: issue 1461: Stereo parameters are not updated when SID/NODATA forces BW to stay the same */


/* ##################### End NON-BE switches ########################### */
+5 −19
Original line number Diff line number Diff line
@@ -818,6 +818,7 @@ static void *mem_alloc_block( size_t size, const char *size_str );

void reset_mem( Counting_Size cnt_size )
{
    int16_t something;
    size_t tmp_size;

    /* initialize list of stack records */
@@ -837,13 +838,7 @@ void reset_mem( Counting_Size cnt_size )
    max_num_calls = MAX_NUM_RECORDS;

    /* initialize stack pointers */
#if defined( __GNUC__ ) || defined( __clang__ )
    /* GCC/Clang: use builtin (works for many targets) */
    ptr_base_stack = __builtin_frame_address( 0 );
#else
    int16_t something;
    ptr_base_stack = &something;
#endif
    ptr_max_stack = ptr_base_stack;
    ptr_current_stack = ptr_base_stack;

@@ -948,14 +943,10 @@ void reset_mem( Counting_Size cnt_size )

void reset_stack( void )
{
    /* initialize/reset stack pointers */
#if defined( __GNUC__ ) || defined( __clang__ )
    /* GCC/Clang: use builtin (works for many targets) */
    ptr_base_stack = __builtin_frame_address( 0 );
#else
    int16_t something;

    /* initialize/reset stack pointers */
    ptr_base_stack = &something;
#endif
    ptr_max_stack = ptr_base_stack;
    ptr_current_stack = ptr_base_stack;

@@ -970,15 +961,10 @@ void reset_stack( void )

int push_stack( const char *filename, const char *fctname )
{
    int16_t something;
    int32_t current_stack_size;

#if defined( __GNUC__ ) || defined( __clang__ )
    /* GCC/Clang: use builtin (works for many targets) */
    ptr_base_stack = __builtin_frame_address( 0 );
#else
    int16_t something;
    ptr_base_stack = &something;
#endif
    ptr_current_stack = &something;

    (void) *filename; /* to avoid compilation warning */

+8 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@ ivas_error ivas_cpe_enc(
    int32_t cpe_brate;
    int32_t element_brate_ref;
    int16_t last_bits_frame_nominal; /* last_bits_frame_nominal for M or PCh channel */
#ifdef FIX_1461_CNG_BW_SWITCHING
    int16_t NFFT_inner;
#endif

    error = IVAS_ERR_OK;
    push_wmops( "ivas_cpe_enc" );
@@ -628,6 +631,11 @@ ivas_error ivas_cpe_enc(
            if ( sts[0]->core_brate == SID_2k40 || sts[0]->core_brate == FRAME_NO_DATA )
            {
                /* Reconfigure DFT Stereo for inactive frames */
#ifdef FIX_1461_CNG_BW_SWITCHING
                /* -- nbands may need to be updated here in case the bandwidth was changed due to inactive frames */
                NFFT_inner = STEREO_DFT_N_MAX_ENC * inner_frame_tbl[sts[0]->bwidth] / L_FRAME48k;
                hCPE->hStereoDft->nbands = stereo_dft_band_config( hCPE->hStereoDft->band_limits, hCPE->hStereoDft->hConfig->band_res, NFFT_inner, ENC );
#endif
                if ( sts[0]->core_brate == SID_2k40 )
                {
                    stereo_dft_config( hConfigDft, IVAS_SID_5k2, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
+9 −0
Original line number Diff line number Diff line
@@ -2879,6 +2879,15 @@ static void stereo_dft_enc_compute_prm(

    hStereoDft->nrg_past_pos = ( pos + 1 ) % STEREO_DFT_NRG_PAST_LEN;

#ifdef FIX_1461_CNG_BW_SWITCHING
    /* Replicate last band for remaining bands in case the bandwidth is higher after SID/NODATA is considered */
    for ( i = hStereoDft->nbands; i < STEREO_DFT_BAND_MAX; i++ )
    {
        pPredGain[i] = pPredGain[i - 1];
        pSideGain[i] = pSideGain[i - 1];
    }
#endif

#ifdef DEBUG_MODE_DFT
    {
        float tmp_f;
Loading