search for: spx_word16_t

Displaying 20 results from an estimated 81 matches for "spx_word16_t".

2008 May 03
2
Resampler (no api)
...if +#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; int frac_advance; float cu...
2008 May 03
0
Resampler, memory only variant
...if +#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; int frac_advance; float cu...
2007 Aug 29
2
high-pass filter issues
...t;highpass_enabled) highpass(out, out, st->frameSize, (st->isWideband?HIGHPASS_WIDEBAND:HIGHPASS_NARROWBAND)|HIGHPASS_OUTPUT, st->mem_hp); /*for (i=0;i<st->frameSize;i++) printf ("%d\n", (int)st->frame[i]);*/ here's the function: void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem) { int i; #ifdef FIXED_POINT const spx_word16_t Pcoef[5][3] = {{16384, -31313, 14991}, {16384, -31569, 15249}, {16384, -31677, 15328}, {16384, -32313, 15947}, {16384, -22446, 6537}}; const spx_word16_t Zcoef[5][3] = {{15672, -31344,...
2009 Apr 24
2
[PATCH] Blackfin: cleanup astat/cc/hardware loop asm clobbers
...644 --- a/libspeex/cb_search_bfin.h +++ b/libspeex/cb_search_bfin.h @@ -33,6 +33,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "bfin.h" + #define OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack) { @@ -73,10 +75,7 @@ void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t * : : "m" (subvect_size), "m" (shape_cb), "m...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...DING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ARCH_H #define ARCH_H #include "speex/speex_types.h" #define ABS(x) ((x) < 0 ? (-(x)) : (x)) #ifdef FIXED_POINT typedef spx_int16_t spx_word16_t; typedef spx_int32_t spx_word32_t; #ifdef _MSC_VER typedef __int64 spx_word64_t; #else typedef long long spx_word64_t; #endif typedef spx_word32_t spx_mem_t; typedef spx_word16_t spx_coef_t; typedef spx_word16_t spx_lsp_t; typedef spx_word32_t spx_sig_t; #define LPC_SCALING 8192 #define...
2005 Jan 25
1
"spx_word16_t *" is incompatible with parameter of type "float *"
...am going for the integer version. The floating point library build was very clean, but when I build with FIXED_POINT defined, the compiler exits when it find this discrepancy in \libspeex\cb_search.c : ".\libspeex\cb_search.c", line 185: cc0167: error: argument of type "spx_word16_t *" is incompatible with parameter of type "float *" compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack); The function definition defines resp2 as a float in line 47: static void compute_weighted_codebook(const signed char *shape_cb, const...
2008 Feb 19
4
Patch for Analog Devices compiler & fixed-point AGC
...k_destroy(FilterBank *bank); +void filterbank_destroy(FilterBank *bnk); -void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel); +void filterbank_compute_bank32(FilterBank *bnk, spx_word32_t *ps, spx_word32_t *mel); -void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *psd); +void filterbank_compute_psd16(FilterBank *bnk, spx_word16_t *mel, spx_word16_t *psd); #ifndef FIXED_POINT -void filterbank_compute_bank(FilterBank *bank, float *psd, float *mel); -void filterbank_compute_psd(FilterBank *bank, float *mel, float *psd); +void filterbank_c...
2007 Sep 13
2
innov_save, what is it? why does it hurt me so?
...or (i=0;i<st->subframeSize;i++) innov_save[i] = EXTRACT16(PSHR32(innov[i], SIG_SHIFT)); } it will just start filling data in, which it shouldn't. I see that innov_save is set at the beginning of a for loop at: for (sub=0;sub<st->nbSubframes;sub++) { int offset; spx_word16_t *exc; spx_word16_t *sp; spx_word16_t *innov_save = NULL; spx_word16_t tmp;... but for some reason that never made a difference even though I know I stepped over it in the code. I commented innov save out for now but I don't know if there is some case where I might need it....
2006 Nov 15
2
Quick survey for Speex 1.2
...located. > In my current implementation, all the memory allocations are collected > together to form one big structure like below, > > typedef struct { > > EncState enc_state; > > char stack[NB_ENC_STACK]; > > spx_word16_t winBuf[80]; > > spx_word16_t excBuf[612]; > > spx_word16_t swBuf[612]; > > spx_word16_t lagWindow[22]; Yuk. That's so.... G.729 and ITU codecs :-) As much as you'd like something like that, it would be a pain to maintain it. If you want everything in one chunk...
2007 Sep 17
1
Possible fixed point overflow/div 0 preprocess.c
..._preprocess_run> ... st->nb_adapt++; st->min_count++; beta = MAX16(QCONST16(.03,15),DIV32_16(Q15_ONE,st->nb_adapt)); beta_1 = Q15_ONE-beta; ... </> On my architecture(x86) at least the DIV32_16 is defined as follows. typedef short spx_int16_t; typedef spx_int16_t spx_word16_t; #define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b)))) The nb_adapt overflow occurred when its value reached 0x00010000 when the cast is performed to a short the value 0x0000 is given and hence the divide by zero exception. Proposed resolution: The SpeexPreprocessState_...
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 Aug 24
1
Speex on ARM7
...on embedded board using ARM7 (Atmel). ARM7 don't have floating point so I'm using FIXED_POINT. Unfortunately the encoding speed is about 5 times slower then necessary for real time. ARM7 is slow for 16/8 bits operations. The sequence: static inline spx_word32_t compute_pitch_error(spx_word16_t *C, spx_word16_t *g, spx_word16_t pitch_control) { spx_word32_t sum = 0; sum = ADD32(sum,MULT16_16(MULT16_16_16(g[0],pitch_control),C[0])); sum = ADD32(sum,MULT16_16(MULT16_16_16(g[1],pitch_control),C[1])); sum = ADD32(sum,MULT16_16(MULT16_16_16(g[2],pitch_control),C[2])); sum...
2006 Nov 15
0
Quick survey for Speex 1.2
...nce all the memories are allocated at the initial stage. In my current implementation, all the memory allocations are collected together to form one big structure like below, typedef struct { EncState enc_state; char stack[NB_ENC_STACK]; spx_word16_t winBuf[80]; spx_word16_t excBuf[612]; spx_word16_t swBuf[612]; spx_word16_t lagWindow[22]; ............................................ int pitch[16]; VBRState vbr; } speex_encoder_memory; The structure defined above is used to...
2007 Mar 08
0
Introduction and patch
...------------------- > > diff -bu ../../../speex/libspeex/fftwrap.c libspeex/fftwrap.c > --- ../../../speex/libspeex/fftwrap.c 2007-03-08 18:46:57.000000000 +1000 > +++ libspeex/fftwrap.c 2007-03-08 20:45:23.000000000 +1000 > @@ -165,7 +165,6 @@ > > void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out) > { > - int i; > int shift; > struct kiss_config *t = (struct kiss_config *)table; > shift = maximize_range(in, in, 32000, t->N); > @@ -188,9 +187,10 @@ > } > #endif > > +void kiss_fftri2(kiss_fftr_cfg cfg,const kiss_fft_sc...
2007 Jun 14
2
Blackfin inline assembler and VisualDSP++ toolchain
...before. Just about everything fails. Some things fail during compilation, the rest during final assembling pass. Thinking about it, the problem is probably not in the asm syntax, but in a way by each the compiler treats the asm keyword. For example, for the following function: ----- static inline spx_word16_t MAX16(spx_word16_t a, spx_word16_t b) { spx_word32_t res; __asm__ ( "%1 = %1.L (X);\n\t" "%2 = %2.L (X);\n\t" "%0 = MAX(%1,%2);" : "=d" (res) : "%d" (a), "d" (b) ); return res; } --- Compiler s...
2006 Nov 15
0
Quick survey for Speex 1.2
...on, all the memory allocations are collected > > together to form one big structure like below, > > > > typedef struct { > > > > EncState enc_state; > > > > char stack[NB_ENC_STACK]; > > > > spx_word16_t winBuf[80]; > > > > spx_word16_t excBuf[612]; > > > > spx_word16_t swBuf[612]; > > > > spx_word16_t lagWindow[22]; > > Yuk. That's so.... G.729 and ITU codecs :-) As much as you'd like > something like that, it would be a pain to maintai...
2005 Dec 20
3
CVS compilation and EVC++ 4.0
Hi all, I'd like you to know i'm not able to build Speex library anymore from CVS without modfing the code in mdf.c. This is due to the fact that EVC++ compiler doesn't like memory allocations in this form: spx_word16_t w[N]; where N is not a constant. I know this is not an error for gcc compiler and ANSI standard but it is in VS2005 and EVC++ 4.0 If someone knows how to compile this with a MS compiler i would apreciate it. Regards Fabio -------------- next part -------------- An HTML attachment was scrubbed......
2009 Jun 13
1
Resampler saturation
...lease to > include the resampler and it had many bugs. I suggest trying > to get 1.2rc1 (or latest git) working. Hi, I found the problem preventing to use version >= 1.2beta3. After the patch for SSE, resampler_basic_direct_single() has been modified to use float instead of the generic spx_word16_t type... Anyway, float implementation is perfect, because handling saturation when converting back to int. After reconverting to spx_word16_t, the fixed point version is now good, except for saturation. Using MULT16_16 for convolution, we have 1 guard bit, which seems to be enough in resampler_ba...
2004 Aug 06
1
Error in compiling Speexdec code (Speex-1.1.5 code) on Windows using VC++6.0
...9;{' error4.d:\speex\speex-1.1.5\libspeex\preprocess.c(974) : error C2143: syntax error : missing ';' before 'type' error 5.d:\speex\speex-1.1.5\libspeex\preprocess.c(1011) : error C2065: 'i' : undeclared identifier The source of the error is this function tatic inline spx_word16_t spx_cos(spx_word16_t x) { if (x<SPX_PI_2) { x *= x; return C1 + x*(C2+x*(C3+C4*x)); } else { x = M_PI-x; x *= x; return -(C1 + x*(C2+x*(C3+C4*x))); } } Is the definition of this function in someway related to ogg_static file? Please help. Thanks &...
2007 Sep 14
1
innov_save, what is it? why does it hurt me so?
...) clears the allocated memory, but maybe you have changed this. >> it will just start filling data in, which it shouldn't. I see that >> innov_save is set at the beginning of a for loop at: >> for (sub=0;sub<st->nbSubframes;sub++) >> { > ... >> spx_word16_t *innov_save = NULL; >> spx_word16_t tmp;... > >> but for some reason that never made a difference even though I know I >> stepped over it in the code. That is because this is a local variable used only within this loop, and is different from the field of the same name i...