search for: shr32

Displaying 20 results from an estimated 27 matches for "shr32".

Did you mean: pshr32
2005 Nov 05
2
Noisy sound quality with Blackfin in WB-mode
Hello Jean-Marc, > Got any luck with the Blackfin stuff? One thing I forgot mentioning that > would probably help a lot in narrowing down the bug is to simply disable > assembly functions one by one and see which one breaks Speex. sorry that I didn't reply for some days. Unfortunately I had some other serious problems with my software which are not related to Speex. I hope to solve
2006 Apr 18
2
Major internal changes, TI DSP build change
...What > I am seeing out of the decoder is an extremely low signal (sample values of > +/-10, in this build, by build 11126 the output is almost all zeros). That's quite strange, but I think I figured it out. Could you try changing the definition of SHL32 in fixed_generic.h from #define SHR32(a,shift) ((a) >> (shift)) to #define SHR32(a,shift) (((spx_word32_t)(a)) >> (shift)) This is not the correct fix, but if it does solve the problem, then I know how to fix it properly (by using EXTEND32) in svn. > It may be a compiler hiccup in scaling/shifting, or else somehow the...
2005 Nov 09
0
Noisy sound quality with Blackfin in WB-mode
...quot;, "P3", "P4", "R0", "R1", "R2", "R3", "R4", "I0", "I1", "L0", "L1", "B0", "B1", "memory" ); + + + for ( i=1; i<lag; i++ ) + { + ac[i]=SHR32(ac32[i+(10-(lag-1))], ac_shift); + } + + d=0; for (j=0;j<n;j++) { d = ADD32(d,SHR32(MULT16_16(x[j],x[j]), shift)); } - ac32[0] = d; - - for (i=0;i<lag;i++) - { - d=0; - for (j=i;j<lag_1;j++) - { - d = ADD32(d,SHR32(MULT16_16(x[j],x...
2005 Dec 12
2
More floating point errors
Hi! It seems that using a different compiler (I assume the development is done with MSC) uncovers various issues with the floating point. Here is the second one I'm seeing - DOMAIN error from sqrt(). In the open_loop_nbest_pitch(), this line: g = DIV32(corr[i-start], 10+SHR32(MULT16_16(spx_sqrt(e0),spx_sqrt(energy[i-start]) ),6)); The values are: e0 is 7.2 i is 142, start is 17 energy [i-start] is -2.1004911E-015 Hope this information is enough to go on. Tia, .a -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pi...
2005 Nov 12
2
Noisy sound quality with Blackfin in WB-mode
...t;, "R0", "R1", "R2", > "R3", "R4", "I0", "I1", "L0", "L1", "B0", "B1", "memory" > ); > + > + > + for ( i=1; i<lag; i++ ) > + { > + ac[i]=SHR32(ac32[i+(10-(lag-1))], ac_shift); > + } > + > + > d=0; > for (j=0;j<n;j++) > { > d = ADD32(d,SHR32(MULT16_16(x[j],x[j]), shift)); > } > - ac32[0] = d; > - > - for (i=0;i<lag;i++) > - { > - d=0; > - for (j=i...
2009 Oct 26
1
[PATCH] Fix miscompile of SSE resampler
...ampler_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_basic_direct_double(SpeexResamplerState *st, spx_uint32_t c } sum = accum[0] + accum[1] + accum[2] + accum[3]; #else - sum = inner_product_double(sinc, iptr, N); + inner_product_double(&sum, sinc, iptr, N); #en...
2008 Feb 02
0
Patch to make analysis data available.
...TS: + { + spx_int32_t *w = (spx_int32_t *)ptr; + int N = st->window_size; + int n = st->frame_size; + int M = st->M; + int i, j; + spx_word32_t t1, t2, t3; + for(i=0;i<M;i++) { + w[i*n] = 0; + w[(i+1)*n-1] = 0; + for(j=1;j<n-1;j++) { + t1 = MULT16_16(SHR32(st->W[i*N+j*2],16), SHR32(st->W[i*N+j*2],15)); + t2 = MULT16_16(SHR32(st->W[i*N+j*2-1],16), SHR32(st->W[i*N+j*2-1],15)); + t3 = MULT16_16(100,spx_sqrt(ADD32(t1,t2))); + w[i*n+j] = SHR32(t3, WEIGHT_SHIFT); + } + } + } + break; default: speex_warning_in...
2010 Nov 16
1
Possible bug in "pitch_downsample"
Hi Jean-Marc, I could be way off base here, but it seems to me that line 115 in pitch.c in the function "pitch_downsample": x_lp[i] = SHR32(HALF32(HALF32(x[1][(2*i-1)]+x[1][(2*i+1)])+x[1][2*i]), SIG_SHIFT+2); should actually be: x_lp[i] += SHR32(HALF32(HALF32(x[1][(2*i-1)]+x[1][(2*i+1)])+x[1][2*i]), SIG_SHIFT+2); Sorry if I'm totally misreading things and just wasting your time. Cheers, John Ridges
2006 Apr 19
0
Major internal changes, TI DSP build change
...he decoder is an extremely low signal (sample values >> of >> +/-10, in this build, by build 11126 the output is almost all zeros). > > That's quite strange, but I think I figured it out. Could you try > changing the definition of SHL32 in fixed_generic.h from > #define SHR32(a,shift) ((a) >> (shift)) > to > #define SHR32(a,shift) (((spx_word32_t)(a)) >> (shift)) > > This is not the correct fix, but if it does solve the problem, then I > know how to fix it properly (by using EXTEND32) in svn. > >> It may be a compiler hiccup in scalin...
2011 Sep 01
0
[PATCH 3/5] resample: Add NEON optimized inner_product_single for fixed point
...een changed to contain the final right shift and saturation so it can also be implemented in the optimal way for the used platform. This change affects fixed point calculations only. I also added a new fixed point macro SATURATE32PSHR(x, shift, a). It does pretty much the same thing as SATURATE32(PSHR32(x, shift), a), but it avoids over flowing in rounding up phase in the rare occasion where x has already been saturated. It should also be slightly faster. --- libspeex/arch.h | 1 + libspeex/fixed_generic.h | 4 ++ libspeex/resample.c | 10 ++++- libspeex/resample_neon.h | 1...
2006 Feb 14
0
Bug in vbr_analysis
...nt is > done with MSC) uncovers various issues with the floating point. No, all development is done on gcc/Linux. > Here is the second one I'm seeing - DOMAIN error from sqrt(). > > In the open_loop_nbest_pitch(), this line: > > g = DIV32(corr[i-start], 10 > +SHR32(MULT16_16(spx_sqrt(e0),spx_sqrt(energy[i-start])), 6)); change that to: g = DIV32(corr[i-start], 10+SHR32(MULT16_16(spx_sqrt(e0),spx_sqrt(1 +energy[i-start])),6)); (note the "1+" in the spx_sqrt) As for this appearing only on some version/compiler configurations, the only explanation...
2008 Jan 26
1
Shift count warning messages
...Jim, Thanks a lot for investigating. It definitely makes sense now. I'll fix the problem now. Is there any other place where you see that same (or similar) problem? Jean-Marc Jim Crichton a ?crit : > Jean-Marc, > > I dug into this further, and found that the warning occurred when PSHR32 > had a shift greater than 15. > > in fixed_generic.h, PSHR32 is defined as: > > #define PSHR32(a,shift) (SHR32((a)+((1<<((shift))>>1)),shift)) > > For 16-bit compilers the "1" needs a cast: > > #define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)&lt...
2006 Jun 01
1
Fixed-point version
...ers (lots of them), I have no practice in working with fixed-point versions of such numbers. For instance, in the first source I'm trying to work with, nb_celp.c, it is hard to see that the following two lines of code yield the same result: #ifdef FIXED_POINT fact = SHR16(19661,SHR32(lsp_dist,LSP_SHIFT+2)); #else fact = .6*exp(-.2*lsp_dist); #endif Now, some questions. 1) When dealing with float constants, like .00001 or 0.05, to express them in fixed-point should I just scale them with the appropriate constants from arch.h? 2) If so, which scaling should I use? T...
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 Jan 23
2
Shift count warning messages
...'ve noticed this on the echo canceller and the preprocessor. all >>>> pretty much related to these two lines of code: >>>> >>>> kiss_fft C_MUL4(scratch[0],Fout[m] , *tw1 ); >>>> >>>> mdf.c st->wtmp2[i] = >>>> EXTRACT16(PSHR32(st->W[j*N+i],NORMALIZE_SCALEDOWN+16)); >>>> >>>> Is there some kind of switch I was supposed to throw to not get >>>> these messages? if not-are they hurting anything? >>>> >>>> -Mike >>>> >>>> >>>> &...
2008 Jan 25
0
Shift count warning messages
Jean-Marc, I dug into this further, and found that the warning occurred when PSHR32 had a shift greater than 15. in fixed_generic.h, PSHR32 is defined as: #define PSHR32(a,shift) (SHR32((a)+((1<<((shift))>>1)),shift)) For 16-bit compilers the "1" needs a cast: #define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)<<((shift))>>1)),shift)) This chan...
2006 Apr 17
2
Major internal changes, TI DSP build change
> 1. I got a compile error at line 410 in nb_celp.c, because this compiler > will not allow variable declarations in the midst of executable code. I > fixed this by bracketing this code block: Thanks for letting me know. I just fixed it in svn. > 2: The decoder is broken. Running the Male.wav test file, I get all zeros > out for the first 5 seconds, then 8 samples ranging
2006 May 01
2
Re: speex echo cancellation limitations
> I am writing to gain a better understanding of the limitations of speex echo > cancellation, esp. with respect to the fixed point implementation. > If these limitations have been documented elsewhere already, please let me > know! Nothing officially documented, sorry. > I observe experimentally that when one or both of the echo or ref data for > speex_echo_cancel() have
2006 Apr 19
2
Major internal changes, TI DSP build change
> You found it. The SHL32 (not SHR32) line fixes the problem. It must be > doing a 16-bit shift, then extending the result (which is reasonable). As > it happens, that it the same macro which gave us trouble last May > (25th/26th), when the C55 build was more subtlely broken. Yes, that's what I finally remembered. I...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...GAMMA_SCALING 1. #define GAIN_SCALING 1. #define GAIN_SCALING_1 1. #define LPC_SHIFT 0 #define SIG_SHIFT 0 #define VERY_SMALL 1e-15 #define NEG16(x) (-(x)) #define NEG32(x) (-(x)) #define EXTRACT16(x) (x) #define EXTEND32(x) (x) #define SHR16(a,shift) (a) #define SHL16(a,shift) (a) #define SHR32(a,shift) (a) #define SHL32(a,shift) (a) #define PSHR16(a,shift) (a) #define PSHR32(a,shift) (a) #define SATURATE16(x,a) (x) #define SATURATE32(x,a) (x) #define PSHR(a,shift) (a) #define SHR(a,shift) (a) #define SHL(a,shift) (a) #define SATURATE(x,a) (x) #define ADD16(a,b) ((a)+(...