Commit f61fca33 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'LTV_SBA_crash_fix' into 'main'

Ltv sba crash fix

See merge request !571
parents 7cb8a253 4713fad1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@
#define FIX_818_COMPLEXITY_IMPROV /* Fix for issue 818 */
#define FIX_805_VERIFICATION /* Fix for issue 805 */
#define FIX_827_HIGH_MLD /* Fix for issue 827 */
#define HP20_FIX32_RECODING /* Improved hp20 filtering code */
//#define HP20_FIX32_RECODING /* Improved hp20 filtering code */
#endif
#define ISM_DISABLE
#define FIX_TMP_714
+18 −3
Original line number Diff line number Diff line
@@ -1457,7 +1457,7 @@ void TonalMdctConceal_whiten_noise_shape_ivas_fx(
    const Word16 L_frame,
    const TONALMDCTCONC_NOISE_SHAPE_WHITENING_MODE whitening_mode )
{
    Word16 inc, start_idx, stop_idx;
    Word16 inc, start_idx, stop_idx, i;
    Word32 *noiseLevelPtr, *scfs_bg, *scfs_for_shaping;
    Word16 noiseLevelPtr_exp;
    HANDLE_FD_CNG_COM hFdCngCom;
@@ -1533,8 +1533,23 @@ void TonalMdctConceal_whiten_noise_shape_ivas_fx(
        q_wns = sub( sub( 31, noiseLevelPtr_exp ), 3 );
        sns_shape_spectrum_fx( whitenend_noise_shape, &q_wns, psychParams, scfs_for_shaping, Q16, L_frame, NULL );

        IF( GT_16( add( q_wns, 1 ), sub( 31, hFdCngCom->cngNoiseLevelExp ) ) )
        {
            FOR( i = 0; i < sub( stop_idx, start_idx ); i++ )
            {
                hFdCngCom->cngNoiseLevel[i] = L_shr( whitenend_noise_shape[start_idx + i], sub( add( q_wns, hFdCngCom->cngNoiseLevelExp ), 30 ) );
                move32();
            }
        }
        ELSE
        {
            Copy32( whitenend_noise_shape + start_idx, hFdCngCom->cngNoiseLevel, sub( stop_idx, start_idx ) );
        hFdCngCom->cngNoiseLevelExp = sub( Q30, q_wns );

            scale_sig32( hFdCngCom->cngNoiseLevel + sub( stop_idx, start_idx ), sub( FFTCLDFBLEN, sub( stop_idx, start_idx ) ), sub( add( q_wns, hFdCngCom->cngNoiseLevelExp ), 30 ) );

            hFdCngCom->cngNoiseLevelExp = sub( Q30, q_wns ); // Exponent = 31 - (q_wns + 1)
            move16();
        }
    }
    ELSE
    {
+4 −0
Original line number Diff line number Diff line
@@ -1505,7 +1505,11 @@ void TonalMDCTConceal_InsertNoise_ivas_fx(
                    num = L_shr( num, 1 );
                    exp = add( exp, 1 );
                }
#ifdef BASOP_NOGLOB
                tmp = div_l( num, round_fx_sat( den ) );
#else
                tmp = div_l( num, round_fx( den ) );
#endif
                tmp = Sqrt16( tmp, &exp );
                g = mult_r( g, tmp ); // exponent of g = exp