Commit 14dbe7d8 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '870-possible-crash-saturation-in-fec_estimation' into 'main'

Additon of _sat to shl in FEC_pitch_estim_fx()

Closes #870

See merge request !575
parents b18177b7 d7c6affd
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ void FEC_pitch_estim_fx(
    tmp = mult_r( pitch_buf[1], 22938 );                                                  /*Q6( 0.7f * pitch_buf[1] 0.7 in Q15)*/
    tmp1 = shl( tmp, 1 );                                                                 /*Q6 (1.4f * pitch_buf[1])*/
    tmp2 = round_fx( L_shl( Mpy_32_16_1( old_pitch_buf[2 * NB_SUBFR - 1], 22938 ), 6 ) ); /*Q6 (0.7f * old_pitch_buf[2*NB_SUBFR-1])*/
    tmp3 = shl( tmp2, 1 );                                                                /*Q6 (1.4f * old_pitch_buf[2*NB_SUBFR-1])*/
    tmp3 = shl_sat( tmp2, 1 );                                                            /*Q6 (1.4f * old_pitch_buf[2*NB_SUBFR-1])*/

    tmp16k1 = round_fx( L_shl( Mpy_32_16_1( old_pitch_buf[2 * NB_SUBFR16k - 1], 22938 ), 6 ) ); /*Q6 0.7f * old_pitch_buf[2*NB_SUBFR16k-1]*/
#ifdef BASOP_NOGLOB