Renamed celt_word* to opus_val*
This commit is contained in:
parent
f9d14f8d77
commit
ff5f7228fd
31 changed files with 401 additions and 401 deletions
|
@ -24,7 +24,7 @@ void testdiv(void)
|
|||
for (i=1;i<=327670;i++)
|
||||
{
|
||||
double prod;
|
||||
celt_word32 val;
|
||||
opus_val32 val;
|
||||
val = celt_rcp(i);
|
||||
#ifdef FIXED_POINT
|
||||
prod = (1./32768./65526.)*val*i;
|
||||
|
@ -45,7 +45,7 @@ void testsqrt(void)
|
|||
for (i=1;i<=1000000000;i++)
|
||||
{
|
||||
double ratio;
|
||||
celt_word16 val;
|
||||
opus_val16 val;
|
||||
val = celt_sqrt(i);
|
||||
ratio = val/sqrt(i);
|
||||
if (fabs(ratio - 1) > .0005 && fabs(val-sqrt(i)) > 2)
|
||||
|
@ -102,7 +102,7 @@ void testexp2log2(void)
|
|||
#else
|
||||
void testlog2(void)
|
||||
{
|
||||
celt_word32 x;
|
||||
opus_val32 x;
|
||||
for (x=8;x<1073741824;x+=(x>>3))
|
||||
{
|
||||
float error = fabs((1.442695040888963387*log(x/16384.0))-celt_log2(x)/1024.0);
|
||||
|
@ -116,7 +116,7 @@ void testlog2(void)
|
|||
|
||||
void testexp2(void)
|
||||
{
|
||||
celt_word16 x;
|
||||
opus_val16 x;
|
||||
for (x=-32768;x<-30720;x++)
|
||||
{
|
||||
float error1 = fabs(x/2048.0-(1.442695040888963387*log(celt_exp2(x)/65536.0)));
|
||||
|
@ -131,7 +131,7 @@ void testexp2(void)
|
|||
|
||||
void testexp2log2(void)
|
||||
{
|
||||
celt_word32 x;
|
||||
opus_val32 x;
|
||||
for (x=8;x<65536;x+=(x>>3))
|
||||
{
|
||||
float error = fabs(x-0.25*celt_exp2(celt_log2(x)<<1))/16384;
|
||||
|
@ -145,10 +145,10 @@ void testexp2log2(void)
|
|||
|
||||
void testilog2(void)
|
||||
{
|
||||
celt_word32 x;
|
||||
opus_val32 x;
|
||||
for (x=1;x<=268435455;x+=127)
|
||||
{
|
||||
celt_word32 error = abs(celt_ilog2(x)-(int)floor(log2(x)));
|
||||
opus_val32 error = abs(celt_ilog2(x)-(int)floor(log2(x)));
|
||||
if (error!=0)
|
||||
{
|
||||
printf("celt_ilog2 failed: celt_ilog2(x)!=floor(log2(x)) (x = %d, error = %d)\n",x,error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue