ref: b0b6d6aeac82704ebc04091e538eb84b6eae59fd
parent: d401961a1858c616fac95ffc8065539a47c3f2df
author: Mark Harris <mark.hsj@gmail.com>
date: Thu Jul 21 17:39:41 EDT 2016
test_opus_decode: Check all soft clip samples
--- a/tests/test_opus_decode.c
+++ b/tests/test_opus_decode.c
@@ -384,13 +384,13 @@
{
for (j=0;j<1024;j++)
{
- x[j]=(i&255)*(1/32.f)-4.f;
+ x[j]=(j&255)*(1/32.f)-4.f;
}
opus_pcm_soft_clip(&x[i],1024-i,1,s);
for (j=i;j<1024;j++)
{
- if(x[i]>1.f)test_failed();
- if(x[i]<-1.f)test_failed();
+ if(x[j]>1.f)test_failed();
+ if(x[j]<-1.f)test_failed();
}
}
for(i=1;i<9;i++)
@@ -397,13 +397,13 @@
{
for (j=0;j<1024;j++)
{
- x[j]=(i&255)*(1/32.f)-4.f;
+ x[j]=(j&255)*(1/32.f)-4.f;
}
opus_pcm_soft_clip(x,1024/i,i,s);
for (j=0;j<(1024/i)*i;j++)
{
- if(x[i]>1.f)test_failed();
- if(x[i]<-1.f)test_failed();
+ if(x[j]>1.f)test_failed();
+ if(x[j]<-1.f)test_failed();
}
}
opus_pcm_soft_clip(x,0,1,s);