search for: spx_uint32_t

Displaying 20 results from an estimated 21 matches for "spx_uint32_t".

2008 May 03
0
Resampler, memory only variant
...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_buffer_size(SpeexResamplerState *st, spx_uint32_t buff_len); + +/** Get the buffer size in samples. + * @param st Resampler state + * @param buff_len Number of samples allocated. + */ +void speex_resampler_get_buffer_size(SpeexResamplerState *st, spx_uint32_t *buff_len); + /** Make sure that the first samples to go out of the resamplers don't...
2008 Mar 29
0
GCC/ELF Visibility patch
...turn 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_frac(nb_channels, in_rate, out_rate, in...
2008 May 03
2
Resampler (no api)
...add_ps(sum, _mm_movehl_ps(sum, sum)); + sum = _mm_add_ss(sum, _mm_shuffle_ps(sum, sum, 0x55)); + _mm_store_ss(&ret, sum); + return ret; +} + +#define OVERRIDE_INTERPOLATE_PRODUCT_SINGLE +static inline float interpolate_product_single(const float *a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac) { + int i; + float ret; + __m128 sum = _mm_setzero_ps(); + __m128 f = _mm_loadu_ps(frac); + for(i=0;i<len;i+=2) + { + sum = _mm_add_ps(sum, _mm_mul_ps(_mm_load1_ps(a+i), _mm_loadu_ps(b+i*oversample))); + sum = _mm_add_ps(sum, _mm_mul_ps(_mm_load1_ps(a+i+1), _...
2008 Mar 29
2
GCC/ELF Visibility patch (fwd)
...turn 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_frac(nb_channels, in_rate, out_rate, in...
2009 Aug 05
0
Bug in libspeexdsp resampler
...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->out_stride = st->nb_channels; for (i...
2012 May 02
1
[PATCH] resample: Fix input indexing bug from interleaved functions
...- 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_stride = st->nb_channels; f...
2009 Oct 26
1
[PATCH] Fix miscompile of SSE resampler
...+++++++---------------- 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 @@ static int resampler...
2019 Nov 06
0
【SPEEX】 use speex resample make noise
...er = 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}; >     spx_int16_t outbuff[1920] = {0}; >     spx_uint32_t inlen = 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 r...
2007 May 02
0
[patch] Mac Universal Binaries
...d short) (s) << 8) | ((unsigned short) (s) >> 8)) > #define be_short(s) ((short) (s)) > #else > @@ -46,7 +46,7 @@ > /** Convert little endian */ > static inline spx_int32_t le_int(spx_int32_t i) > { > -#ifdef WORDS_BIGENDIAN > +#ifdef __BIG_ENDIAN__ > spx_uint32_t ui, ret; > ui = i; > ret = ui>>24; > Index: configure.ac > =================================================================== > --- configure.ac (revision 12905) > +++ configure.ac (working copy) > @@ -32,7 +32,6 @@ > AC_CANONICAL_HOST > AM_PROG_LIBTOOL...
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
...es 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. > int speex_err = 0; > > mspeex_src_state = speex_resampler_init(2,44100,8000,4,&speex_err); > // other code eg. using bass to feed "...
2019 Nov 05
0
【SPEEX】 use speex resample make noise
...er = 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}; >     spx_int16_t outbuff[1920] = {0}; >     spx_uint32_t inlen = 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...
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
2007 Mar 08
4
Introduction and patch
Hi, I'm one of the people working on the Rockbox project (http://www.rockbox.org) which is an open source alternative firmware for a range Digital Audio Players. Recently we integrated support for the Speex codec using libspeex and seems to work well. If you could add Rockbox to your list of software that supports Speex, that'd be great. So that's the introduction done. Now for
2007 May 02
4
[patch] Mac Universal Binaries
Hi all, Speex currently decides endianness at configure-time. This causes the ppc half of Mac universal binaries to have some endianness problems. Most notably, the header built by speex_packet_to_header() has incorrect byte-ordering. This Apple developer page describes the incantation that can be used to build universal binaries on Mac. It also highlights the configure-time versus compile-time
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...$ ********************************************************************/ #ifndef _SPEEX_TYPES_H #define _SPEEX_TYPES_H #if defined(_WIN32) # if defined(__CYGWIN__) # include <_G_config.h> typedef _G_int64_t spx_int64_t; typedef _G_int32_t spx_int32_t; typedef _G_uint32_t spx_uint32_t; typedef _G_int16_t spx_int16_t; typedef _G_uint16_t spx_uint16_t; # elif defined(__MINGW32__) typedef short spx_int16_t; typedef unsigned short spx_uint16_t; typedef int spx_int32_t; typedef unsigned int spx_uint32_t; typedef long long spx_int64_t; typedef...
2010 Nov 10
0
bug fix for speex_resampler_reset_mem?
...input_data, ...) write_waveform(...) speex_resampler_destroy(state); When I run it this way, my two output waveforms are not identical on a binary basis. Changing speex_resampler_reset_mem() as follows seems to fix the problem: EXPORT int speex_resampler_reset_mem(SpeexResamplerState *st) { spx_uint32_t i; for (i=0;i<st->nb_channels*(st->filt_len-1);i++) st->mem[i] = 0; // added bugfix below: st->started = 0; for (i=0;i<st->nb_channels;i++) { st->last_sample[i] = 0; st->magic_samples[i] = 0; st->samp_frac_num[i] = 0; } r...
2007 Mar 08
0
Introduction and patch
.../* Remove packet */ > speex_free(jitter->buf[i]); > @@ -438,7 +438,7 @@ > /* Let the jitter buffer know it's the right time to adjust the buffering delay to the network conditions */ > int jitter_buffer_update_delay(JitterBuffer *jitter, JitterBufferPacket *packet, spx_uint32_t *start_offset) > { > - int i, j; > + int i; > float late_ratio_short; > float late_ratio_long; > float ontime_ratio_short; > diff -bu ../../../speex/libspeex/kiss_fft.c libspeex/kiss_fft.c > --- ../../../speex/libspeex/kiss_fft.c 2007-02-09 20:12:29.00000000...
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
2011 Sep 01
0
[PATCH 3/5] resample: Add NEON optimized inner_product_single for fixed point
...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_stride * out_sample++] =...