Commit 7de3bc96 authored by vaillancour's avatar vaillancour
Browse files

small correction to the fix

parent 42023f79
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -164,4 +164,6 @@
#define FIX_ISSUE_1247
#define NONBE_FIX_1087_OOB_SBA_DTX_RS                   /* VA: issue 1087: Extend the length of the buffer for MCT decoding to avoid out-of-bound writing in SBA SID bitrate switching decoding */
#define FIX_1285_DECODER_CRASH

#define FIX_1320_LOWRATE_ACELP
#endif
+5 −2
Original line number Diff line number Diff line
@@ -302,8 +302,11 @@ void encod_gen_2sbfr(
         * Gain clipping test to avoid unstable synthesis on frame erasure
         *-----------------------------------------------------------------*/

#ifndef FIX_1320_LOWRATE_ACELP
        clip_gain = gp_clip_fx( st->element_mode, st->core_brate, st->voicing_fx, i_subfr, coder_type, xn, st->clip_var_fx, Q_new ); // Q0

#else
        clip_gain = gp_clip_fx( st->element_mode, st->core_brate, st->voicing_fx, i_subfr, coder_type, xn, st->clip_var_fx, sub( Q_new, 1 ) ); // Q0
#endif
        /*-----------------------------------------------------------------*
         * LP filtering of the adaptive excitation, codebook target computation
         *-----------------------------------------------------------------*/
@@ -348,7 +351,7 @@ void encod_gen_2sbfr(
#ifndef FIX_1320_LOWRATE_ACELP
        hLPDmem->tilt_code = est_tilt_ivas_fx( exc + i_subfr, gain_pit, code, gain_code, &voice_fac, Q_new, 2 * L_SUBFR, 0 );
#else
        Lgcode = L_shl_sat( gain_code, sub( Q_new, 0 ) ); /* scaled gain_code with Qnew -> Q16*/
        Lgcode = L_shl_sat( gain_code, Q_new ); /* scaled gain_code with Qnew -> Q16*/
        gcode16 = round_fx_sat( Lgcode );          /*Q0*/
        hLPDmem->tilt_code = est_tilt_ivas_fx(exc + i_subfr, gain_pit, code, Lgcode, &voice_fac, Q_new, 2 * L_SUBFR, 0);
#endif