diff --git a/lib_enc/acelp_core_enc_fx.c b/lib_enc/acelp_core_enc_fx.c index 6449367c81a5fc4cfc8d12788c3acbd9e5662d21..b9310dead64d1b82a5e84b1a8010304eb681d596 100644 --- a/lib_enc/acelp_core_enc_fx.c +++ b/lib_enc/acelp_core_enc_fx.c @@ -156,7 +156,7 @@ ivas_error acelp_core_enc_fx( st_fx->Nb_ACELP_frames = 0; move16(); } - st_fx->Nb_ACELP_frames = add( st_fx->Nb_ACELP_frames, 1 ); // Q0 + st_fx->Nb_ACELP_frames = add_sat( st_fx->Nb_ACELP_frames, 1 ); // Q0 move16(); int_fs_fx = INT_FS_16k_FX; @@ -967,7 +967,7 @@ ivas_error acelp_core_enc_ivas_fx( st->Nb_ACELP_frames = 0; move16(); } - st->Nb_ACELP_frames = add( st->Nb_ACELP_frames, 1 ); + st->Nb_ACELP_frames = add_sat( st->Nb_ACELP_frames, 1 ); move16(); IF( EQ_16( st->L_frame, L_FRAME ) ) diff --git a/lib_enc/energy_fx.c b/lib_enc/energy_fx.c index 6d81eb82a7b8bd9dfe8261486ebf6330f1bdefbb..7dc96a4e31a73fa401bb5170f05035510b58de02 100644 --- a/lib_enc/energy_fx.c +++ b/lib_enc/energy_fx.c @@ -184,7 +184,7 @@ static void update_sb_bg_energy( Word32 sb_bg_energy_ti, tmp; Word16 tmpQ, i; - *tbg_energy_count = add( *tbg_energy_count, 1 ); /* Q0 */ + *tbg_energy_count = add_sat( *tbg_energy_count, 1 ); /* Q0 */ move16(); tmpQ = add( tmp_Q_add, frame_sb_energy_scale );