search for: word2int

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

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
2013 Dec 20
2
Scaling fix for float input
...B a/libspeex/resample.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/20131...
2014 Apr 15
0
[PATCH 2/3] Use fabsf() instead of fabs() since we have floats, not double
...----- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libspeexdsp/resample.c b/libspeexdsp/resample.c index e32ca45..a19b997 100644 --- a/libspeexdsp/resample.c +++ b/libspeexdsp/resample.c @@ -85,7 +85,7 @@ static void speex_free (void *ptr) {free(ptr);} #ifdef FIXED_POINT #define WORD2INT(x) ((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x))) #else -#define WORD2INT(x) ((x) < -32767.5f ? -32768 : ((x) > 32766.5f ? 32767 : floor(.5+(x)))) +#define WORD2INT(x) ((x) < -32767.5f ? -32768 : ((x) > 32766.5f ? 32767 : floorf(.5+(x)))) #endif #def...
2014 Apr 15
2
[PATCH 2/3] Use fabsf() instead of fabs() since we have floats, not double
...7 deletions(-) > > diff --git a/libspeexdsp/resample.c b/libspeexdsp/resample.c > index e32ca45..a19b997 100644 > --- a/libspeexdsp/resample.c > +++ b/libspeexdsp/resample.c > @@ -85,7 +85,7 @@ static void speex_free (void *ptr) {free(ptr);} > #ifdef FIXED_POINT > #define WORD2INT(x) ((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x))) > #else > -#define WORD2INT(x) ((x) < -32767.5f ? -32768 : ((x) > 32766.5f ? 32767 : > floor(.5+(x)))) > +#define WORD2INT(x) ((x) < -32767.5f ? -32768 : ((x) > 32766.5f ? 32767 : > floorf(.5+(x)))) > #en...
2011 Sep 01
0
[PATCH 5/5] resample: Add NEON optimized inner_product_single for floating point
From: Jyri Sarha <jsarha at ti.com> Also adds inline asm implementations of WORD2INT(x) macro for fixed and floating point. --- libspeex/resample_neon.h | 101 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 101 insertions(+), 0 deletions(-) diff --git a/libspeex/resample_neon.h b/libspeex/resample_neon.h index ba93e41..e7e981e 100644 --- a/libspeex/resample_neon...
2019 Jun 14
0
resample of libopusenc-0.2.1 outputs all zeros if define FIXED_POINT
...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->filt_len-1]=in[j*istride_save]; #endif @@ -1017,7 +1018,8 @@ EXPORT int speex_resampler_process_int(S for (j=0;j&...
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
2008 May 03
2
Resampler (no api)
...=============================== --- libspeex/resample.c (revision 14829) +++ libspeex/resample.c (working copy) @@ -74,6 +74,7 @@ #include "os_support.h" #endif /* OUTSIDE_SPEEX */ +#include "stack_alloc.h" #include <math.h> #ifndef M_PI @@ -86,10 +87,6 @@ #define WORD2INT(x) ((x) < -32767.5f ? -32768 : ((x) > 32766.5f ? 32767 : floor(.5+(x)))) #endif -/*#define float double*/ -#define FILTER_SIZE 64 -#define OVERSAMPLE 8 - #define IMAX(a,b) ((a) > (b) ? (a) : (b)) #define IMIN(a,b) ((a) < (b) ? (a) : (b)) @@ -97,6 +94,17 @@ #defi...
2008 May 03
0
Resampler, memory only variant
...=============================== --- libspeex/resample.c (revision 14829) +++ libspeex/resample.c (working copy) @@ -74,6 +74,7 @@ #include "os_support.h" #endif /* OUTSIDE_SPEEX */ +#include "stack_alloc.h" #include <math.h> #ifndef M_PI @@ -86,10 +87,6 @@ #define WORD2INT(x) ((x) < -32767.5f ? -32768 : ((x) > 32766.5f ? 32767 : floor(.5+(x)))) #endif -/*#define float double*/ -#define FILTER_SIZE 64 -#define OVERSAMPLE 8 - #define IMAX(a,b) ((a) > (b) ? (a) : (b)) #define IMIN(a,b) ((a) < (b) ? (a) : (b)) @@ -97,6 +94,17 @@ #defi...
2008 Feb 05
1
Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
...hardware saturation available on >> Blackfin, or does it saturate by software? Can you point me to the >> place I have to look at inside the resampler function for >> saturation? > > Saturation is entirely done in software. The resampler does the > conversion using the WORD2INT macro. > > Jean-Marc > > > > _______________________________________________________________________ > Jetzt neu! Sch?tzen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage > kostenlos testen. > http://www.pc-sicherheit.web.de/startseite/?mc=022220 > > > __...
2008 Feb 08
1
Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
...tion available on >>> Blackfin, or does it saturate by software? Can you point me to >>> the place I have to look at inside the resampler function for >>> saturation? >> Saturation is entirely done in software. The resampler does the >> conversion using the WORD2INT macro. >> >> Jean-Marc >> >> >> >> _______________________________________________________________________ >> Jetzt neu! Sch?tzen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage >> kostenlos testen. >> http://www.pc-sicherheit.web.de/startsei...
2008 Feb 01
0
FW: Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
...hardware saturation available on >> Blackfin, or does it saturate by software? Can you point me to the >> place I have to look at inside the resampler function for >> saturation? > > Saturation is entirely done in software. The resampler does the > conversion using the WORD2INT macro. > > Jean-Marc > > > > _______________________________________________________________________ > Jetzt neu! Sch?tzen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage > kostenlos testen. > http://www.pc-sicherheit.web.de/startseite/?mc=022220 > > >
2008 Feb 12
1
Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
...t;>>> Blackfin, or does it saturate by software? Can you point me to >>>> the place I have to look at inside the resampler function for >>>> saturation? >>> Saturation is entirely done in software. The resampler does the >>> conversion using the WORD2INT macro. >>> >>> Jean-Marc >>> >>> >>> >>> _______________________________________________________________________ >>> Jetzt neu! Sch?tzen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage >>> kostenlos testen. >>> http...
2008 Feb 01
1
FW: Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
Hi Jean-Marc, didn't get a reply to my last post (see below) -- do you have no idea what happens here? After some more tests, I disabled the DIV32_16 Blackfin optimizations and now get good quality on the Blackfin. But when I have overdrive on the input, things become very bad -- I'm not sure if this is really a filter stability issue like I wrote some weeks ago. I use the speex
2008 Feb 22
1
Re: Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
...lackfin, or does it saturate by software? Can you point me to >>>>> the place I have to look at inside the resampler function for >>>>> saturation? >>>> Saturation is entirely done in software. The resampler does the >>>> conversion using the WORD2INT macro. >>>> >>>> Jean-Marc >>>> >>>> >>>> >>>> _______________________________________________________________________ >>>> Jetzt neu! Sch?tzen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage >>>> kostenlo...
2008 Mar 05
1
Problem with Blackfin assembly optimizations -- bug in fixed_bfin.h / resampler saturation???
...oes it saturate by software? Can you point >>>>>> me to the place I have to look at inside the resampler >>>>>> function for saturation? >>>>> Saturation is entirely done in software. The resampler does >>>>> the conversion using the WORD2INT macro. >>>>> >>>>> Jean-Marc >>>>> >>>>> >>>>> >>>>> _______________________________________________________________________ >>>>> Jetzt neu! Sch?tzen Sie Ihren PC mit McAfee und WEB.DE. 30...