diff --git a/lib_com/options.h b/lib_com/options.h index 3c358ec83a0910b3e4c5219af88ab8384a81913e..78614182d46a6d3aea320161c3513ad1c3278b4f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -117,6 +117,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 ########################### */ diff --git a/lib_com/swb_tbe_com_fx.c b/lib_com/swb_tbe_com_fx.c index 8ad1288a7400a7a5d15fc39618486c717a5ec014..504b83759d930adb7349093a8dd390d78610d8b6 100644 --- a/lib_com/swb_tbe_com_fx.c +++ b/lib_com/swb_tbe_com_fx.c @@ -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 */