[xiph-commits] r11978 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Wed Nov 1 01:54:34 PST 2006
Author: jm
Date: 2006-11-01 01:54:31 -0800 (Wed, 01 Nov 2006)
New Revision: 11978
Modified:
trunk/speex/libspeex/preprocess.c
Log:
gamma calculation converted (not the value).
Modified: trunk/speex/libspeex/preprocess.c
===================================================================
--- trunk/speex/libspeex/preprocess.c 2006-11-01 08:24:15 UTC (rev 11977)
+++ trunk/speex/libspeex/preprocess.c 2006-11-01 09:54:31 UTC (rev 11978)
@@ -688,8 +688,7 @@
if (st->post[i]>100.f)
st->post[i]=100.f;
- /*gamma = .15+.85*st->prior[i]*st->prior[i]/((1+st->prior[i])*(1+st->prior[i]));*/
- gamma = .1+.9*(st->old_ps[i]/(1.f+st->old_ps[i]+tot_noise))*(st->old_ps[i]/(1.f+st->old_ps[i]+tot_noise));
+ gamma = .1+.9*FRAC_SCALING_1*SQR16_Q15(DIV32_16_Q15(st->old_ps[i],ADD32(st->old_ps[i],tot_noise)));
/* A priori SNR update */
st->prior[i] = gamma*max(0.0f,st->post[i]) + (1.f-gamma)*SNR_SCALING_1*DIV32_16_Q8(st->old_ps[i],tot_noise);
More information about the commits
mailing list