Commit 8cbfea6c authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for LTV crash observed for test case: [ltv_basop_encoder-MASA 2TC at 192...

Fix for LTV crash observed for test case: [ltv_basop_encoder-MASA 2TC at 192 kbps, 48kHz in, 48kHz out, EXT out]
parent b5d31923
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2006,8 +2006,8 @@ Word16 ivas_smc_gmm_fx(
    {
        Word32 tmp_max;
        tmp_max = L_max( PS_norm_fx[i], hSpMusClas->past_PS_fx[i - LOWEST_FBIN] );

        temp32 = BASOP_Util_Divide3232_Scale_newton( tmp_max, L_add( dPS_fx[i], avoid_divide_by_zero ), &temp_exp ); // 31-temp_exp
        /* Saturation doesn't have a significant impact here, as a value of 1e-5 in Q31 format is added to prevent division by zero */
        temp32 = BASOP_Util_Divide3232_Scale_newton( tmp_max, L_add_sat( dPS_fx[i], avoid_divide_by_zero ), &temp_exp ); // 31-temp_exp
        ps_sta_fx = BASOP_Util_Add_Mant32Exp( temp32, temp_exp, ps_sta_fx, ps_sta_exp, &ps_sta_exp );
    }
    temp32_log = L_add( BASOP_Util_Log2( L_add_sat( ps_sta_fx, L_shr( 21475, ps_sta_exp ) ) ), L_shl( ps_sta_exp, Q25 ) );