search for: speexresamplerst

Displaying 20 results from an estimated 20 matches for "speexresamplerst".

2008 Mar 29
0
GCC/ELF Visibility patch
...e *mode, int request, void *ptr) { return mode->query(mode->mode, request, ptr); } Index: libspeex/resample.c =================================================================== --- libspeex/resample.c (revision 14645) +++ libspeex/resample.c (working copy) @@ -721,12 +721,12 @@ } -SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) +EXPORT SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) { return speex_resampler_init_f...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...e *mode, int request, void *ptr) { return mode->query(mode->mode, request, ptr); } Index: libspeex/resample.c =================================================================== --- libspeex/resample.c (revision 14645) +++ libspeex/resample.c (working copy) @@ -721,12 +721,12 @@ } -SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) +EXPORT SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, spx_uint32_t in_rate, spx_uint32_t out_rate, int quality, int *err) { return speex_resampler_init_f...
2008 May 03
0
Resampler, memory only variant
...ex_resampler_skip_zeros CAT_PREFIX(RANDOM_PREFIX,_resampler_skip_zeros) #define speex_resampler_reset_mem CAT_PREFIX(RANDOM_PREFIX,_resampler_reset_mem) #define speex_resampler_strerror CAT_PREFIX(RANDOM_PREFIX,_resampler_strerror) @@ -312,6 +314,20 @@ */ int speex_resampler_get_output_latency(SpeexResamplerState *st); +/** Set the buffer size in samples. The resampler allocates a temporary buffer, and + * for optimal efficiency this buffer should be as large as your expected + * frame size. + * @param st Resampler state + * @param buff_len Number of samples to allocate. + */ +void speex_resampler_set_...
2009 Oct 26
1
[PATCH] Fix miscompile of SSE resampler
...x/resample_sse.h | 24 ++++++++---------------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/libspeex/resample.c b/libspeex/resample.c index 7b5a308..8131380 100644 --- a/libspeex/resample.c +++ b/libspeex/resample.c @@ -361,7 +361,7 @@ static int resampler_basic_direct_single(SpeexResamplerState *st, spx_uint32_t c sum = accum[0] + accum[1] + accum[2] + accum[3]; */ #else - sum = inner_product_single(sinc, iptr, N); + inner_product_single(&sum, sinc, iptr, N); #endif out[out_stride * out_sample++] = SATURATE32(PSHR32(sum, 15), 32767); @@ -412,7 +412,7 @@...
2008 May 03
2
Resampler (no api)
...) @@ -97,6 +94,17 @@ #define NULL 0 #endif +#ifdef _USE_SSE +#include "resample_sse.h" +#endif + +/* Numer of elements to allocate on the stack */ +#ifdef VAR_ARRAYS +#define FIXED_STACK_ALLOC 8192 +#else +#define FIXED_STACK_ALLOC 1024 +#endif + typedef int (*resampler_basic_func)(SpeexResamplerState *, spx_uint32_t , const spx_word16_t *, spx_uint32_t *, spx_word16_t *, spx_uint32_t *); struct SpeexResamplerState_ { @@ -109,6 +117,7 @@ spx_uint32_t nb_channels; spx_uint32_t filt_len; spx_uint32_t mem_alloc_size; + spx_uint32_t buffer_size; int int_advance;...
2009 Mar 17
2
Resample UltraWideBand to NarrowBand
...n I use Speex NarrowBand the Asterisk is able to convert this frame to G711. But when I use Speex UltraWideBand the Asterisk don'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...
2009 Aug 05
0
Bug in libspeexdsp resampler
...original "in_len" value and reset it before each call to "speex_resampler_process_int". There might be 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->...
2010 Nov 10
0
bug fix for speex_resampler_reset_mem?
I'm using resample.c from speex in my project, and was testing it by processing the same waveform twice, with a reset() call 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_r...
2019 Nov 06
0
【SPEEX】 use speex resample make noise
...which means that the > input and output are not truncated, > but the sound quality is very bad, what would be the cause? > I tried to call speex_resampler_reset_mem before each sample, but the > effect is not as good as usual. > > int main() > { >     int err; >     SpeexResamplerState *speex_resampler; >     speex_resampler = speex_resampler_init(1, 16000, 48000, 10, &err); >     FILE *fp = fopen("/data/zhou.wav", "rb+"); >     FILE *fp2 = fopen("/data/zhou2.wav", "ab+"); >     spx_int16_t inbuff[640] = {0}; >  ...
2012 May 02
1
[PATCH] resample: Fix input indexing bug from interleaved functions
...speex/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->in_stride = st->out_str...
2011 Sep 01
0
[PATCH 3/5] resample: Add NEON optimized inner_product_single for fixed point
...oid *ptr) {free(ptr);} #include "resample_sse.h" #endif +#ifdef _USE_NEON +#include "resample_neon.h" +#endif + /* Numer of elements to allocate on the stack */ #ifdef VAR_ARRAYS #define FIXED_STACK_ALLOC 8192 @@ -360,11 +364,12 @@ static int resampler_basic_direct_single(SpeexResamplerState *st, spx_uint32_t c } sum = accum[0] + accum[1] + accum[2] + accum[3]; */ + sum = SATURATE32PSHR(sum, 15, 32767); #else sum = inner_product_single(sinc, iptr, N); #endif - out[out_stride * out_sample++] = SATURATE32(PSHR32(sum, 15), 32767); + out[out_stri...
2014 Apr 15
6
[PATCH 0/3] misc. cleanup
Hello, some misc. cleanup patches for speexdsp, nothing big I'm not sure about how to submit patches, so this is a test balloon :) ultimately, I'd like to fix the FIXED_POINT issue, see http://lists.xiph.org/pipermail/speex-dev/2013-December/008465.html currently, I think the only way to find out how speexdsp has been compiled is to resample some bytes and observe the output; which is
2011 Sep 01
6
[PATCH 0/5] ARM NEON optimization for samplerate converter
From: Jyri Sarha <jsarha at ti.com> I optimized Speex resampler for NEON capable ARM CPUs. The first patch should speed up resampling on any platform that can spare the increased memory usage. It would be nice to have these merged to the master branch. Please let me know if there is anything I can do to help the the merge. The patches have been rebased on top of master branch in
2007 Mar 22
1
[SPAM] RE: Encoding audio sampled at 44.1 khz?
...XP Pro SP 2 Program used to play back the output file: GoldWave */ #include <speex/speex_resampler.h> #include <stdio.h> //#pragma comment(lib, "libspeex_test.lib") #define ReadSize 16384 int main(int argc, char* argv[]) { // First of all, declare the resampler state SpeexResamplerState* State = speex_resampler_init(2, 44100, 22050, 5); short in[ReadSize]; short out[ReadSize]; FILE* fin = fopen(argv[1], "rb"); FILE* fout = fopen(argv[2], "wb"); unsigned InLength = ReadSize, OutLength = ReadSize;; speex_resampler_skip_zeros(State); while (1) { // Read...
2009 Mar 18
0
Resample UltraWideBand to NarrowBand
...Speex NarrowBand the Asterisk is able to convert this frame to G711. But when I use Speex UltraWideBand the Asterisk don'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 resamp...
2010 Jul 15
1
Speex Echo Cancellation
Hi I am using speex for cancelling echo.but i am not succeeded. I need echo cancellation in urgent.Please help m. Thanks in advance Devi
2010 Jul 15
0
Speex Resampler
...e. > > But i can't get Speex resampler to work, it just don't gives any error > and does like it finished as I've expected but the converted Samples are > only in the middle part of the buffer changed. all other one is the same... > This is my code i tried: > > SpeexResamplerState *mspeex_src_state; > float buf[3528]; //gets my float samples from bass > float bufout[640]; //speex resample out buffer > spx_uint32_t buf_len = 0; //set later by bass > spx_uint32_t bufout_len = 320; //when i use 640 which is correct, the program crashes. >...
2019 Nov 05
0
【SPEEX】 use speex resample make noise
...When I read 640bytes each time, I found that the sound after the sound > conversion is very noisy, > but if I read 6400bytes each time. The conversion will be much better, > the line is my sample code, am I using it incorrectly? please help confirm? > > int main() > { >     SpeexResamplerState *speex_resampler; >     int err; >     speex_resampler = speex_resampler_init(1, 16000, 48000, 10, &err); >     FILE *fp = fopen("/data/zhou.wav", "rb+"); >     FILE *fp2 = fopen("/data/zhou2.wav", "ab+"); >     spx_int16_t inbuff[6...
2008 Feb 18
2
Speex Resampler quality
Hi, *"That's in general not very reliable. You can get PEAQ to say all sorts of silly things." Can you provide me links for any more effective tools other than PEAQ? Which is more reliable for Speex resampler? * *"strongly suspect that it's just not compensating for the delay introduced by the resampler. Because higher quality means higher delay, you'd find that PEAQ
2007 Mar 21
2
Encoding audio sampled at 44.1 khz?
Hi everyone, I recently began using libspeex 1.2 Beta 1 on Windows using MS Visual C++. I have gotten a decoder and an encoder to work fine from the excellent sample code posted at the website. But I face a problem. I am working on using Speex in a program to play and create audio books encoded using Speex (currently testing it only; for these tests, I do not use Ogg to save the encoded