Commit 332f377a authored by vaillancour's avatar vaillancour
Browse files

more staturation fixes based on a different saturation level

parent 9f1a30fc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -414,8 +414,13 @@ static void init_tcx_fx(
            move16();
        }

#ifdef BASOP_NOGLOB
        /*pit = pit_old * (float)st->L_frame/(float)L_frame_old;*/
        pit = shl_sat(mult_r(pit_old, div_s(st->L_frame, shl(L_frame_old, 2))), 2);
/* Note : the saturation here that can happens when FS == 32kHz*/
#else
        pit = shl(mult_r(pit_old, div_s(st->L_frame, shl(L_frame_old, 2))), 2);
#endif
        /*    assert(pit <= st->L_frame);*/

        hTcxEnc->tcxltp_pitch_int_past = pit;