Commit e7bf3124 authored by fotopoulou's avatar fotopoulou
Browse files

fix for crash reported in issue 879

parent d43c141f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -183,6 +183,9 @@

#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_879_DIFF_CONCEAL_PATH               /* FhG: Fix for issue 879 and different concelalment paths that led to crash */

/* ################## End DEVELOPMENT switches ######################### */

/* clang-format on */
+4 −0
Original line number Diff line number Diff line
@@ -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++ )