[xiph-commits] r12497 - in trunk/speex: include/speex libspeex

jm at svn.xiph.org jm at svn.xiph.org
Mon Feb 19 20:17:30 PST 2007


Author: jm
Date: 2007-02-19 20:17:27 -0800 (Mon, 19 Feb 2007)
New Revision: 12497

Modified:
   trunk/speex/include/speex/speex_resampler.h
   trunk/speex/libspeex/resample.c
Log:
defined MULT16_32_Q15 for OUTSIDE_SPEEX. Fixed stupid IO stride bug.


Modified: trunk/speex/include/speex/speex_resampler.h
===================================================================
--- trunk/speex/include/speex/speex_resampler.h	2007-02-19 11:28:08 UTC (rev 12496)
+++ trunk/speex/include/speex/speex_resampler.h	2007-02-20 04:17:27 UTC (rev 12497)
@@ -49,6 +49,7 @@
 #define spx_word16_t float
 #define spx_word32_t float
 #define MULT16_16(a,b) ((a)*(b))
+#define MULT16_32_Q15(a,b) ((a)*(b))
 #define PSHR32(a,b) (a)
 #endif
 

Modified: trunk/speex/libspeex/resample.c
===================================================================
--- trunk/speex/libspeex/resample.c	2007-02-19 11:28:08 UTC (rev 12496)
+++ trunk/speex/libspeex/resample.c	2007-02-20 04:17:27 UTC (rev 12497)
@@ -807,13 +807,13 @@
    istride_save = st->in_stride;
    ostride_save = st->out_stride;
    for (i=0;i<*in_len;i++)
-      x[i] = in[i+st->in_stride];
+      x[i] = in[i*st->in_stride];
    st->in_stride = st->out_stride = 1;
    speex_resampler_process_native(st, channel_index, x, in_len, y, out_len);
    st->in_stride = istride_save;
    st->out_stride = ostride_save;
    for (i=0;i<*out_len;i++)
-      out[i+st->out_stride] = WORD2INT(y[i]);
+      out[i*st->out_stride] = WORD2INT(y[i]);
 }
 #endif
 



More information about the commits mailing list