[xiph-commits] r11994 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Thu Nov 2 04:26:15 PST 2006
Author: jm
Date: 2006-11-02 04:26:10 -0800 (Thu, 02 Nov 2006)
New Revision: 11994
Modified:
trunk/speex/libspeex/preprocess.c
Log:
EXTRACT16() for correctness
Modified: trunk/speex/libspeex/preprocess.c
===================================================================
--- trunk/speex/libspeex/preprocess.c 2006-11-02 12:18:25 UTC (rev 11993)
+++ trunk/speex/libspeex/preprocess.c 2006-11-02 12:26:10 UTC (rev 11994)
@@ -704,7 +704,7 @@
gamma = QCONST16(.1f,15)+MULT16_16_Q15(QCONST16(.89f,15),SQR16_Q15(DIV32_16_Q15(st->old_ps[i],ADD32(st->old_ps[i],tot_noise))));
/* A priori SNR update = gamma*max(0,post) + (1-gamma)*old/noise */
- st->prior[i] = PSHR32(ADD32(MULT16_16(gamma,MAX16(0,st->post[i])), MULT16_16(Q15_ONE-gamma,DIV32_16_Q8(st->old_ps[i],tot_noise))), 15);
+ st->prior[i] = EXTRACT16(PSHR32(ADD32(MULT16_16(gamma,MAX16(0,st->post[i])), MULT16_16(Q15_ONE-gamma,DIV32_16_Q8(st->old_ps[i],tot_noise))), 15));
st->prior[i]=MIN16(st->prior[i], QCONST16(100.f,SNR_SHIFT));
}
More information about the commits
mailing list