search for: speex_resampler_magic

Displaying 3 results from an estimated 3 matches for "speex_resampler_magic".

2009 May 06
1
speex resampler
I'm trying to understand a bit more about the inner workings of the speex resampler. I want to do resampling on a voip stream. High quality and low latency is important. 1) What does speex_resampler_magic() do? 2) I find that resampling has quite an impact on performance and I'm trying to figure out where the cpu cycles are going and see what can be done to reduce the cost. I ran a profile a while ago. From what I remember there appeared to be dynamic memory allocation going on. Any comments on...
2008 May 03
2
Resampler (no api)
...-1;j++) - mem[j] = in[st->in_stride*(j+*in_len-N+1)]; - } else { - for (;j<N-1;j++) - mem[j] = 0; - } + ilen = *in_len; + + for(j=0;j<N-1;++j) + mem[j] = mem[j+ilen]; + return RESAMPLER_ERR_SUCCESS; } -#define FIXED_STACK_ALLOC 1024 +static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_index, spx_word16_t **out, spx_uint32_t out_len) { + const spx_uint32_t tmp_in_len = st->magic_samples[channel_index]; + spx_word16_t *mem = st->mem + channel_index * st->mem_alloc_size; + const int N = st->filt_len; + + speex_res...
2008 May 03
0
Resampler, memory only variant
...-1;j++) - mem[j] = in[st->in_stride*(j+*in_len-N+1)]; - } else { - for (;j<N-1;j++) - mem[j] = 0; - } + ilen = *in_len; + + for(j=0;j<N-1;++j) + mem[j] = mem[j+ilen]; + return RESAMPLER_ERR_SUCCESS; } -#define FIXED_STACK_ALLOC 1024 +static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_index, spx_word16_t **out, spx_uint32_t out_len) { + const spx_uint32_t tmp_in_len = st->magic_samples[channel_index]; + spx_word16_t *mem = st->mem + channel_index * st->mem_alloc_size; + const int N = st->filt_len; + + speex_res...