search for: q15_one

Displaying 5 results from an estimated 5 matches for "q15_one".

2007 Nov 05
2
[patch] speex_preprocess_ctl
...================================ > > --- libspeex/preprocess.c (revision 13983) > > +++ libspeex/preprocess.c (arbetskopia) > > @@ -1126,16 +1126,16 @@ > > break; > > > > case SPEEX_PREPROCESS_SET_PROB_START: > > - *(spx_int32_t*)ptr = MIN32(Q15_ONE,MAX32(0, *(spx_int32_t*) > > ptr)); > > - st->speech_prob_start = DIV32_16(MULT16_16(32767,* > > (spx_int32_t*)ptr), 100); > > + *(spx_int32_t*)ptr = MIN32(100,MAX32(0, *(spx_int32_t*)ptr)); > > + st->speech_prob_start = DIV32_16(MULT16_16(Q15ONE...
2007 Oct 29
1
[patch] speex_preprocess_ctl
...--- Index: libspeex/preprocess.c =================================================================== --- libspeex/preprocess.c (revision 13983) +++ libspeex/preprocess.c (arbetskopia) @@ -1126,16 +1126,16 @@ break; case SPEEX_PREPROCESS_SET_PROB_START: - *(spx_int32_t*)ptr = MIN32(Q15_ONE,MAX32(0, *(spx_int32_t*)ptr)); - st->speech_prob_start = DIV32_16(MULT16_16(32767,*(spx_int32_t*)ptr), 100); + *(spx_int32_t*)ptr = MIN32(100,MAX32(0, *(spx_int32_t*)ptr)); + st->speech_prob_start = DIV32_16(MULT16_16(Q15ONE,*(spx_int32_t*)ptr), 100); break; case SPE...
2007 Sep 17
1
Possible fixed point overflow/div 0 preprocess.c
...ithin 'speex_preprocess_run', I received a floating point exception even when compiled with -DFIXED_POINT. The reason is as follows: <original beta calculation within speex_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 occur...
2007 Nov 05
0
[patch] speex_preprocess_ctl
...=========== >>> --- libspeex/preprocess.c (revision 13983) >>> +++ libspeex/preprocess.c (arbetskopia) >>> @@ -1126,16 +1126,16 @@ >>> break; >>> >>> case SPEEX_PREPROCESS_SET_PROB_START: >>> - *(spx_int32_t*)ptr = MIN32(Q15_ONE,MAX32(0, *(spx_int32_t*) >>> ptr)); >>> - st->speech_prob_start = DIV32_16(MULT16_16(32767,* >>> (spx_int32_t*)ptr), 100); >>> + *(spx_int32_t*)ptr = MIN32(100,MAX32(0, *(spx_int32_t*)ptr)); >>> + st->speech_prob_start = DIV32_16(MUL...
2008 Feb 19
4
Patch for Analog Devices compiler & fixed-point AGC
...e_psd16(st->bnk,st->gain_floor+N, st->gain_floor); /* Compute gain according to the Ephraim-Malah algorithm -- linear frequency */ for (i=0;i<N;i++) @@ -933,7 +933,7 @@ tmp = MULT16_16_P15(p,spx_sqrt(SHL32(EXTEND32(st->gain[i]),15))) + MULT16_16_P15(SUB16(Q15_ONE,p),spx_sqrt(SHL32(EXTEND32(st->gain_floor[i]),15))); st->gain2[i]=SQR16_Q15(tmp); } - filterbank_compute_psd16(st->bank,st->gain2+N, st->gain2); + filterbank_compute_psd16(st->bnk,st->gain2+N, st->gain2); } /* If noise suppression is o...