Commit 7291acfd authored by vaclav's avatar vaclav
Browse files

Merge branch '2462-bug-in-calculating-parcor-coefficient-in-calc_rc0_h' into 'main'

[non-BE] [split-non-BE] [allow-regression] Fix bug in calculating parcor coefficient in Calc_rc0_h()

Closes #2462

See merge request !2854
parents 3dc11469 3fa7478f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@
#define FIX_BASOP_2472_IGF_SP_AUD_DEC_CHAN              /* FhG: always use channel 1 for sp_aud_decision0[] being passed to ProcessIGF_ivas_fx() */
#define FIX_BASOP_REMOVE_SYNTH2_FX                      /* FhG: Replace 32bit olapBufferSynth2_fx with 16bit olapBufferSynth2 buffer */
#define FIX_FLOAT_1528_5MS_REND_ISM_META_DELAY_COMPENSATION  /* Nokia: float issue 1528: Fixes incorrect compensation for ISM metadata delay in 5ms TD rendering */
#define FIX_2462_PARCOR_FIX                             /* VA: issue 2462: Fix bug in calculating parcor coefficient in Calc_rc0_h() */

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

+15 −0
Original line number Diff line number Diff line
@@ -657,7 +657,12 @@ void Calc_rc0_h(
#ifdef HARMONIZE_TBE3
    IF( element_mode != EVS_MONO && enc_dec == ENC )
    {
#ifdef FIX_2462_PARCOR_FIX
        tmp2 = shr( h[0], 2 );
        L_acc = L_mult( tmp2, tmp2 );
#else
        L_acc = L_mult( h[0], h[0] ); // TBV: shouldn't it be "shr( h[0], 2 )" ?
#endif
        FOR( i = 1; i < LONG_H_ST; i++ )
        {
            tmp2 = shr( h[i], 2 );
@@ -669,9 +674,15 @@ void Calc_rc0_h(

        ptrs = h;

#ifdef FIX_2462_PARCOR_FIX
        temp = shr( *ptrs++, 2 );
        move16();
        L_acc = L_mac( L_acc, temp, shr( *ptrs, 2 ) );
#else
        temp = *ptrs++;
        move16();
        L_acc = L_mult( temp, *ptrs );
#endif
        FOR( i = 1; i < LONG_H_ST - 1; i++ )
        {
            temp = shr( *ptrs++, 2 );
@@ -703,7 +714,11 @@ void Calc_rc0_h(
            L_acc = L_mac( L_acc, temp, *ptrs );
        }
    }
#ifdef FIX_2462_PARCOR_FIX
    L_acc = L_shl_sat( L_acc, sh_acf );
#else
    L_acc = L_shl( L_acc, sh_acf );
#endif
    acf1 = extract_h( L_acc );

    /* Compute 1st parcor */