search for: speex_resampler_process_int

Displaying 16 results from an estimated 16 matches for "speex_resampler_process_int".

2009 Aug 05
0
Bug in libspeexdsp resampler
There is a bug in "speex_resampler_process_interleaved_int" and "speex_resampler_process_interleaved_float" in the resampler. It seems that when "speex_resampler_process_int" is called for the first channel, "in_len" is set to the actual number of samples used (when output limited), which you would think w...
2009 Oct 23
0
Little bug in the libspeexdsp resampler
Hi Jean-Marc, I reported this bug a couple of months ago and either it got lost or I just didn't make my case very well. Let me see if I can explain why "speex_resampler_process_interleaved_int" and "speex_resampler_process_interleaved_float" in the resampler have a problem. If you call "speex_resampler_process_interleaved_int" with a small "out_len" (and therefore is output limited), then the first time the function calls "speex_res...
2009 Mar 17
2
Resample UltraWideBand to NarrowBand
...#39;t convert it. Then I need in my Asterisk Channel Source include the Speex Library in resample this frame in 32KHz to 8KHz. Searching for it in Speex Doc, I found it: SpeexResamplerState *resampler; resampler = speex_resampler_init(nb_channels, input_rate, output_rate, quality, &err); err = speex_resampler_process_int(resampler, channelID, in, &in_length, out, &out_length); But in my source I have one *dataframe where is my payload. How I can use it to resample my frame? Thanks you very much, Thiago. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/p...
2010 Nov 10
0
bug fix for speex_resampler_reset_mem?
...in the middle, as follows: short *input_data = read_waveform_as_linear(infileName, &rate, &num_samples, &num_channels); SpeexResamplerState *state = speex_resampler_init_frac(num_channels, in_rate, out_rate, in_rate, out_rate, quality, &error); speex_resampler_skip_zeros(state); speex_resampler_process_int(state, 0, input_data, ...) write_waveform(...) speex_resampler_reset_mem(m_resampler_state); speex_resampler_skip_zeros(m_resampler_state); speex_resampler_process_int(state, 0, input_data, ...) write_waveform(...) speex_resampler_destroy(state); When I run it this way, my two output waveforms are...
2019 Jun 14
0
resample of libopusenc-0.2.1 outputs all zeros if define FIXED_POINT
...ample.c 2019-06-15 01:32:37 +0800 @@ -82,7 +82,7 @@ static void speex_free(void *ptr) {free( #include <limits.h> #ifndef M_PI -#define M_PI 3.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->fil...
2019 Nov 06
0
【SPEEX】 use speex resample make noise
...n = 640; >     spx_uint32_t outlen = 1920; >     while (1) >     { >         speex_resampler_reset_mem(speex_resampler); >         int len = fread(inbuff, 2, 320, fp); >         if (len <= 0) >         { >             break; >         } >         int ret = speex_resampler_process_int(speex_resampler, >                                                 0, >                                                 inbuff, >                                                 &inlen, >                                                 outbuff, >                            ...
2008 Mar 29
0
GCC/ELF Visibility patch
...+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(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_...
2009 Mar 18
0
Resample UltraWideBand to NarrowBand
...ert it. Then I need in my Asterisk Channel Source include the Speex Library in resample this frame in 32KHz to 8KHz. Searching for it in Speex Doc, I found it: SpeexResamplerState *resampler; resampler = speex_resampler_init(nb_channels, input_rate, output_rate, quality, &err); err = speex_resampler_process_int(resampler, channelID, in, &in_length, out, &out_length); But in my source I have one *dataframe where is my payload. How I can use it to resample my frame? Thanks you very much, Thiago. ------------------------------------------------------------------------------ _____________...
2019 Nov 05
0
【SPEEX】 use speex resample make noise
...nlen = 640; >     spx_uint32_t outlen = 1920; >     speex_resampler_skip_zeros(speex_resampler); >     while (1) >     { >         int len = fread(inbuff, 2, 320, fp); >         if (len <= 0) >         { >             break; >         } >         int ret = speex_resampler_process_int(speex_resampler, >                                                 0, >                                                 inbuff, >                                                 &inlen, >                                                 outbuff, >                            ...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...+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(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_...
2007 Mar 14
2
Resampler
Hello Jean-Marc, thank you for your answer! > I'll look into this. There's basically no overflow prevention for now. > I'll think about how to add that without affecting performance too much > (on CPUs that don't have hardware saturation). I'm open to suggestions :-) I'm not sure if I can really help, but I did a few more tests. Reducing the volume of the input
2007 Feb 05
3
Speex and RTP
> I believe there is new resampling functionality in the speex svn head, > although I haven't tested it yet. You might also want to check out > 'Secret Rabbit Code' for your resampling. Yes, I've just been working on a resampler recently. Its changing a lot, but it's now usable. I'd actually be quite happy to have some feedback on it. Jean-Marc > Hope this
2012 May 02
1
[PATCH] resample: Fix input indexing bug from interleaved functions
...ri Sarha <jsarha at ti.com> --- libspeex/resample.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 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...
2007 Feb 05
0
Speex and RTP
Hi Jean-Marc, Just some initial feedback, I've just tried to build svn head using the Visual Studio 2005 compiler, and had the following issues: 1. Missing definition of M_PI if it's undefined (and it is on this platform) 2. In speex_resampler_process_int, the compliler can't determine the value of *in_len and *out_len at compile time and thus determine the size of the x and y arrays. I've resolved these issues locally with quick and obvious hacks and when I get a chance I'll integrate your resampler into some code of ours and see how i...
2008 May 03
2
Resampler (no api)
...];i++) + mem[N-1+i]=mem[N-1+i+tmp_in_len]; } - st->in_stride = istride_save; - st->out_stride = ostride_save; - for (i=0;i<*out_len;i++) - out[i*st->out_stride] = y[i]; + *out += out_len*st->out_stride; + return out_len; +} + +#ifdef FIXED_POINT +EXPORT 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) #else - spx_word16_t x[FIXED_STACK_ALLOC]; - spx_word16_t y[FIXED_STACK_ALLOC]; - spx_uint32_t ilen=*in_len, olen=*out_len; - istride_save = st->in_...
2008 May 03
0
Resampler, memory only variant
...];i++) + mem[N-1+i]=mem[N-1+i+tmp_in_len]; } - st->in_stride = istride_save; - st->out_stride = ostride_save; - for (i=0;i<*out_len;i++) - out[i*st->out_stride] = y[i]; + *out += out_len*st->out_stride; + return out_len; +} + +#ifdef FIXED_POINT +EXPORT 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) #else - spx_word16_t x[FIXED_STACK_ALLOC]; - spx_word16_t y[FIXED_STACK_ALLOC]; - spx_uint32_t ilen=*in_len, olen=*out_len; - istride_save = st->in_...