Commit 3e191ba3 authored by vaclav's avatar vaclav
Browse files

fix to prevent saturations

parent 3ac7ee78
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1599,7 +1599,9 @@ ivas_error core_switching_pre_dec_fx(
        ELSE
        {
#ifdef FIX_2379_REMOVE_previoussynth_fx_32
            frame_ener_fx( output_frame, UNVOICED_CLAS, st->previoussynth_fx, -1, &st->enr_old_fx, 1, 0, 0, 0 ); /*Q-0*/
            Word32 previoussynth_fx_32[L_FRAME48k];
            Copy_Scale_sig_16_32_no_sat( st->previoussynth_fx, previoussynth_fx_32, output_frame, 0 );
            fer_energy_fx( output_frame, UNVOICED_CLAS, previoussynth_fx_32, 0, -1, &st->enr_old_fx, 1 ); /*Q0*/
#else
            fer_energy_fx( output_frame, UNVOICED_CLAS, st->previoussynth_fx_32, 0, -1, &st->enr_old_fx, 1 ); /*Q-0*/
#endif
@@ -1686,8 +1688,9 @@ ivas_error core_switching_pre_dec_fx(
        st->last_coder_type = GENERIC;
        move16();
#ifdef FIX_2379_REMOVE_previoussynth_fx_32
        frame_ener_fx( output_frame, UNVOICED_CLAS, st->previoussynth_fx, -1, &st->enr_old_fx, 1, 0, 0, 0 ); /*Q-0*/
        st->enr_old_fx--;                                                                                    // just to keep the value identical
        Word32 previoussynth_fx_32[L_FRAME48k];
        Copy_Scale_sig_16_32_no_sat( st->previoussynth_fx, previoussynth_fx_32, output_frame, 0 );
        fer_energy_fx( output_frame, UNVOICED_CLAS, previoussynth_fx_32, 0, -1, &st->enr_old_fx, 1 ); /*Q0*/
#else
        fer_energy_fx( output_frame, UNVOICED_CLAS, st->previoussynth_fx_32, 0, -1, &st->enr_old_fx, 1 );     /*Q-0*/
#endif