#define FIX_2164_ASSERT_IN_OMASA_PREPROC_FOR_EDIT /* Nokia: Issue 2164: Prevent overflow when calculating equalization coefficient for editing before clamping to safe range */
#define FIX_BASOP_ASSERT_IN_TONAL_MDCT_PLC /* FhG: fix for issue 2165 - using saturating addition in tonal MDCT PLC function */
#define OPT_2146_BASOP_UTIL_ADD_MANT32EXP /* Dlb: optimized version of BASOP_Util_Add_Mant32Exp() */
#define FIX_2166_ASSERT_OSBA_PLC_STEREO_OUT /* FhG: fix for issue 2166 - add missing averaging factor 0.5 in for the sum of energies in function stereo_dft_dmx_swb_nrg_fx()*/
#define FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE /* FhG: Use dynamic Q factor for synth_fx and synthFB_fx to prevent overflow */
/* ################### End FIXES switches ########################### */
Scale_sig(&(synth[-((shr(L_frame,1)+hTcxDec->pit_max_TCX)+2*M)]),add(add(shr(L_frame,1),hTcxDec->pit_max_TCX),shl(M,1)),negate(st->Q_syn_factor));/*Q0, Setting back to Q0, as the following calculations are implemented assuming synth is in Q0 */
Scale_sig(&synth[-L_frame],L_frame,negate(st->Q_syn_factor));/*Q0, Setting back to Q0, as the following calculations are implemented assuming synth is in Q0 */
#endif
Copy(st->old_Aq_12_8_fx,A_local,M+1);/*Q12*/
offset=shr(L_frame,1);
@@ -766,9 +784,26 @@ void con_tcx_fx(
syn=buf+M;/*Q_syn*/
Copy(synth-M,buf,M);/*Q_syn*/
#ifdef FIX_1793_DEC_MC_TO_MONO_SCALING_ISSUE
IF(NE_32(st->element_mode,EVS_MONO))// to keep evs bit-exactness