/* Verification of the filters similartiies and prediction gain obtained for each channel */
/* Verification of the filters similarities and prediction gain obtained for each channel */
/* Threshold are more relax if alpha is close to 0.5 (Valid if ICA is used ) */
if(((pred_gain_reuse_PCh>=RATIO_PG*predgain_SCh&&dist<EUCLDST)/* Prediction gain are close & Euclidian dist is small */
||(predgain_SCh<PG2ND&&dist<EUCLDST2))/* Prediction gain if the secondary channel is low & Euclidian dist is not too large */
if(((pred_gain_reuse_PCh>=RATIO_PG*predgain_SCh&&dist<EUCLDST)/* Prediction gain are close & Euclidean dist is small */
||(predgain_SCh<PG2ND&&dist<EUCLDST2))/* Prediction gain if the secondary channel is low & Euclidean dist is not too large */
||(hStereoTD->tdm_last_ratio_idx>=(LRTD_STEREO_MID_IS_PRIM-2)&&hStereoTD->tdm_last_ratio_idx<=(LRTD_STEREO_MID_IS_PRIM+2)&&/* ratio between 0.4 and 0.6 */
((pred_gain_reuse_PCh>=RATIO_PG2*predgain_SCh&&dist<EUCLDST2)||predgain_SCh<PG2ND2))/* Prediction gain are not far & Euclidian dist is not too large or Prediction gain if the secondary channel is low */
((pred_gain_reuse_PCh>=RATIO_PG2*predgain_SCh&&dist<EUCLDST2)||predgain_SCh<PG2ND2))/* Prediction gain are not far & Euclidean dist is not too large or Prediction gain if the secondary channel is low */
||ener_sig<=30.0f/* secondary channel has low energy */