search for: istride_save

Displaying 8 results from an estimated 8 matches for "istride_save".

2013 Dec 20
2
Scaling fix for float input
...esample.c b/libspeex/resample.c --- a/libspeex/resample.c 2013-12-20 17:40:27.326576921 +0500 +++ b/libspeex/resample.c 2013-12-20 17:40:16.918577087 +0500 @@ -915,7 +915,7 @@ if (in) { for(j=0;j<ichunk;++j) #ifdef FIXED_POINT - x[j+st->filt_len-1]=WORD2INT(in[j*istride_save]); + x[j+st->filt_len-1]=WORD2INT(32768.*in[j*istride_save]); #else x[j+st->filt_len-1]=in[j*istride_save]; #endif -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20131220/93160412/attac...
2009 Aug 05
0
Bug in libspeexdsp resampler
...some more clever way to fix it deeper in the code, but this seems to work. The changed functions follow. John Ridges EXPORT int speex_resampler_process_interleaved_float(SpeexResamplerState *st, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) { spx_uint32_t i; int istride_save, ostride_save; spx_uint32_t bak_in_len = *in_len; spx_uint32_t bak_out_len = *out_len; istride_save = st->in_stride; ostride_save = st->out_stride; st->in_stride = st->out_stride = st->nb_channels; for (i=0;i<st->nb_channels;i++) { *in_len = bak_in_len; *out_len = bak_out_len;...
2008 May 03
2
Resampler (no api)
...t;mem_alloc_size; + spx_word16_t *mem = st->mem + channel_index * st->mem_alloc_size; + spx_uint32_t ilen; + st->started = 1; - /* Handle the case where we have samples left from a reduction in filter length */ - if (st->magic_samples[channel_index]) - { - int istride_save; - spx_uint32_t tmp_in_len; - spx_uint32_t tmp_magic; - - istride_save = st->in_stride; - tmp_in_len = st->magic_samples[channel_index]; - tmp_out_len = *out_len; - /* magic_samples needs to be set to zero to avoid infinite recursion */ - tmp_magic = s...
2008 May 03
0
Resampler, memory only variant
...t;mem_alloc_size; + spx_word16_t *mem = st->mem + channel_index * st->mem_alloc_size; + spx_uint32_t ilen; + st->started = 1; - /* Handle the case where we have samples left from a reduction in filter length */ - if (st->magic_samples[channel_index]) - { - int istride_save; - spx_uint32_t tmp_in_len; - spx_uint32_t tmp_magic; - - istride_save = st->in_stride; - tmp_in_len = st->magic_samples[channel_index]; - tmp_out_len = *out_len; - /* magic_samples needs to be set to zero to avoid infinite recursion */ - tmp_magic = s...
2012 May 02
1
[PATCH] resample: Fix input indexing bug from interleaved functions
...sertions(+), 4 deletions(-) diff --git a/libspeex/resample.c b/libspeex/resample.c index 7957c61..d59508d 100644 --- a/libspeex/resample.c +++ b/libspeex/resample.c @@ -970,13 +970,15 @@ EXPORT int speex_resampler_process_interleaved_float(SpeexResamplerState *st, co { spx_uint32_t i; int istride_save, ostride_save; - spx_uint32_t bak_len = *out_len; + spx_uint32_t bak_out_len = *out_len; + spx_uint32_t bak_in_len = *in_len; istride_save = st->in_stride; ostride_save = st->out_stride; st->in_stride = st->out_stride = st->nb_channels; for (i=0;i<st->nb_c...
2019 Jun 14
0
resample of libopusenc-0.2.1 outputs all zeros if define FIXED_POINT
...14159265358979323846 +#define M_PI 3.14159265358979323846f #endif #define IMAX(a,b) ((a) > (b) ? (a) : (b)) @@ -1000,7 +1000,8 @@ EXPORT int speex_resampler_process_int(S if (in) { for(j=0;j<ichunk;++j) #ifdef FIXED_POINT - x[j+st->filt_len-1]=WORD2INT(in[j*istride_save]); + /* [-1.0, 1.0] ==> [-32768, 32767] */ + x[j+st->filt_len-1]=WORD2INT(32768 * in[j*istride_save]); #else x[j+st->filt_len-1]=in[j*istride_save]; #endif @@ -1017,7 +1018,8 @@ EXPORT int speex_resampler_process_int(S for (j=0;j<ochunk+omagic;+...
2008 Mar 29
0
GCC/ELF Visibility patch
...x_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) +EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) { spx_uint32_t i; int istride_save, ostride_save; @@ -920,16 +920,16 @@ #endif return RESAMPLER_ERR_SUCCESS; } -int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len) +EXPORT int speex_resampler_process_int(Speex...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...x_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) +EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len) { spx_uint32_t i; int istride_save, ostride_save; @@ -920,16 +920,16 @@ #endif return RESAMPLER_ERR_SUCCESS; } -int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len) +EXPORT int speex_resampler_process_int(Speex...