[Speex-dev] [PATCH 1/5] resample: Calculate full sinc table (e.g. no sinc interpolation)

Jyri Sarha oku at iki.fi
Thu Sep 1 05:30:27 PDT 2011

From: Jyri Sarha <jsarha at ti.com>

On many systems taking couple of kilo-bytes for full sinc table is not
a problem. With a straight filter table the number of MAC operations
needed drops to one quarter. Also the inner loop of the filter becomes
more simple and easier to optimize. So the full sinc table version
runs much faster in most cases. The trade off is some kilo-bytes
bigger memory usage and more CPU needed when initializing the
 libspeex/resample.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libspeex/resample.c b/libspeex/resample.c
index 7b5a308..3829715 100644
--- a/libspeex/resample.c
+++ b/libspeex/resample.c
@@ -585,7 +585,11 @@ static void update_filter(SpeexResamplerState *st)
    /* Choose the resampling type that requires the least amount of memory */
+   if (1) 
    if (st->den_rate <= st->oversample)
       spx_uint32_t i;
       if (!st->sinc_table)

More information about the Speex-dev mailing list