pkgsrc/audio/mpg123/patches/patch-ad
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

75 lines
2 KiB
Text

$NetBSD: patch-ad,v 1.3 1999/10/12 04:43:12 simonb Exp $
--- dct64.c.orig Sat Sep 20 21:16:04 1997
+++ dct64.c Thu Aug 12 23:28:33 1999
@@ -29,7 +29,7 @@
for(i=15;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=15;i>=0;i--)
- *bs++ = (*--b2 - *b1++) * *--costab;
+ *bs++ = REAL_MUL((*--b2 - *b1++), *--costab);
b1 = bufs;
costab = pnts[1]+8;
@@ -39,13 +39,13 @@
for(i=7;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=7;i>=0;i--)
- *bs++ = (*--b2 - *b1++) * *--costab;
+ *bs++ = REAL_MUL((*--b2 - *b1++), *--costab);
b2 += 32;
costab += 8;
for(i=7;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=7;i>=0;i--)
- *bs++ = (*b1++ - *--b2) * *--costab;
+ *bs++ = REAL_MUL((*b1++ - *--b2), *--costab);
b2 += 32;
}
@@ -58,12 +58,12 @@
for(i=3;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=3;i>=0;i--)
- *bs++ = (*--b2 - *b1++) * costab[i];
+ *bs++ = REAL_MUL((*--b2 - *b1++), costab[i]);
b2 += 16;
for(i=3;i>=0;i--)
*bs++ = (*b1++ + *--b2);
for(i=3;i>=0;i--)
- *bs++ = (*b1++ - *--b2) * costab[i];
+ *bs++ = REAL_MUL((*b1++ - *--b2), costab[i]);
b2 += 16;
}
@@ -75,13 +75,13 @@
{
*bs++ = (*b1++ + *--b2);
*bs++ = (*b1++ + *--b2);
- *bs++ = (*--b2 - *b1++) * costab[1];
- *bs++ = (*--b2 - *b1++) * costab[0];
+ *bs++ = REAL_MUL((*--b2 - *b1++), costab[1]);
+ *bs++ = REAL_MUL((*--b2 - *b1++), costab[0]);
b2 += 8;
*bs++ = (*b1++ + *--b2);
*bs++ = (*b1++ + *--b2);
- *bs++ = (*b1++ - *--b2) * costab[1];
- *bs++ = (*b1++ - *--b2) * costab[0];
+ *bs++ = REAL_MUL((*b1++ - *--b2), costab[1]);
+ *bs++ = REAL_MUL((*b1++ - *--b2), costab[0]);
b2 += 8;
}
bs = bufs;
@@ -92,10 +92,10 @@
real v0,v1;
v0=*b1++; v1 = *b1++;
*bs++ = (v0 + v1);
- *bs++ = (v0 - v1) * (*costab);
+ *bs++ = REAL_MUL((v0 - v1), (*costab));
v0=*b1++; v1 = *b1++;
*bs++ = (v0 + v1);
- *bs++ = (v1 - v0) * (*costab);
+ *bs++ = REAL_MUL((v1 - v0), (*costab));
}
}