[xiph-commits] r10585 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Tue Dec 13 05:16:18 PST 2005
Author: jm
Date: 2005-12-13 05:16:15 -0800 (Tue, 13 Dec 2005)
New Revision: 10585
Modified:
trunk/speex/libspeex/mdf.c
Log:
minor accuracy improvements
Modified: trunk/speex/libspeex/mdf.c
===================================================================
--- trunk/speex/libspeex/mdf.c 2005-12-12 21:25:53 UTC (rev 10584)
+++ trunk/speex/libspeex/mdf.c 2005-12-13 13:16:15 UTC (rev 10585)
@@ -317,11 +317,11 @@
for (i=0;i<st->frame_size;i++)
{
st->x[i] = st->x[i+st->frame_size];
- st->x[i+st->frame_size] = SHL16(SUB16(echo[i], MULT16_16_Q15(st->preemph, st->memX)),1);
+ st->x[i+st->frame_size] = SHL16(SUB16(echo[i], MULT16_16_P15(st->preemph, st->memX)),1);
st->memX = echo[i];
st->d[i] = st->d[i+st->frame_size];
- st->d[i+st->frame_size] = SHL16(SUB16(ref[i], MULT16_16_Q15(st->preemph, st->memD)),1);
+ st->d[i+st->frame_size] = SHL16(SUB16(ref[i], MULT16_16_P15(st->preemph, st->memD)),1);
st->memD = ref[i];
}
@@ -346,13 +346,13 @@
st->e[i] = 0;
/* Do we need saturation? */
st->e[i+st->frame_size] = tmp_out;
- tmp_out = SHR32(tmp_out,1);
+ tmp_out = PSHR32(tmp_out,1);
/* Saturation */
if (tmp_out>32767)
tmp_out = 32767;
else if (tmp_out<-32768)
tmp_out = -32768;
- tmp_out = ADD32(tmp_out, EXTEND32(MULT16_16_Q15(st->preemph, st->memE)));
+ tmp_out = ADD32(tmp_out, EXTEND32(MULT16_16_P15(st->preemph, st->memE)));
out[i] = tmp_out;
st->memE = tmp_out;
}
More information about the commits
mailing list