Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2013-07-16 02:51:24 +0400
committerGregory Maxwell <greg@xiph.org>2013-07-16 02:51:24 +0400
commit5280c71883e4a2d072d6f69ab7c9b6dc7ace66dc (patch)
tree71052cb37fb1bcc0d9778131f21b836e0acbcb55 /src/opus_compare.c
parent4effd308828dd6bbbd1ad210c63d6518161b640d (diff)
Revert "Fixes a number of double promotions and missing casts."
This reverts commit 43279728cd39947f95dbf77557a0a698f164fdd1.
Diffstat (limited to 'src/opus_compare.c')
-rw-r--r--src/opus_compare.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opus_compare.c b/src/opus_compare.c
index b73f4544..06c67d75 100644
--- a/src/opus_compare.c
+++ b/src/opus_compare.c
@@ -75,7 +75,7 @@ static size_t read_pcm16(float **_samples,FILE *_fin,int _nchannels){
int s;
s=buf[2*(xi*_nchannels+ci)+1]<<8|buf[2*(xi*_nchannels+ci)];
s=((s&0xFFFF)^0x8000)-0x8000;
- samples[(nsamples+xi)*_nchannels+ci]=(float)s;
+ samples[(nsamples+xi)*_nchannels+ci]=s;
}
}
nsamples+=nread;
@@ -230,7 +230,7 @@ int main(int _argc,const char **_argv){
/*Read in the data and allocate scratch space.*/
xlength=read_pcm16(&x,fin1,2);
if(nchannels==1){
- for(xi=0;xi<xlength;xi++)x[xi]=.5f*(x[2*xi]+x[2*xi+1]);
+ for(xi=0;xi<xlength;xi++)x[xi]=.5*(x[2*xi]+x[2*xi+1]);
}
fclose(fin1);
ylength=read_pcm16(&y,fin2,nchannels);
@@ -346,7 +346,7 @@ int main(int _argc,const char **_argv){
float re;
float im;
re=Y[(xi*yfreqs+xj)*nchannels+ci]/X[(xi*NFREQS+xj)*nchannels+ci];
- im=re-(float)log(re)-1;
+ im=re-log(re)-1;
/*Make comparison less sensitive around the SILK/CELT cross-over to
allow for mode freedom in the filters.*/
if(xj>=79&&xj<=81)im*=0.1F;
@@ -364,7 +364,7 @@ int main(int _argc,const char **_argv){
err+=Ef*Ef;
}
err=pow(err/nframes,1.0/16);
- Q=100*(1-0.5f*(float)log(1+err)/log(1.13f));
+ Q=100*(1-0.5*log(1+err)/log(1.13));
if(Q<0){
fprintf(stderr,"Test vector FAILS\n");
fprintf(stderr,"Internal weighted error is %f\n",err);