Commit 9e64ef90 authored by Nishant S Kulgod's avatar Nishant S Kulgod
Browse files

added sat

parent 1156eb33
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -472,12 +472,13 @@ void encod_unvoiced_ivas_fx(
#endif
                    Ltmp2 = Mpy_32_16_1( gain_code_vect[j], code_fx[i] );
                    Ltmp2 = L_shl( Ltmp2, Q_new_p5 );
                    Ltmp = L_add( Ltmp, Ltmp2 );
#ifdef BASOP_NOGLOB
                    Ltmp = L_add_sat(Ltmp, Ltmp2);
                    Ltmp = L_shl_sat( Ltmp, 1 ); /* saturation can occur here */
                    exc_fx[i + i_subfr] = round_fx_sat( Ltmp );
#else
                    BASOP_SATURATE_WARNING_OFF_EVS
                    Ltmp = L_add( Ltmp, Ltmp2 );
                    Ltmp = L_shl( Ltmp, 1 ); /* saturation can occur here */
                    BASOP_SATURATE_WARNING_ON_EVS
                    exc_fx[i + i_subfr] = round_fx( Ltmp );
+1 −1
Original line number Diff line number Diff line
@@ -564,7 +564,7 @@ Word16 Pit_exc_contribution_len_ivas_fx( /* o : bin wher
    test();
    if ( GE_16( st_fx->GSC_IVAS_mode, 1 ) || LT_32( st_fx->core_brate, ACELP_9k60 ) )
    {
        av_corr = shl( av_corr, 1 ); /*Q2 Correlation really poor at low rate, time domain still valide*/
        av_corr = shl_sat( av_corr, 1 ); /*Q2 Correlation really poor at low rate, time domain still valide*/
    }
    min_corr = abs_s( sub( mfreq_loc_Q2fx[0], av_corr ) ); /*Q2*/