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
IF((EQ_32(st->last_core,TCX_10_CORE)||EQ_32(st->last_core,TCX_20_CORE))||// st->Q_syn_factor is set in TCX mode; otherwise, it may be uninitialized
(hCPE!=NULL&&(GT_16(hCPE->element_mode,IVAS_CPE_DFT)&&EQ_16(hCPE->last_element_mode,IVAS_CPE_DFT)&&((EQ_32(sts[0]->last_core,TCX_10_CORE)||EQ_32(sts[0]->last_core,TCX_20_CORE))))))// In this case, sts[1] gets its value from sts[0].