Commit 273cf984 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into simplifications_ivas_dec

parents 3423233d 4a69292c
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@

/*#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_1285_RENDER_CONFIG_PTR_COMPARE              /* Philips: Warning about pointer comparison in the render config reader */
#define SIMPLIFY_IVAS_CORE                              /* VA: simplify ivas core coder functions */

/* #################### End BE switches ################################## */
@@ -173,9 +174,9 @@
#define NONBE_1273_ISM_METADATA_COUNTER                 /* VA: issue 1273: fix counter overflow in ISM metadata encoder */
#define NONBE_1279_COUNTER_OVERFLOW                     /* VA: issue 1279: Avoid possible overflow of counter st->Nb_ACELP_frames */
#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING           /* Ericsson: issue 1180, corrected long term mute loop attnuation after 200ms  in PhECU-PLC  */
#define NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD      /* VA/Eri: issue 1277: Fix Mismatch in DTX high-rate threshold between EVS float and BASOP */


#define NONBE_1231_BASOP_819_THRESHOLD_MASA2TOTAL        /* Nokia: add fix for precision limitation in comparison with masa2total energy ratio threshold to be aligned with BASOP*/
/* ##################### End NON-BE switches ########################### */

+32 −4
Original line number Diff line number Diff line
@@ -263,6 +263,9 @@ static void trans_ana(
    const int16_t time_offs,     /* i  : Time offset                                          */
    const float est_mus_content, /* i  : 0.0=speech_like ... 1.0=Music    (==st->env_stab )   */
    const int16_t last_fec,      /* i  : signal that previous frame was concealed with fec_alg*/
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING
    const int16_t element_mode, /* i :  element_mode req to handle EVS_MONO specific BE path  */
#endif
    float *alpha,       /* o  : Magnitude modification factors for fade to average   */
    float *beta,        /* o  : Magnitude modification factors for fade to average   */
    float *beta_mute,   /* o  : Factor for long-term mute                            */
@@ -416,10 +419,27 @@ static void trans_ana(
            {
                mag_chg[k] = 0;
            }
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING
            if ( element_mode != EVS_MONO )
            {
                if ( k == 0 && burst_len > BETA_MUTE_THR ) /* beta_mute final long term attenuation adjusted only once per frame in the first sub-band, Ref   Eq(184) in 26.447 */
                {
                    *beta_mute *= BETA_MUTE_FAC;
                }
            }
            else
            {
                if ( burst_len > BETA_MUTE_THR ) /* legacy incorrect(too fast) EVS_MONO operation, still kept for BE.  To be updated after EVS CR, ref Eq (184) in 26.447 */
                {
                    *beta_mute *= BETA_MUTE_FAC;
                }
            }
#else
            if ( burst_len > BETA_MUTE_THR )
            {
                *beta_mute *= BETA_MUTE_FAC;
            }
#endif
            alpha[k] = mag_chg[k];
            beta[k] = (float) ( sqrt( 1.0f - SQR( alpha[k] ) ) * *beta_mute );
            if ( k >= LGW32k - 1 )
@@ -2094,7 +2114,11 @@ static void hq_phase_ecu(
            *time_offs = 0; /* IVAS reset of offset time counter, timeoffset variable later also used to calculate burst length */
        }

#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING
        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 );
#else
        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 );
#endif
        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 )
@@ -2122,7 +2146,11 @@ static void hq_phase_ecu(
            *time_offs = (int16_t) INT16_MAX; /* high value --> continued muting will ensure that the now saturated  seed is not creating tones */
        }

#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING
        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 */
#else
        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 */
#endif
    }

    mvr2r( X_sav, X, Lprot );
+1 −4
Original line number Diff line number Diff line
@@ -268,14 +268,11 @@ ivas_error ivas_core_dec(
    }
#endif

    save_hb_synth = NULL;
    if ( sba_dirac_stereo_flag && hSCE && sts[0]->total_brate <= SID_2k40 && sts[0]->cng_type == FD_CNG )
    {
        save_hb_synth = hSCE->save_hb_synth;
    }
    else
    {
        save_hb_synth = NULL;
    }

    /*------------------------------------------------------------------*
     * Decode SID for MDCT-Stereo DTX mode
+4 −0
Original line number Diff line number Diff line
@@ -2369,7 +2369,11 @@ ivas_error RenderConfigReader_read(
                            errorHandler( item, ERROR_VALUE_INVALID );
                            return IVAS_ERR_INVALID_RENDER_CONFIG;
                        }
#ifdef FIX_1285_RENDER_CONFIG_PTR_COMPARE
                        if ( i >= pRenderConfigReader->nFG || pRenderConfigReader->pFG[i].pFc == NULL )
#else
                        if ( i > pRenderConfigReader->nFG || &pRenderConfigReader->pFG[i] == NULL )
#endif
                        {
                            return IVAS_ERR_INVALID_RENDER_CONFIG;
                        }
+5 −0
Original line number Diff line number Diff line
@@ -210,6 +210,11 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g192 bit_error
../IVAS_dec MONO 16 bit_error testv/stvST48n.wav_stereo_32000_48-16_DTX_MONO_FER5.tst

// stereo at 32 kbps, 48kHz in, 48kHz out, random FER at 18% with long bursts
../IVAS_cod -stereo 32000 48 testv/stvST48c.wav bit
eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_18pct_longburst.g192 bit_error
../IVAS_dec STEREO 48 bit_error testv/stvST48c.wav_stereo_32000_48-48_STEREO_FER5_BURST.tst

// stereo at 48 kbps, 16kHz in, 16kHz out
../IVAS_cod -stereo 48000 16 testv/stvST16c.wav bit
../IVAS_dec STEREO 16 bit testv/stvST16c.wav_stereo_48000_16-16.tst
Loading