Commit 9ef9fc22 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept FIX_1179_USAN_PHASEECU

parent d36423f0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -171,7 +171,6 @@
#define NONBE_1377_REND_DIRATT_CONF                     /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */
#define FIX_1377_HANDLE_ERROR_CODE                      /* Eri: Add missing error code handling from IVAS_REND_SetObjectIDs */
#define FIX_1053_REVERB_RECONFIGURATION
#define FIX_1179_USAN_PHASEECU                          /* Eri: issue 1179:  better handling of 16 bit wrap around for very long(>200ms) FER-bursts   */
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define FIX_1113_EXTREND_ISAR                           /* FhG: issue 1113: fix external renderer asserts for FOA/HOA2 and CLDFB config */
#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.  */
+0 −27
Original line number Diff line number Diff line
@@ -2102,21 +2102,10 @@ 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, element_mode, alpha, beta, beta_mute, Xavg );

@@ -2125,7 +2114,6 @@ static void hq_phase_ecu(
        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 "+="  */
@@ -2138,26 +2126,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; /* continued muting will ensure that the now fixed seeds are not creating tones */
#endif
        }

        trans_ana( prevsynth + 2 * output_frame - Lprot, mag_chg, &ph_dith, mag_chg_1st, output_frame, *time_offs, env_stab, 0, element_mode, alpha, beta, beta_mute, Xavg ); /* 1.0 stable-music,  0.0 speech-like */
@@ -2169,11 +2146,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 );