diff --git a/lib_com/options.h b/lib_com/options.h index d49cf2670b854568b383e0e2e17ed3ea23a45909..db4a7408c56eeff150da10981cdbb55112895855 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -182,6 +182,7 @@ #define FIX_871_REMOVE_UNNECESSARY_CONDITION /* VA: remove a condition that is not needed and prevented correct frame classification of the secondary channel of the TD stereo */ #define FIX_875_SATURATION_DURING_ROUNDING /* VA: fix a possible saturation when rounding */ #define FIX_882_LOW_LEVEL_DISCONTINUITIES /* VA: Fix 882, discontinuities for low level signal by adding a scaling function that uses rounding, this function is more complex than normal one, has to be used only when necessary*/ +#define FIX_879_DIFF_CONCEAL_PATH /* FhG: Fix for issue 879 and different concelalment paths that led to crash */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/tonalMDCTconcealment_fx.c b/lib_dec/tonalMDCTconcealment_fx.c index 69905d14138874f55ade09ce29b3b725e8bed17c..93e2f24cc737086744f535ca95494e0a3b3315b9 100644 --- a/lib_dec/tonalMDCTconcealment_fx.c +++ b/lib_dec/tonalMDCTconcealment_fx.c @@ -2022,7 +2022,11 @@ ELSE FOR( i = 1; i < hTonalMDCTConc->pTCI->numIndexes; i++ ) { tmp = round_fx( BASOP_Util_fPow( L_deposit_h( tiltFactor ), 0, L_deposit_h( (UWord16) L_add( L_sub( hTonalMDCTConc->pTCI->upperIndex[i - 1], hTonalMDCTConc->pTCI->lowerIndex[i - 1] ), 1 ) ), 15, &exp ) ); +#ifdef FIX_879_DIFF_CONCEAL_PATH + tmp = shl_sat( tmp, exp ); +#else tmp = shl( tmp, exp ); +#endif tilt = mult_r( tilt, tmp ); // Q15 FOR( l = hTonalMDCTConc->pTCI->lowerIndex[i]; l <= hTonalMDCTConc->pTCI->upperIndex[i]; l++ )