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

[3GPP-Issue #824] Fixes crash in low level signal at 24.4 kbps with dtx enabled

[x] The crash was occurring in function stereo_dft_generate_comfort_noise_fx(). The shr() in the IF condition overflow. Using shr_sat solved the issue
parent c24a0ae3
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1055,7 +1055,7 @@ static void stereo_dft_generate_comfort_noise_fx(

            tmp_16 = BASOP_Util_Divide3232_Scale( E0, E1, &q_div );
            tmp_16 = Sqrt16( tmp_16, &q_div );
            IF( LT_16( tmp_16, shr( MAX_16, q_div ) ) )
            IF( LT_16( tmp_16, shr_sat( MAX_16, q_div ) ) )
            {
                tmp_16 = shl( tmp_16, q_div );
                hStereoCng->xfade_length = sub( MAX_XFADE_FX, extract_l( L_shr( imult3216( MAX_XFADE_FX, tmp_16 ), Q15 ) ) );