@@ -938,6 +938,25 @@ Word16 find_uv_fx( /* o : coding type
move16();
}
}
#ifdef FIX_2349_HARM_FIND_UV
ELSEIF(st_fx->element_mode==EVS_MONO)
{
if(((LT_16(add_sat(mean_voi3,corr_shift),add(22774/* 0.695f in Q15 */,mean_voi3_offset)))&&/* normalized correlation low */
(LT_16(add_sat(st_fx->voicing_fx[2],corr_shift),25887/* 0.8 in Q15 */))&&/* normalized correlation low on look-ahead - onset detection */
(LT_32(ee[0],397/* 6.2f in Q6 */))&&(GT_32(hp_E[0],E_min_th))&&/* energy concentrated in high frequencies provided that some energy is present in HF... */
(LT_32(ee[1],397/* 6.2f in Q6 */))&&(GT_32(hp_E[1],E_min_th))&&/* ... biased towards look-ahead to detect onsets */
(tmp_offset_flag==0)&&/* Take care of voiced offsets */
/*( st_fx->music_hysteresis_fx == 0 ) && *//* ... and in segment after AUDIO frames */
(LE_32(dE1,245760/* 30.0f in Q13 */))&&/* Avoid on sharp energy spikes */
(LE_32(st_fx->old_dE1_fx,245760/* 30.0f in Q13 */))&&/* + one frame hysteresis */
(st_fx->spike_hyst<0))/* Avoid after sharp energy spikes followed by decay (e.g. castanets) */
||(flag_low_relE&&(LE_32(st_fx->old_dE1_fx,245760/* 30.0f in Q13 */))))/* low relative frame energy (only for SC-VBR) */
{
coder_type=UNVOICED;
move16();
}
}
#endif
ELSE
{
test();
@@ -950,9 +969,7 @@ Word16 find_uv_fx( /* o : coding type
test();
test();
if(((LT_16(add_sat(mean_voi3,corr_shift),add(22774/* 0.695f in Q15 */,mean_voi3_offset)))&&/* normalized correlation low */
#ifdef FIX_2349_HARM_FIND_UV
(LT_16(add_sat(st_fx->voicing_fx[2],corr_shift),25887)&&st_fx->element_mode==EVS_MONO)&&/* normalized correlation low on look-ahead - onset detection */
(LT_32(ee[0],397/* 6.2f in Q6 */))&&(GT_32(hp_E[0],E_min_th))&&/* energy concentrated in high frequencies provided that some energy is present in HF... */
(LT_32(ee[1],397/* 6.2f in Q16 */))&&(GT_32(hp_E[1],E_min_th))&&/* ... biased towards look-ahead to detect onsets */
(tmp_offset_flag==0)&&/* Take care of voiced offsets */