Commit fd0cc99c authored by vaillancour's avatar vaillancour
Browse files

possible fix to #1328

parent 6c9ddc40
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@

#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_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 NONBE_1328_FIX_NON_LINEARITY                    /* VA: Fix possible issue when computing bwe_exc_extended and previous frame were almost 0  */
/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+6 −0
Original line number Diff line number Diff line
@@ -1424,6 +1424,12 @@ ivas_error acelp_core_dec(

        if ( !st->ppp_mode_dec && ( st->idchan == 0 || st->element_mode != IVAS_CPE_TD || ( st->idchan == 1 && st->element_mode == IVAS_CPE_TD && st->tdm_LRTD_flag ) ) )
        {
#ifdef NONBE_1328_FIX_NON_LINEARITY
            if ( st->hBWE_TD->bwe_non_lin_prev_scale > 0.1f && st->element_mode > EVS_MONO && ( st->coder_type <= UNVOICED ) )
            {
                st->hBWE_TD->bwe_non_lin_prev_scale = 0.025f;
            }
#endif
            non_linearity( bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame );
        }

+6 −0
Original line number Diff line number Diff line
@@ -701,6 +701,12 @@ ivas_error acelp_core_enc(

        if ( !st->Opt_SC_VBR && ( st->idchan == 0 || st->element_mode != IVAS_CPE_TD || ( st->idchan == 1 && st->element_mode == IVAS_CPE_TD && st->tdm_LRTD_flag ) ) )
        {
#ifdef NONBE_1328_FIX_NON_LINEARITY
            if ( st->hBWE_TD->bwe_non_lin_prev_scale > 0.1f && st->element_mode > EVS_MONO && ( st->coder_type <= UNVOICED ) )
            {
                st->hBWE_TD->bwe_non_lin_prev_scale = 0.025f;
            }
#endif
            /* Apply a non linearity to the SHB excitation */
            non_linearity( bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame );
        }