diff options
Diffstat (limited to 'apps/codecs/libspeex/vorbis_psy.c')
-rw-r--r-- | apps/codecs/libspeex/vorbis_psy.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/codecs/libspeex/vorbis_psy.c b/apps/codecs/libspeex/vorbis_psy.c index 91cf49c69c..2032bf63e2 100644 --- a/apps/codecs/libspeex/vorbis_psy.c +++ b/apps/codecs/libspeex/vorbis_psy.c | |||
@@ -90,9 +90,9 @@ static void _analysis_output(char *base,int i,float *v,int n,int bark,int dB){ | |||
90 | if(dB){ | 90 | if(dB){ |
91 | float val; | 91 | float val; |
92 | if(v[j]==0.) | 92 | if(v[j]==0.) |
93 | val=-140.; | 93 | val=-140.; |
94 | else | 94 | else |
95 | val=todB(v[j]); | 95 | val=todB(v[j]); |
96 | fprintf(of,"%f\n",val); | 96 | fprintf(of,"%f\n",val); |
97 | }else{ | 97 | }else{ |
98 | fprintf(of,"%f\n",v[j]); | 98 | fprintf(of,"%f\n",v[j]); |
@@ -254,19 +254,19 @@ static void bark_noise_hybridmp(int n,const long *b, | |||
254 | } | 254 | } |
255 | 255 | ||
256 | static void _vp_noisemask(VorbisPsy *p, | 256 | static void _vp_noisemask(VorbisPsy *p, |
257 | float *logfreq, | 257 | float *logfreq, |
258 | float *logmask){ | 258 | float *logmask){ |
259 | 259 | ||
260 | int i,n=p->n/2; | 260 | int i,n=p->n/2; |
261 | float *work=alloca(n*sizeof(*work)); | 261 | float *work=alloca(n*sizeof(*work)); |
262 | 262 | ||
263 | bark_noise_hybridmp(n,p->bark,logfreq,logmask, | 263 | bark_noise_hybridmp(n,p->bark,logfreq,logmask, |
264 | 140.,-1); | 264 | 140.,-1); |
265 | 265 | ||
266 | for(i=0;i<n;i++)work[i]=logfreq[i]-logmask[i]; | 266 | for(i=0;i<n;i++)work[i]=logfreq[i]-logmask[i]; |
267 | 267 | ||
268 | bark_noise_hybridmp(n,p->bark,work,logmask,0., | 268 | bark_noise_hybridmp(n,p->bark,work,logmask,0., |
269 | p->vi->noisewindowfixed); | 269 | p->vi->noisewindowfixed); |
270 | 270 | ||
271 | for(i=0;i<n;i++)work[i]=logfreq[i]-work[i]; | 271 | for(i=0;i<n;i++)work[i]=logfreq[i]-work[i]; |
272 | 272 | ||
@@ -319,10 +319,10 @@ VorbisPsy *vorbis_psy_init(int rate, int n) | |||
319 | float bark=toBARK(rate/(2*n)*i); | 319 | float bark=toBARK(rate/(2*n)*i); |
320 | 320 | ||
321 | for(;lo+p->vi->noisewindowlomin<i && | 321 | for(;lo+p->vi->noisewindowlomin<i && |
322 | toBARK(rate/(2*n)*lo)<(bark-p->vi->noisewindowlo);lo++); | 322 | toBARK(rate/(2*n)*lo)<(bark-p->vi->noisewindowlo);lo++); |
323 | 323 | ||
324 | for(;hi<=n && (hi<i+p->vi->noisewindowhimin || | 324 | for(;hi<=n && (hi<i+p->vi->noisewindowhimin || |
325 | toBARK(rate/(2*n)*hi)<(bark+p->vi->noisewindowhi));hi++); | 325 | toBARK(rate/(2*n)*hi)<(bark+p->vi->noisewindowhi));hi++); |
326 | 326 | ||
327 | p->bark[i]=((lo-1)<<16)+(hi-1); | 327 | p->bark[i]=((lo-1)<<16)+(hi-1); |
328 | 328 | ||