Commit d14d9683 authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into 1255-object-editing-broken-in-jbm

parents 609d9857 eb82b75a
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -737,10 +737,8 @@ int main(
        lfeRoutingConfigs[i] = NULL;
    }

#ifdef FIX_1225_DISCLAIMER
    IVAS_REND_PrintDisclaimer();

#endif
    CmdlnArgs args = parseCmdlnArgs( argc, argv );

    if ( args.nonDiegeticPan && !( ( args.inConfig.numAudioObjects == 0 && args.inConfig.multiChannelBuses[0].audioConfig == IVAS_AUDIO_CONFIG_MONO ) ||
@@ -898,7 +896,6 @@ int main(
        exit( -1 );
    }

#ifdef FIX_1225_DISCLAIMER
    fprintf( stdout, "Input audio file:       %s\n", args.inputFilePath );
    fprintf( stdout, "Output audio file:      %s\n\n", args.outputFilePath );

@@ -940,7 +937,6 @@ int main(
        goto cleanup;
    }

#endif
    if ( !isEmptyString( args.customHrtfFilePath ) )
    {
        if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK )
+0 −4
Original line number Diff line number Diff line
@@ -47,11 +47,7 @@ int16_t print_disclaimer( FILE *fPtr )
{

    fprintf( fPtr, "\n==================================================================================================\n" );
#ifdef FIX_1225_DISCLAIMER
    fprintf( fPtr, " \n IVAS Codec Version IVAS-FL-2.0\n" );
#else
    fprintf( fPtr, " IVAS Codec Baseline\n" );
#endif
    fprintf( fPtr, " \n" );
    fprintf( fPtr, " Based on EVS Codec (Floating Point) 3GPP TS26.443 Nov 04, 2021,\n" );
    fprintf( fPtr, " Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0\n" );
+1 −5
Original line number Diff line number Diff line
@@ -160,9 +160,6 @@

/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define FIX_1225_DISCLAIMER                             /* VA: issue 1225: Add disclaimer for external renderer + Add info about IVAS reference version */
#define FIX_1179_USAN_PHASEECU                          /* Eri: issue 1179:  better handling of 16 bit wrap around for very long(>200ms) FER-bursts   */
#define FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX          /* VA: issue 1249: remove obsolete code around ALLRAD decoder matrix */
#define FIX_1217_OBJECT_EDIT_FILE_INTERFACE             /* Nokia: issue #1217: add decoder functionality to read object edit instructions from a file */

/* #################### End BE switches ################################## */
@@ -174,10 +171,9 @@

#define NONBE_1217_OBJ_EDIT_FOA                         /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */
#define NONBE_1215_FIX_JBM_MAX_SCALING                  /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */

#define NONBE_1230_DECODE_MASA_ISM_AZIMUTH_PREC_FROM_BASOP        /* Nokia: Fixes ivas_decode_masaism_metadata decision logic change due to precision difference; this is the fix in floating point */
#define NONBE_FIX_1255_OBJ_EDIT_JBM                     /* VA: issue 1255: restore object editing in JBM */


/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+0 −27
Original line number Diff line number Diff line
@@ -2089,28 +2089,16 @@ static void hq_phase_ecu(

    if ( !prev_bfi || ( prev_bfi && *last_fec && ( *time_offs == output_frame ) ) )
    {
#ifdef FIX_1179_USAN_PHASEECU
        if ( !( prev_bfi && *last_fec && ( element_mode == EVS_MONO ) ) )
        {
            *time_offs = 0; /* IVAS reset of offset time counter, timeoffset variable later also used to calculate burst length */
        }
#else
        if ( prev_bfi && *last_fec && element_mode == EVS_MONO )
        {
            *time_offs += 0;
        }
        else
        {
            *time_offs = 0;
        }
#endif

        trans_ana( prevsynth + 2 * output_frame - Lprot - *time_offs + ph_ecu_lookahead, mag_chg, &ph_dith, mag_chg_1st, output_frame, *time_offs, env_stab, *last_fec, alpha, beta, beta_mute, Xavg );
        spec_ana( prevsynth + 2 * output_frame - Lprot - *time_offs + ph_ecu_lookahead, plocs, plocsi, num_p, X_sav, output_frame, bwidth, element_mode, &noise_fac, pcorr );

        if ( prev_bfi && *last_fec )
        {
#ifdef FIX_1179_USAN_PHASEECU
            if ( element_mode != EVS_MONO )
            {
                *time_offs = (int16_t) ( *time_offs + output_frame ); /* USAN avoid risk of internal int32_t  in "+="  */
@@ -2123,26 +2111,15 @@ static void hq_phase_ecu(
            {
                *time_offs = (int16_t) ( *time_offs + output_frame ); /* EVS_MONO BE compatible, but EVS CR needed as wrap will cause burst length muting envelope instability issues */
            }
#else
            *time_offs += output_frame;
#endif
        }
    }
    else
    {
#ifdef FIX_1179_USAN_PHASEECU
        *time_offs = (int16_t) ( *time_offs + output_frame ); /* cast added for USAN, "+=" avoided as it may creat a truncation from int to int16_t  */
#else
        *time_offs += output_frame;
#endif
        if ( *time_offs <= 0 )
        {
            /* detect wrap around  of st->time_offs */
#ifdef FIX_1179_USAN_PHASEECU
            *time_offs = (int16_t) INT16_MAX; /* high value --> continued muting will ensure that the now saturated  seed is not creating tones */
#else
            *time_offs = MAX16B;
#endif
        }

        trans_ana( prevsynth + 2 * output_frame - Lprot, mag_chg, &ph_dith, mag_chg_1st, output_frame, *time_offs, env_stab, 0, alpha, beta, beta_mute, Xavg ); /* 1.0 stable-music,  0.0 speech-like */
@@ -2154,11 +2131,7 @@ static void hq_phase_ecu(
    seed = *time_offs;
    if ( *num_p > 0 )
    {
#ifdef FIX_1179_USAN_PHASEECU
        seed = (int16_t) ( seed + plocs[*num_p - 1] ); /* explicit cast and "+="  not used,  as it "+="  may create a cast from 32 bit to 16 bit, triggering USAN   */
#else
        seed += plocs[*num_p - 1];
#endif
    }

    subst_spec( plocs, plocsi, num_p, *time_offs, X, mag_chg, ph_dith, old_is_transient, output_frame, &seed, alpha, beta, *beta_mute, Xavg, element_mode, ph_ecu_lookahead, noise_fac );
+0 −20
Original line number Diff line number Diff line
@@ -1509,16 +1509,6 @@ ivas_error ivas_init_decoder(
            return error;
        }

#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX
        if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup )
        {
            if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }

#endif
        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order,
                                              ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ),
                                              st_ivas->ivas_format ) ) != IVAS_ERR_OK )
@@ -1666,16 +1656,6 @@ ivas_error ivas_init_decoder(
            return error;
        }

#ifndef FIX_1249_REMOVE_OBSOLETE_ALLRAD_MATRIX
        if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->hOutSetup.is_loudspeaker_setup )
        {
            if ( ( error = ivas_sba_get_hoa_dec_matrix( st_ivas->hOutSetup, &st_ivas->hoa_dec_mtx, st_ivas->hIntSetup.ambisonics_order ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }

#endif
        if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order,
                                              ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ),
                                              st_ivas->ivas_format ) ) != IVAS_ERR_OK )
Loading