pkgsrc/audio/mpg123/patches/patch-ak
simonb b55ba7a0d1 Add fixed-point support used by the arm32.
XXX: Uses strongarm C-compiler options to use 32x32=64 int multiply.
1999-10-12 04:43:11 +00:00

40 lines
1.5 KiB
Text

$NetBSD: patch-ak,v 1.1 1999/10/12 04:43:15 simonb Exp $
--- tabinit.c.orig Mon Feb 15 23:55:11 1999
+++ tabinit.c Thu Aug 12 17:31:33 1999
@@ -56,7 +56,7 @@
kr=0x10>>i; divv=0x40>>i;
costab = pnts[i];
for(k=0;k<kr;k++)
- costab[k] = 1.0 / (2.0 * cos(M_PI * ((double) k * 2.0 + 1.0) / (double) divv));
+ costab[k] = DOUBLE_TO_REAL(1.0 / (2.0 * cos(M_PI * ((double) k * 2.0 + 1.0) / (double) divv)));
#ifdef USE_3DNOW
for(k=0;k<kr;k++)
costab[k+kr] = -costab[k];
@@ -69,7 +69,7 @@
for(i=0,j=0;i<256;i++,j++,idx+=32)
{
if(idx < 512+16)
- decwin[idx+16] = decwin[idx] = (double) intwinbase[j] / 65536.0 * (double) scaleval;
+ decwin[idx+16] = decwin[idx] = DOUBLE_TO_REAL((double) intwinbase[j] / 65536.0 * (double) scaleval);
if(i % 32 == 31)
idx -= 1023;
@@ -80,7 +80,7 @@
for( /* i=256 */ ;i<512;i++,j--,idx+=32)
{
if(idx < 512+16)
- decwin[idx+16] = decwin[idx] = (double) intwinbase[j] / 65536.0 * (double) scaleval;
+ decwin[idx+16] = decwin[idx] = DOUBLE_TO_REAL((double) intwinbase[j] / 65536.0 * (double) scaleval);
if(i % 32 == 31)
idx -= 1023;
@@ -91,7 +91,7 @@
#ifdef USE_3DNOW
if(!param.down_sample) {
for(i=0;i<512+32;i++) {
- decwin[512+31-i] *= 65536.0; /* allows faster clipping in 3dnow code */
+ decwin[512+31-i] = REAL_MUL(decwin[512+31-i], 65536.0); /* allows faster clipping in 3dnow code */
decwin[512+32+i] = decwin[512+31-i];
}
}