Commit 3ed639c2 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for LTV crash for OMASA stream

[x] Test case - ltv-OMASA 2Dir1TC 3ISM at 24.4 kbps, 48kHz in, 16kHz out, FOA out, FER at 10%
parent e64601da
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2853,10 +2853,10 @@ void perform_noise_estimation_dec_ivas_fx(
                    /* energy significantly decreases in one of the larger partitions during active frames -> downward update */
                    FOR( p = CNA_ACT_DN_LARGE_PARTITION; p < npart; p++ )
                    {
                        L_tmp = L_shr( hFdCngDec->msPeriodog_ST_fx[p], sub( sub( 31, hFdCngDec->msPeriodog_ST_exp ), 4 ) );
                        IF( LT_32( hFdCngDec->msPeriodog_ST_fx[p], msNoiseEst[p] ) )
                        L_tmp = L_shr( hFdCngDec->msPeriodog_ST_fx[p], sub( hFdCngDec->msNoiseEst_exp, hFdCngDec->msPeriodog_ST_exp ) );
                        IF( LT_32( L_tmp, msNoiseEst[p] ) )
                        {
                            msNoiseEst[p] = L_add( Mpy_32_16_1( msNoiseEst[p], CNA_ACT_DN_FACT_Q15 ), Mpy_32_16_1( L_tmp, (Word16) L_sub( ONE_IN_Q15, CNA_ACT_DN_FACT_Q15 ) ) );
                            msNoiseEst[p] = L_add( Mpy_32_16_1( msNoiseEst[p], CNA_ACT_DN_FACT_Q15 ), Mpy_32_16_1( L_tmp, ONE_IN_Q15 - CNA_ACT_DN_FACT_Q15 ) );
                            move32();
                        }
                    }
+1 −1
Original line number Diff line number Diff line
@@ -1377,7 +1377,7 @@ static void stereo_dft_generate_comfort_noise_fx(
                IF( ( st->hFdCngDec->smoothed_psd_fx[i] > 0 ) && GT_32( Mpy_32_16_1( ftmp, (Word16) 0x3333 ), L_shr_sat( st->hFdCngDec->smoothed_psd_fx[i], l_shift_val ) ) )
                {
                    /* prevent abrupt upward update steps */
                    ftmp = L_add( L_shl( st->hFdCngDec->smoothed_psd_fx[i], 2 ), L_shr( st->hFdCngDec->smoothed_psd_fx[i], 1 ) );
                    ftmp = L_add( L_shl( st->hFdCngDec->smoothed_psd_fx[i], 1 ), L_shr( st->hFdCngDec->smoothed_psd_fx[i], 1 ) );
                    l_shift_val = 0;
                    move16();
                }